Learn binary › Converter

Binary to decimal converter

Type a number in binary or in decimal, or turn on the lights. The sum shows underneath.

Convert a number

128 + 32 + 16 + 2 + 1

From 0 to 65,535.

From binary to decimal

  1. Write the value of each place under the digits, from right to left: 1, 2, 4, 8, 16, and so on.
  2. Keep only the values that sit under a 1.
  3. Add them up.

Example: 101101 has a 1 in the places of 32, 8, 4 and 1. So 32 + 8 + 4 + 1 = 45.

From decimal to binary

Find the largest place that fits in the number and turn its light on. Take that value away and repeat with what is left, until you reach zero.

Example with 45: 32 fits and 13 is left; 8 fits and 5 is left; 4 fits and 1 is left; 1 fits. The lights of 32, 8, 4 and 1 are on: 101101.

Another way is to divide by 2 until you reach zero and read the remainders from the bottom up. Both ways give the same result.

Table from 0 to 15

DecimalBinaryDecimalBinary
0000081000
1000191001
20010101010
30011111011
40100121100
50101131101
60110141110
70111151111

How far it goes

This converter goes up to 65,535, the largest number 16 lights can hold. With 8 lights, one byte, the maximum is 255.