Math Tools Math Tools

How to Convert Binary to Decimal

How to Convert Binary to Decimal

By Math Tools ·

How to Convert Binary to Decimal

What number is 101101 in binary? If you add up powers of 2, you'll get 45. But there's a faster way that works left to right, in your head, without writing any powers at all: double and add.

Binary is the language of every digital device. Converting it to decimal is a basic skill for programmers, network engineers, students and anyone curious about how computers store numbers. Here are both methods.


Binary Is Easier Than Decimal, Just Longer

Binary only has two digits, 0 and 1, so its "multiplication table" has just four entries. What makes binary feel hard is length: 45 takes 2 digits in decimal but 6 in binary. The actual arithmetic is simpler than anything in base 10.


How Binary Place Values Work

In decimal, each place is worth 10 times the place to its right: ones, tens, hundreds. In binary, each place is worth 2 times the place to its right:

Place (from right) 7 6 5 4 3 2 1 0
Power of 2 2⁷ 2⁶ 2⁵ 2⁴ 2⁰
Value 128 64 32 16 8 4 2 1

Memorizing 1, 2, 4, 8, 16, 32, 64, 128 makes conversion fast.


Method 1: Add Up Place Values

Step 1: Write the place values above each digit, starting with 1 at the right.

Step 2: Add the place values wherever there's a 1.

Example: 101101

Place value:  32  16   8   4   2   1
Binary digit:  1   0   1   1   0   1
32 + 8 + 4 + 1 = 45

Example: 11010110

128 + 64 + 16 + 4 + 2 = 214

Check any conversion with the binary to decimal converter, or browse the base 2 to base 10 table.


Method 2: Double and Add (Left to Right)

This method, based on Horner's method for evaluating polynomials, never needs large powers.

Start with 0. For each digit from left to right: double your running total, then add the digit.

Example: 101101

Digit Double, then add Running total
1 0 × 2 + 1 1
0 1 × 2 + 0 2
1 2 × 2 + 1 5
1 5 × 2 + 1 11
0 11 × 2 + 0 22
1 22 × 2 + 1 45

It works because 101101 = ((((1×2 + 0)×2 + 1)×2 + 1)×2 + 0)×2 + 1. This is how many programs convert binary strings, and it's easy to do mentally.


Binary Fractions

Digits after a binary point are worth halves, quarters, eighths and so on:

0.101₂ = 1×(1/2) + 0×(1/4) + 1×(1/8) = 0.5 + 0.125 = 0.625

Some simple decimal fractions, like 0.1, can't be written exactly in binary, which is why computers sometimes give 0.1 + 0.2 = 0.30000000000000004. See Floating-Point Numbers.


Negative Numbers: Two's Complement

Computers usually store negative integers in two's complement. In an 8-bit signed number, the leftmost bit is worth −128 instead of +128.

Example: 11111011 (8-bit signed)

−128 + 64 + 32 + 16 + 8 + 0 + 2 + 1 = −5

The same bits read as an unsigned number equal 251. Whether a byte means 251 or −5 depends entirely on how the program interprets it. See How Computers Represent Numbers.


An Insider Reference: Thomas Harriot's Hidden Binary

Gottfried Wilhelm Leibniz is often credited with introducing binary arithmetic, in a paper published in 1703. But nearly a century earlier, English mathematician and astronomer Thomas Harriot had already worked with base 2.

Harriot, who also made some of the first telescopic drawings of the Moon in 1609, left thousands of pages of unpublished manuscripts. Historians studying them found that around 1600–1610 he converted numbers between decimal and binary and performed binary addition and multiplication. Because he never published, his work had no influence on later mathematicians, and remained largely unknown until scholars examined his papers in the 20th century.


Two Concepts Worth Knowing

Positional Notation

In positional notation, a digit's value depends on its position. Binary, decimal, octal and hexadecimal all work the same way, differing only in the base. Compare them in the table of bases.

Bit and Byte

A bit is one binary digit. A byte is 8 bits, representing 256 values: 0 to 255 unsigned, or −128 to 127 signed.


Quick Answer: How Do You Convert Binary to Decimal?

Multiply each binary digit by its place value (1, 2, 4, 8, 16, … from right to left) and add the results. For 101101: 32 + 8 + 4 + 1 = 45. Alternatively, start at 0 and, for each digit from left to right, double the total and add the digit.


Try Them Yourself

Convert your age and the current year to binary, then back to decimal using the double-and-add method. After a few tries, you'll be able to do small conversions entirely in your head.