Professional Documents
Culture Documents
Base Conversion
Number systems
Decimal – 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Binary – 0, 1
Octal – 0, 1, 2, 3, 4, 5, 6, 7
Base Five
Hexadecimal system – 0, 1, 2, 3, 4, 5, 6,
7, 8, 9, A, B, C, D, E, F
HML\D:\D_My Document\My
Documents\maths\SPM\form5\lessons 2
Why different number systems?
HML\D:\D_My Document\My
Documents\maths\SPM\form5\lessons 3
Base Conversion
HML\D:\D_My Document\My
Documents\maths\SPM\form5\lessons 4
Base Conversion
Conversion
Binary number,
Octal number,
Decimal number.
HML\D:\D_My Document\My
Documents\maths\SPM\form5\lessons 5
Base Conversion
Decimal Binary Octal Base Five Hexadecimal
0 0000 0 0 0
1 0001 1 1 1
2 0010 2 2 2
3 0011 3 3 3
4 0100 4 4 4
5 0101 5 10 5
6 0110 6 11 6
7 0111 7 12 7
8 1000 10 13 8
9 1001 11 14 9
10 1010 12 20 A
11 1011 13 21 B
12 1100 14 22 C
13 1101 15 23 D
14 1110 16 24 E
15 1111 17 30 F
HML\D:\D_My Document\My
Documents\maths\SPM\form5\lessons 6
Base Conversion
For example:
62 = 111110 = 76 = 222
Decimal binary octal base five
1 For Decimal:
62 = 6x101 + 2x100
2 For Binary:
111110 = 1x25 + 1x24 + 1x23 + 1x22 + 1x21 + 0x20
3 For Octal:
76 = 7x81+ 6x80
4 For Base Five:
189 = 2x52 + 2x51 + 2x50
HML\D:\D_My Document\My
Documents\maths\SPM\form5\lessons 7
Binary and decimal system
Binary to decimal
X . 2 7 + X . 2 6 + X . 2 5 + X . 2 4 + X . 2 3 + X . 2 2+ X . 2 1 + X .
20
Decimal to binary
Keep dividing the number by two and keep
track of the remainders.
Arrange the remainders (0 or 1) from the
least significant (right) to most significant (left)
digits
Example – see next slide
HML\D:\D_My Document\My
Documents\maths\SPM\form5\lessons 8
Base 10 to Base 2 Conversion
HML\D:\D_My Document\My
Documents\maths\SPM\form5\lessons 10
Base 10 and Base 8 Conversion
How to convert the decimal number to
octal system
e.g. convert 1910 in octal form
8 |19 ----3
8 | 2 ----2
0
1810 = 238
Convert 458 to decimal number
458= 3710
4x81+ 5x80
HML\D:\D_My Document\My
Documents\maths\SPM\form5\lessons 11
Base 10 and Base 5 Conversion
How to convert the decimal number to
octal system
e.g. convert 1910 to base 5
5 |19 ----4
5 | 3 ----3
0
1810 = 345
Convert 435 to decimal number
435= 2310
4x51+ 3x50
HML\D:\D_My Document\My
Documents\maths\SPM\form5\lessons 12
Base 2 and 5 Conversion
5 |18 ----3
5 | 3 ----3
0
100102 = 335
HML\D:\D_My Document\My
Documents\maths\SPM\form5\lessons 13
Number Bases
8415
HML\D:\D_My Document\My
Documents\maths\SPM\form5\lessons 15
Binary Addition
Rules.
0+0=0
0+1=1
1+0=1
HML\D:\D_My Document\My
Documents\maths\SPM\form5\lessons 16
Binary Addition
Verification
1111 5510
110111 + 2810
+ 011100 8310
232 2
64 32 16 8 4 2 1
- 222 2 1 0 1 0 011
1010011 = 64 + 16 + 2 +1
= 8310
HML\D:\D_My Document\My
Documents\maths\SPM\form5\lessons 17
Binary Addition
e.g.
100111+ 10110 =
Verification
100111
+ 010110
___________
HML\D:\D_My Document\My
Documents\maths\SPM\form5\lessons 18
Octal Addition
11
6437 8
+ 251 0 8
99
- 88 (subtract Base (8))
1114 7 8
HML\D:\D_My Document\My
Documents\maths\SPM\form5\lessons 19
Octal Addition
ex
3536 8
+ 2 4 5 78
HML\D:\D_My Document\My
Documents\maths\SPM\form5\lessons 20
Decimal Subtraction
How it was done?
( add the base 10 when borrowing)
7 13 10 10 10
8 4 1 15 7 3 0 10
- 4 6 5 7 8 4 1 5
13 10 15
3 7 5 8 -4 6 5 7
3 7 5 8
HML\D:\D_My Document\My
Documents\maths\SPM\form5\lessons 21
Binary Subtraction
Verification
8310
- 2810
110 1 5510
0 10 0 1010
1 0 1 0 0 1 12 64 32 16 8 4 2 1
- 0 1 1 1 0 02 1 1 0 1 1 1
= 32 + 16 + + 4 + 2 +1
1 1 0 1 1 12
= 5510
HML\D:\D_My Document\My
Documents\maths\SPM\form5\lessons 22
Binary Subtraction
exercise
100111- 10110=
Verification
100101
- 010110
___________
HML\D:\D_My Document\My
Documents\maths\SPM\form5\lessons 23
Octal Subtraction
8
009
1 1 1 4 78
- 64378
2 51 0 8
HML\D:\D_My Document\My
Documents\maths\SPM\form5\lessons 24
Octal Subtraction
ex
3 5 3 68
- 2 4 5 78
HML\D:\D_My Document\My
Documents\maths\SPM\form5\lessons 25