Professional Documents
Culture Documents
Subject: PRF192-PFC Workshop 01: Objectives
Subject: PRF192-PFC Workshop 01: Objectives
Workshop 01
Objectives:
(1) Reviewing for number systems
(2) Exploring memory of a C program
Recommendations
Part 1: Students do exercises using notebooks
Part 2: Students develop programs, run them, write down their memory structure to
notebooks.
Exercise 2(2 marks): Convert decimal numbers to binary and hexadecimal ones
101101111 b
+ 100111011 b
110110001 b
110001101b
101 1110 1000 b
1011010 b* 1011b = 1 1110 1111 b
1101000b + 2AB h + 345 q = 3F8 h = 1170 q
3AFh / 1Ch = 10 0001 b = 33 d
3ACh – 562q = 10 0011 1101 b = 573 d
3FFA h / 327q = 100 1100 b = 76 d
Exercise 4 (2 marks)
1- Show binary formats of 1-byte unsigned numbers: 251 , 163, 117
2- Show binary formats of 2-byte unsigned numbers: 551 , 160, 443
3- Show binary formats of 1-byte signed numbers: -51 , -163, -117, 320
4- Show the decimal values of 1-byte unsigned representations: :
01100011 b , 10001111 b , 11001010 b , 01001100 b
Sample
c:22936 ‘A’
23
i:22936 1
16
l:2293 1000
612
f:22936 0.5
08
d:22936 12.809
00
Complete the code of following program then draw it’s memory structure
(2 marks)