Похожие презентации:
Objectives. Describe common CPU
1.
Objectives• Describe common CPU components and their
function: ALU Arithmetic Logic Unit), CU (Control
Unit), Cache
• Explain the function of the CPU as fetch and execute
instructions stored in memory
2.
Function and characteristics of the CPUUnit 1 Systems architecture, memory and storage
The main components of a
computer
MAIN MEMORY (RAM)
INPUT
DEVICES
CENTRAL PROCESSING
UNIT (CPU)
SECONDARY
STORAGE
OUTPUT
DEVICES
3.
Function and characteristics of the CPUUnit 1 Systems architecture, memory and storage
The CPU
4.
Function and characteristics of the CPUUnit 1 Systems architecture, memory and storage
Central Processing Unit (CPU)
• The Central Processing
Unit or CPU is arguably
the most important
component of a
computer
• What does it do?
• If it was one organ in the
human body what would
it be?
5.
Function and characteristics of the CPUUnit 1 Systems architecture, memory and storage
Central Processing Unit (CPU)
• You can think of the CPU as being like the brain in a
human
• It is responsible for all of a computer’s processing
• It processes data by performing the fetch-decodeexecute cycle.
6.
Function and characteristics of the CPUUnit 1 Systems architecture, memory and storage
Fetch – Decode – Execute cycle
• The CPU operates by repeating
three operations:
• FETCH – causes the next
instruction and any data
involved to be fetched from
main memory (RAM)
• DECODE – decodes the
instruction
• EXECUTE – carries out the
instruction
• Repeat…
7.
Function and characteristics of the CPUUnit 1 Systems architecture, memory and storage
Registers in the CPU
Program
Counter
ALU
Control
Unit
Accumul
ator
8.
Function and characteristics of the CPUUnit 1 Systems architecture, memory and storage
Registers in the CPU
• Program Counter:
A special purpose register that
holds the address of the next
instruction to be executed
• The Accumulator:
Holds data, such as numbers
during arithmetic calculations
Program
Counter
Accumulator
9.
Function and characteristics of the CPUUnit 1 Systems architecture, memory and storage
Program Counter
• The Program Counter points
to the next instruction that
needs to be executed
• It is located in the Control Unit
• The Program Counter is
incremented after fetching
an instruction
• This moves it on to point to
the next instruction to be
executed
1
2
3
Program
Counter
5
4
5
LDA 28
6
ADD #2
7
STO 10
8
9
10
11
12
10.
Function and characteristics of the CPUUnit 1 Systems architecture, memory and storage
Accumulator
• The accumulator is where
arithmetic and logic results are
temporarily stored much like
the M+ function on a calculator
• Without the accumulator, it
would be necessary to write
the result of each calculation to
main memory
• The accumulator speeds up the
storage and retrieval of
calculations
11.
Function and characteristics of the CPUUnit 1 Systems architecture, memory and storage
The Arithmetic Logic Unit
• The ALU or Arithmetic Logic Unit performs:
• Logical operations,
• shift operations and
• arithmetic operations
Main
Memory
X = 3
Y = 5
ALU
ADD X, Y
Accumulator
8
12.
Function and characteristics of the CPUUnit 1 Systems architecture, memory and storage
Memory registers
• With the von Neumann architecture, both the
instructions and the data are stored together in RAM
• Two registers are required to implement this:
MAR
(Memory
Address
Register)
MDR
(Memory
Data
Register)
13.
Function and characteristics of the CPUUnit 1 Systems architecture, memory and storage
Memory Address Register
• The MAR holds the address of the current instruction
being executed
• The MAR knows the location of the data that needs
to be accessed
• It keeps track of where data is located
MAR
(Memory
Address
Register)
14.
Function and characteristics of the CPUUnit 1 Systems architecture, memory and storage
Memory Data Register
• The MDR holds the actual data that is being stored
in RAM
• It acts as a buffer and holds data that is copied from
RAM, ready for the CPU to process it
MDR
(Memory
Data
Register)
15.
Function and characteristics of the CPUUnit 1 Systems architecture, memory and storage
Working together
MAR (Memory Address Register)
MDR (Memory Data Register)
The two work together; The MAR knows where to look
for data in RAM, the MDR keeps hold of that data until
it’s ready to be used by the CPU
MAR
(Memory
Address
Register)
Memory
MDR
(Memory
Data
Register)
16.
Function and characteristics of the CPUUnit 1 Systems architecture, memory and storage
Control Unit
• The control unit coordinates all
of the activities taking place
within the CPU
• Much like the conductor of an
orchestra
17.
Function and characteristics of the CPUUnit 1 Systems architecture, memory and storage
Processor registers
ALU: Temporarily
stores arithmetic
and logic results
PC: Points to
the next
instruction
CIR (Current Instruction
Register): Holds the
current instruction to be
executed
MDR: Stores
the actual data
MAR: Stores
the address of
the data