I need to work with a binary number.
I tried writing:
const x = 00010000;
But it didn\'t work.
I know that I can use an hex
The "type" of a binary number is the same as any decimal, hex or octal number: int
(or even char, short, long long).
When you assign a constant, you can't assign it with 11011011 (curiously and unfortunately), but you can use hex. Hex is a little easier to mentally translate. Chunk in nibbles (4 bits) and translate to a character in [0-9a-f].