ToolNimba

๐Ÿ”Ÿ Binary to Decimal Converter with Steps

Shihab Mia By Shihab Mia ยท Updated 2026-07-10

Spaces are ignored. Only the digits 0 and 1 are allowed.

Decimal value
10
Positional breakdown
Bit count
4
Hex (base 16)
A
Octal (base 8)
12
Binary digits
1010
Place value of each bit
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

  1. Type or paste a binary number (only 0s and 1s) into the input box, or tap one of the example buttons.
  2. Read the decimal value at the top; it updates instantly as you type.
  3. Check the positional breakdown line to see how each bit and place value adds up to the total.
  4. Use the copy buttons to grab the decimal, hexadecimal, or octal result for use elsewhere.

Formula & method

decimal = sum of bit x 2position, counting positions from 0 at the rightmost bit. For a binary string b, the value is b0x20 + b1x21 + b2x22 + ... For example 1010 = 1x23 + 0x22 + 1x21 + 0x20 = 8 + 0 + 2 + 0 = 10.
Binary 1010 to Decimal1010place 8place 4place 2place 12 pow 32 pow 22 pow 12 pow 01x8 + 0x4 + 1x2 + 0x1= 10 in decimal

Worked examples

Convert the binary number 1010 to decimal.

  1. Write the place values from right to left under the bits: 8, 4, 2, 1.
  2. Match each bit to its place: 1 over 8, 0 over 4, 1 over 2, 0 over 1.
  3. Multiply and keep only the 1 bits: 1x8 = 8 and 1x2 = 2; the 0 bits add nothing.
  4. Add the contributions: 8 + 2 = 10.

Result: 1010 in binary equals 10 in decimal (hex A, octal 12).

Convert the byte 11001010 to decimal.

  1. Place values for 8 bits are 128, 64, 32, 16, 8, 4, 2, 1.
  2. The 1 bits sit over 128, 64, 8 and 2.
  3. Add those place values: 128 + 64 + 8 + 2.
  4. 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 2Decimal place value
02 to the 01
12 to the 12
22 to the 24
32 to the 38
42 to the 416
52 to the 532
62 to the 664
72 to the 7128
82 to the 8256
92 to the 9512

Common binary values with their decimal, hex, and octal equivalents

BinaryDecimalHexOctal
1111
10222
101555
101010A12
111115F17
10000161020
110010010064144
11111111255FF377
100000000256100400

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.