Home › Converters › Binary to Decimal

Binary to Decimal

Computers think in binary — long strings of 0s and 1s — but people read ordinary decimal numbers. This binary to decimal converter translates between the two: type a binary number and get its decimal value, exactly, even for 64-bit values with dozens of digits. The base boxes also convert to and from octal and hexadecimal, and the table under the result shows your number in all four bases at once.

The same value in all four bases

BaseValue
Binary (base 2)
Octal (base 8)
Decimal (base 10)
Hexadecimal (base 16)

How it works

Binary is a base-2 counting system: it has only two digits, 0 and 1, and every position in a binary number is worth a power of two instead of a power of ten. Reading from the right, the positions are worth 1, 2, 4, 8, 16, 32, 64, 128 and so on — each one double the previous. That is why computers use it: a wire is either on or off, so a single bit naturally holds one binary digit.

Decimal is the base-10 system everyone learns in school, with positions worth 1, 10, 100, 1000. Converting binary to decimal means adding up the place values of every 1 in the binary number. This converter does that addition with exact whole-number arithmetic, so a 64-bit value converts digit-for-digit instead of being rounded the way a normal calculator would round it.

Decimal value = (rightmost bit × 1) + (next bit × 2) + (next bit × 4) + (next bit × 8) + … — each position left is worth double: 2^0, 2^1, 2^2, 2^3, …

To convert by hand, write the powers of two over the binary digits, then add the powers wherever the digit is 1. For example, 1010 has 1s in the 8 and 2 positions, so it is 8 + 2 = 10 in decimal. Positions holding a 0 contribute nothing. The reverse trip — decimal to binary — works by dividing by two and collecting the remainders, and you can run it here by swapping the base boxes: this same tool converts decimal, octal and hexadecimal in any direction, because all four bases describe the same whole number, just written with different digits.

Worked example

A networking student in Ohio is reading a subnet mask and meets the binary octet 11111111. She wants its decimal value before she can finish the exercise.

Step 1: Write the powers of two over the digits — 128, 64, 32, 16, 8, 4, 2, 1.
Step 2: Every digit is 1, so add all eight values: 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1.
Step 3: The sum is 255.
Step 4: So the binary number 11111111 is 255 in decimal.

That is exactly what the converter shows for 11111111: 255 — the largest value one byte can hold, which is why 255 turns up everywhere in computing, from subnet masks to color channels.

Common mistakes and tips

The most common mistake is reading a binary number as if it were decimal: 1010 printed on a screen is "one thousand ten" only in decimal — as binary it is worth just 10. Always check which base a string of digits is in before doing arithmetic with it. The second trap is counting positions from the left. Place values start at the right with 2^0 = 1; count from the left and every value comes out wrong.

A useful pattern to remember: a run of n ones always equals 2^n − 1, so 1111 is 15, 11111111 is 255 and sixteen 1s are 65,535. And if you type a digit like 2 into the binary box, this converter will stop and tell you — binary has no digit 2. That check also makes it handy for catching typos in long bit strings.

FAQ

What is 11111111 in decimal?

11111111 in binary is 255 in decimal. Add the place values of all eight 1s: 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255.

How do I convert binary to decimal by hand?

Write the powers of two (1, 2, 4, 8, 16…) over the binary digits from the right, then add the powers wherever the digit is 1. Zeros contribute nothing.

What is 1010 in decimal?

1010 in binary is 10 in decimal: the 1s sit in the 8 and 2 positions, and 8 + 2 = 10. It looks like "one thousand ten" but binary place values are powers of two, not ten.

How large a binary number can this converter handle?

Very large. The converter uses exact arbitrary-precision arithmetic, so 64-bit values — and far longer bit strings — convert digit-for-digit without the rounding a floating-point calculator would introduce.

Why do I get an error when I type a 2?

Because 2 is not a binary digit. Binary only uses 0 and 1, so the converter names the invalid character and stops, rather than silently producing a wrong answer.

Disclaimer: Results are conversions for guidance only. Values are rounded for display; for legal, medical, or safety-critical use, confirm with an official source or a qualified professional.