How to convert numbers between bases
In decimal each position is a power of 10, in binary a power of 2, in octal a power of 8 and in hexadecimal a power of 16 (digits 0–9 and letters A–F). For example 255 in decimal is 11111111 in binary, 377 in octal and FF in hex.
The converter works with integers of any size — it uses BigInt arithmetic, so no digits are lost on very long numbers.
Binary to decimal step by step
Replace every 1 with the value of its position (from the right: 1, 2, 4, 8, 16, 32…) and add them up: 1101₂ = 8 + 4 + 0 + 1 = 13. The other way, divide by 2 and write the remainders from last to first: 13 → 6 r1 → 3 r0 → 1 r1 → 0 r1, giving 1101.
| Decimal | Binary | Hex |
|---|---|---|
| 10 | 1010 | A |
| 15 | 1111 | F |
| 16 | 10000 | 10 |
| 255 | 11111111 | FF |
| 2026 | 11111101010 | 7EA |
Where you’ll meet these bases
- Hexadecimal — CSS colours (#FF8800), memory addresses, MAC addresses, checksums.
- Binary — bits, subnet masks, flags and permissions in programming.
- Octal — Linux file permissions (chmod 755).
Frequently asked questions
What is FF in decimal?
255 — F is 15, so FF = 15 × 16 + 15 = 255.
Does letter case matter in hex?
No — “ff” and “FF” are the same number. The converter accepts both and shows results in capitals.