Hexadecimal
Hex (base 16) is a compact way to write binary values. Edit any field to update the others.
What is hexadecimal?
Base 16, and why it makes binary easier to read.
Hexadecimal is a number system that uses 16 digits: 0–9 for zero to nine, and A–F for ten to fifteen.
The useful thing about hex is that one hex digit maps exactly to four binary digits. A group of four bits is called a nibble, so converting between binary and hex is just swapping each nibble for one hex digit.
| Binary | 0100 | 0001 |
| Hex | 4 | 1 |
That means an 8-bit byte is always two hex digits. It is the reason colour codes look like #FF8800 and why memory addresses are written as hex: much shorter than binary, but still a clean view of the underlying bits.
Converter
Hexadecimal, decimal, and binary stay in sync.
Hex keypad
Decimal keypad
Binary keypad
Hex digit reference
The sixteen hex digits and their decimal/binary values.
| Hex | Decimal | Binary |
|---|---|---|
| 0 | 0 | 0000 |
| 1 | 1 | 0001 |
| 2 | 2 | 0010 |
| 3 | 3 | 0011 |
| 4 | 4 | 0100 |
| 5 | 5 | 0101 |
| 6 | 6 | 0110 |
| 7 | 7 | 0111 |
| 8 | 8 | 1000 |
| 9 | 9 | 1001 |
| A | 10 | 1010 |
| B | 11 | 1011 |
| C | 12 | 1100 |
| D | 13 | 1101 |
| E | 14 | 1110 |
| F | 15 | 1111 |