How a Program is Executed in Microprocessor

Intel Microprocessors work on the stored program concept, i.e., instructions are stored in memory. To execute a program, microprocessor fetches the instructions one by one and executes them in the same sequence and then executes them. The flow of signal for the execution of a stored instruction in figure below.

flow of signal for execution of a stored instruction
Flow of signal for execution of a stored instruction

Microprocessor performs the following steps to execute the stored instructions.

Steps to Execute program

  • 1. First the Program counter loads the 16-bit memory address of the instruction on the address bus.
  • 2. The Control unit sends the MEMR signal to tell the memory that the microprocessor wants to read the memory. And thereby memory enable the addressed memory location.
  • 3. The addressed memory location then placed the 8-bit instruction code on the data bus. And transferred this code to the instruction register (IR).
  • 4. The opcode is then fetch to the instruction decoder and machine cycle encode from instruction register. The instruction decoder and machine cycle encoder decode the meaning of the opcode and the number of machine cycles required to execute the complete instruction.
  • 5. The decoded opcode information is sent to the control unit. So that the control unit can generate the appropriate control signal to execute the instruction.

Read Also: Microprocessor pin description