COMPUTER ORGANIZATION//
INSTRUCTION CYCLE//
Made by:-
Panchal Parth R.
INSTRUCTION CYCLE
• A program residing in the memory unit of the computer consists of a sequence of
instructions.
• The program is executed in the computer by going through a cycle for each instruction.
• Each instruction cycle in turn is subdivided into a sequence of sub-cycles or phases.
INSTRUCTION CYCLE
Fetch
Indirect
Execute
Interrupt
CIRCUITS USED
• The circuits used in the CPU during the cycle are:
• Program counter (PC) - an incrementing counter that keeps track of the memory address of the
instruction that is to be executed next.
• Memory address register (MAR) - holds the address of a memory block to be read from or written
to.
• Memory data register (MDR) - a two-way register that holds data fetched from memory (and ready
for the CPU to process) or data waiting to be stored in memory
• Instruction register (IR) - a temporary holding ground for the instruction that has just been fetched
from memory
• Control unit (CU) - decodes the program instruction in the IR, selecting machine resources such as
a data source register and a particular arithmetic operation, and coordinates activation of those
resources
• Arithmetic logic unit (ALU) - performs mathematical and logical operations.
FLOW CHART OF INSTRUCTION CYCLE
TRANSFER NOTATION
• Step 1: Start SC <- 0
• Step 2: T0 :- AR <- PC
• Step 3: T1 :- IR <- M[AR], PC <- PC + 1
• Step 4: T2 :- Decode Opcode IR(12-14)
AR <- IR(0-4) , I <- IR(15)
• Step 5: T3 :- Decision , If I = 0 => Direct;
If I = 1 => Indirect => Memory Reference/ Register Reference Instruction/
IO Reference Instruction.
• Step 6: T4 :- Execute.
STEPS OF INSTRUCTION CYCLE:
• In basic computer, each instruction cycle consists of the following phases:
• Fetch an instruction from Memory.
• Decode the instruction.
• Read the effective address from memory if the instruction has an indirect
address.
• Execute the instruction.
FETCHING THE INSTRUCTION
• The next instruction is fetched from the memory address that is currently
stored in the program counter (PC), and stored in the instruction register (IR).
• Now, the PC points to the next instruction that will be read at the next cycle.
DECODE THE INSTRUCTION
• The decoder interprets the instruction.
• During this phases the instruction inside the IR (instruction register) gets
decoded.
IN CASE OF A MEMORY INSTRUCTION
• In case of a memory instruction (direct or indirect) the execution phase will be
in the next clock pulse.
• Required data is fetched from main memory to be processed and then placed
into data registers.
• During this phases the instruction inside the IR (instruction register) gets
decoded.
• If the instruction is direct, nothing is done at this clock pulse.
• If this is an I/O instruction or a Register instruction, the operation is
performed (executed) at clock Pulse.
EXECUTE THE INSTRUCTION
• The control unit of CPU passes the decoded information as a sequence of control signals.
• Signals are passed to the relevant function units of the CPU to perform the actions required.
• These action may be :
• Reading values from registers
• Passing them to the ALU to perform mathematical or logic functions on them, or
• Writing the result back to a register
• aThe result generated by the operation is stored in the main memory, or sent to an output
device.
THANK YOU

INSTRUCTION CYCLE

  • 2.
  • 3.
    INSTRUCTION CYCLE • Aprogram residing in the memory unit of the computer consists of a sequence of instructions. • The program is executed in the computer by going through a cycle for each instruction. • Each instruction cycle in turn is subdivided into a sequence of sub-cycles or phases.
  • 4.
  • 5.
    CIRCUITS USED • Thecircuits used in the CPU during the cycle are: • Program counter (PC) - an incrementing counter that keeps track of the memory address of the instruction that is to be executed next. • Memory address register (MAR) - holds the address of a memory block to be read from or written to. • Memory data register (MDR) - a two-way register that holds data fetched from memory (and ready for the CPU to process) or data waiting to be stored in memory • Instruction register (IR) - a temporary holding ground for the instruction that has just been fetched from memory • Control unit (CU) - decodes the program instruction in the IR, selecting machine resources such as a data source register and a particular arithmetic operation, and coordinates activation of those resources • Arithmetic logic unit (ALU) - performs mathematical and logical operations.
  • 6.
    FLOW CHART OFINSTRUCTION CYCLE
  • 7.
    TRANSFER NOTATION • Step1: Start SC <- 0 • Step 2: T0 :- AR <- PC • Step 3: T1 :- IR <- M[AR], PC <- PC + 1 • Step 4: T2 :- Decode Opcode IR(12-14) AR <- IR(0-4) , I <- IR(15) • Step 5: T3 :- Decision , If I = 0 => Direct; If I = 1 => Indirect => Memory Reference/ Register Reference Instruction/ IO Reference Instruction. • Step 6: T4 :- Execute.
  • 8.
    STEPS OF INSTRUCTIONCYCLE: • In basic computer, each instruction cycle consists of the following phases: • Fetch an instruction from Memory. • Decode the instruction. • Read the effective address from memory if the instruction has an indirect address. • Execute the instruction.
  • 9.
    FETCHING THE INSTRUCTION •The next instruction is fetched from the memory address that is currently stored in the program counter (PC), and stored in the instruction register (IR). • Now, the PC points to the next instruction that will be read at the next cycle.
  • 10.
    DECODE THE INSTRUCTION •The decoder interprets the instruction. • During this phases the instruction inside the IR (instruction register) gets decoded.
  • 11.
    IN CASE OFA MEMORY INSTRUCTION • In case of a memory instruction (direct or indirect) the execution phase will be in the next clock pulse. • Required data is fetched from main memory to be processed and then placed into data registers. • During this phases the instruction inside the IR (instruction register) gets decoded. • If the instruction is direct, nothing is done at this clock pulse. • If this is an I/O instruction or a Register instruction, the operation is performed (executed) at clock Pulse.
  • 12.
    EXECUTE THE INSTRUCTION •The control unit of CPU passes the decoded information as a sequence of control signals. • Signals are passed to the relevant function units of the CPU to perform the actions required. • These action may be : • Reading values from registers • Passing them to the ALU to perform mathematical or logic functions on them, or • Writing the result back to a register • aThe result generated by the operation is stored in the main memory, or sent to an output device.
  • 13.