INTRODUCTION TO COMPUTING
CPIT 201 WEEK 12 LECTURE 1
Faculty of Computing and Information Technology . Rabegh
Chapter 5
Computer Organization Computer Organization
Faculty of Computing and Information Technology . Rabegh
Program Execution:
Today, Today, generalgeneral--purpose computerspurpose computers use a use a set of instructions called a
set of instructions called a programprogram to to process data. A computer executes the process data. A computer executes the program to create output data from
program to create output data from program to create output data from program to create output data from input data. Both the program and the input data. Both the program and the data are stored in memory.
data are stored in memory.
Faculty of Computing and Information Technology . Rabegh
Machine Cycle
• The CPU uses repeating machine cycles to execute instructions in the program, one by one, from beginning to end. A simplified cycle can consist of three simplified cycle can consist of three phases:
1.Fetch
2.decode 3.execute
Faculty of Computing and Information Technology . Rabegh
The steps of a machine cycle
Faculty of Computing and Information Technology . Rabegh
Fetch:
The control unit orders the system to copy the next instruction into instruction register in the CPU.
Decode:
When the instruction is in the instruction register, it When the instruction is in the instruction register, it is decoded by the control unit, the result of this
decode is the binary code for some operation that the system will perform.
Faculty of Computing and Information Technology . Rabegh
• Execute:
After the instruction is decoded, the control unit sends the task order to a
component in the CPU. For example, the control unit can tell the system to load a data item from memory or the CPU can data item from memory or the CPU can tell the ALU to add the content of two input registers and put the result in an output register.
Faculty of Computing and Information Technology . Rabegh
Simple Computer
• In order to explain the
architecture of computers and their instruction processing, we their instruction processing, we introduce a simple computer.
Faculty of Computing and Information Technology . Rabegh
Components of a simple computer.
Faculty of Computing and Information Technology . Rabegh