Binary to Decimal Converter
Convert a binary number to decimal, hex and octal with every place value shown. Binary is a base-2 positional system. Example: with binary number 10011100, the result is Decimal = 156; Hexadecimal = 9C; Octal = 234.
Last updated · By S. Dilshan · Runs in your browser, nothing is uploaded
Step-by-Step Solution
How do you use the Binary to Decimal Converter?
Type or paste a binary number made only of 0s and 1s. Spaces, underscores and a leading 0b prefix are ignored, so you can paste values like 1001 1100 or 0b10011100 directly. The decimal value appears instantly, along with the equivalent hexadecimal and octal numbers and the number of bits.
The Step-by-Step Solution box lists the place value of every bit, so you can see exactly how the total is built. Very long values are supported, up to 256 digits, because the arithmetic is exact and never rounds.
What formula does the Binary to Decimal Converter use?
Binary is a base-2 positional system. The rightmost bit is worth 2⁰ = 1, the next is worth 2¹ = 2, then 4, 8, 16, 32, 64, 128 and so on, doubling each step to the left. To convert, multiply each bit by its place value and add the results. Only bits that are 1 contribute, so you can simply add up the place values where a 1 appears.
In symbols, a binary number with bits bₙ…b₁b₀ equals Σ bᵢ × 2ⁱ. This is exactly how decimal works with powers of 10, just with a smaller set of digits.
Worked example: 10011100
Reading from the left, the 1s sit in the 128, 16, 8 and 4 positions, and the 0s contribute nothing. So 10011100₂ = 128 + 16 + 8 + 4 = 156. In hexadecimal this is 9C, because the groups 1001 and 1100 equal 9 and C, and in octal it is 234. A quick check is that an 8-bit number can never exceed 255, the value of 11111111.
Why binary conversion matters
Everything a computer stores is ultimately binary, and converting to decimal lets humans read it. Programmers decode flags and permissions, network engineers read subnet masks such as 11111111.11111111.11111111.00000000 (255.255.255.0), and students in digital logic courses work with binary daily.
A useful shortcut is that n bits can represent 2ⁿ different values, from 0 to 2ⁿ − 1. So 8 bits cover 0 to 255, 16 bits cover 0 to 65,535 and 32 bits cover 0 to 4,294,967,295. Knowing these limits helps you spot overflow bugs.
What are the most common mistakes with the Binary to Decimal Converter?
- Counting place values from the left instead of from the right.
- Typing a digit other than 0 or 1. The tool will point out the first invalid digit.
- Forgetting that a leading bit of 1 in a signed number may mean a negative value in two’s complement notation.
- Skipping a place value when a 0 appears, which shifts every higher bit by one position.
What Is the Tested Example for the Default Values?
This example is computed by the same code that powers the calculator above, so you can compare it with your own numbers or a textbook answer.
| Input: Binary number | 10011100 |
|---|---|
| Decimal | 156 |
| Hexadecimal | 9C |
| Octal | 234 |
| Number of bits | 8 |
Where Can You Verify These Formulas?
The definitions and formulas on this page follow standard references. Check them against these sources:
Built and maintained by S. Dilshan. Found a mistake? Email [email protected] with the page address.
Frequently Asked Questions
How do you convert binary to decimal?
Multiply each bit by 2 raised to its position, counting from 0 on the right, and add the results. For 1101 that is 8 + 4 + 0 + 1 = 13.
What is the largest number 8 bits can hold?
255, which is 11111111 in binary. In general n bits hold values from 0 to 2ⁿ − 1.
Can this converter handle negative binary numbers?
It accepts a leading minus sign for simple signed binary. For two’s complement representations, use the two’s complement calculator.