This binary to decimal converter changes binary numbers into normal decimal numbers and shows the working. Binary uses only 0 and 1. Decimal uses 0 to 9. You can convert in both directions, and fractions work too.
How to use the binary to decimal converter online
- Choose binary to decimal, or decimal to binary.
- Type the number. Binary input must use only 0, 1 and a point.
- Read the answer.
- Follow the steps below it.
Binary to decimal converter formula
Decimal = sum of (digit × 2^position)
Position starts at 0 on the right and goes up as you move left. After the point, positions are −1, −2, −3 and so on.
Binary to decimal converter with steps: 110101
| Digit | Position | Power of 2 | Digit × power |
|---|---|---|---|
| 1 | 5 | 32 | 32 |
| 1 | 4 | 16 | 16 |
| 0 | 3 | 8 | 0 |
| 1 | 2 | 4 | 4 |
| 0 | 1 | 2 | 0 |
| 1 | 0 | 1 | 1 |
Add the last column: 32 + 16 + 0 + 4 + 0 + 1 = 53. So 110101 in binary is 53 in decimal.
Common mistake: A common mistake beginners make is numbering positions from 1. The rightmost digit has position 0, because 2^0 is 1.
A quicker way: double and add
Start with 0. For each digit from left to right, double your number and add the digit. For 1011:
- 0 × 2 + 1 = 1
- 1 × 2 + 0 = 2
- 2 × 2 + 1 = 5
- 5 × 2 + 1 = 11
This method is easy in your head and in code. See it as a program in binary to decimal in Java.
Fractions, with solution
For 101.101, split the number at the point.
- Left: 101 = 4 + 0 + 1 = 5.
- Right: .101 = 1 × 1/2 + 0 × 1/4 + 1 × 1/8 = 0.5 + 0.125 = 0.625.
- Total: 5.625.
Decimal to binary
Divide by 2 and write the remainder each time. For 13:
| Division | Result | Remainder |
|---|---|---|
| 13 ÷ 2 | 6 | 1 |
| 6 ÷ 2 | 3 | 0 |
| 3 ÷ 2 | 1 | 1 |
| 1 ÷ 2 | 0 | 1 |
Read the remainders from bottom to top: 1101.
For a decimal fraction, multiply by 2 and keep the whole part. For 0.625: 1.25 gives 1, 0.5 gives 0, and 1.0 gives 1. So 0.625 is .101.
Some fractions never end. The decimal 0.1 has repeating binary digits, so every converter must stop somewhere. The result is then rounded.
Pro tip: Check the last digit. A whole binary number ending in 1 is odd, and one ending in 0 is even.
Values worth remembering
| Binary | Decimal |
|---|---|
| 1 | 1 |
| 10 | 2 |
| 100 | 4 |
| 1000 | 8 |
| 1111 | 15 |
| 10000 | 16 |
| 1111 1111 | 255 |
A row of n ones equals 2^n − 1. Eight ones give 256 − 1 = 255, the largest value in one unsigned byte.
Using this converter for homework
A binary to decimal converter with solution steps is most useful when you try first. Work the sum on paper, then compare it line by line. If your answer differs, the first different line shows your mistake.
In an exam, this binary to decimal converter calculator will not be there, so practise the double-and-add method until it feels easy.
Where binary appears
Computers store numbers, text and pictures as bits. You will meet binary in networking, in data structures and algorithms, and in placement tests such as these aptitude questions. Halving a range again and again is also the idea behind binary search in Java, though that is about searching and not about base 2. Sizes shown in bytes are easier to understand too, so compare them with the character counter.
