Skip to content
BetterDL

Binary-to-decimal conversion

Also called: binary to decimal

Finding the decimal value of a binary number by adding the place weights (1, 2, 4, 8, …) of every bit that is 1.

To convert binary to decimal, use the place-value rule: each bit times its weight, all added up. Since every bit is 0 or 1, that simplifies to add the weights that sit over a 1.

  1. Write the weights above the bits, starting with 1 at the right: 1, 2, 4, 8, 16, …
  2. Mark the weights that sit over 1-bits.
  3. Add them.

For long numbers there's a second method, doubling. Start with 0. For each bit from left to right, double the running total and add the bit. It works because each step shifts everything one place left, which doubles it.

Both methods give the unsigned value. For a twos complement pattern with MSB 1, make the leftmost weight negative, or subtract 2ⁿ from the unsigned value.

1
32
0
16
1
8
1
4
0
2
1
1

Worked example

Example

101101₂ two ways

Add weights, then confirm by doubling.

  1. 1.

    Weights over the 1s: 32, 8, 4 and 1.

  2. 2.

    32 + 8 + 4 + 1 = 45.

  3. 3.

    Doubling, bit by bit from the left: 0 × 2 + 1 = 1, 1 × 2 + 0 = 2, 2 × 2 + 1 = 5, 5 × 2 + 1 = 11, 11 × 2 + 0 = 22, 22 × 2 + 1 = 45.

  4. 4.

    Both give 45.

Common mistakes

  • Starting the weights at the left. 11010₂ is 26, not 11.

  • Adding the weights over the 0s as well.

  • Using the unsigned method on a negative two's complement pattern without making the MSB weight negative.

Practice Binary-to-decimal conversion

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

Binary-to-decimal conversion is taught in Number Systems.