T1 CPU Architecture
T1 CPU Architecture
Starter
• A laptop and smartphone are both examples of
computer systems
• What are the input and output devices for these computer
systems?
• What component carries
out the processing of
the instructions?
CPU architecture
Computer architecture and storage
Starter
• Input devices:
• Laptop: keyboard, buttons, trackpad, microphone
• Smartphone: microphone, buttons, GPS sensor, gyroscopic
sensor, touch part of the touchscreen
• Output devices:
• Laptop and smartphone: speakers, display
• Processing:
• CPU (Central Processing Unit)
CPU architecture
Computer architecture and storage
SECONDARY
STORAGE
CPU architecture
Computer architecture and storage
What is this?
CPU architecture
Computer architecture and storage
The CPU
CPU architecture
Computer architecture and storage
Control Unit
• The control unit coordinates and controls
all of the activities taking place within
the CPU
• It decodes instructions and executes them
• It receives signals from the system clock
• It directs the timing and control of other
parts of the CPU, much like the conductor
of an orchestra
CPU architecture
Computer architecture and storage
Main ALU
Memory Accumulator
X = 3 ADD X, Y 8
Y = 5
CPU architecture
Computer architecture and storage
Worksheet
• Complete Task 1 on Worksheet
CPU architecture
Computer architecture and storage
7 STO 12
been fetched
8
10 50
11 17
12
CPU architecture
Computer architecture and storage
Accumulator
• The accumulator (ACC) is
where arithmetic and logic
results are temporarily stored,
much like the M+ function on
a calculator
CPU architecture
Computer architecture 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 MDR
(Memory (Memory
Address Data
Register) Register)
CPU architecture
Computer architecture and storage
Processor architecture
• What does each acronym stand for?
• What does each part do?
CPU architecture
Computer architecture and storage
Processor architecture
PC: MAR:
Program Counter – points Memory Address Register – stores the
to the next instruction address of the instruction to be executed
ACC: RAM:
Accumulator – Random Access
Temporarily stores Memory
arithmetic results
ALU: CIR:
Arithmetic Logic Stores the current
Unit – performs instruction to be
calculations and decoded and
logic expressions executed
MDR:
Memory data register – Stores the
data to be sent/received from memory
CPU architecture
Computer architecture and storage
12
8 • 8 is loaded into the accumulator (ACC)
CPU architecture
Computer architecture and storage
Example – Step 2
1 • PC now points to next instruction in
2
location 6
3 • Address 6 is passed to the MAR and
4 the PC is incremented
5 LDA 10 Program • Instruction at Address 6 passed to MDR
Counter
6 ADD #4
• The instruction is passed to the CIR and
7 STO 11 6 then decoded
8
• No more data from memory is needed
9
12
12
CPU architecture
Computer architecture and storage
Example – Step 3
1 • PC points to the next instruction in
2
location 7
3 • Address 7 is passed to the MAR and the
4 PC is incremented
5 LDA 10 • Instruction at Address 7 passed to MDR
6 ADD #4 Program
Counter
• The instruction is passed to the CIR to
7 STO 11
be decoded
8 7
• The instruction is executed causing the
9
value 12 to be transferred from the
10 8 accumulator into memory location 11
Acc
11 12
12
12
CPU architecture
Computer architecture and storage
Worksheet
• Complete Task 2 on Worksheet
CPU architecture
Computer architecture and storage
Plenary
• In pairs, answer the following:
• What is the purpose of the CPU?
• What are two major components
of the CPU, and what is the
purpose of each?
• What is a register?
• Name four special
registers in the CPU
CPU architecture
Computer architecture and storage
Plenary
• What is the purpose of the CPU?
• To fetch and execute instructions stored in memory
• What are two major components of the CPU, and
what is the purpose of each?
• The ALU, which carries out arithmetic and logic instructions
• The Control Unit, which coordinates the CPU activities
• What is a register?
• A special fast memory location in the CPU
• Name four special registers in the CPU
• PC, MAR, MDR, CIR, Accumulator (ACC)