Lesson 3 of 5 · Open

Counting with two digits

In binary, each place is worth twice the one to its right.

A computer writes numbers using only the digits 0 and 1. When it writes 10, it does not mean ten, it means two. That seems odd, but it follows the same idea as the numbers you use every day.

In the number 352, the 2 stands for two ones, the 5 for five tens, and the 3 for three hundreds: 3 · 100 + 5 · 10 + 2 · 1. Every place has a fixed value, its place value. Because there are ten digits, it gets ten times as large with every step from right to left. This familiar way of writing is called the decimal system.

With two digits, the place value doubles

If there are only the digits 0 and 1, the place value gets twice as large with every step from right to left, instead of ten times as large. This way of writing is called the binary system or base two. A number written this way is called a binary number. The table shows the place values of both systems side by side.

Place from the rightDecimal systemBinary system
first11
second102
third1004
fourth1,0008
fifth10,00016

How to read a binary number

Each digit says whether the value of its place counts: a 1 means yes, a 0 means no. In binary 10, the 1 is in the place worth 2 and the 0 is in the place worth 1. So the value 2 counts and the value 1 does not. That is why 10 means two here.

Binary 10: digit times place value, place by place.

Quick check

In binary 100: how much is the place that holds the 1 worth?

Example

Binary 101

The number has three places. From the right they are worth 1, 2, and 4. Go through the digits one by one.

  1. Left digit 1: the place value 4 counts.
  2. Middle digit 0: the place value 2 does not count.
  3. Right digit 1: the place value 1 counts.
  4. Add them up: 4 + 1 = 5

Example

Binary 11010

With five places it pays to write the place values down. Start with 1 on the right and double toward the left.

  1. Digits from the left: 1, 1, 0, 1, 0
  2. Place values above them: 16, 8, 4, 2, 1
  3. There is a 1 at 16, at 8, and at 2.
  4. Add them up: 16 + 8 + 2 = 26

The other way: writing a number in binary

To write a number as a binary number, you break it into place values. Take the largest place value that fits into the number and subtract it. Do the same with what is left until nothing remains. At the end every place value gets a digit, from the largest one you used down to 1: a 1 if you used it, otherwise a 0.

Example

13 as a binary number

The place values are 16, 8, 4, 2, and 1. 16 is already too large, so you start at 8.

  1. 8 fits: 13 − 8 = 5
  2. 4 fits: 5 − 4 = 1
  3. 2 does not fit into the remaining 1.
  4. 1 fits: 1 − 1 = 0, nothing is left.
  5. For 8, 4, 2, 1 the digits are 1, 1, 0, 1: the binary number is 1101.

Typical mistake

Reading the digits like an ordinary number, for example 101 as one hundred one. That cannot be right: in binary, the second place from the right is worth 2 and the third is worth 4, not 10 and 100. So say a binary number digit by digit: one, zero, one.

Remember

The places of a binary number are 1, 2, 4, 8, 16 and so on from the right, each worth twice the one before. Add up the values of all places that hold a 1.

Tasks

Three tasks complete the lesson. The order does not matter, the text above stays where it is.

Task 1 · Pairs

Which number belongs to which binary number?

Drag every card to its place, or tap it and then the place.

  • Binary 110
  • Binary 111
  • Binary 1001
  • Binary 1110

Task 2 · Input

Read the binary number. What number is it in decimal?

Enter the result.

Binary 10110 =

Task 3 · Sorting

Which binary numbers are read correctly?

Drag every card into its group, or tap the group.

5 cards left

Binary 11011 = 4

Go deeper

Three more tasks, optional. They do not count for completing the lesson.

Task 4 · Choice · optional

Binary 1010 is 10. Add a 0 at the right end and you get 10100. What number is that?

One answer is right.

Task 5 · Order · optional

Put these in order from the smallest to the largest value.

Drag the rows into the right order.

  1. 118 in decimal
  2. 2Binary 10000
  3. 3Binary 10101
  4. 4Binary 1111

Task 6 · Input · optional

Write the number 19 as a binary number. Type its digits into the field.

Enter the result.

19 = binary

Back to the chapter