How to Convert Binary to Decimal (With Examples)

Computers store everything – text, photos, music – as patterns of 0s and 1s. Students meet binary in maths and computer science classes, and programmers meet it when working with permissions, colours and network addresses. If you have searched for how to convert binary to decimal, the good news is that it takes just one idea: in binary, each place is worth twice as much as the place to its right.

Screenshot of the Binary to Decimal Converter on Assen Tools
The Binary to Decimal Converter in use. Open the Binary to Decimal Converter – free, no sign-up.

The binary number system in one minute

Our everyday decimal system uses ten digits (0–9), and each place is worth ten times the one to its right: ones, tens, hundreds, thousands. The binary number system uses only two digits, 0 and 1, and each place value is worth two times the one to its right.

Here are the first powers of two, from right to left:

  • 2⁰ = 1
  • 2¹ = 2
  • 2² = 4
  • 2³ = 8
  • 2⁴ = 16
  • 2⁵ = 32
  • 2⁶ = 64
  • 2⁷ = 128

The method

  1. Write the binary number down.
  2. Under each digit, write its place value, starting with 1 on the far right and doubling as you move left.
  3. Add up the place values wherever there is a 1. Ignore the places with a 0.

That total is the decimal number.

Worked examples

Example 1: 1011

From right to left the place values are 1, 2, 4, 8. The digits are 1, 1, 0, 1 (reading right to left). 8 + 0 + 2 + 1 = 11

Example 2: 110101

Place values: 32, 16, 8, 4, 2, 1. Digits: 1, 1, 0, 1, 0, 1. 32 + 16 + 4 + 1 = 53

Example 3: 11111111

All eight places are 1: 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255. That is why one byte (eight bits) can store values from 0 to 255 – the same range you see in RGB colour codes.

Example 4: 10010

16 + 2 = 18

Going the other way: decimal to binary

To turn an ordinary number into binary, divide by 2 repeatedly and write down the remainders:

53 ÷ 2 = 26 remainder 1 26 ÷ 2 = 13 remainder 0 13 ÷ 2 = 6 remainder 1 6 ÷ 2 = 3 remainder 0 3 ÷ 2 = 1 remainder 1 1 ÷ 2 = 0 remainder 1

Read the remainders from bottom to top: 110101. That matches Example 2.

A quick mental shortcut

For short binary numbers, many people simply memorise the values of 4-bit patterns: 0101 = 5, 1000 = 8, 1010 = 10, 1100 = 12, 1111 = 15. Longer numbers can then be read four bits at a time, which is also the first step towards hexadecimal.

Common mistakes

  • Starting the place values on the left. Always start with 1 on the far right.
  • Skipping a place. Every digit needs a place value, including the zeros.
  • Reading remainders top to bottom in the reverse method – read them bottom to top.

Check your answers instantly

The free Number Base Converter converts between binary, decimal, octal and hexadecimal as you type, and handles very large numbers. It is perfect for checking homework or debugging code.

If your binary represents text rather than a number – for example 01001000 01101001 – use the Binary Converter, which translates binary code to letters (that example spells "Hi"). The ASCII Converter shows the number behind every character.

Where you will use this

  • Computer science exams and coding interviews
  • Subnet masks and IP addresses in networking
  • File permissions such as 755 on Linux servers
  • Understanding bits, bytes and storage sizes

For related conversions, see how to convert binary to octal and how to convert fractional decimal to binary.

Summary

Now you know how to convert binary to decimal: write the place values 1, 2, 4, 8, 16 and so on from right to left, then add the ones that sit under a 1. Reverse the process by dividing by 2 and reading the remainders upward. Check any answer in seconds with the free Number Base Converter.

Jonathan Nwachukwu, founder of Assen Tools

Written by

Jonathan Nwachukwu · Founder & developer

Jonathan is a freelance web developer and web development teacher who builds Laravel, WordPress and WooCommerce sites for clients. He built AssenTools to put the everyday file, photo and calculation jobs he kept doing for clients and students into one free, private toolbox, and he maintains every tool and guide on the site.