Workshop01 - Answer
Workshop01 - Answer
Workshop 01
Name: your_name
Student ID: your_student_ID
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.
Part 1: Number systems:
1A7B h + 26FE7 h = ?h = ?b
1A7B h + 26FE7 h = 2 8A62 h = 0010 1000 1010 0110 0010 b
1101101101 b - 10110111 b = ?b
1101101101 b - 10110111 b = 0010 1011 0110 b
3654 q - 337 q = ?q = ?b
3654 q - 337 q = 3 315 q = 0110 1100 1101 b
3AB7 h - 1FA h = ?h = ?b
3AB7 h - 1FA h = 38BD h = 0011 1000 1011 1101 b
36A h - 576 q = ?h = ?b
576 q = 17E h
36A h - 576 q = 36A h - 17E h = 1EC h = 0001 1110 1100 b
64AE h - 1001101 b = ?q
1001101 b = 4D h
64AE h - 1001101 b = 64AE h - 4D h = 6461 h = 62 141 q
1 0110 1111 b
+ 1 0011 1011 b
1 1011 0001 b
1 1000 1101 b
= 0101 1110 1000 b
1011010 b * 1011 b
01011010 b
x 1011 b
01011010 b
01011010 b
00000000 b
01011010 b
= 01111011110 b = 0011 1101 1110 b
3AF h / 1C h = ?b = ?d
3AF h = 943 d
1C h = 28 d
3AF h / 1C h = 943 d / 28 d = 33 d = 0010 0001 b
3AC h – 562 q = ?b = ?d
3AC h = 940 d
562 q = 370 d
3AC h – 562 q = 940 d - 370 d = 570 d = 0010 0011 1010 b
3FFA h / 327 q = ?b = ?d
3FFA h = 16378 d
327 q = 215 d
3FFA h / 327 q = 16378 d / 215 d = 76 d = 0100 1100 b
Exercise 4 (2 marks):
Sample
Complete the code of following program then draw it’s memory
structure. (2 marks)