Gate2020 cs Q22

0. 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 ?

  • Option : A
  • Explanation :
    Given steps:
    1. R2r, TEMP1r, ALUadd, TEMP2W
    2. R1r, TEMP1W
    3. PCr, MARW, MEMr
    4. TEMP2r, ROW
    5. MDRr. IRW
    Instruction fetch is first step to be done which is indicated by step 3 and 5

    Then instruction decoded by cu and then operand fetch should be performe
    D. If is indicated with step 2 and operand fetch and perform operation by step 1

    4. Now, write result operations should be performe
    D. It is indicated by step 4, as a result, should be in R0.
    Step4:

    Hence correct order of execution should be, 3, 5, 2, 1, 4
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *