Skip to content
Binary Translator
Menu

Binary to Decimal Converter

Enter a binary number to get its decimal value, with the place value of every 1 shown. Switch to signed to read it as two's complement.

Updated · UTF-8 text encoding

Only 0 and 1. Spaces and a 0b prefix are ignored.

Read it as

Decimal

45

Place values

2⁵ + 2³ + 2² + 2⁰ = 32 + 8 + 4 + 1 = 45

How to convert binary to decimal

Each position in a binary number is worth twice the one to its right. For an 8-bit number:

1286432168421
10110101

Add the values above every 1: 128 + 32 + 16 + 4 + 1 = 181. That's the whole method, and it works for any length: just keep doubling the place values to the left.

A faster way for long numbers: doubling

Read the digits from left to right, starting with 0. For each digit, double your running total and add the digit. For 1011: 0×2+1 = 1, 1×2+0 = 2, 2×2+1 = 5, 5×2+1 = 11. It's easy to do in your head and never needs a table of powers of 2.

Signed binary and two's complement

Computers store negative whole numbers using two's complement. The leftmost bit gets a negative place value, so in 8 bits it's worth -128. That makes 01111111 the largest positive value (127) and 10000000 the most negative (-128). The same bits can therefore mean two different numbers, which is why the converter asks how to read them. To go the other way, including negative numbers, use the decimal to binary converter.

Binary to hexadecimal is often a quicker route for long numbers; see binary to hex. A chart of 0 to 255 is on the binary numbers page.

Questions people ask

How do you convert binary to decimal?

Add the place values (1, 2, 4, 8, 16, ...) under each 1, starting from the right. 1011 = 8 + 2 + 1 = 11.

What is 11111111 in decimal?

255 unsigned, or -1 as an 8-bit signed (two's complement) number.

How do you convert signed binary to decimal?

Give the leftmost bit a negative weight. For 8 bits: 10000011 = -128 + 2 + 1 = -125.

Sources

More binary converters