Binary to decimal
Paste ones and zeros to get the decimal value. Group bits with _ if you like.
Result
Settings
Result
Settings
Result
Settings
Result
Recent
To read binary as decimal, add up the place values sitting under every 1: 1, 2, 4, 8, 16 and so on from the right. Paste a value like 101101 or 0b1111_0000 and you see the decimal number straight away, plus hex and octal. Free, no account needed.
How to do it by hand
- Write the place values over the digits from right to left: 1, 2, 4, 8, 16, 32 and onward.
- Keep the place values that sit above a 1 and cross out the ones above a 0.
- Add what is left. That sum is the decimal number.
- Quick check: the last digit tells you odd (1) or even (0).
Worked examples
1011
8 + 0 + 2 + 1
11
110010
32 + 16 + 2
50
10000001
128 + 1
129
Common mistakes
- Starting the place values at 2. The rightmost bit is worth 1.
- Reading 10 in binary as ten. It is two.
- Forgetting the width for signed data. 10000001 is 129 unsigned but -127 as a signed 8-bit value.
Powers of 2 (place values)
| Place (from the right) | Binary digit | Decimal value |
|---|---|---|
| 0 | 1 | 1 |
| 1 | 10 | 2 |
| 2 | 100 | 4 |
| 3 | 1000 | 8 |
| 4 | 10000 | 16 |
| 5 | 100000 | 32 |
| 6 | 1000000 | 64 |
| 7 | 10000000 | 128 |
| 8 | 100000000 | 256 |
| 9 | 1000000000 | 512 |
| 10 | 10000000000 | 1,024 |
| 11 | 100000000000 | 2,048 |
| 12 | 1000000000000 | 4,096 |
| 13 | 10000000000000 | 8,192 |
| 14 | 100000000000000 | 16,384 |
| 15 | 1000000000000000 | 32,768 |
| 16 | 10000000000000000 | 65,536 |
Questions people ask
Can I paste a long bit string with a space every 8 bits?
Spaces separate values, so each group would be converted on its own. Join the groups with _ or remove the spaces to keep it as one number.
What does the 0b prefix do?
It tells the tool the value is binary no matter which base is selected. 0b11 is 3.
Can I flip one bit and watch the result change?
Yes. Click a cell on the bit board and the decimal, hex and octal results follow.