instruction execution cycle
TRANSCRIPT
Instruction Execution
15MCA043
Instruction Execution
Instruction is command which is given by the
user to computer.
Execution is the process by which a computer
performs instruction.
Instruction Execution means a program to be
executed by a processor consists of a set of
instructions stored in memory.
Terminologies
Program Counter is a register in a computer
processor that contains the address of the next
instruction which will be executed.
Memory Address Register (MAR) holds the
Memory Location of data that needs to be
accessed.
Instruction Register (IR) is a part of CPU control
unit that stores the instruction currently being
executed or decoded.
Memory Buffer Register (MBR) stores the data
being transferred to and from immediate access
store also known as Memory Data Register
(MDR).
Control Unit (CU) decodes the program
instruction in the IR, selecting machine
resources such as a data source register and a
particular arithmetic operation.
Arithmetic Logic Unit (ALU) performs
mathematical and logical operations.
Accumulator (AC) means the processor contains
the single data register.
Instruction Register
Fetched instruction is placed in the instruction register
Categories
– Processor-memory• Transfer data between processor and memory
– Processor-I/O• Data transferred to or from a peripheral device
– Data processing• Arithmetic or logic operation on data
– Control• Alter sequence of execution
Instruction Execution Cycle
The time period during which one instruction is
fetched from memory and execute when computer
given an instruction in machine language.
Each instruction is further divided into sequence of
phases.
After the execution of program counter is
incremented to point to the next instruction.
Process
I. Processor reads instruction from
memory time .
II. Decodes the instruction.
III. Execute the instruction.
Fetch Cycle
The Program Counter (PC) contains the address
of the next instruction to be fetched.
The address contained in the PC is copied to the
Memory Address Register (MAR).
The instruction is copied from the memory
location contained in the MAR and placed in the
Memory Buffer Register (MBR).
The entire instruction is copied from the MBR
and placed in the Current Instruction Register
(CIR)
Execute Cycle
The address part of the instruction is placed in
the MAR
The instruction is decoded and executed.
The processor checks for interrupts and either
branches to the relevant interrupt service routine
or starts the cycle again.
Start
Fetch Instruction
Decode Instruction
Execute Instruction
Halt
Example