DevSwitch.net
Back to Tools
#

Binary to Decimal Converter

Convert binary numbers to decimal format

Number Converters

Tip: Enter a binary number (0s and 1s only). The conversion happens in real-time.

Runs in your browser

Binary Decimal

Decimal base 10
-
Try

Convert binary to decimal

Type or paste a binary number and its decimal value appears as you type. Results longer than four digits are also shown with commas between the thousands, and the window bar shows the bit length. Copy takes the plain digits.

Each bit is worth twice the bit to its right, so a binary number is a sum of powers of two. The binary to decimal converter adds them exactly at any length: sixty-four ones give 18446744073709551615, with no rounding in the last digits.

How to convert binary to decimal by hand

Write the place values 1, 2, 4, 8 and so on under the bits, starting from the right. Then add the place values that sit under a 1. For 10110101:

BitPlace valueAdds
1 2⁷ = 128 128
0 2⁶ = 64 0
1 2⁵ = 32 32
1 2⁴ = 16 16
0 2³ = 8 0
1 2² = 4 4
0 2¹ = 2 0
1 2⁰ = 1 1

Add the last column: 128 + 32 + 16 + 4 + 1 = 181, so 10110101 is 181 in decimal. The step-by-step window above lists the same products for the bits you type, for numbers up to 40 bits long.

For long numbers there is a shortcut: start at 0 and go through the bits from the left, doubling the total and adding the bit each time. For 1011 that gives 1, 2, 5 and 11.

Binary to decimal table

BinaryDecimal
1 1
10 2
11 3
100 4
111 7
1000 8
1010 10
1111 15
10000 16
100000 32
1111111 127
10000000 128
11111111 255

A 1 followed by zeros is a power of two, and a row of ones is one less than the next power: 1000 is 8 and 111 is 7. These two patterns let you check most results in your head.

Starting from a decimal number?

Decimal to binary works the other way: it divides by 2 and lists every remainder.

Signed and padded binary input

Read as expected

  • Leading zeros change nothing: 00000101 is 5
  • A minus sign stays a sign: -1101 gives -13
  • Spaces, underscores and a 0b prefix are skipped, so 0b1111 0000 gives 240

Not handled

  • Two's complement: 11111111 is always 255, never -1 as a signed byte
  • Binary fractions such as 0.101: the point counts as an invalid digit

For the same bits in hex and octal at once, use the number system converter; the binary to hex converter also shows how the bits split into hex digits.

Binary to decimal questions

10: one eight, no four, one two and no one. 8 + 2 = 10.

255, the largest value one byte holds: 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1.

No. 0101 and 101 are both 5. Leading zeros only pad a number to a fixed width, such as a full byte.

Yes, and longer ones too. The arithmetic is exact for whole numbers of any length. The step-by-step window shows the place values for numbers up to 40 bits.

No. The conversion runs in your browser.