How it works
Hexadecimal counts in base 16, binary counts in base 2. Converting means rewriting the same quantity with a different set of digits — the value never changes, only how it is written.
- Convert each hexadecimal digit to its decimal value and add them up.
- Divide that total by 2, keeping the remainders.
- Read the remainders bottom to top for the binary result.
The reverse conversion is Binary to Hexadecimal, which also handles every other base pair.
Examples
Worked examples, digit by digit:
- 2 (hexadecimal) = 2 in decimal = 10 (binary)
- 5 (hexadecimal) = 5 in decimal = 101 (binary)
- FF (hexadecimal) = 255 in decimal = 11111111 (binary)
| Decimal | Binary | Octal | Hexadecimal |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 |
| 2 | 10 | 2 | 2 |
| 4 | 100 | 4 | 4 |
| 8 | 1000 | 10 | 8 |
| 10 | 1010 | 12 | A |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
| 32 | 100000 | 40 | 20 |
| 64 | 1000000 | 100 | 40 |
| 100 | 1100100 | 144 | 64 |
| 255 | 11111111 | 377 | FF |
Hexadecimal to Binary: frequently asked questions
- How do I convert hexadecimal to binary?
- Replace each hex digit with its 4-bit binary equivalent. For example, hexadecimal 2D is 101101 in binary. The converter above does this instantly for any value.
- What is FF in binary?
- Hexadecimal FF equals 11111111 in binary (the value 255, the largest number that fits in one byte).
- Why are hexadecimal and binary used?
- Hexadecimal (base 16, digits 0–9 and A–F) writes each byte as exactly two characters, which is why it is used for colours (#FF8800), memory addresses and MAC addresses. Binary (base 2) is how computers store data, as bits that are either 0 or 1.
