Bit manipulation across 2 bytes?
I have read up on bit manipulation and understand it fine i.e. How to set certain bits, get certain bits, shift bits etc etc.
However what if the bits are across two bytes? e.g.
Code:
char a = 255;
char b;
char c;
'Char a' is fine as it is handled in one bit. I understand how to work with bits like this.
However, what if I want to assign 400 to characters b and c? Is there a simple way?
I'm a bit confused as you may be able to tell but would appreciate any suggestions.
Thanks in advance