0% found this document useful (0 votes)
16 views

Module 2a Number Systems

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Module 2a Number Systems

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 44

SCSR1013 DIGITAL LOGIC

MODULE 2a:
NUMBER SYSTEMS

1
FACULTY OF COMPUTING
2
Numbering system

3
4
5
Example:

N = 4839.7210 → ( 43823190 . 7-12-2 )10

o (4 x 103) + (8 x 102) + (3 x 101) +


(9 x 100) + (7 x 10-1) + (2 x 10-2)

o (4 x 1000) + (8 x 100) + (3 x 10) +


(9 x 1) + (7 x 0.1) + (2 x 0.01)

o (4000) + (800) + (30) + (9) + (0.7) +


(0.02)
o 4839.72
6
7
Example:

Most significant digit (MSD) Least significant digit (LSD)

N = 4 8 3 9 . 7 2 10
10
Base number

Integer part Fraction part

8
Decimal number

9
Decimal number

10
Exercise 2a.1:

Express 567.2310 as a sum of values of each digit.

Solution:
= (5 x 102) + (6 x 101) + (7 x 100) + (2 x 10-1) + (3 x 10-2)
= (5 x 100) + (6 x 10) + (7 x 1) + (2 x 0.1) + (3 x 0.01)
= 500 + 60 + 7 + 0.2 + 0.03

11
Binary number

Example: Express the number as a sum of values of each digit

12
Exercise 2a.2:

Express 110100.0112 as a sum of values of each digit.

Solution:
= (1 x 25) + (1 x 24) + (0 x 23) + (1 x 22) + (0 x 21) +
(0 x 20) + (0 x 2-1) + (1 x 2-2) + (1 x 2-3)

= (1 x 32) + (1 x 16) + (0 x 8) + (1 x 4) + (0 x 2) +
(0 x 1) + (0 x 0.5) + (1 x 0.25) + (1 x 0.125)

= (32) + (16) + (4) + (0.25) + ( 0.125)

13
Octal number

Example:

Express the number as a sum of values of each digit

14
Exercise 2a.3:

(No digit 8 in octal number system)

Express 568.238 as a sum of values of each digit.

Is there any errors ?

15
Exercise 2a.3:

Express 567.238 as a sum of values of each digit.

0.015625

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.015625)
= 320+ 48 + 7 + 0.25 + 0.046875

16
Hexadecimal number

Representation of decimal
value into hexadecimal value

17
Example: Express the number as a sum of values of each digit

18
Exercise 2a.4:

Express 567.2316 as a sum of values of each digit.

Solution:
= (5 x 162) + (6 x 161) + (7 x 160) + (2 x 16-1) + (3 x 16-2)
= (5 x 256) + (6 x 16) + (7 x 1) + (2 x 0.0625) + (3 x 0.00390625)
= 1280 + 96 + 7 + 0.125 + 0.1171875

19
Exercise 2a.4b:

Express 5A7.2F16 as a sum of values of each digit.

Solution:
= (5 x 162) + (A x 161) + (7 x 160) + (2 x 16-1) + (F x 16-2)
= (5 x 256) + (10 x 16) + (7 x 1) + (2 x 0.0625) + (15 x 0.00390625)
= 1280 + 160 + 7 + 0.125 + 0.05859375

20
290.86410

Note:
• All examples in previous slides are converted into decimal
numbers without the total.
• Can calculate the value in decimal to those examples.

21
Calculate the value in decimal to all previous exercises.

Exercise 2a.2:
110100.0112 = (32) + (16) + (4) + (0.25) + ( 0.125)
= 52.37510
Exercise 2a.3:
567.238 = (320) + (48) + (7) + (0.25) + (0.046875)
= 375.29687510
Exercise 2a.4:
567.2316 = (1280) + (96) + (7) + (0.125) + (0.1171875)
= 1383.2421910
Exercise 2a.4b:
5A7.2F16 = (1280) + (160) + (7) + (0.125) + (0.05859375)
= 1447.1835910
22
Exercise 2a.5:

10 21 1
100 22 11 1010
111 10001
10000 24 1111 11010
100000 25 100011

23
Solution:

(c)

(a)

(b)

24
successive division

25
Successive Division:

122
Remainder

8 82
8 10 2
1 2

Answer

26
Successive Division:

Remainder
2 42 101010

2 21 0
2 10 1
2 5 0

2 2 1

1 0
Answer

27
7FF

Remainder

16 2047 15 = F
16 127 15 = F

7
Answer
28
29
.0101
Answer:

0 625 0

0.625 1 25 1

0.25 0 5 0

0.5 1 1

30
.CC49
Answer:

12 768 12

0.768 12 288 12

0.288 4 608 4

0.608 9 9
stop until reaching the desired fractional digits
31
- Successive division
- Successive multiplication

32
Exercise 2a.7:

5 A 7 . 2 E F 16
1447.1835910 = ___________

1447 + 0.18359
Successive Division: Successive Multiplication:
(Whole part) (Fraction part)
Remainder

16 1447 7 0.18359 x 16 = 2.93744 = 2


16 90 10 = A 0.93744 x 16 = 14.99904 = E
0.99904 x 16 = 15.98464 = F
5
(up to 3 fractional points)

33
34
Binary2 → Octal8

2316
8 2n = 8
n=3
3
LSB

11 00 0 1 1 0 0 11 1 1 0

2 3 1 6

35
Binary2 → Hexadecimal16

4CE 2n = 16
n=4

4
LSB

0 11 00 00 11 11 00 00 11 11 11 00

4 12 14
↓ ↓
C E
36
37
whole fraction

38
Whole fraction (Binary2 → Octal8)

Recall:
2n = 8
n=3
215.644
8
3

010 001 101

2 1 5
3

110 100 100

6 4 4
Whole fraction (Binary2 → Hexadecimal16)

Recall:
2n = 16
n=4
8D .D2

40
41
1 2 4 . A B 7
(Whole part) (Fraction part)

623.538 =

42
Summary of Number Systems Conversion

Successive Multiplication

Fraction Octal8

Group

Convert
2n = 8 22 21 20
n=3 4 2 1

Decimal10 Binary2
.

Positional number system

Convert
2n = 16

Group
23 22 21 20
Whole

n=4 8 4 2 1

Hex16
Successive Division

43
Summary of Number Systems Conversion

Successive Multiplication

Octal8
Fraction

111 → 78
Group
2n = 8

Convert
78 🡪🡪
111
n=3

Decimal10 Binary2
.

Positional number system

0111 → 716

716 🡪🡪 0111
Convert
2n = 16

Group
Whole

n=4

Hex16
Successive Division
…23 22 21 20
…8 4 2 1

44

You might also like