How it works
Binary counts in base 2, decimal counts in base 10. Converting means rewriting the same quantity with a different set of digits — the value never changes, only how it is written.
- Number the digits from the right, starting at 0.
- Multiply each digit by 2 raised to the power of its position.
- Add the results — that total is the decimal value.
The reverse conversion is Decimal to Binary, which also handles every other base pair.
Examples
Worked examples, digit by digit:
- 1010 (binary) = 1×23 + 0×22 + 1×21 + 0×20 = 10 (decimal)
- 10101 (binary) = 1×24 + 0×23 + 1×22 + 0×21 + 1×20 = 21 (decimal)
- 11111111 (binary) = 1×27 + 1×26 + 1×25 + 1×24 + 1×23 + 1×22 + 1×21 + 1×20 = 255 (decimal)
| 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 |
Binary to Decimal: frequently asked questions
- How do I convert binary to decimal?
- Multiply each binary digit by 2 raised to its position (starting at 0 on the right) and add the results. For example, 101101 = 1×2^5 + 0×2^4 + 1×2^3 + 1×2^2 + 0×2^1 + 1×2^0 = 45. The converter above does this instantly for any value.
- What is 11111111 in decimal?
- Binary 11111111 equals 255 in decimal (the value 255, the largest number that fits in one byte).
- Why are binary and decimal used?
- Binary (base 2) is how computers store data, as bits that are either 0 or 1. Decimal (base 10) is the everyday number system.
