Convert numbers: binary, octal, decimal, hex and any base
Turn a number into binary, hex or any base and back: for colours, file sizes, permissions or homework. Type in any box; the others follow.
How it is worked out
Type a number above to see each step, a fraction too (0.1, ff.8, 10.101).
Hex digits in binary and decimal
| Hex | Binary | Decimal |
|---|---|---|
| 0 | 0000 | 0 |
| 1 | 0001 | 1 |
| 2 | 0010 | 2 |
| 3 | 0011 | 3 |
| 4 | 0100 | 4 |
| 5 | 0101 | 5 |
| 6 | 0110 | 6 |
| 7 | 0111 | 7 |
| 8 | 1000 | 8 |
| 9 | 1001 | 9 |
| A | 1010 | 10 |
| B | 1011 | 11 |
| C | 1100 | 12 |
| D | 1101 | 13 |
| E | 1110 | 14 |
| F | 1111 | 15 |
Each hex digit is four bits, each octal digit three, so hex to binary is one digit at a time.