Binary (Base 2) to Decimal (Base 10) Converter
Convert binary numbers to decimal.
11111111 (base 2) = 255 (base 10)
Digits in base 2: 0 and 1. Digits in base 10: 0 to 9.
How to convert Binary to Decimal
Every positional number system works the same way: a digit is worth its own value times the base raised to the power of its position. In base 2 the place values, from the right, are 20 = 1, 21 = 2, 22 = 4 and so on.
To get from base 2 to decimal, multiply each digit by 2 raised to the power of its position, counting from 0 on the right, and add the results.
The method
decimal value = each digit × its place value, all added upplace values in base 2: 1, 2, 4, 8, 16, and so ondigits in base 2: 0 and 1digits in base 10: 0 to 9
Worked example 1: 101101 from binary to decimal
101101 (base 2) = 1 × 25 + 1 × 23 + 1 × 22 + 1 × 20= 32 + 8 + 4 + 1= 45101101 (base 2) = 45 (base 10)
Digits that are 0 add nothing to the sum, so they are left out of the expansion.
Worked example 2: 11111111 from binary to decimal
11111111 (base 2) = 1 × 27 + 1 × 26 + 1 × 25 + 1 × 24 + 1 × 23 + 1 × 22 + 1 × 21 + 1 × 20= 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1= 25511111111 (base 2) = 255 (base 10)
Worked example 3: 1111101000 from binary to decimal
1111101000 (base 2) = 1 × 29 + 1 × 28 + 1 × 27 + 1 × 26 + 1 × 25 + 1 × 23= 512 + 256 + 128 + 64 + 32 + 8= 1,0001111101000 (base 2) = 1000 (base 10)
Need the other direction? Open the Decimal to Binary converter.
Binary to Decimal examples
The decimal number 255 is written 11111111 in binary and 255 in decimal.
| Binary | Decimal |
|---|---|
| 1 | 1 |
| 10 | 2 |
| 111 | 7 |
| 1000 | 8 |
| 1010 | 10 |
| 1111 | 15 |
| 10000 | 16 |
| 100000 | 32 |
| 1000000 | 64 |
| 1100100 | 100 |
| 11111111 | 255 |
| 1111101000 | 1000 |
Where Binary to Decimal comes up
Binary uses only 0 and 1, because a digital circuit has two stable states: off and on. Every number a computer stores is binary underneath. You meet it when you work with bit flags, bit masks, subnet masks and low-level debugging.
Decimal is the base 10 system everyone learns first, with the digits 0 to 9. It is the form people read: prices, measurements, ages and IDs. It is also the base we calculate in by hand, which is why the worked steps on this page pass through decimal.
Going to a larger base packs more value into each digit, so the result is shorter. The number 255 needs 8 digits in binary and 3 in decimal.
Binary to Decimal FAQ
How do I convert binary to decimal?
Multiply each base 2 digit by 2 raised to the power of its position, counting from 0 on the right, then add everything up.
Which digits does binary use?
Base 2 uses the digits 0 and 1. For example, 2 is not a valid digit in base 2.
Will the decimal number be longer or shorter?
Shorter. Going to a larger base packs more value into each digit, so the result is shorter. Roughly 0.3 decimal digits for every binary digit. The number 255 needs 8 digits in binary and 3 in decimal.
What is 11111111 in decimal?
11111111 in binary is 255 in decimal. Both are the decimal number 255.
Can I convert negative numbers or fractions?
The converter handles whole numbers, and a leading minus sign works for negatives. Fractions use a different method, where you repeatedly multiply the fractional part by the new base, and they are not supported here.