How to use bitset/read on 16bit numbers (Arduino) 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
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);