Skip to content

Binary to Decimal Converter - Convert Binary Numbers

Decimal (10)
—
Other bases
Binary (2)—
Octal (8)—
Hexadecimal (16)—
Base 36—

Binary to Decimal in One Step

Paste a binary number made of 0s and 1s and the decimal value appears straight away, with octal, hex and a custom base listed underneath. The converter uses arbitrary-precision integers, so a 64-bit register dump or a 200-bit value converts exactly instead of being rounded.

How to Convert Binary to Decimal by Hand

Binary is base 2, so each position is worth twice the one to its right. Number the bits from 0 starting at the rightmost bit, then add up 2 to the power of each position that holds a 1.

Worked example: 101101

  1. Write the positions under the bits: 1 (5), 0 (4), 1 (3), 1 (2), 0 (1), 1 (0).
  2. Keep the positions that hold a 1: 5, 3, 2 and 0.
  3. Look up their values: 32, 8, 4 and 1.
  4. Add them: 32 + 8 + 4 + 1 = 45.

A second method avoids powers entirely. Start at 0, and for each bit from left to right, double the running total and add the bit. For 101101: 1, 2, 5, 11, 22, 45. This doubling method is how the converter works internally and is easy to do in your head for short numbers.

Powers of Two Table

The value of a 1 bit at each position:

Bit positionPowerDecimal value
0201
1212
2224
3238
42416
52532
62664
727128
828256
929512
102101,024
112112,048
122124,096
132138,192
1421416,384
1521532,768
1621665,536

Common Binary Numbers

BinaryDecimal
11
102
1015
10008
101010
111115
1000016
10000032
100000064
1111111127
10000000128
11111111255
111111111111111165,535

Shortcuts for Reading Binary

A run of n ones always equals 2n − 1, so 1111 is 15 and 11111111 is 255. A 1 followed by n zeros is exactly 2n, so 1000000 is 64. For long numbers, split the bits into groups of four from the right and read each group as a hex digit (0000 to 1111 is 0 to F); converting the hex to decimal is then easier than adding many powers of two. Leading zeros never change the value: 00101101 and 101101 are both 45. Turn on "Group digits" in the converter to see the result alongside a nibble-grouped view of the input.

Where You Meet Binary Values

Binary shows up in bit flags and permission masks, subnet masks (11111111.11111111.11111111.00000000 is 255.255.255.0), hardware registers and low-level protocol documentation. Going the other way? Use the decimal to binary converter, or the number base converter for any pair of bases.

Related Tools

Frequently Asked Questions

How do you convert binary to decimal?
Number the bits from 0 on the right. Each 1 bit adds 2 raised to its position, and 0 bits add nothing. For 1011: 8 + 0 + 2 + 1 = 11. The converter above does this for you, for numbers of any length.
What is 11111111 in decimal?
11111111 is 255, the largest value of an unsigned 8-bit byte. In general, n ones in a row equal 2^n - 1, so 16 ones is 65535 and 32 ones is 4294967295.
Can I paste binary with spaces or a 0b prefix?
Yes. Spaces, underscores and commas are ignored and a leading 0b is removed, so '0b1010 1010' and '10101010' give the same answer, 170.
Does it handle signed (two's complement) binary?
The converter reads binary as an unsigned number. To read an 8-bit two's complement value, convert it normally and subtract 256 if the top bit is 1: 11111110 is 254, so the signed value is 254 - 256 = -2. Use 65536 for 16-bit values and 2^32 for 32-bit values.