Binary to Decimal Converter
Convert binary numbers to decimal format
Tip: Enter a binary number (0s and 1s only). The conversion happens in real-time.
Runs in your browserBinary Decimal
Binary to decimal, step by step
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:
| Bit | Place value | Adds |
|---|---|---|
| 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
| Binary | Decimal |
|---|---|
| 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:
00000101is5 - A minus sign stays a sign:
-1101gives-13 - Spaces, underscores and a
0bprefix are skipped, so0b1111 0000gives240
Not handled
- Two's complement:
11111111is always255, never-1as 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.