Yr8 Bases
Yr8 Bases
Yr8 Bases
Dr J Frost ([email protected])
www.drfrostmaths.com
@DrFrostMaths
Objectives:
1. To appreciate how we can have different number systems using
different ‘bases’.
2. Count in different bases.
3. To convert numbers from decimal to another base.
4. To convert numbers from any base to decimal.
5 0
6 1 2 344 111 99
7 10 10 400 1000 9A
8 11 11 401 1001 9B
9 100 12 402 1010 9C
10 … 20 … … 9D
11 21 9E
12 … 9F
… A0
…
• What do you think it means for our ‘normal’ number system to be base 10?
Each digit has 10 possible values.
?
Base
0
1
10
11
100
101 Next number?
110
111
1000
1010
1111
Counting Game!
Everyone stand up. Take it in turns to count in ternary (base 3), starting at 0. If you get it
wrong, you sit down.
a Base 2: 1, 10, 11, 100, 101, 110, Find the next number is base 5:
? 1010
111, 1000, 1001,
4
a) 4 10? b) 234 240 ?
b Base 5: 1, 2, 3, 4, 10, 11,
? c) 243 244 ? d) 344 400 ?
12, 13, 14, 20
c Base 4: 1, 2, 3, 10, 11, 12, A number in base has digits.
13, 20, 21, 22? 5
b) How many possible values are there
2 What number comes after 555 in:
a Base 6? 1000
for each digit? ?
b Base 7? 556
? c) Therefore how many possible
numbers up to digits are there? ?
?
N How many times does the digit 0 occur if you write out the numbers 1 to 111111
in binary? (Hint: consider all two-digit numbers, then three, and so on)
2 digit numbers: occurrence You can see the first numbers are powers of 2 and the second are
3 digit numbers: occurrences going up by 1 each time.
Why: Consider just 5 digit numbers. There are possible numbers
4 digit numbers: occurrences
?two possibilities). For each digit half of the possibilities will be 0,
(because the first digit has to be 1 but the other digits each have
5 digit numbers: occurrences
thus each digit (except the first) contributes zeros. There’s 4 digits
6 digit number: occurrences which contributes zeroes, thus .
Total = 129 In general for digit numbers, zeroes will be seen.
Any Base Decimal
If we were to write out the digits of the decimal
number “2493”, what is the value of each digit?
(Hint: Think primary school!)
?
2000 +400 +90?+ 3 = 2493
Any Base Decimal
Now suppose we had a number in base 5 instead.
How do we convert it to decimal?
125 25 ? 5 1
multiply 4 3 0 15
500 + 75 + 0 ?+ 1 = 576?
Test Your Understanding
Copy and complete in your book.
8 4 2? 1 64 16 ? 4 1
1 0 1 12 3 3 0 24
8 + 0 +?2 + 1 = 11 192 + 48 + ? 0 + 2 = 242
27 9 ?3 1
1 2 2 03
27 + 18 +? 6 + 0 = 51
, G e t
a ya n
a M re !
I’m t O f H e
e O u
M
The Maya numeral system is base 20
(“vigesimal”).
60 + 0 = 0
3 3 06 03 00
Q1
20 1
120 + 6 = 126
661261 051 56
Q2
1232435 32 23
Q3
2391441 291
Q4
400 20 1
400 + 0 + 11 = 411
1212111 114 11
Q5
490118019801380
Q6
8000 400 20 1
157784582984396884196884
Exercise 2
In computing, a byte consists of 8 bits, where each bit
4 is a binary digit. What is the largest possible number
Convert the following numbers from
1 in decimal that a byte can represent?
the indicated base to decimal.
11012 13 ? ?
1112 7 ? 5
In general, what is the largest number in decimal that
can be represented by binary digits? Give your
1100112 51 ? answer in terms of .
10223
35 ? ?
7348
476 ? 6
A three-digit number is 100 in decimal. What’s the
68 ? smallest the base can be?
In base 4 the biggest number in decimal is , whereas
2335 198 ? ?
in base 5 it’s . So 5 is the smallest base.
5306
2 What is the following Mayan number The number with digits , where and are unknown
in decimal? digits, is 107 in decimal if the number was originally in
N base 5, and 205 in decimal if it was originally in base
7. Determine and .
Solving, .
160?001 ?
432 is in an unknown base, but when converted to
3 When the number “a036” in base 7 decimal, gives 164. Determine the base.
is converted to decimal, the value is Let the base be . Then . Solving this quadratic
1742. Determine the value of the N equation gives .
digit .
? ?
Summary So Far
We have learnt that the numbers we use in everyday life are in
“base 10”.
?
?
But numbers can be in any ‘base’ such as base 2 (binary).
The base of a number system is
? values for each digit.
the number of possible
?
Decimal Any Base
Do the opposite! Convert 18 from decimal to binary.
16 8 ?4 2 1
1? 0 0 1 0 2
? ? ? ?
16 + 0 + 0 + 2 + 0 = 18
Bro Tip: Start with the highest multiple possible of the
highest power (in this case 16). Then see what’s left and
continue to get the digits.
Another Example
?
125 25 5 1
2 0 4 2 5
? ? ? ?
250+ 0 + 20+ 2= 272
Test Your Understanding
64 16 ? 4 1
1? 2? 1? 0? 4
64 +32 + 4 + 0 = 100
Decimal Any Base
It can help to write out multiples of your various powers. Below is base 6.
0: 0
1: 16 255 255 255 FF, FF, FF
2: 32
3: 48
4: 64 0? 0? 0? 00, 00,
? 00
5: 80
6: 96
7: 112 0? 255
? 0? 00, FF,
? 00
8: 128
9: 144
A: 160 255
? 255
? 0? FF, FF,
? 00
B: 176
C: 192
D: 208 75
? 172
? 198
? 4B, AC,
? C6
E: 224
F: 240
255
? 128
? 0? FF, 80,
? 00
Adding in decimal
2 0 5 3
+ 3 6 1 9
1 0 0 1
+ 1 1 0 1
1
? 0? 1
? 1
? 0
?
1
Another Example
1 0 1 0
+ 1 1 0 1 1
1 0 0 ? 1 0 1
Test Your Understanding
1 1 0 1
+ 1 1 1
1 0 1? 0 0
2 3 0 35
+ 2 2 45
?
3 0 3 2
Exercise 4
Convert the following to hexadecimal.
QQQ Time
2a 2 ?
8 a = 2, b =?4
2b 178 ?
3 551 ?