GATE | GATE CS 2020 | Question 14

Consider the following data path diagram.

Consider an instruction:

R0 ← R1 + R2 

The following steps are used to execute it over the given data path. Assume that PC is incremented appropriately. The subscripts r and w indicate read and write operations, respectively.

  1. R2r, TEMP1r, ALUadd, TEMP2w
  2. R1r, TEMP1w
  3. PCr, MARw, MEMr
  4. TEMP2r, R0w
  5. MDRr, IRw

Which one of the following is the correct order of execution of the above steps ?
(A) 2, 1, 4, 5, 3
(B) 1, 2, 4, 3, 5
(C) 3, 5, 2, 1, 4
(D) 3, 5, 1, 2, 4

Answer: (C)


  1. Send the address to memory via MAR:
    PCr, MARw, MEMr
  2. Read the opcode into IR from the memory via MBR:
    MDRr, IRw
  3. Send the first operand to Temp1(ALU):
    R1r, TEMP1w
  4. Read the second operand directly from the R2 and process the data in ALU and store the result into TEMP2:
    R2r, TEMP1r, ALUadd, TEMP2w
  5. Store the result into R0:
    TEMP2r, R0w

Option (C) is correct.

Quiz of this Question

My Personal Notes arrow_drop_up
Article Tags :


Please write to us at to report any issue with the above content.