How to use the binary, hex & decimal converter
- Click the box for the number system you have, for example Binary.
- Type or paste your number. The other three boxes fill in straight away.
- Click Copy next to the result you need.
The four number systems
| System | Base | Digits used | The number 255 |
|---|---|---|---|
| Decimal | 10 | 0–9 | 255 |
| Binary | 2 | 0 and 1 | 1111 1111 |
| Hexadecimal | 16 | 0–9 and A–F | FF |
| Octal | 8 | 0–7 | 377 |
We count in decimal because we have ten fingers. Computers count in binary because their circuits have two states, on and off. Hexadecimal is a compact way to write binary: one hex digit stands for exactly four binary digits, so a byte is always two hex digits. Octal groups three binary digits and is still used for file permissions on Linux.
How to convert binary to decimal by hand
Each binary digit is worth twice the one to its right: 1, 2, 4, 8, 16 and so on. Add up the values where there is a 1. For 1011: 8 + 0 + 2 + 1 = 11.
How to convert decimal to binary by hand
Divide the number by 2 again and again, writing down each remainder, then read the remainders from last to first. For 13: 13 ÷ 2 = 6 r 1, 6 ÷ 2 = 3 r 0, 3 ÷ 2 = 1 r 1, 1 ÷ 2 = 0 r 1. Read upwards: 1101.
Hex digits at a glance
| Hex | Decimal | Binary | Hex | Decimal | Binary |
|---|---|---|---|---|---|
| 0 | 0 | 0000 | 8 | 8 | 1000 |
| 1 | 1 | 0001 | 9 | 9 | 1001 |
| 2 | 2 | 0010 | A | 10 | 1010 |
| 3 | 3 | 0011 | B | 11 | 1011 |
| 4 | 4 | 0100 | C | 12 | 1100 |
| 5 | 5 | 0101 | D | 13 | 1101 |
| 6 | 6 | 0110 | E | 14 | 1110 |
| 7 | 7 | 0111 | F | 15 | 1111 |
To turn words into binary instead of numbers, use Text to Binary.
Frequently asked questions
How do I convert binary to decimal?
Type the binary number into the Binary box. The decimal value appears in the Decimal box.
How do I convert decimal to hexadecimal?
Type the number into the Decimal box and read the result in the Hexadecimal box.
What is FF in decimal?
FF in hexadecimal is 255 in decimal and 11111111 in binary.
Is there a size limit?
No. The converter handles numbers of any length exactly.