Knowee
Questions
Features
Study Tools

Consider an instruction ADD R1 , R2. ( Add the contents of Register R2 to the contents of Register R1)The following steps are used to execute it over the given path. Assume that PC is incremented appropriately.MAR ← PCR1← R1+R2PC← PC+4MDR ← Mem[MAR]IR← MDRIdentify the correct order of execution of the above steps.

Question

Consider an instruction ADD R1 , R2. ( Add the contents of Register R2 to the contents of Register R1)The following steps are used to execute it over the given path. Assume that PC is incremented appropriately.MAR ← PCR1← R1+R2PC← PC+4MDR ← Mem[MAR]IR← MDRIdentify the correct order of execution of the above steps.

🧐 Not the exact question you are looking for?Go ask a question

Solution

The correct order of execution of the steps for the instruction ADD R1, R2 would be:

  1. IR← MDR: The instruction is fetched from memory and loaded into the Instruction Register (IR). This is the instruction decode stage.

  2. MAR ← PC: The Memory Address Register (MAR) is loaded with the address of the next instruction to be executed, which is contained in the Program Counter (PC).

  3. MDR ← Mem[MAR]: The Memory Data Register (MDR) is loaded with the instruction at the memory location specified by the MAR. This is the instruction fetch stage.

  4. R1← R1+R2: The contents of Register R2 are added to the contents of Register R1. This is the execute stage of the instruction.

  5. PC← PC+4: The Program Counter (PC) is incremented to point to the next instruction. This is the instruction fetch stage.

Please note that the order might vary slightly depending on the specific architecture of the computer system.

This problem has been solved

Similar Questions

Consider an instructionADD R1 , R2. ( Add the contents of Register R2 to the contents of Register R1)Give the steps (micro operations) involved in the execution of an above given instruction.Answer:MAR ← PCMDR ← Mem[MAR]IR← MDRR1← R1+R2PC← PC+4

Consider an instructionADD R1 , R2. ( Add the contents of Register R2 to the contents of Register R1)Give the steps (micro operations) involved in the execution of an above given instruction.

Which of the following operation performed by ADD M instruction? A) Add the contents of memory location (specified BC register pair) to the accumulator. B) Add the contents of memory location (specified HL register pair) to the accumulator. C) Add the contents of memory location (specified DE register pair) to the accumulator. D) Add the contents of B register to the accumulator.

Consider the instructions in the given figure and find the contents of the CPU registers - PC, MAR, MDR, IR, R1 and R2.

If the instruction involves reading from or writing to memory, the __________ register will be used to hold the address, and the __________ register will hold the data to be written or read.  PC and DRIMAR and IRMAR and MDRMAR and DATA BusALU and DR

1/3

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.