Hi Guys,
Question on a BitField. How will I check the sixth bit in a six bits storage? For example
I know, i will have to use bit mask to check the sixth bit.Code:struct BITF { unsigned Bits:6; unsigned :2; }; struct BITF Buffer; unsigned D; D = (unsigned *)&Buffer; *D = 0x04; if( Buffer.Bits & ??? ) ...
0x04
0000 0100
Buffer.Bits ==> 0000 01
how will i check the sixth bit ( LSB == 1 )?
thanks guys!
~ssharish