bit shifting

Just like that, but your array definition is all wrong:
'B0001' is not the same as B0001, B0001 is an number type, 'B0001' is an ASCII char type and will give the value 'B', decimal 66 (he other characters are ignored)