I need to check the value of the least significant bit (LSB) and most significant bit (MSB) of an integer in C/C++. How would I do this?
int LSB = value & 1; int MSB = value >> (sizeof(value)*8 - 1) & 1;