06-30-2015, 01:12 AM
Most popular compilers for c/c++ accept the 0b prefix.
It's a bit of a habit to write in bytes and not in nibbles or even smaller like 11.
Code:
int i = 0;
i = 42; // decimal
i = 0x2a; // hex
i = 052; // octa
i = 0b00101010; // binair
It's a bit of a habit to write in bytes and not in nibbles or even smaller like 11.