๐ Binary to Decimal Converter with Steps
By Shihab Mia ยท Updated 2026-07-10
Spaces are ignored. Only the digits 0 and 1 are allowed.
| Bit | Place value | Contribution |
|---|
This binary to decimal converter turns any string of 0s and 1s into its base 10 value in one step, so 1010 becomes 10 and 11111111 becomes 255. It shows the full positional breakdown (1010 = 1x8 + 0x4 + 1x2 + 0x1 = 10), the number of bits, and the matching hexadecimal and octal values. Everything runs in your browser, and it stays exact for very long binary numbers, well past the 8 or 32 bits most examples stop at.
What is the Binary to Decimal Converter?
Binary is a base 2 number system: every digit, called a bit, is either 0 or 1, and each position is worth twice the position to its right. Decimal, the numbers you use every day, is base 10, where each position is worth ten times the one to its right. A binary to decimal conversion is simply the job of asking, for each 1 in the binary string, how much that position is worth, and adding those values together. The rightmost bit is the ones place (2 to the power 0), the next is the twos place (2 to the power 1), then fours, eights, sixteens, and so on.
To convert binary to decimal by hand, write the place values above the bits from right to left: 1, 2, 4, 8, 16, 32, 64, 128 and upward. Then multiply each bit by its place value and total the results. For the binary number 1010 the places from the left are 8, 4, 2 and 1, so the sum is 1x8 + 0x4 + 1x2 + 0x1, which equals 10. Any bit that is 0 contributes nothing, so in practice you only add up the place values that sit under a 1. This is exactly what the converter above does, and it prints that breakdown line so you can check the work.
The same binary to decimal method scales to any length. The byte 11111111 has eight 1s over the places 128, 64, 32, 16, 8, 4, 2 and 1, which total 255, the largest value a single byte can hold. Add one more bit and 100000000 is 256. Because each extra bit doubles the range, an n-bit binary number can represent values from 0 up to 2 to the power n, minus 1. This is why 8 bits reach 255, 16 bits reach 65535, and 32 bits reach just over four billion.
On the computing side, standard JavaScript number math is exact only up to 53 bits, so a naive parseInt starts losing precision on very long binary strings. This tool uses BigInt internally, which keeps the decimal result exact no matter how many bits you paste in, and it still reports the hexadecimal and octal forms of the same value. So whether you are checking a 4-bit homework problem, decoding a full byte, or converting a 64-bit register dump, the binary to decimal result you see is the true value, not a rounded approximation.
When to use it
- Checking a homework or exam answer when converting a binary number to decimal by hand.
- Decoding a byte such as 11001010 from memory, a register, or a network packet into a readable decimal value.
- Teaching or learning place value in base 2 with a live positional breakdown you can watch update.
- Cross checking a binary value against its hexadecimal and octal forms while working on low level code.
How to use the Binary to Decimal Converter
- Type or paste a binary number (only 0s and 1s) into the input box, or tap one of the example buttons.
- Read the decimal value at the top; it updates instantly as you type.
- Check the positional breakdown line to see how each bit and place value adds up to the total.
- Use the copy buttons to grab the decimal, hexadecimal, or octal result for use elsewhere.
Formula & method
Worked examples
Convert the binary number 1010 to decimal.
- Write the place values from right to left under the bits: 8, 4, 2, 1.
- Match each bit to its place: 1 over 8, 0 over 4, 1 over 2, 0 over 1.
- Multiply and keep only the 1 bits: 1x8 = 8 and 1x2 = 2; the 0 bits add nothing.
- Add the contributions: 8 + 2 = 10.
Result: 1010 in binary equals 10 in decimal (hex A, octal 12).
Convert the byte 11001010 to decimal.
- Place values for 8 bits are 128, 64, 32, 16, 8, 4, 2, 1.
- The 1 bits sit over 128, 64, 8 and 2.
- Add those place values: 128 + 64 + 8 + 2.
- The 0 bits over 32, 16, 4 and 1 contribute nothing.
Result: 11001010 in binary equals 202 in decimal (hex CA, octal 312).
Bit place values (powers of 2) used in binary to decimal conversion
| Bit position (from right) | Power of 2 | Decimal place value |
|---|---|---|
| 0 | 2 to the 0 | 1 |
| 1 | 2 to the 1 | 2 |
| 2 | 2 to the 2 | 4 |
| 3 | 2 to the 3 | 8 |
| 4 | 2 to the 4 | 16 |
| 5 | 2 to the 5 | 32 |
| 6 | 2 to the 6 | 64 |
| 7 | 2 to the 7 | 128 |
| 8 | 2 to the 8 | 256 |
| 9 | 2 to the 9 | 512 |
Common binary values with their decimal, hex, and octal equivalents
| Binary | Decimal | Hex | Octal |
|---|---|---|---|
| 1 | 1 | 1 | 1 |
| 10 | 2 | 2 | 2 |
| 101 | 5 | 5 | 5 |
| 1010 | 10 | A | 12 |
| 1111 | 15 | F | 17 |
| 10000 | 16 | 10 | 20 |
| 1100100 | 100 | 64 | 144 |
| 11111111 | 255 | FF | 377 |
| 100000000 | 256 | 100 | 400 |
Common mistakes to avoid
- Reading the bits in the wrong direction. Place values start at 1 on the right and double as you move left. If you number the positions from the left instead, the powers come out reversed. Always align the rightmost bit with the ones place.
- Forgetting that a 0 bit still holds a position. A 0 does not add to the total, but it still occupies its place, so it keeps every bit to its left in the correct, larger place value. Do not skip or delete 0s when lining up the place values.
- Starting the exponent at 1 instead of 0. The rightmost bit is 2 to the power 0, which equals 1, not 2 to the power 1. Starting from 1 shifts every place value up by one and doubles the answer.
- Assuming plain number math stays exact for long binary strings. Standard JavaScript numbers lose precision beyond 53 bits, so a long binary to decimal conversion can drift. This tool uses BigInt so the decimal result stays exact for any length you enter.
Glossary
- Binary
- A base 2 number system that uses only the digits 0 and 1, where each position is worth twice the position to its right.
- Decimal
- The everyday base 10 number system using digits 0 through 9, where each position is worth ten times the one to its right.
- Bit
- A single binary digit, either 0 or 1. It is the smallest unit of data in computing.
- Byte
- A group of 8 bits. One byte can represent decimal values from 0 to 255.
- Place value
- The amount a digit is worth because of its position. In binary the place values are the powers of 2: 1, 2, 4, 8, 16 and so on.
- Most significant bit
- The leftmost bit in a binary number, which carries the largest place value and the most weight in the decimal total.
Frequently asked questions
How do you convert binary to decimal?
To convert binary to decimal, multiply each bit by its place value (a power of 2) and add the results. The rightmost bit is worth 1, then 2, 4, 8 and so on to the left. For 1010 that is 1x8 + 0x4 + 1x2 + 0x1 = 10.
What is 1010 in decimal?
Binary 1010 equals 10 in decimal. The place values from the left are 8, 4, 2 and 1, and only the 8 and 2 positions hold a 1, so 8 + 2 = 10.
What is 11111111 in decimal?
The 8-bit binary number 11111111 equals 255 in decimal. It adds every place value from 128 down to 1 (128 + 64 + 32 + 16 + 8 + 4 + 2 + 1), which is the largest value a single byte can hold.
What is the formula for binary to decimal?
The formula is decimal = sum of bit x 2 to the power position, counting positions from 0 at the rightmost bit. Each 1 adds its place value and each 0 adds nothing.
Can this converter handle very long binary numbers?
Yes. This binary to decimal converter uses BigInt internally, so it keeps the decimal result exact for binary strings well beyond 53 bits, unlike simple calculators that round large values.
What is the largest decimal value from 8 bits?
Eight bits reach a maximum decimal value of 255, because an n-bit binary number can represent 0 up to 2 to the power n minus 1, and 2 to the power 8 minus 1 is 255.