Binary and other number bases
Machine translation
Learn
Our system groups in 10s: it is base 10. It uses ten digits, from 0 to 9, and each place is worth 10 times the one to its right.
The binary system is base 2. It groups in 2s and has only two digits: 0 and 1. Each place is worth double the one to its right: 1, 2, 4, 8, 16, 32…
8 4 2 1 1 0 1 1 1011 in base 2: 8 + 2 + 1 = 11 (the places with a 1, in colour) To read a binary number, you add up the places that have a 1. To write one, you look for the places that add up to the number. For example, 13 = 8 + 4 + 1, and it is written 1101.
13 = 8 + 4 + 1: in base 2 it is written 1101 You count as usual, but with two digits. When a place reaches 2, it is exchanged for 1 in the next place. So 1 + 1 is 10, which is read “one, zero” and not “ten”.
Base 10 Base 2 1 1 2 10 3 11 4 100 5 101 6 110 7 111 8 1000 Counting from 1 to 8 in base 10 and in base 2 There are more bases. In base 5 you group in 5s, with the digits 0, 1, 2, 3 and 4. The places are worth 1, 5, 25… So 32 in base 5 is 3 × 5 + 2 = 17. In any base, the greatest digit is one less than the base.
25 5 1 0 3 2 32 in base 5 = 3 × 5 + 2 = 17 Computers use binary. Each digit, a bit, is stored with a switch: on is 1 and off is 0.
Worked examples
Example 1
What number is 1101 in base 2?
| 8 | 4 | 2 | 1 |
|---|---|---|---|
| 1 | 1 | 0 | 1 |
- Write down the places: 8, 4, 2 and 1.
- Add up the places that have a 1: 8, 4 and 1.
- 8 + 4 + 1 = 13.
1101 in base 2 is 13.
Watch out! Many children read it as “one thousand, one hundred and one”, as if it were base 10.
Example 2
Mara wants to write 19 in base 2. How does she write it?
| 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|
| ? | ? | ? | ? | ? |
- The places are 16, 8, 4, 2 and 1.
- The greatest place that fits into 19 is 16, and 19 − 16 = 3 is left.
- 3 is 2 + 1: the 8 and the 4 are not used.
- Put a 1 in 16, 2 and 1, and a 0 in 8 and 4: 10011.
19 in base 2 is 10011.
Watch out! Many children write the values of the places, 16, 2 and 1, instead of ones and zeros.
Example 3
Tony counts in base 2: 1, 10, 11… What number comes after 111?
| 4 | 2 | 1 |
|---|---|---|
| 1 | 1 | 1 |
- 111 is the places 4, 2 and 1: it is 7.
- The next one is 8, which needs a new place.
- The three places reach 2 and are exchanged for 1 in the next place: 1000.
After 111 comes 1000.
Watch out! Many children write 112, but in base 2 the digit 2 does not exist.
A challenge to think about
Count in binary on the fingers of one hand: a finger up is 1 and a finger down is 0. The places are worth 16, 8, 4, 2 and 1, starting with the thumb. How high can you count? Show someone your age in binary.
Practise
Rounds of 10 questions. Choose a level:
Your grade in this topic:No grade yetDo a round at the Basic level to get a grade.
Next topic: Natural numbers, integers and rational numbers →