Exercise1: Suppose The Memory Cells at Addresses 00 Through 05 in The Machine
Exercise1: Suppose The Memory Cells at Addresses 00 Through 05 in The Machine
Assuming that the program counter initially contained 00, record the contents of the
program counter, instruction register, and memory cell at address 02 at the end of each
fetch phase of the machine cycle until the machine halts.
- Program counter: 06
- Instructions: 2211 – 3202 – COOO
- Memory cell at address 02: 11
Exercise2: Suppose the memory cells from addresses 00 to 05 in the machine described
in Appendix C contain the (hexadecimal) bit patterns given in the following table:
Address Content
00 14
01 02
02 34
03 17
04 C0
05 00
If we start the machine with its program counter containing 00, what bit pattern is in the
memory cell whose address is hexadecimal 17 when the machine halts?
b. If the machine is started with its program counter containing 00, what bit pattern is in
register 6 when the machine halts?
Register 6: 55
a. What would be the first instruction executed if we started the machine with its program
counter containing 00?
1221
b. What would be the first instruction executed if we started the machine with its program
counter containing 01?
2134
When answering the following questions, assume that the machine starts with its program
counter equal to 00.
a. Translate the instructions that are executed into English.
Instructions: (write the complete sentence from appendix C)
1202: Load
3242: Store
C000: Halt
b. What bit pattern is in the memory cell at address 42 when the machine halts?
- Memory cell at address 42: 32
c. What bit pattern is in the program counter when the machine halts?
- Program counter: 06
a. List the addresses of the memory cells that contain the program that will be
executed if we start the machine with its program counter containing 00.
The memory cells containing the program are: 00, 01, 02, 03, 04, 05
At C000 the program halt, no meaning for the other cells
b. List the addresses of the memory cells that are used to hold data.
The cell memory used to hold data is 06 from instruction 3B06
CSCI205 Chapter Review Problems - Solution Fall 2020 – 2021
If we start the machine with its program counter containing 00, when does the machine
halt?
- The machine halt at cell memory 06
Instructions: 25B0 – 3504 – C000
When answering the following questions, assume that the machine is started with its
program counter containing A4.
a. What is the bit pattern in register 0 : 13
b. What is the bit pattern in register 1: A7
c. What is the bit pattern in register 2: B7
d. What is the bit pattern in the cell memory FF: B7
CSCI205 Chapter Review Problems - Solution Fall 2020 – 2021
Exercise8: Suppose the memory cells at addresses 00 through 09 in the machine described in
Appendix C contain the following bit patterns:
00 1C03 02 Reg C: 03
2B03 04 Reg B: 03
5ABC 06 Reg A: 03
3A00 08
C000 0A
Reg C AND Reg B => 03 AND 03
00000011 AND
00000011
-------------
00000011 = 03
Assume that the machine starts with its program counter containing 00.
a. What will be in the memory cell at address 00 when the machine halts? 03
b. What bit pattern will be in the program counter when the machine halts? 0A