Number Base Reference
| Decimal | Binary | Hex | Octal |
|---|---|---|---|
| 0 | 0000 | 0 | 0 |
| 8 | 1000 | 8 | 10 |
| 10 | 1010 | A | 12 |
| 15 | 1111 | F | 17 |
| 16 | 10000 | 10 | 20 |
| 255 | 11111111 | FF | 377 |
Convert between binary (base 2), decimal (base 10), hexadecimal (base 16), and octal (base 8). Enter a value in any field and all others update automatically.
| Decimal | Binary | Hex | Octal |
|---|---|---|---|
| 0 | 0000 | 0 | 0 |
| 8 | 1000 | 8 | 10 |
| 10 | 1010 | A | 12 |
| 15 | 1111 | F | 17 |
| 16 | 10000 | 10 | 20 |
| 255 | 11111111 | FF | 377 |
Decimal uses powers of ten; binary uses powers of two. Each position doubles as you move left: 1, 2, 4, 8, 16, 32, 64, 128.
Reading 1011 from the right: 1 + 2 + 0 + 8 = 11.
Divide repeatedly by 2 and read the remainders bottom to top. For 13: 13÷2 = 6 r1, 6÷2 = 3 r0, 3÷2 = 1 r1, 1÷2 = 0 r1 → 1101.
Hex is base 16, using 0–9 then A–F for 10–15. Its value is that one hex digit maps exactly to four binary digits, so long binary strings compress cleanly.
| Dec | Bin | Hex |
|---|---|---|
| 8 | 1000 | 8 |
| 10 | 1010 | A |
| 15 | 1111 | F |
| 255 | 11111111 | FF |
This is why colour codes look like #FF8800 — three pairs of hex digits, each a byte from 0 to 255 for red, green and blue.
A circuit reliably distinguishes two states — voltage present or absent — far more easily than ten. Everything above that is built on the same two symbols: text through character encodings, images through pixel values, instructions through opcodes.
It also explains why storage sizes cluster on powers of two. 256, 512, 1024 are round numbers in binary even though they look arbitrary in decimal.