EXECUTION OF A PROGRAM

BASIC OPERATIONAL CONCEPT

  • Also known as connection between processor and the main memory.
  • The basic function of the computer is to execute program, sequence of instructions.
  • Instructions are stored in the computer memory.

  • Instructions are executed to process data which is loaded into computer memory through input unit.
  • After processing the data, the result is either stored back into computer memory for further reference or it is sent to the outside world through the output port.
  • All functional units of the computer contribute to execute a program.
  • So to perform execution of the instruction, the processor contains a number of registers used for temporary storage of the data and some special function registers, as shown in fig 1.

fig 1

  • The special function register include program counter(PC), instruction register(IR), memory address register(MAR) and memory data register(MDR).

 Now we will be learning about each of them in detail

Lets start!

Program Counter(PC):

  • A program is a series of instructions stored in the memory. These instruction tells the CPU exactly how to get the desired results.
  • It is important that these instruction must be executed in a proper order to get the correct result.
  • The sequence of the instruction execution is monitored by the program counter.
  • So, it basically keeps the tract of which instruction is being executed and what the next instruction will be.

Instruction Register(IR):

  • It basically used to hold the instruction that are currently being executed.
  • The contents of IR are available to the control unit, which generate the timing signals that control the various processing elements involved in executing the instruction.

Memory Address Register(MAR) and Memory Data Register(MDR):

  • These registers are used to handle the data transfer between the main memory and the processor.
  • MAR holds the address of the main memory to or form which data is to be transferred.
  • MDR sometimes also called MBR(memory buffer register) contains the data to be written into or read from the addressed word of the main memroy.

General Purpose Registers:

  • These are used to hold the operands for arthematic and logic operational and/or used to store the result of the operation.
  • Since the  access time of these registers is lowest, these are used to store frequently used data.


                                                                      *******

0 comments