Building a large array of booleans with the modulo trick


A poster on xsibase asks “how can a build an array of booleans where the pattern 0101 is repeated 256 times?”

Here’s how:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s