user5132: I'm working on an Arduino powered Tetris game. To keep track of the pieces that have fallen and become fixed I have an array of bytes 
byte theGrid[] = {   
B00000000,
B00000000,  
B00000000,
B00000000,
B00000000,
...

This works great when the well is only 8 LEDs wide, but I need it to be 16 wide. Is there a way to perform bitwise operations on a 16 bit number, like a short? I tried just declaring theGrid as a short, but I'm getting this error no matter what I do.
tetris:62: error: 'B0000000000000000' was not declared in this scope

The reason I was using byte is so I could use bitread and bitset. So if an L piece comes down and lands, I can bitset the appropriate bits like this 
bitSet(theGrid[pixelY], 15-pixelX); 

and end up with
B1000000000000000, B1110000000000000


user368: The main problem that you're having is that binary literals don't exist in C; the Arduino libraries get around this by having every single binary value from 1'b0 to 8'b1111_1111 defined as a macro in cores/arduino/binary.h. The obvious workaround is to use octal, decimal, or hexadecimal literals instead.
unsigned short theGrid[] = {
00,
0,
0x0,
 ...
};

Bitwise operations work as normal.
theGrid[pixelY] |= _BV(15 - pixelX);


5132: <p>I'm working on an Arduino powered Tetris game. To keep track of the pieces that have fallen and become fixed I have an array of bytes </p>

<pre><code>byte theGrid[] = {   
B00000000,
B00000000,  
B00000000,
B00000000,
B00000000,
...
</code></pre>

<p>This works great when the well is only 8 LEDs wide, but I need it to be 16 wide. Is there a way to perform bitwise operations on a 16 bit number, like a short? I tried just declaring theGrid as a short, but I'm getting this error no matter what I do.</p>

<pre><code>tetris:62: error: 'B0000000000000000' was not declared in this scope
</code></pre>

<p>The reason I was using byte is so I could use bitread and bitset. So if an L piece comes down and lands, I can bitset the appropriate bits like this </p>

<pre><code>bitSet(theGrid[pixelY], 15-pixelX); 
</code></pre>

<p>and end up with</p>

<pre><code>B1000000000000000, B1110000000000000
</code></pre>
 368: <p>The main problem that you're having is that <em>binary literals don't exist in C</em>; the Arduino libraries get around this by having <strong>every single binary value</strong> from <a href="http://www.asic-world.com/verilog/syntax1.html#Integer_Numbers" rel="nofollow">1'b0</a> to 8'b1111_1111 defined as a macro in <a href="https://github.com/arduino/Arduino/blob/master/hardware/arduino/cores/arduino/binary.h" rel="nofollow"><code>cores/arduino/binary.h</code></a>. The obvious workaround is to use octal, decimal, or hexadecimal literals instead.</p>

<pre><code>unsigned short theGrid[] = {
00,
0,
0x0,
 ...
};
</code></pre>

<p>Bitwise operations work as normal.</p>

<pre><code>theGrid[pixelY] |= _BV(15 - pixelX);
</code></pre>
