Binary to Decimal Converter
Type a binary number to get its decimal value, with each bit’s place value (1, 2, 4, 8 …) shown and added up.
Binary uses only 0 and 1
In decimal (base 10)
45
Binary 10 1101 is 45 in decimal (base 10).
32 + 8 + 4 + 1 = 45
Tap a bit to flip it. Each tile is worth its digit × 2n.
How to convert binary to decimal
Binary is base 2: each position is worth twice the one to its right. Reading from the right, the places are worth 1, 2, 4, 8, 16, 32, 64 and 128 for a byte, and the pattern keeps doubling for longer numbers.
To convert, write the place value under every bit, keep the places that hold a 1, and add them. A 0 contributes nothing, so you only ever add powers of two. For 11010110 that is 128 + 64 + 16 + 4 + 2 = 214.
A quick check: an n-bit number is always below 2ⁿ, so an 8-bit answer can never pass 255. If the last bit is 1 the decimal number is odd.
value = bₙ₋₁×2ⁿ⁻¹ + … + b₂×4 + b₁×2 + b₀×1
- JavaScript stores numbers as 64-bit floats, so integers are exact only up to 2⁵³ − 1 = 9,007,199,254,740,991; this converter uses BigInt and stays exact beyond that. Source: ECMAScript, Number.MAX_SAFE_INTEGER.
Common binary numbers in decimal
Counting from 0 to 16, then the powers of two and all-ones values programmers meet most.
| Binary | Decimal | Why it matters |
|---|---|---|
| 0 | 0 | nothing set |
| 1 | 1 | 2^0 |
| 10 | 2 | 2^1 |
| 11 | 3 | |
| 100 | 4 | 2^2 |
| 101 | 5 | |
| 110 | 6 | |
| 111 | 7 | |
| 1000 | 8 | 2^3 |
| 1001 | 9 |
Show all 26 rowsShow fewer
| 1010 | 10 | ten: 1010, not 10 |
| 1011 | 11 | |
| 1100 | 12 | |
| 1101 | 13 | |
| 1110 | 14 | |
| 1111 | 15 | |
| 10000 | 16 | 2^4 |
| 100000 | 32 | 2^5 |
| 1000000 | 64 | 2^6 |
| 1111111 | 127 | largest 7-bit value (ASCII) |
| 10000000 | 128 | top bit of a byte |
| 11111111 | 255 | largest byte |
| 100000000 | 256 | values in one byte |
| 1111111111 | 1,023 | ten bits all on |
| 10000000000 | 1,024 | 2^10, one kibi |
| 1111 1111 1111 1111 | 65,535 | largest 16-bit value |
Frequently Asked Questions
What is 1111 in binary as a decimal?
1111 in binary is 15: 8 + 4 + 2 + 1. Four bits all set is always 2⁴ − 1 = 15, which is why one hex digit (0 to F) covers exactly four bits.
Why does binary 10 equal 2?
In base 2 the second place from the right is worth 2 instead of 10. So 10 in binary means one 2 and no 1s, which is 2. Writing 0b10 makes the base clear in code.
How do I convert a binary fraction such as 101.11?
Places right of the point are worth ½, ¼, ⅛ and so on, so 101.11 is 4 + 1 + 0.5 + 0.25 = 5.75. This tool converts whole numbers; for how computers store fractions see the IEEE 754 converter.
How long can the binary number be?
There is no practical limit: the converter works with exact big integers, so a 64-bit or 128-bit value converts without rounding. The step-by-step working is shown up to 32 bits.