How to Convert Binary to Decimal Step by Step
Understand binary number systems and convert values to decimal using position-based multiplication—no shortcuts, just clarity.
Binary is a base-2 number system using only digits 0 and 1. Computers store all data in binary, but humans typically read decimal (base-10). Converting between them is a fundamental skill in programming and computer science.
Understanding Place Values
Each binary digit represents a power of 2, read from right to left: 20, 21, 22, 23, and so on. The decimal value is the sum of each bit multiplied by its place value.
Step-by-Step Example
Convert 1101 to decimal:
- 1 × 23 = 8
- 1 × 22 = 4
- 0 × 21 = 0
- 1 × 20 = 1
Sum: 8 + 4 + 0 + 1 = 13
Larger Numbers
For long binary strings, work systematically from right to left. Double-check each power of 2 - a common mistake is misaligning digit positions.
Related Developer Tools
For encoding data in web applications, explore our Base64 Encode and Base64 Decode tools.
Converting Decimal Back to Binary
The reverse process divides the decimal number by 2 repeatedly and reads remainders from bottom to top. For example, 13 divided by 2 gives remainders 1, 0, 1, 1 - reading upward produces 1101.
Where You Use This in Real Projects
Binary conversion appears in permission flags, color channel values, network subnet calculations, and low-level debugging. Understanding place values helps you read hex dumps and bitmask documentation even when you work in higher-level languages.
Key Takeaways
- Read binary digits right to left, multiplying by powers of 2
- Double-check alignment - one shifted digit changes the entire result
- Practice with short strings before tackling 16-bit or 32-bit values
Where you still meet binary
The arithmetic has not changed. You still meet it when you read permission bits, subnet masks, or a color channel. Write the weights above the bits, 1, 2, 4, 8, and so on from the right, and add the weights that sit above a 1. If the answer looks doubled or halved, the bit string was reversed.
Check the bit order before you trust the number
Write the places above the digits, from the right, starting at 1, then 2, then 4. A single reversed bit changes the result by that place value. Leading zeros do not change the value, but a fixed width of 8 bits matters when you are reading a byte from a spec. Hex and binary are both just notations. Convert through decimal if you are unsure, and compare one known example such as 11111111 before you convert a long string. The method has not changed. The mistakes are still the same ones.
Group long binary strings in fours if you also need hexadecimal. Four bits are one hex digit, from 0000 as 0 through 1111 as F. That check catches a shifted string faster than re-adding every place value. If the spec says two complement for negative numbers, do not use the plain place-value method on the high bit. The article method is for ordinary unsigned values. Say which one your assignment asked for.
Work on paper for the first long value, then use a calculator to add the place values you listed. If the two answers differ, you dropped a bit. Eight bits are a byte. Sixteen bits are two bytes. If a homework question says byte, do not silently drop leading zeros when you write the binary, and do not add them when you write the decimal. The decimal does not grow because you padded the binary. Say unsigned unless the class has taught negative numbers.
If the binary string came from a screenshot, retype it. A font can make 1 and l look alike, and a single wrong character ruins the place values after it. Count the digits before you start adding. If the question says 8 bits and you have 7, you dropped one. If you have 9, you added one. Fix the string, then convert. Do not convert first and hope the decimal looks familiar.
Write the place values in a column and add downward. A row that you add in your head is where a missed bit hides.
Frequently asked questions
Each digit is a power of two, from the right, starting at 2 to the power 0. Add the positions that are 1.
Use a calculator or write the powers down. This article is the method, not a file converter.
Bits left of the point are whole numbers. Bits to the right are halves, quarters, and so on.
Sizes, flags, and color values are still easier to read if you can expand a binary number.
Yes. Divide the decimal by 2 and read the remainders from bottom to top.