q how do the registers help in instruction


Q. How do the registers help in instruction execution?

We will discuss this in following steps:

Step 1:

First step of instruction execution is to fetch instruction which is to be executed. To do so we need:

  • Address of 'instruction to be fetched'. Generally Program counter (PC) register stores this information.
  • Now this address is converted to physical machine address and put on address bus with help of a buffer register sometimes termed as Memory Address Register (MAR).
  • This coupled with a request from CU for reading, fetches instruction on the data bus and transfers instruction to Instruction Register (IR).
  • On the completion of fetch PC is incremented to point to subsequent instruction.

In Step 2:

  • The IR is decoded.Let's presume that Instruction Register comprises an instruction ADD Memory location B with general purpose register R1 and store result in R1 then CU will first instruct to:
  • Get data of memory location B to buffer register for data (DR) employing buffer address register (MAR) by issuing Memory read operation.
  • This data can be stored in a general purpose register if so required let's say R2
  • Now ALU will perform addition of R1 and R2 under the command of CU and the result will be put back in R1. The status of ALUoperation for illustration result in nonzero/zero, overflow/no overflow etc. is recorded in status register.
  • In the same way the other instructions are fetched and executed by using ALU and register under control of the CU.

So for explaining instruction execution we should explain the registers layout and micro-operations, ALU design and lately the control unit organization.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: q how do the registers help in instruction
Reference No:- TGS0326718

Expected delivery within 24 Hours