About this tool
Convert binary (base 2) numbers to decimal (base 10). Paste one binary number per line; spaces, underscores and 0b prefixes are ignored, so 1111 1111 and 0b1111_1111 both give 255.
How to convert binary to decimal
Each binary digit is worth a power of two, doubling from right to left: 1, 2, 4, 8, 16… Add up the values of the positions that contain a 1:
1 1 0 1
8 4 2 1 → 8 + 4 + 1 = 13
After a binary point, positions are worth ½, ¼, ⅛…, so 101.11 = 4 + 1 + 0.5 + 0.25 = 5.75.
Signed numbers (two’s complement)
11111011 is 251 as an unsigned byte, but −5 as a signed 8-bit integer. Choose a bit width under Negative numbers to read inputs of exactly that length as two’s complement: if the first bit is 1, the value is negative.
Features
- Any size: numbers are converted exactly with arbitrary-precision arithmetic, so 64-bit values and even longer numbers never lose digits (a normal calculator rounds anything above 253).
- Fractions:
3.75→11.11. Fractions that don’t end in the target base, like 0.1 in binary, are cut off after the chosen number of digits and marked with…. - Negative numbers with a minus sign, or as two’s complement in 8, 16, 32 or 64 bits, the way computers store signed integers.
- Flexible input: prefixes (
0b,0o,0x,#), spaces, underscores and thousands separators are ignored. Convert many numbers at once, one per line. - The first number is also shown in every base, with the number of bits it needs.
Quick reference
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 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 |
| 9 | 1001 | 11 | 9 |
| 10 | 1010 | 12 | A |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
| 32 | 100000 | 40 | 20 |
| 64 | 1000000 | 100 | 40 |
| 100 | 1100100 | 144 | 64 |
| 127 | 1111111 | 177 | 7F |
| 128 | 10000000 | 200 | 80 |
| 255 | 11111111 | 377 | FF |
| 256 | 100000000 | 400 | 100 |
| 1024 | 10000000000 | 2000 | 400 |
FAQ
How do I convert binary to decimal?
Enter the binary number and the decimal value appears instantly. By hand, add the powers of two (1, 2, 4, 8…) for every position that holds a 1, counting from the right.
What is 1010 in decimal?
10. 11111111 is 255, and 10000000 is 128.
How do I convert a signed binary number?
Choose the bit width (8, 16, 32 or 64) under Negative numbers. Inputs of exactly that length starting with 1 are read as negative two’s complement values, so 11111011 is −5.
Can I convert binary fractions?
Yes. 101.11 converts to 5.75; each position after the point is worth half the previous one.