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
- 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.
- 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.
- 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.
- 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
- https://www.electronics-tutorials.ws/binary/bin_2.html
- https://developer.mozilla.org/en-US/docs/Glossary/Binary
- https://en.wikipedia.org/wiki/Binary_number
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
- Prime Number CheckerCalculators
- Logarithm CalculatorCalculators
- LCM & GCD CalculatorCalculators
- Factorial CalculatorCalculators
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: