Binary to Decimal Converter
Base 2 to base 10, with each bit's contribution shown separately.
Enter binary digits only: 0 and 1. A leading 0b is fine.
Show the working
How the conversion works
Identical method to any other base, with 2 in place of 16. Each bit is multiplied by 2 raised to the power of its position, counting from zero at the right.
= 8 + 0 + 2 + 0 = 10
Because every position is a power of two, the useful ones are worth recognizing on sight: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024.
Powers of two reference
| Binary | Decimal | Hex | Note |
|---|---|---|---|
| 1 | 1 | 1 | 2^0 |
| 10 | 2 | 2 | 2^1 |
| 100 | 4 | 4 | 2^2 |
| 1000 | 8 | 8 | 2^3 |
| 10000 | 16 | 10 | 2^4 |
| 100000 | 32 | 20 | 2^5 |
| 1000000 | 64 | 40 | 2^6 |
| 10000000 | 128 | 80 | 2^7, one byte's high bit |
| 11111111 | 255 | FF | largest 8-bit unsigned value |
| 100000000 | 256 | 100 | 2^8 |
| 10000000000 | 1,024 | 400 | 2^10, one kibibyte in bytes |
| 1111111111111111 | 65,535 | FFFF | largest 16-bit unsigned value |
Signed values and two's complement
This tool reads input as unsigned, so 11111111 gives 255. In a signed 8-bit context the same bits mean minus 1, because signed integers use two's complement: the leftmost bit carries the sign, and negative values are stored as the complement of the positive value plus one.
If you are debugging something that shows a large positive number where you expected a small negative one, or the reverse, this is usually why.
Why 1024 keeps appearing
2 to the power 10 is 1,024, tantalisingly close to 1,000. Early computing borrowed the kilo prefix for it, and the ambiguity has never fully gone away. Storage manufacturers count in decimal, so a terabyte is a trillion bytes, while operating systems have historically divided by 1,024 at each step. That is why a 1 TB drive shows as roughly 931 GB. The common mistakes guide covers this in more detail.
Common questions
How do I convert binary to decimal?
Multiply each bit by 2 raised to the power of its position, counting from zero at the right, then add the results. For 1010: the bits are 1, 0, 1, 0 from the left, giving 8 plus 0 plus 2 plus 0, which is 10.
What is 11111111 in decimal?
255. That is the largest value eight bits can hold as an unsigned number, which is why a byte runs from 0 to 255.
Does this handle negative numbers?
No. This tool treats input as unsigned. Signed binary uses two's complement, where the leftmost bit indicates sign and the remaining bits are interpreted differently, so 11111111 would be minus 1 rather than 255 in an 8-bit signed context.
Why is 1024 significant?
It is 2 to the power 10, the closest power of two to 1,000. That near-miss is the root of the confusion between decimal and binary storage units, where a kilobyte may mean 1,000 bytes or 1,024 depending on who is counting.
Related converters and guides
Sources
- Base conversion is arithmetic rather than a measured conversion, so there is no external factor to cite. The place-value method shown is the standard positional-notation definition: each digit is multiplied by the base raised to the power of its position, counting from zero at the right.