How to convert binary to decimal
- Paste your binary numbers into Input, one per line.
- Each number turns into its decimal value straight away. Numbers can be on separate lines or separated by spaces; underscores and a leading 0b are ignored.
- Copy the decimal numbers, or change To if you need hex or octal instead.
Converting binary to decimal by hand
Write the place values over the bits, starting with 1 on the right and doubling at each step to the left. Then add up the place values that sit over a 1. For 11010110:
| Place value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|---|
| Bit | 1 | 1 | 0 | 1 | 0 | 1 | 1 | 0 |
128 + 64 + 16 + 4 + 2 = 214. A quick sanity check: the rightmost bit tells you if the number is odd. 11010110 ends in 0, so 214 has to be even.
Binary numbers from 0 to 16
| Binary | Decimal | Binary | Decimal |
|---|---|---|---|
| 0 | 0 | 1001 | 9 |
| 1 | 1 | 1010 | 10 |
| 10 | 2 | 1011 | 11 |
| 11 | 3 | 1100 | 12 |
| 100 | 4 | 1101 | 13 |
| 101 | 5 | 1110 | 14 |
| 110 | 6 | 1111 | 15 |
| 111 | 7 | 10000 | 16 |
| 1000 | 8 |
A binary number gains a digit each time it reaches a power of two: 10 is 2, 100 is 4, 1000 is 8 and 10000 is 16. A run of 1s is always one less than the next power of two, so 1111 is 15 and 11111111 is 255.