If statement - checking only the first 5 MSB's.

I've posted this around the place a few times, but here is a portable binary constant generator: A little something I would like to share. - Programming Questions - Arduino Forum

It allows binary constants separated every 8 bits.

uint8_t u_6 = B8(00000110);  //6

uint16_t u_AABB = B16( 10101010, 10111011 ); //43707

uint32_t u_AABBCCDD = B32( 10101010, 10111011, 11001100, 11011101 ); //2864434397