Base Converter guide
How to Convert Binary to Decimal
To convert binary to decimal, give each digit a place value that doubles from right to left — 1, 2, 4, 8, 16 and so on. Then add up the place values wherever there is a 1. For 11010110 that is 128 + 64 + 16 + 4 + 2 = 214.
Place values are the whole idea
In the decimal numbers you use every day, each position is worth ten times the one to its right: ones, tens, hundreds, thousands.
Binary works exactly the same way, except each position is worth twice the one to its right: 1, 2, 4, 8, 16, 32, 64, 128.
That is the only difference. Once you have that, converting is just adding.
The method
Write the place values above your binary number, starting with 1 on the right and doubling as you move left. Then add up the place values that sit above a 1, and ignore the ones above a 0.
For 11010110:
| Place value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|---|
| Binary digit | 1 | 1 | 0 | 1 | 0 | 1 | 1 | 0 |
| Counts? | 128 | 64 | — | 16 | — | 4 | 2 | — |
Adding it up
128 + 64 + 16 + 4 + 2 = 214.
That is the conversion loaded into the calculator on this page, and it shows each place value as it works so you can compare it against your own.
Notice you only ever add — there is no multiplication to do, because every place value is multiplied by either 1 or 0, and multiplying by 1 changes nothing.
The doubling shortcut
There is a faster method that avoids writing place values at all, and it is well worth learning if you do this often.
Start with 0. Read the binary digits from left to right. For each digit: double what you have, then add the digit.
For 11010110: start at 0. Double and add 1 → 1. Double and add 1 → 3. Double and add 0 → 6. Double and add 1 → 13. Double and add 0 → 26. Double and add 1 → 53. Double and add 1 → 107. Double and add 0 → 214.
It looks like more steps, but each one is trivial and you never need to know how long the number is before you start. This is also how a computer does it.
Checking your answer quickly
A few checks that catch most errors:
- A binary number ending in 0 is always even; ending in 1, always odd. If 11010110 gave you an odd answer, something is wrong.
- An 8-digit binary number is somewhere between 128 and 255. If your answer falls outside that range, you have miscounted a place value.
- The leftmost 1 alone tells you the rough size. In 11010110 the leftmost 1 is worth 128, so the answer is between 128 and 255.
Powers of two worth memorising
These come up constantly, and knowing them makes everything else faster:
1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024
That is why file sizes and memory come in those odd-looking numbers. A kilobyte is 1024 bytes rather than 1000 because 1024 is 2 to the power of 10, and powers of two are what the hardware naturally works in.