Binary to Decimal Converter
Convert binary to decimal and see the full working: every bit, its power of 2 and the sum. Numbers of any length are exact, and a two's complement view reads signed values.
Spaces, underscores and a 0b prefix are ignored. A leading minus sign makes the number negative.
| Binary | | |
|---|---|---|
| Octal | | |
| Decimal | | |
| Hex | | |
| Bit length | |
Show steps
Each digit is multiplied by its place value, which is a power of the base (2 for binary, 8 for octal, 16 for hex). The products are then added together.
| Digit | Position | Place value | Digit × place value |
|---|---|---|---|
| Sum | |||
Two's complement view (signed numbers)
Auto uses as many bits as you typed (4 per hex digit), so 11111011 is read as an 8-bit value.
| Width | | |
|---|---|---|
| Bits | | |
| Hex | | |
| Unsigned | | |
| Signed | |
Convert Binary Numbers to Decimal Online
Binary is how computers count, but people read numbers in decimal. This converter turns any string of 1s and 0s into its decimal value as you type.
Show steps lists every bit with its power of 2, so you can check homework or learn the method. The two's complement view reads the bits as a signed number.
How to use the binary to decimal converter
- Enter the binary number, such as
10110101. You can paste it with spaces, like1011 0101. - Read the decimal result, plus octal, hex and the bit length.
- Check the steps to see how each bit contributes, or open the two's complement view for signed values.
How to convert binary to decimal by hand
Binary is base 2: each position is worth twice the one to its right (1, 2, 4, 8, 16 …). Write the place value under every bit and add the values where the bit is 1.
Here is 10110101:
| Bit | Place value | Bit × place value |
|---|---|---|
1 | 27 = 128 | 1 × 128 = 128 |
0 | 26 = 64 | 0 × 64 = 0 |
1 | 25 = 32 | 1 × 32 = 32 |
1 | 24 = 16 | 1 × 16 = 16 |
0 | 23 = 8 | 0 × 8 = 0 |
1 | 22 = 4 | 1 × 4 = 4 |
0 | 21 = 2 | 0 × 2 = 0 |
1 | 20 = 1 | 1 × 1 = 1 |
Adding the non-zero values: 128 + 32 + 16 + 4 + 1 = 181.
The doubling method
No powers of 2 needed: read the bits from left to right, starting at 0, and for each bit double your total and add the bit. For 1011: 0 × 2 + 1 = 1, 1 × 2 + 0 = 2, 2 × 2 + 1 = 5, 5 × 2 + 1 = 11.
Powers of 2 table
In binary, 2n is a 1 followed by n zeros. These are the place values you add up:
| Power | Value | Power | Value |
|---|---|---|---|
| 20 | 1 | 28 | 256 |
| 21 | 2 | 29 | 512 |
| 22 | 4 | 210 | 1,024 |
| 23 | 8 | 211 | 2,048 |
| 24 | 16 | 212 | 4,096 |
| 25 | 32 | 213 | 8,192 |
| 26 | 64 | 214 | 16,384 |
| 27 | 128 | 215 | 32,768 |
| 216 | 65,536 | 232 | 4,294,967,296 |
Binary to decimal examples
| Binary | Decimal | Note |
|---|---|---|
1010 | 10 | |
1111 | 15 | Largest 4-bit value |
1100100 | 100 | 64 + 32 + 4 |
11111111 | 255 | Largest 8-bit value |
100000000 | 256 | 28 |
1111101000 | 1000 | 512 + 256 + 128 + 64 + 32 + 8 |
1111111111111111 | 65535 | Largest 16-bit value |
Signed binary numbers (two's complement)
Computers store negative integers in two's complement. In a fixed width of n bits, a number whose first bit is 1 is negative, and its value is the unsigned value minus 2n. So in 8 bits 11111011 is 251 − 256 = −5, 10000000 is −128 and 01111111 is 127.
The two's complement view shows both readings for 8, 16, 32 or 64 bits, or for the number of bits you typed (Auto).
Where you need binary to decimal
- Networking: the subnet mask
11111111.11111111.11111111.00000000is 255.255.255.0, one byte at a time. - Programming: flags and bit masks are often printed in binary. To calculate with them, use the binary calculator.
Frequently Asked Questions
Common questions about converting binary numbers to decimal.
Multiply each bit by its power of 2, starting with 1 for the rightmost bit, and add the results. 1011 is 8 + 0 + 2 + 1 = 11.
11111111 is 255, the largest number that fits in one byte (8 bits). Adding 1 gives 100000000, which is 256.
1010 is 8 + 2 = 10.
No. 00001011 and 1011 are both 11. Leading zeros only matter in the two's complement view, where they set the bit width.
If it has a minus sign, convert the digits and keep the sign: -101 is -5. If it is a two's complement bit pattern, open the two's complement view and pick the width.
No practical limit. The converter uses exact big-integer arithmetic, so a 200-bit number is converted without rounding.
Yes, with the decimal to binary converter, which shows the repeated division steps.