If you are using GCC then you can use GCC extension for this:
int x = 0b00010000;
http://gcc.gnu.org/onlinedocs/gcc/Binary-constants.html
Binary constants using the '0b' prefixhttp://gcc.gnu.org/onlinedocs/gcc/Binary-constants.html
C operator precedence
http://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B#Operator_precedence
No comments:
Post a Comment