Number base converter
Type a number and choose its base to see it in binary, decimal, hexadecimal and octal at once. 255 in decimal is 1111 1111 in binary and FF in hexadecimal.
- Checked on thousands of cases
- Updated November 1, 2026
Decimal (base 10)
Binary (base 2)
Hexadecimal (base 16)
Octal (base 8)
Tap a bit to switch it on or off
Quick challenge
Streak 0Best 0
Test yourself: every answer is computed by the tool, and the wrong choices are the most common traps.
How it works
Formula: 1011₂ = 1×2³ + 0×2² + 1×2¹ + 1×2⁰ = 11
Each digit is worth its value times a power of the base, counted from the right: 1011 in binary is 1×8 + 0×4 + 1×2 + 1×1 = 11. To convert to another base, the number is divided by the new base repeatedly and the remainders are read backwards. Hexadecimal uses the digits 0–9 and the letters A–F (10 to 15); one hex digit stands for exactly four binary digits. The calculator works with whole numbers of any size; prefixes like 0x and 0b are accepted.
Common numbers in binary, octal and hexadecimal
| Decimal | Binary | Octal | Hexadecimal |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 |
| 2 | 10 | 2 | 2 |
| 3 | 11 | 3 | 3 |
| 4 | 100 | 4 | 4 |
| 5 | 101 | 5 | 5 |
| 7 | 111 | 7 | 7 |
| 8 | 1000 | 10 | 8 |
| 10 | 1010 | 12 | A |
| 15 | 1111 | 17 | F |
| 16 | 1 0000 | 20 | 10 |
| 32 | 10 0000 | 40 | 20 |
| 64 | 100 0000 | 100 | 40 |
| 100 | 110 0100 | 144 | 64 |
| 127 | 111 1111 | 177 | 7F |
| 128 | 1000 0000 | 200 | 80 |
| 255 | 1111 1111 | 377 | FF |
| 256 | 1 0000 0000 | 400 | 100 |
| 1000 | 11 1110 1000 | 1750 | 3E8 |
| 1024 | 100 0000 0000 | 2000 | 400 |
| 4096 | 1 0000 0000 0000 | 10000 | 1000 |
| 65535 | 1111 1111 1111 1111 | 177777 | FFFF |
Frequently asked questions
How do I convert binary to decimal?
Multiply each digit by 2 raised to its position (starting at 0 on the right) and add: 110101 = 32 + 16 + 4 + 1 = 53.
How do I convert decimal to hexadecimal?
Divide by 16 repeatedly and write the remainders backwards, using A–F for 10–15. 255 = 15 × 16 + 15, so 255 = FF.
Why do programmers use hexadecimal?
Because one hex digit matches exactly four bits, so a byte (8 bits) is always two hex digits: 1111 1111 = FF. It's shorter to read than binary.