Question: How does a microprocessor keep track of which instruction is next to be executed? For questions #7 - #9, please refer to the following description
- How does a microprocessor keep track of which instruction is next to be executed?
For questions #7 - #9, please refer to the following description
A processor begins with the number 0 in memory cell 150.
In memory cell 19 is an instruction to load the number 0 (zero) into register 2.
In memory cell 20 is an instruction to load memory cell 150 into register 3.
In memory cell 21 is an instruction to switch the program counter to 200 if register 3s value is greater than 0.
In memory cell 22 is an instruction to increment register 3 by 1. (i.e. r3s new value will be r3s old value+1)
In memory cell 23 is an instruction to increment register 2 by 1. (i.e. r3s new value will be r3s old value+1)
In memory cell 24 is an instruction to load the program counter with the value 21.
In memory cell 25 is an instruction to stop execution.
In memory cell 200 is an instruction to store the value in register 3 into memory cell 150.
In memory cell 201 is an instruction to stop execution.
The program counter begins with the value 19.
- (5 pts) What is the memory address (cell number) of the last instruction that will execute? _______
- (5 pts) When the program stops executing, what value will be stored in register 2? _______
- (5 pts) When the program stops executing, what value will be stored in memory cell 150? _______
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
