# Control Unit - Q7

+1 vote

Consider the following :
Consider the instruction $\text{Load } R5, X(R7)$ which uses the Index addressing mode to load a word of data from memory location $X + [R7]$ into register $R5$.
Execution of this instruction involves the following actions:

$\text{(I1)}$ Fetch the instruction from the memory.

$\text{(I2)}$ Decode the instruction to determine the operation to be performed.

$\text{(I3)}$ Add the immediate value X to the contents of R7.

$\text{(I4)}$ Read register R7.

$\text{(I5)}$ Use the sum X + [R7] as the effective address of the source operand, and read the contents of that location in the memory.

$\text{(I6)}$ Increment the program counter.

$\text{(I7)}$ Load the data received from the memory into the destination register, $R5$.

Which of the following is the most preferred order of execution of the above instruction?

$(A) I1\rightarrow I2\rightarrow I3\rightarrow I4\rightarrow I5\rightarrow I6\rightarrow I7$

$(B) I1\rightarrow I2\rightarrow I6\rightarrow I3\rightarrow I4\rightarrow I5\rightarrow I7$

$(C) I1\rightarrow I6\rightarrow I2\rightarrow I4\rightarrow I3\rightarrow I5\rightarrow I7$

$(D) I1\rightarrow I6\rightarrow I2\rightarrow I5\rightarrow I4\rightarrow I3\rightarrow I7$

reshown Jun 9

$\\ Very\ first\ step=fetch\ the\ inst^n=I1\\ \\After\ fetching\ we\ can\ increment\ the\ PC=I6\\ \\Now\ we\ have\ the\ inst&^n\ in\ the\ IR \ let's \ decode\ it=I2\\ \\After\ decoding\ read\ the\ operand\ value\ from\ R7=I4\\ \\We\ have\ the\ immediate\ value\ add\ it \ to\ R7=I3\\ \\Now\ calculate\ the\ EA\ using\ I4\ and\ I3\ and\ fetch\ the\ source\ operand=I5\\ \\Load\ the\ Data=I7$