gcc: Binary constants
1
1 6.64 Binary Constants using the '0b' Prefix
1 ===========================================
1
1 Integer constants can be written as binary constants, consisting of a
1 sequence of '0' and '1' digits, prefixed by '0b' or '0B'. This is
1 particularly useful in environments that operate a lot on the bit level
1 (like microcontrollers).
1
1 The following statements are identical:
1
1 i = 42;
1 i = 0x2a;
1 i = 052;
1 i = 0b101010;
1
1 The type of these constants follows the same rules as for octal or
1 hexadecimal integer constants, so suffixes like 'L' or 'UL' can be
1 applied.
1