Number bases (decimal hex binary)

Hex prefixes often appear as 0x; binary as 0b in code.

Updated:

DecHexBin
00x00b0
10x10b1
20x20b10
30x30b11
40x40b100
50x50b101
60x60b110
70x70b111
80x80b1000
90x90b1001
100xA0b1010
110xB0b1011
120xC0b1100
130xD0b1101
140xE0b1110
150xF0b1111
160x100b10000
170x110b10001
180x120b10010
190x130b10011
200x140b10100
210x150b10101
220x160b10110
230x170b10111
240x180b11000
250x190b11001
260x1A0b11010
270x1B0b11011
280x1C0b11100
290x1D0b11101
300x1E0b11110
310x1F0b11111
320x200b100000

Notes

Frequently asked questions

What is 32 in hexadecimal and binary?
32 in decimal is 0x20 in hexadecimal and 0b100000 in binary. Hex digits beyond 9 use the letters A–F for the values 10–15.
How many bits does one hex digit represent?
One hex digit represents exactly 4 bits, so two hex digits make one byte (8 bits). That is why hexadecimal maps so neatly onto binary.
What does the 0x prefix mean in programming?
0x marks a literal as hexadecimal, so 0x10 equals 16 in decimal. Binary literals use the 0b prefix, as in 0b1010 = 10.