1 - > Bit 1Example:
2 - > Bit 2
4 - > Bit 3
8 - > Bit 4
16 - > Bit 5
32 - > Bit 6
64 - > Bit 7
128 - > Bit 8
if(buffer[0] & 1 == 0){// Frist bit is set to 0}
else{// First bit is set to 1}
if(buffer[0] & 64 == 0){// Bit number 7 is set to 0}else{// Bit number 7 is set to 1}
No comments:
Post a Comment