How to Convert Binary to Decimal (and Back)

Convert binary to decimal by hand and back again, with worked examples. Learn place values, the doubling method, and where hexadecimal fits in.

Updated 5 min read By CodingEagles
Free tool Number Base Converter Binary, octal, decimal and hexadecimal, all at once. Open tool

To convert binary to decimal, give each digit a place value that doubles from right to left (1, 2, 4, 8, …) and add up the values where there is a 1. So 1011 is 8 + 2 + 1 = 11. The number base converter does it instantly across binary, octal, decimal and hex.

That is the method. Here it is worked through, plus the reverse.

How binary place values work

Decimal, the system we use daily, gives each digit a place value that multiplies by ten as you move left: ones, tens, hundreds. Binary does the same thing but multiplies by two: ones, twos, fours, eights, sixteens. Each binary digit, or bit, is either 0 or 1, so a place value either counts or it does not.

Take 1011:

Bit1011
Place value8421
Counts?821

Add the counted values: 8 + 2 + 1 = 11. So binary 1011 is decimal 11.

How to convert binary to decimal

By hand

Write the place values above each bit, doubling from the right, then add the ones that are switched on.

  • 110 → 4 + 2 = 6
  • 10000 → 16
  • 11111111 → 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255

That last one is why a single byte (eight bits) holds values from 0 to 255.

Instantly

Type the binary number into the number base converter and read the decimal, with validation so a stray digit is caught rather than guessed.

How to convert decimal to binary

Divide the decimal number by 2 over and over, noting the remainder each time, then read the remainders from bottom to top.

Take 13:

  • 13 ÷ 2 = 6 remainder 1
  • 6 ÷ 2 = 3 remainder 0
  • 3 ÷ 2 = 1 remainder 1
  • 1 ÷ 2 = 0 remainder 1

Reading the remainders upward gives 1101, which is decimal 13.

Where hexadecimal fits

Hexadecimal (base 16) is popular with programmers because each hex digit maps to exactly four bits, making it a compact way to write binary. So the byte 11111111 is FF in hex. The converter shows binary, octal, decimal and hex together, which makes the relationship between them clear at a glance.

To see why these bases also explain storage sizes, see how to convert MB to GB.

Frequently asked questions

How do I convert binary to decimal?
Each binary digit is a power of two, doubling from right to left: 1, 2, 4, 8, 16 and so on. Add the values where there is a 1. So 1011 is 8 + 0 + 2 + 1 = 11. The number base converter does it instantly and also goes the other way.
How do I convert decimal to binary?
Repeatedly divide the decimal number by 2 and note each remainder. Reading the remainders from last to first gives the binary digits. So 13 gives remainders 1, 0, 1, 1 read upward, which is 1101.
Why is binary used in computers?
Computers store and process information with switches that are either on or off, which maps naturally onto the two binary digits 1 and 0. Everything else, text, images, numbers, is built on that two-state foundation.

Ready to try it?

Binary, octal, decimal and hexadecimal, all at once. Free, in-browser, and 100% private — your data never leaves your device.

Open the Number Base Converter