BinaryDecimal

A binary point and minus sign are fine

Try
DecimalUnsigned
13.625
4 integer bits · 3 fraction bits

Place values

Each 1 adds the value of its position
  1. 1238
  2. 1224
  3. 0212
  4. 1201
  5. 12−10.5
  6. 02−20.25
  7. 12−30.125

8 + 4 + 1 + 0.5 + 0.125 = 13.625

Guide

How to convert binary to decimal

  1. Number the positions from right to left, starting at 0 just left of the binary point. Positions to the right of the point are −1, −2, −3 and so on.
  2. Each position is worth 2 to the power of its number: 1, 2, 4, 8, 16 to the left of the point, and 0.5, 0.25, 0.125 to the right.
  3. Add up the values of the positions that hold a 1. Positions holding 0 add nothing.
  4. With Two's complement on, the leftmost bit counts as negative. In 8 bits it's worth −128 instead of 128.

Worked example

Finding the value of 1101.101. Only the positions holding a 1 count:

PositionPowerValue
3238
2224
0201
−12−10.5
−32−30.125

8 + 4 + 1 + 0.5 + 0.125 = 13.625

  • Results are exact, even for very long numbers and fractions. Nothing is rounded.
  • Leading zeros don't change the value, except in two's complement mode, where the number of digits sets the bit width.
  • Every binary fraction has an exact decimal value, because 2 divides 10. The reverse isn't true.
Learn

Understanding binary to decimal conversion

Place values, a faster doubling method, binary fractions and signed numbers.

A binary to decimal converter tells you the base-10 value of a number written in base 2. Type any binary number above, with or without a binary point, and you'll get its exact decimal value along with every place value that contributes to it. This guide explains how to convert binary to decimal by hand, a faster method for long numbers, and how fractions and signed numbers work.

Place values: the core idea

Binary is a positional number system, just like decimal. The rightmost digit is the ones place, worth 2⁰ = 1. Moving left, each position is worth twice as much: 2, 4, 8, 16, 32, 64, 128 and so on. To convert binary to decimal, multiply each digit by its place value and add the results. Since every digit is 0 or 1, that simply means adding up the place values wherever there's a 1. For 101010, the 1s sit in the 32, 8 and 2 places, so the value is 32 + 8 + 2 = 42. The place-value boxes in the converter draw this out for you, and the sum underneath shows the total.

A faster way: doubling as you go

For long binary numbers, adding place values means first working out large powers of two. A quicker method reads the bits from left to right. Start at 0. For each bit, double your running total and add the bit. For 1101: start with 1, then 1 × 2 + 1 = 3, then 3 × 2 + 0 = 6, then 6 × 2 + 1 = 13. The answer is 13, and you never had to write down a power of two. This doubling method is also how computers convert binary to decimal internally.

Converting binary fractions to decimal

Positions to the right of the binary point have negative powers of two: 2⁻¹ = 0.5, 2⁻² = 0.25, 2⁻³ = 0.125, 2⁻⁴ = 0.0625 and so on. Add them up the same way. For 1101.101, the whole part is 8 + 4 + 1 = 13 and the fraction is 0.5 + 0.125 = 0.625, giving 13.625. A useful fact: every binary fraction has an exact, finite decimal value, because 2 divides 10. So 0.0001 is exactly 0.0625, and this converter always shows the full decimal value with no rounding. The reverse isn't true, which is why decimal 0.1 can't be written exactly in binary.

Signed binary and two's complement

The same pattern of bits can mean different numbers depending on how it's read. Read as an unsigned number, 11111111 is 255. Read as an 8-bit two's complement number, where the leftmost bit counts as negative, it's −1, and 10000000 is −128. Turn on Two's complement above to read your bits that way: the sign bit is highlighted and its negative place value appears in the sum. In this mode, the number of digits you type sets the width, so 1111 is −1 but 01111 is 15. For fixed widths of 8, 16, 32 or 64 bits, use the two's complement calculator. A binary number written with a minus sign, like -1011, is simply −11.

Powers of two worth remembering

A few values come up again and again when you convert binary to decimal, so they're worth learning:

PowerValueWhere you'll see it
2⁸256Values in one byte (0 to 255)
2¹⁰1,024One kibibyte
2¹⁶65,536Values in 16 bits
2³²4,294,967,296Values in 32 bits, IPv4 addresses

A binary number of n ones is always one less than 2ⁿ. For example, 8 ones is 255, and 64 ones is 18,446,744,073,709,551,615, the largest unsigned 64-bit integer. Powers of two are also why storage has binary units: the unit converter shows how a kibibyte (1,024 bytes) differs from a kilobyte (1,000 bytes).

Exact results for long numbers

Ordinary floating-point arithmetic loses precision after about 53 bits, so many converters return a rounded answer for long binary strings. This binary to decimal converter uses arbitrary-precision arithmetic, so a 64-bit, 128-bit or even 500-bit number converts digit for digit. You can paste up to 512 characters, including spaces, underscores and a 0b prefix.

Good to know

For a quick sanity check, count the digits. A binary number of n digits that starts with 1 is always at least 2ⁿ⁻¹ and less than 2ⁿ, so 8 digits means somewhere from 128 to 255.

FAQ

Frequently asked questions

Quick answers about the binary to decimal converter and how it works.

How do I convert binary to decimal?

Each position is worth 2 to the power of its place, counting from 0 on the right: 1, 2, 4, 8, 16 and so on. Add up the values of the positions holding a 1. 101010 is 32 + 8 + 2 = 42.

The tool draws every position and its value, and shows the sum.

Can I convert binary fractions?

Yes. Type a binary point and the positions after it are worth 0.5, 0.25, 0.125 and so on. 0.1 in binary is 0.5, and 1101.101 is 13.625. The decimal result is always exact.

How do I convert a negative binary number?

There are two kinds. If the number has a minus sign, like -1011, it's simply −11.

If it's a two's complement bit pattern, turn on Two's complement. The leftmost bit then counts as negative, so 11111111 is −1 instead of 255.

Do leading zeros change the value?

Not normally: 00101 and 101 are both 5. In two's complement mode they do, because the number of digits sets the bit width. 1111 is −1, but 01111 is 15.

Is there a length limit?

You can enter up to 512 characters, and the result stays exact at any length. The place-value boxes show the first 64 digits, and the sum lists the first 12 terms.

Can I paste binary with spaces or a 0b prefix?

Yes. Spaces and underscores are ignored, and a leading 0b is removed, so 0b1000_0000 reads as 128.

Still have a question?Contact us