Suppose that the following instructions are found at the given locations in memo
ID: 3871713 • Letter: S
Question
Suppose that the following instructions are found at the given locations in memory:
Location Contents
00 lda 20
01 add 21
02 sto 21
03 hlt
20 dat 005
21 dat 008
Show the contents of registers PC, MAR, MDR, and Acc (accumulator) at the conclusion of the instruction at location 01, i.e. before the instruction at 02 is fetched. (Hint: This question is constructed so that it doesn’t make any difference whether the addresses are decimal or hexadecimal numbers. The dat constants are decimal.)
Explain how the Little Man Computer can use the same operation code (9) for both input and output.
Explanation / Answer
PC (program counter ) is can also be called as instruction pointer holds the address of next instruction.
Here at location 01 it holds address of next instruction I.e., 02
MAR Memory address Register is a CPU register holds the address of data to be fetched from memory and data addressed by MAR is fed into MDR Memory data register.
Here MAR holds Address of 21 and MDR holds 21.
The add 21 adds the content of 21 and accumulator which is already loaded with 5
Now the accumulator holds 13
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.