Binary converters

Binary to decimal converter.

Binary 1010 is decimal 10, and 11111111 is 255. Add the place values 1, 2, 4, 8, 16, 32, 64, 128 wherever there is a 1.

Advertisement

Input

Result

Enter a binary number.

How to binary to decimal by hand

Read the bits from the right. The rightmost bit is worth 1, the next 2, then 4, 8, 16 and so on, doubling each step. Add up the values of the positions that hold a 1.

For 1010: 8 + 0 + 2 + 0 = 10. For 11111111: 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255.

Worked examples

Binary to decimal examples
BinaryDecimal
101010
111115
0100 000165
1111 1111255
0001 0000 0000256

Need text, decimal and hex side by side? Use the full binary converter, or look a character up in the ASCII table.

Binary to decimal FAQ

How do you convert binary to decimal?

Write the place values 1, 2, 4, 8, 16 and so on under the bits, starting at the right, then add the values that sit under a 1. For 1010 that is 8 + 2 = 10.

What is 11111111 in decimal?

255. Eight 1 bits add up to 2^8 - 1, the largest value one byte can hold.

What is the largest decimal number 8 or 16 bits can store?

Eight bits store 0 to 255 and sixteen bits store 0 to 65,535 as plain unsigned numbers.

Does this handle very long binary numbers?

Yes. It uses exact whole-number arithmetic, so 64 ones convert to 18,446,744,073,709,551,615 with no rounding.

Advertisement
Advertisement