Read the places

Learn binary and hexadecimal conversion with place values, worked examples, and the double-and-add method.

A base is only place values

2³812²402¹212⁰11
1011 in binary: 8 + 2 + 1, which is 11.
1101D01106
Four binary digits make one hex digit.

In decimal, the places are 1, 10, 100 and so on. Each place is worth ten times the one to its right, because decimal has ten digits.

More

Binary has two digits, so each place is worth two times the one to its right: 1, 2, 4, 8, 16, 32. To read a binary number, add the places that have a 1 under them. So 1011 is 8 plus 0 plus 2 plus 1, which is 11.

There is a second way to read binary, and it is quicker on a long number. Double and add: start at the left and, for each digit, double what you have so far and add that digit. To go the other way, from decimal to binary, take away the biggest power of two that fits, write a 1 in its place, and carry on with what is left.

Hex has sixteen digits, written 0 to 9 then A to F. Sixteen is 2 times 2 times 2 times 2, so four binary digits are exactly one hex digit. That is why programmers write hex: it is binary, four digits at a time.

Lesson help

Add the places that have a 1 under them, and read binary four digits at a time to get hex.

About this lesson

Try the method in a practice when you are ready.

Report

A base is only place values

In decimal, the places are 1, 10, 100 and so on. Each place is worth ten times the one to its right, because decimal has ten digits.

Binary has two digits, so each place is worth two times the one to its right: 1, 2, 4, 8, 16, 32. To read a binary number, add the places that have a 1 under them. So 1011 is 8 plus 0 plus 2 plus 1, which is 11.

There is a second way to read binary, and it is quicker on a long number. Double and add: start at the left and, for each digit, double what you have so far and add that digit. To go the other way, from decimal to binary, take away the biggest power of two that fits, write a 1 in its place, and carry on with what is left.

Hex has sixteen digits, written 0 to 9 then A to F. Sixteen is 2 times 2 times 2 times 2, so four binary digits are exactly one hex digit. That is why programmers write hex: it is binary, four digits at a time.

2³812²402¹212⁰11
1011 in binary: 8 + 2 + 1, which is 11.
1101D01106
Four binary digits make one hex digit.

One each way, then hex

Write 45 in binary. The biggest power of two that fits in 45 is 32, so put a 1 in the 32 place and 13 is left. 16 does not fit, so that place is 0. 8 fits, and 5 is left. 4 fits, and 1 is left. 2 does not fit. 1 fits. The places used are 32, 8, 4 and 1, so 45 is 101101.

Now read 1011 back. The places are 8, 4, 2 and 1, and the digits are 1, 0, 1, 1. Add the places with a 1 under them: 8 plus 2 plus 1 is 11.

Double and add gives the same answer. Start at 1. Double and add 0 is 2. Double and add 1 is 5. Double and add 1 is 11.

Now 11010110 to hex. Split it from the right into fours: 1101 and 0110. 1101 is 8 plus 4 plus 1, which is 13, and 13 is D. 0110 is 4 plus 2, which is 6. So 11010110 is D6.

2⁵3212⁴1602³812²412¹202⁰11
45 in binary: 32 + 8 + 4 + 1.
16¹16D16⁰16
D6 in hex: 13 times 16, plus 6, which is 214.

Four binary digits

Here is 1100 in binary.

The places are 8, 4, 2 and 1. Add the places that have a 1 under them.

The usual slip is to count the places from the wrong end. The rightmost place is always 1.

2³812²412¹202⁰10
1100 in binary, with its places above the digits.

Try it

What is 1100 in decimal?

  1. 3
  2. 12
Show the answer

12

Correct. The 1s sit over the 8 place and the 4 place, and 8 plus 4 is 12.

Enable JavaScript to answer interactively and save your place.

Practice Number bases

Sign in free

Practice without limits and keep your progress.