Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

What is the purpose of step 2 (modify the PC) in the fetch-decode-execute cycle?

ID: 3871370 • Letter: W

Question

What is the purpose of step 2 (modify the PC) in the fetch-decode-execute cycle? What would happen if this step were omitted?

This are the steps:-

a) Fetch the next instruction from memory into IR.

b) Change PC to point to the next instruction.

c) Determine the type of instruction just fetched.

D) If the instruction uses a word in memory, determine where it is.

E) Fetch the word, if needed, into a CPU register.

F) Execute the instruction (running the operands through the data path).

G) Go to step 1 to begin executing the next instruction.

Explanation / Answer

PC holds the memory address of the instruction that is to be executed i.e. It holds the address of instruction to be executed next by the compiler.

Generally Compiler runs the programs and instructions sequentially one by one. But using PC it helps to the compiler to do branching i.e to jump to some other instruction. Also because of PC execution would be faster.

Because while compiler executing current instructions PC will hold the address that the next instruction to be executed by compiler. If there is no PC in computer system leads to decrease the performance of CPU execution, and also causes some problems like von-nuemann bottlenecks etc.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote