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 right | Decimal system | Binary system |
|---|---|---|
| first | 1 | 1 |
| second | 10 | 2 |
| third | 100 | 4 |
| fourth | 1,000 | 8 |
| fifth | 10,000 | 16 |
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.
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.
- Left digit 1: the place value 4 counts.
- Middle digit 0: the place value 2 does not count.
- Right digit 1: the place value 1 counts.
- 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.
- Digits from the left: 1, 1, 0, 1, 0
- Place values above them: 16, 8, 4, 2, 1
- There is a 1 at 16, at 8, and at 2.
- 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.
- 8 fits: 13 − 8 = 5
- 4 fits: 5 − 4 = 1
- 2 does not fit into the remaining 1.
- 1 fits: 1 − 1 = 0, nothing is left.
- 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
Tasks
Task 1 · Pairs
Which number belongs to which binary number?
Task 2 · Input
Read the binary number. What number is it in decimal?
Task 3 · Sorting
Which binary numbers are read correctly?
5 cards left
Go deeper
Task 4 · Choice · optional
Binary 1010 is 10. Add a 0 at the right end and you get 10100. What number is that?
Task 5 · Order · optional
Put these in order from the smallest to the largest value.
- 118 in decimal
- 2Binary 10000
- 3Binary 10101
- 4Binary 1111
Task 6 · Input · optional