Binary to Decimal Converter

Convert any binary number to its decimal equivalent instantly, with a full positional breakdown showing the value of every bit. Works in both directions β€” decimal back to binary too.

Quick answer

A binary number is converted to decimal by multiplying each bit by 2 raised to its positional power (starting at 0 on the right) and summing the results. For example, binary 1010 equals 1Γ—8 + 0Γ—4 + 1Γ—2 + 0Γ—1 = 10 in decimal. Binary uses only the digits 0 and 1 (base-2), while decimal uses digits 0–9 (base-10). This positional notation is the foundation of all digital computing.

Formula & method

D = b_{n-1}Γ—2^{n-1} + b_{n-2}Γ—2^{n-2} + … + b_1Γ—2^1 + b_0Γ—2^0
  • D β€” Resulting decimal value
  • b_i β€” The bit (0 or 1) at position i
  • n β€” Total number of bits in the binary string

Sum of each bit multiplied by its positional power of 2. Rightmost bit is position 0.

Binary = repeated division of D by 2, remainders read in reverse
  • D β€” Decimal integer to convert

Reverse conversion: divide the decimal integer by 2 repeatedly, collect remainders bottom-to-top.

Examples

Example 1: 1010 binary to decimal
Input
1010
Result
10
Why
Positions (right to left): bit 0 = 0Γ—1 = 0, bit 1 = 1Γ—2 = 2, bit 2 = 0Γ—4 = 0, bit 3 = 1Γ—8 = 8. Sum: 8 + 0 + 2 + 0 = 10.
Example 2: 11111111 binary to decimal
Input
11111111
Result
255
Why
All 8 bits are 1. Powers: 128+64+32+16+8+4+2+1 = 255. This is the maximum value of an unsigned 8-bit byte.
Example 3: 101101 binary to decimal
Input
101101
Result
45
Why
Positions: 1Γ—32 + 0Γ—16 + 1Γ—8 + 1Γ—4 + 0Γ—2 + 1Γ—1 = 32 + 0 + 8 + 4 + 0 + 1 = 45.
Example 4: 1000000 binary to decimal
Input
1000000
Result
64
Why
Only the leftmost bit is 1, at position 6. Value = 1Γ—2^6 = 1Γ—64 = 64. All other bits are 0.

Frequently asked questions

What is binary (base-2)?

Binary is a number system that uses only two digits, 0 and 1. Every position represents a power of 2, doubling in value from right to left. Computers use binary because electronic circuits naturally represent two states: off (0) and on (1).

How do you convert binary to decimal by hand?

Write out the binary number, then assign each bit a positional power of 2 starting at 0 from the right. Multiply each bit (0 or 1) by its corresponding power of 2, then add all the products together. The sum is the decimal value.

How do you convert decimal to binary by hand?

Repeatedly divide the decimal number by 2 and record the remainder (0 or 1) each time. When the quotient reaches 0, read the remainders from bottom to top β€” that sequence is the binary representation.

What is the largest decimal number a byte (8 bits) can hold?

An 8-bit unsigned byte can hold values from 0 to 255. This is because the maximum binary value with 8 bits is 11111111, which equals 2^8 βˆ’ 1 = 255.

What is the difference between binary and hexadecimal?

Binary (base-2) uses digits 0–1; hexadecimal (base-16) uses digits 0–9 and A–F. Hex is often used as a shorthand for binary because each hex digit represents exactly 4 bits (a nibble), making long binary strings much more readable.

Why do computers use binary instead of decimal?

Binary maps perfectly onto the two physical states of a transistor β€” conducting (1) or not conducting (0). Using more states would require distinguishing between multiple voltage levels, which is error-prone and harder to build reliably at scale.

Sources & references

External references open in a new tab. We are independent and not affiliated with these organizations.

  • βœ“ Free to use
  • βœ“ No sign-up required
  • βœ“ Runs entirely in your browser β€” nothing is uploaded.
  • βœ“ Formula and method shown above

Provided β€œas is” for general information only β€” results may be inaccurate, so verify before you rely on them. No warranty; use at your own risk.

Built and reviewed by HIFreeTools against the formula shown above and any authoritative references cited on this page. See our methodology and editorial standards.

Related tools

Embed this tool on your site

Free to embed, no sign-up. Paste this code where you want the binary to decimal converter to appear: