information technology
Download
Report
Transcript information technology
The Central Processing Unit (CPU)
and the Machine Cycle
Central Processing Unit (CPU)
The Central Processing Unit (CPU) is the most
important hardware component of a computer
system.
All the processing takes place in the CPU as, a
result it is commonly referred to as the “brain” of
the computer.
Components of the CPU
The CPU consists of:
1.
Control Unit (CU) – controls the operations of the
CPU
2. Arithmetic Logic Unit (ALU) – performs operations
such as addition, subtraction, multiplication,
division and logical operations.
3. High speed memories such as Registers and Cache
Machine Cycle
Each time the CPU executes an instruction, it
takes a series of steps. The complete series of steps
is called a machine cycle.
Stages of the Machine Cycle
The series of steps that are carried out during the
Machine Cycle are the:
1.
2.
3.
4.
Fetch Stage
Decode Stage
Execution Stage
Storing
Fetch Stage
In the Fetch Stage, the Control Unit takes the
instruction that is store in the Main Memory.
Decode Stage
In the Decode Stage, the Control Unit translates the
instruction into machine language or binary code.
Execution Stage
In the execution stage, the Control Unit or Arithmetic
Logic Unit then performs (carry out) the instruction
from the decode stage.
Storing
The Control Unit or Arithmetic Logic Unit then place
the result from the execution stage into memory.
Diagram of the Machine Cycle
Instruction Time (I-Time)
The instruction time is the time it takes the
Control Unit to fetch (get) and decode
(translate) the instruction from memory.
Execution Time (E-Time)
The execution time is the time it takes the
instruction to be performed (execute) and the
result placed in memory.
Diagram showing the relation between
Instruction Time and Execution Time
Practice Questions
Which part of the Central Processing Unit is responsible
for the following:
Fetch X
B. Fetch Y
C. Check if X is greater than Y
D. Add X and Y and store the result in Z
A.