Execute and Fetch Cycle

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

COMPUTER ORGANIZATION AND

ARCHITECTURE
Dr.M.Sindhuja
Assistant Professor(Senior Grade)
School of Electronics
VIT, Chennai
MODULE-1

FUNCTIONAL COMPONENTS OF COMPUTER


BASIC OPERATIONAL CONCEPTS
• Computer activity is governed by instructions.

• To perform certain operation, program need list of instructions which stored in


memory

•Instructions and data(operands) are stored in the memory are brought into
processor for execute the operations.

• A typical instruction is,


Load R2, LOC

•Instruction read content of memory location (LOC) and load into processor
Register R2.

•Control unit determine the operation to be performed. Next, operand at LOC fetched
from memory into processor register R2.
•After operand loaded , arithmetic or logic operations can be performed

Add R4, R2, R3

•Add contents of registers R2 and R3 and place their sum in register R4. R4 is
overwritten

Store R4, LOC

•After completing operation, the results from register R4 are transferred to LOC.
The original content of LOC are overwritten.

•For load and store instructions, data transfer between memory and processor are initia
ted by sending memory location address to memory unit and asserting control signals.
FUNCTIONAL COMPONENTS OF COMPUTER
PROGRAM EXECUTION STEPS
Basic Function of Computer
• Execution of a program, which consists of set of instructions stored in memory

Instructions Cycle: processing required for single instruction


• Fetch cycle
• Execute cycle

Reference:William Stallings, “Computer Organization and Architecture”, 2016, 10th edition, Pearson / PHI, USA
FETCH CYCLE
• Register called program counter (PC) holds the address of the instruction to
be fetched next.
•PC get incremented after each instruction fetch
•The fetched instruction is loaded into a register in the processor known as
the instruction register (IR)
EXECUTE CYCLE
Processor interprets instruction and performs required actions, such as:
• 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
EXAMPLE OF PROGRAM EXECUTION
Add the contents of Memory location 940 to the contents of 941

Reference:William Stallings, “Computer Organization and Architecture”, 2016, 10th edition, Pearson / PHI, USA
INSTRUCTION CYCLE WITH INTERRUPT
INTERRUPT
• Processor suspend current program operation
• Branching off the program to service I/O device known as an interrupt
handler
• Resuming the original execution after the device is serviced.

Reference:William Stallings, “Computer Organization and Architecture”, 2016, 10th edition, Pearson / PHI, USA

You might also like