Binary to Decimal: 3 Easy Methods Compared, Best Pick
There are three practical ways to go from binary to decimal by hand, and none of them is best for every number. This guide runs all three on the same value, shows where each one wins, and ends with a decision table so you can pick in a few seconds.
What this guide covers
What binary to decimal actually does
Decimal counts in powers of ten, so the 3 in 300 means 3 × 10². Binary counts in powers of two. Every bit is worth double the bit to its right, starting at 1 on the far right. A bit that is 0 adds nothing, a bit that is 1 adds its full weight.
| Position (from the right) | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Weight | 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128 | 256 | 512 | 1024 |
Our binary to decimal test value for all three methods is 10110111. It is eight bits long, it has a mix of ones and zeros and it starts with a 1, which will matter in the last section.
Method 1: add the powers of two
Write the weights under the bits, then add the weights that sit under a 1. It is the method taught first because you can see every step.
| Bit | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 1 |
|---|---|---|---|---|---|---|---|---|
| Weight | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
| Contribution | 128 | 0 | 32 | 16 | 0 | 4 | 2 | 1 |
Sum: 128 + 32 + 16 + 4 + 2 + 1 = 183. Six terms, five additions. This is also what the converter shows in its positional breakdown, one cell per bit.
A run of n ones starting at the right equals 2 to the power n, minus 1. So 11111111 is 256 minus 1, which is 255. Likewise 1111111 is 128 minus 1, which is 127.
Method 2: double and add
Start with 0. For each bit from left to right, double the running total and add the bit. You never need the weights, only the ability to double a number. That makes it the natural choice for a stream of bits you read one at a time.
| Bit read | Running total before | Doubled | Add bit | New total |
|---|---|---|---|---|
| 1 | 0 | 0 | 1 | 1 |
| 0 | 1 | 2 | 0 | 2 |
| 1 | 2 | 4 | 1 | 5 |
| 1 | 5 | 10 | 1 | 11 |
| 0 | 11 | 22 | 0 | 22 |
| 1 | 22 | 44 | 1 | 45 |
| 1 | 45 | 90 | 1 | 91 |
| 1 | 91 | 182 | 1 | 183 |
Same answer, 183. It takes 7 doublings and 5 additions for this number, slightly more steps than method 1, but each step is a tiny one. This is the same idea as Horner method, the way a processor or a parser reads a number digit by digit.
Method 3: group in fours, then use hex
Split the bits into groups of four, starting from the right. Each group is one hex digit. Then convert the hex digits.
| Group | Binary | Value | Hex digit |
|---|---|---|---|
| High nibble | 1011 | 8 + 2 + 1 = 11 | B |
| Low nibble | 0111 | 4 + 2 + 1 = 7 | 7 |
So 10110111 is hex B7, and B7 equals 11 × 16 + 7 = 176 + 7 = 183. Only four small values are involved, and you will remember them quickly: 0001 is 1, 0010 is 2, 0100 is 4, 1000 is 8.
The payoff of this binary to decimal route shows up on longer input. Take 1111000010101010, sixteen bits. Groups: 1111, 0000, 1010, 1010. Hex: F0AA. Then 15 × 4096 + 0 × 256 + 10 × 16 + 10 = 61,440 + 160 + 10 = 61,610. Method 1 would need eight terms of up to 32768 each. If you only need the hex form, a hex to decimal converter takes it from there.
The two leftmost bits are set, so add 128 and 64. That is 192, which is also the first number in the address 192.168.1.4.
Practice set with answers
Try each binary to decimal case with the method you think fits, then compare. The hex column doubles as a check for method 3.
| Binary | Bits | Decimal (unsigned) | Hex | Fastest method |
|---|---|---|---|---|
| 1010 | 4 | 10 | A | Powers of two |
| 11001 | 5 | 25 | 19 | Powers of two: 16 + 8 + 1 |
| 100000 | 6 | 32 | 20 | One bit set, so it is 2 to the power 5 |
| 1100100 | 7 | 100 | 64 | Powers of two: 64 + 32 + 4 |
| 101010101 | 9 | 341 | 155 | Group in fours: 1, 0101, 0101 |
| 1111111111 | 10 | 1023 | 3FF | Run of ten ones: 1024 minus 1 |
Notice how often a pattern gives the answer away. A single 1 followed by zeros is a pure power of two. A run of ones is a power of two minus 1. Alternating bits such as 101010101 are quick in hex because each nibble repeats.
How to remember the weights
You only need to double. Start at 1 and say it aloud: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024. The last one, 1024, is why a kilobyte in computing was long counted as 1024 bytes. After a few minutes of practice the list is yours.
Type in binary to decimal mode and see decimal, octal and hex update together, with a bit by bit breakdown and an 8 bit signed option.
Open the Binary to Decimal ConverterThe methods side by side
| Powers of two | Double and add | Group in fours | |
|---|---|---|---|
| Needs memorised | Weights up to 128 or 256 | Nothing but doubling | 16 hex digits, powers of 16 |
| Steps for 10110111 | 6 terms, 5 additions | 7 doublings, 5 additions | 2 lookups, 1 multiply, 1 add |
| Steps for 16 bits | Up to 16 terms | 15 doublings, many adds | 4 lookups, 3 multiplies |
| Best length | Up to 8 bits | Any, if bits arrive in order | 12 bits and longer |
| Risk | Misplacing a weight | Arithmetic slip in a long chain | Wrong nibble split |
| Best for | Learning, exams | Code, streams | Debugging registers, masks |
Choose powers of two when
- The number has 8 bits or fewer.
- You want to see the structure of the number.
- You are explaining the idea to someone else.
Choose double and add or grouping when
- Bits arrive one at a time (double and add).
- The value has 16 or 32 bits (grouping).
- You are cross checking against a hex dump.
The other fork: unsigned or twos complement?
The binary to decimal methods above give the unsigned value. Computers often store signed integers in twos complement, where the leftmost bit is a sign bit with negative weight. The same eight bits then mean something else.
| Bits | Unsigned | Signed (8 bit twos complement) |
|---|---|---|
| 01111111 | 127 | 127 |
| 10000000 | 128 | minus 128 |
| 10110111 | 183 | minus 73 |
| 11111010 | 250 | minus 6 |
| 11111111 | 255 | minus 1 |
To read a signed value that starts with 1, invert every bit and add 1, then put a minus sign in front. For 10110111, the inverse is 01001000, adding 1 gives 01001001, which is 73. So the signed value is minus 73. Another way: take the unsigned value and subtract 256, since 183 minus 256 is minus 73.
| Width | Unsigned range | Signed range |
|---|---|---|
| 8 bits | 0 to 255 | minus 128 to 127 |
| 16 bits | 0 to 65,535 | minus 32,768 to 32,767 |
| 32 bits | 0 to 4,294,967,295 | minus 2,147,483,648 to 2,147,483,647 |
The binary to decimal converter has a switch for 8 bit signed mode, and the answer to a puzzling result is often that the switch is on or off by mistake. Wikipedia has a clear article on the twos complement representation if you want the proof.
Who should pick which method
Use powers of two. It is transparent and graders can follow every step. Practise until you know weights up to 128 without looking.
Use grouping for anything wider than a byte, because debuggers and logs print hex anyway. Use double and add when you write a parser. Always ask whether the field is signed.
Subnet and address work uses 8 bit groups, so powers of two is quick. The address 11000000.10101000.00000001.00000100 reads 192.168.1.4. Each octet is unsigned.
Sensor registers are often 8 or 16 bits. Group in fours to match datasheets that quote hex, then convert. Check the datasheet for signed readings such as temperature.
Working with other bases too? The octal converter groups bits in threes in the same way that hex groups them in fours.
Frequently asked questions about binary to decimal
How do I convert binary to decimal quickly?
Add the weights of the positions that hold a 1. The weights from the right are 1, 2, 4, 8, 16, 32, 64, 128. For 1011 that is 8 + 2 + 1 = 11.
What is 11111111 in decimal?
It is 255 when read as unsigned. If it is an 8 bit signed value in twos complement, the same bits mean minus 1.
Why does my binary number give a negative answer?
The leftmost bit is being treated as a sign bit. Turn off signed mode, or add 256 to an 8 bit negative result to get the unsigned value.
How many bits do I need for a decimal number?
Find the smallest power of two above your number. 255 needs 8 bits, 256 needs 9 bits and 65,535 needs 16 bits.
Is double and add the same as the positional method for binary to decimal?
It gives the same result with a different order of work. Doubling at each step builds the weights as you go, so you never write them down.
Can I convert binary fractions to decimal?
Yes. Bits after the binary point have weights 1/2, 1/4, 1/8 and so on. The converter on this page handles whole numbers.
Sources: Wikipedia: Twos complement
