Module 2a Number Systems (Student)
Module 2a Number Systems (Student)
1
FACULTY OF COMPUTER SCIENCE & INFORMATION SYSTEM
2
Numbering system
3 4
Ex
tr
a
Example:
2012/2013(1) @ m 1
9/28/12
Ex
tr
a
Example:
N = 4 8 3 9 . 7 2 10
10
Base number
7 8
9 10
Ex
tr
a Binary number
Exercise 1:
Express 567.2310 as a sum of values of each digit.
Example:
11 12
2012/2013(1) @ m 2
9/28/12
Octal number
Exercise 2:
Express 110100.0112 as a sum of values of each digit.
Example:
13 14
Octal number
Exercise 3:
Express 567.238 as a sum of values of each digit.
0.015625
0.015625
Example:
+ (6 x 1) + (1 x 0.015625)
(Correction in module)
15 16
Hexadecimal number
Exercise 3:
Express 567.238 as a sum of values of each digit.
Solution:
= (5 x 82) + (6 x 81) + (7 x 80) + (2 x 8-1) + (3 x 8-2)
= (5 x 64) + (6 x 8) + (7 x 1) + (2 x 0.125) + (3 x 0.0625)
Representation of decimal
= 320+ 48 + 7 + 0.25 + 0.1875 value into hexadecimal value
17 18
2012/2013(1) @ m 3
9/28/12
Exercise 4:
Express 567.2316 as a sum of values of each digit.
Example:
19 20
Exercise 4b:
Express 5A7.2F16 as a sum of values of each digit.
Note:
• All examples in previous slide are converting into
decimal number without the total.
• Calculate the value in decimal to those example.
290.86410
21 22
Ex
tr
a
Exercise 5:
Exercise 2:
110100.0112 = (32) + (16) + (4) + (0.25) + ( 0.125)
= 52.37510
Exercise 3:
567.238 = (320) + (48) + (7) + (0.25) + (0.046875)
= 375.29687510
Exercise 4:
567.2316 = (1280) + (96) + (7) + (0.125) + (0.1171875)
= 1383.2421910
Exercise 4b:
5A7.2F16 = (1280) + (160) + (7) + (0.125) + (0.05859375)
= 1447.1835910
23 24
2012/2013(1) @ m 4
9/28/12
successive division
25 26
Successive Division:
Successive Division:
Remainder
122 101010
Remainder
2 42
8 82 2 21 0
8 10 2 2 10 1
1 2 2 5 0
2 2 1
Answer
1 0
Answer
27 28
7FF
Remainder
16 2047
16 127 15 à F
7 15 à F
Answer
29 30
2012/2013(1) @ m 5
9/28/12
Exercise 6:
144710 = ________ 16
31 32
.0101 .CC49
Answer: Answer:
MSB MSB
0 625 0 12 768 12
0.5 1 1 0.608 9 9
LSB LSB
33 34
Exercise 7:
1447.1835910 = ___________ 16
- Successive division
- Successive multiplication
35 36
2012/2013(1) @ m 6
9/28/12
Binary2 à Octal8
2316
8
ß LSB
1 0 0 1 1 0 0 1 1 1 0
2 3 1 6
37 38
Binary2 à Hexadecimal16
4CE
ß LSB
11 00 00 1 1 0 0 11 11 11 00
4 12 14
à C à E
39 40
215.644
whole fraction 8
3
2 1 5
3
6 4 4
41 42
2012/2013(1) @ m 7
9/28/12
8D .D2
43 44
Exercise 8:
AF90.7B16 = _________________________ 2
45 46
Ex
tr
a
Summary of Number Systems Conversion
Successive Multiplication
Octal8
Fraction
111 à 78
78 à 111
Group
Convert
2n = 8
n=3
Decimal10 Binary2
.
716 à0111
Convert
2n = 16
Group
Whole
n=4
Hex16
Successive Division
…23 22 21 20
…8 4 2 1
47
2012/2013(1) @ m 8