0% found this document useful (0 votes)
76 views17 pages

Fetch & Execute Cycle

The document describes the fetch and execute cycle of a computer's central processing unit (CPU). It involves two main steps: fetch, where the CPU fetches the next instruction from memory and loads it into the instruction register; and execute, where the CPU interprets the instruction and performs the required operation by issuing control signals. This repetitive fetch-execute cycle allows the computer to process programs stored as sequences of instructions in memory.

Uploaded by

Riajimin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
76 views17 pages

Fetch & Execute Cycle

The document describes the fetch and execute cycle of a computer's central processing unit (CPU). It involves two main steps: fetch, where the CPU fetches the next instruction from memory and loads it into the instruction register; and execute, where the CPU interprets the instruction and performs the required operation by issuing control signals. This repetitive fetch-execute cycle allows the computer to process programs stored as sequences of instructions in memory.

Uploaded by

Riajimin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 17

Fetch & Execute cycle

Program Concept
Hardwired systems are inflexible
General purpose hardware can do
different tasks, given correct control
signals
Instead of re-wiring, supply a new set of
control signals

What is a program?
A sequence of steps
For each step, an arithmetic or logical
operation is done
For each operation, a different set of
control signals is needed

Function of Control Unit


For each operation a unique code is
provided
e.g. ADD, MOVE

A hardware segment accepts the code


and issues the control signals
We have a computer!

Function of Control Unit


For each operation a unique code is
provided
e.g. ADD, MOVE

A hardware segment accepts the code


and issues the control signals
We have a computer!

Hardware and Software


Approaches

Computer Components:
Top Level View

Instruction Cycle
The IAS operates repetitively performing an instruction
cycle.
Each instruction cycle consists of Two subcycles.
Two steps:
Fetch
Execute

Fetch Cycle
Program Counter (PC) holds address of
next instruction to fetch
Processor fetches instruction from
memory location pointed to by PC
Increment PC
Unless told otherwise

Instruction loaded into Instruction Register


(IR)
Processor interprets instruction and
performs required actions

Execute Cycle
Processor-memory
data transfer between CPU and main memory

Processor I/O
Data transfer between CPU and I/O module

Data processing
Some arithmetic or logical operation on data

Control
Alteration of sequence of operations
e.g. jump

Combination of above

Example of Program Execution

Instruction Cycle State Diagram

Instruction state cycle diagram


(cont..)

Instruction address calculation (iac):


Determine the address of the next instruction to be executed. Adding a
fixed number to a next number.

Instruction fetch: (if)


Read the instruction from its memory location into the processor.

Operand Address Calculation: (oac)


If the operation involves the reference to an operand in memory or
available via I/O, then determine the address of the operand.

Instruction operation decoding (iod): Analyze instruction to


determine type of operation to be performed and operand(s) to be
used.
Operand Fetch (of):
Fetch the operand from memory or read it from I/O.

Data Operation (do):


Perform the operation indicated in the instruction.

Operand store (os)


Write the result into memory or out to I/O.

Partial Flowchart of IAS Operation

References
William Stallings Computer Organization
and architecture, Prentice Hall, 7 th edition,
2006.

You might also like