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

asked Jun 8 in Computer Organization by gbmentor (58,030 points)
reshown Jun 9 by gbmentor

2 Answers

0 votes

\\ 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

Therefore ans should be C.

answered Jun 9 by tskushagra-guptacse (11,420 points)
0 votes
C is correct one
answered Jun 9 by tsnikhilsharmagate2018 (19,700 points)
Answer:
...