this seems to be working well for me except this one time. I'm trying to get the first 10 bits of this number
unsigned char c= 17512807u<<22>>22;
I expect this to be 359 or 0101100111 but I'm getting 103 or 0001100111. Is there a reason that this is happening?
0101100111is 10 bits.unsigned charis 8 (probably).c(assuming 8-bit characters).uin17512807u, but it is not needed.