0% found this document useful (0 votes)
22 views37 pages

T1 Architecture of The CPU

Uploaded by

Ben Murphy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views37 pages

T1 Architecture of The CPU

Uploaded by

Ben Murphy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 37

Objectives

Describe the basic


components of the CPU.

Describe the roles and


purpose of each
component of the CPU

Understand the purpose


fetch-decode-execute
cycle
Vocabulary Keywords
• CPU
• Fetch
• Execute
• Memory Address Register
• Memory Data Register
• Program Counter
• Accumulator
• Arithmetic Logic Unit
• Control Unit
• Registers
The Architecture of the CPU
Unit 1 Systems architecture

Starter
Write down

3 parts of a computer system

2 List one input devices that can be used to input


data and one output device that can be used to
display data

1 thing you know about the CPU (microprocessor)


The Architecture of the CPU
Unit 1 Systems 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?
The Architecture of the CPU
Unit 1 Systems architecture

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)
The Architecture of the CPU
Unit 1 Systems architecture

The main components


of a computer
MAIN MEMORY

INPUT CENTRAL PROCESSING OUTPUT


DEVICES UNIT (CPU) DEVICES

SECONDARY
STORAGE
The Architecture of the CPU
Unit 1 Systems architecture

What is this?
The Architecture of the CPU
Unit 1 Systems architecture

The CPU
The Architecture of the CPU
Unit 1 Systems architecture

Central Processing Unit (CPU)


• The Central Processing Unit or CPU is the most
important component of a computer
• What does it do?
• What organ in the human body
is it often compared to?
• What are the similarities it has
to this organ?
The Architecture of the CPU
Unit 1 Systems architecture

The purpose of the CPU


• The CPU processes instructions
• When you run a program, it is the
CPU which runs the instructions
• It is often thought of as being
the ‘brains’ of the computer
• The way that a brain works is
very different to a CPU
• A CPU simply runs one
simple instruction at a time
• It carries out billions of
instructions per second
The Architecture of the CPU
Unit 1 Systems architecture

Von Neumann Architecture


Computer architecture is a term used to describe
the design of a computer system.

Modern computers use the Von Neuman


architecture designed by John Von Neumann.

Von Neumann was a mathematician whose


research has an impact on a huge number of
fields such as maths, physics, biology and
computing.
The Architecture of the CPU
Unit 1 Systems architecture

Before Von Neumann


In the beginning, computers were nowhere near as
efficient or small as they are now. They were built to
carry out specific tasks such as breaking war times
The Architecture of the CPU
Unit 1 Systems architecture

Before Von Neumann


So, if the computer has another job to do, it literally
had to be completely re-wired by hand. This could take
weeks or even months. There were no such things as
software updates in those days. Von Neumann
created the idea of how to make computers far easier
to change. He decided that both the data and the
software that are currently being used by a
computer be stored in computer memory
(RAM). This is known as the Stored Program
Concept. With this architecture, the task a
computer is working on can be changed by
simply loading a different program into memory.
The CPU can then access both instructions and
The Architecture of the CPU
Unit 1 Systems architecture

Components of the CPU


• The CPU has several key components/parts
• Control Unit
• Arithmetic-Logic Unit (ALU)
• Registers
• Cache
• Clock
• Buses
The Architecture of the CPU
Unit 1 Systems architecture

Control Unit (CU)


The control unit runs the show. It understands the
instructions and tells the other components what each
instruction needs from them. The control unit is
organised efficient and collaborative. The control unit
manages instructions and controls the other
components.
The Architecture of the CPU
Unit 1 Systems architecture

Arithmetic and Logic Unit (ALU)


The ALU is the calculator of the CPU. It handles all the
mathematical and logical operations. The ALU is
logical, good with numbers and precise.

Main ALU
Memory ADD X, Accumulator
X = 3 Y 8
Y = 5
The Architecture of the CPU
Unit 1 Systems architecture

Clock
The CPU contains an internal clock that is used to
regulate the number of cycles carried out per second
and synchronize the other components. The clock is
punctual, reliable and has good rhythm. The clock
manages the cycles per second of the CPU.
The Architecture of the CPU
Unit 1 Systems architecture

Registers in the CPU


Registers are very small, very fast pieces of memory
located inside the CPU. The key registers are
• Memory Address Register (MAR)
• Memory Data Register (MDR)
• Program Counter (PC)
• Accumulator (ACC)
• Current Instruction Register (CIR)
The Architecture of the CPU
Unit 1 Systems architecture

Registers in the CPU


• Memory Address Register (MAR)
holds the memory address of the current instruction, and then the data that
it uses, so that these can be fetched from memory
• Memory Data Register (MDR)
holds the actual instruction, and then the data that has been fetched from
memory
• Program Counter (PC)
holds the address of the next instruction to be executed
• Accumulator
holds the result of an instruction before it is transferred to memory
• Current Instruction Register
Holds the binary representation of the instruction to be executed.
The Architecture of the CPU
Unit 1 Systems architecture

Worksheet 1
• Complete Task 1 on Worksheet 1
The Architecture of the CPU
Unit 1 Systems architecture

Fetch – Decode – Execute


• The CPU operates by repeating
three operations:
• FETCH – causes the next
instruction and any data
involved to be fetched from
main memory
• DECODE – decodes the
instruction
• EXECUTE – the instruction
is executed
• This process is then repeated…
The Architecture of the CPU
Unit 1 Systems architecture

Program Counter (PC)


1
• The Program Counter holds 2
the address of the next 3
instruction to be executed Program 4
Counter
• The Program Counter is 5 LDA 10
incremented (increased by 1)
as soon as that instruction has
5 6 ADD 11

7 STO 12
been fetched
8

9
1
50
0
1
17
1
1
2
The Architecture of the CPU
Unit 1 Systems architecture

Accumulator
• The accumulator (ACC) is
where arithmetic and logic
results are temporarily stored,
much like the M+ function on
a calculator
The Architecture of the CPU
Unit 1 Systems architecture

MAR and MDR


• In the FETCH stage of the F-E cycle
• the address of the instruction to be executed is copied from
the Program Counter (PC) to the Memory Address
Register (MAR)
• The instruction at that address is fetched from memory and
copied to the Memory Data Register (MDR)
• The Control Unit decodes the instruction and
decides if data needs to be fetched
• If so, the MAR is then used to hold the address of
the data to be used in the instruction
• The data is fetched and copied to the MDR
The Architecture of the CPU
Unit 1 Systems architecture

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)
The Architecture of the CPU
Unit 1 Systems architecture

Processor architecture
• What does each acronym stand for?
• What does each part do?
The Architecture of the CPU
Unit 1 Systems architecture

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
Temporarily stores Access
arithmetic results Memory

ALU: MDR:
Arithmetic Logic Unit – performs Memory data register – Stores the
calculations and logic expressions data to be sent/received from memory
The Architecture of the CPU
Unit 1 Systems architecture

Example – Step 1 (Add 8 + 4)


1 • PC points to next instruction in location 5
2 • Address 5 is passed to MAR and PC is
3 incremented. It now holds 6
4 Program • Instruction at Address 5 is copied from
Counter
5 LDA 10 memory to MDR
6 ADD #4 5 • Instruction is decoded by control unit
7 STO 11
• Address 10 passed from MAR
8

9 • The value in location 10, i.e. 8, is passed


1 from main memory to the MDR
8
0 Acc
• 8 is loaded into the accumulator (ACC)
1
1 8
1
2
The Architecture of the CPU
Unit 1 Systems architecture

Example – Step 2
1 • PC now points to next instruction in
location 6
2

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 decoded
7 STO 11 6
• No more data from memory is needed
8

9 • 4 is added to 8 in the ALU and the result


1 is stored in the accumulator
8
0 Acc
1
1 12
1
2
The Architecture of the CPU
Unit 1 Systems architecture

Example – Step 3
1 • PC points to the next instruction in
location 7
2

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 decoded
7 STO 11

8 7 • The instruction is executed causing the


value 12 to be transferred from the
9
accumulator into memory location 11
1
8
0 Acc
1
1
12 12
1
2
The Architecture of the CPU
Unit 1 Systems architecture

Worksheet 1
• Complete Task 2 on Worksheet 1
The Architecture of the CPU
Unit 1 Systems architecture

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
The Architecture of the CPU
Unit 1 Systems architecture

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, Accumulator
The Architecture of the CPU
Unit 1 Systems architecture

Starter WB
• 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
The Architecture of the CPU
Unit 1 Systems architecture

Starter
• 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, Accumulator
The Architecture of the CPU
Unit 1 Systems architecture

Copyright

© 2020 PG Online Limited

The contents of this unit are protected by copyright.

This unit and all the worksheets, PowerPoint presentations, teaching guides and other associated files
distributed with it are supplied to you by PG Online Limited under licence and may be used and copied by you
only in accordance with the terms of the licence. Except as expressly permitted by the licence, no part of the
materials distributed with this unit may be used, reproduced, stored in a retrieval system, or transmitted, in any
form or by any means, electronic or otherwise, without the prior written permission of PG Online Limited.

Licence agreement

This is a legal agreement between you, the end user, and PG Online Limited. This unit and all the worksheets,
PowerPoint presentations, teaching guides and other associated files distributed with it is licensed, not sold, to
you by PG Online Limited for use under the terms of the licence.

The materials distributed with this unit may be freely copied and used by members of a single institution on a
single site only. You are not permitted to share in any way any of the materials or part of the materials with any
third party, including users on another site or individuals who are members of a separate institution. You
acknowledge that the materials must remain with you, the licencing institution, and no part of the materials may
be transferred to another institution. You also agree not to procure, authorise, encourage, facilitate or enable any
third party to reproduce these materials in whole or in part without the prior permission of PG Online Limited.

You might also like