

Unit 3 CPU Architecture
Presentation
•
Computers
•
9th - 12th Grade
•
Practice Problem
•
Easy
Mr Muwonge
Used 1+ times
FREE Resource
173 Slides • 30 Questions
1
2
Objectives
• Understand the role of the CPU and the
fetch-execute cycle
• Understand the following registers in the Von
Neumann architecture:
• MAR (Memory Address Register)
• MDR (Memory Data Register)
• CIR (Current Instruction Register) • Program Counter (PC)
• Accumulator (ACC)
• Understand common CPU components including:
• ALU (Arithmetic Logic Unit)
• CU (Control Unit)
• Registers
3
CPU architecture
Unit 3 Computer architecture and storage
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?
4
CPU architecture
Unit 3 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)
5
CPU architecture
Unit 3 Computer architecture and storage
The main components
of a computer
MAIN MEMORY
SECONDARY
STORAGE
CENTRAL PROCESSING
UNIT (CPU)
INPUT
DEVICES
OUTPUT
DEVICES
6
CPU architecture
Unit 3 Computer architecture and storage
What is this?
7
Fill in the Blank
What is this?
8
CPU architecture
Unit 3 Computer architecture and storage
The CPU
9
CPU architecture
Unit 3 Computer architecture 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?
• What organ in the human body
is it often compared to?
• What are the similarities it has
to this organ?
10
CPU architecture
Unit 3 Computer architecture and storage
The purpose of the CPU
• The CPU processes instructions
• When you run a program, it is the
CPU which processes the
instructions and data that are input
• The results are then output
• 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, but billions
of instructions are carried out each second
11
CPU architecture
Unit 3 Computer architecture and storage
Stored program concept
• Before about 1943, early computers stored the data
to be worked on in memory. The program was not
stored
• Instructions were input one at a time using switches, or
read in punch cards and executed one at a time
• In 1943-44, mathematician von Neumann and his
colleagues had the idea of storing both the program
instructions as well as the data in memory
• The stored-program computer was born! Another
name is the Von Neumann Architecture
12
CPU architecture
Unit 3 Computer architecture and storage
Von Neumann architecture
• Both program instructions and the data the programs are
using are both stored in the same memory
• The CPU accesses both instructions and data from the
same RAM
• Each instruction or data item is fetched from memory, decoded and
then executed with any new data created being placed back into
memory.
13
Multiple Choice
What is the Von Neumann architecture?
A. Storing only program instructions in memory
B. Storing only data in memory
C. Storing both program instructions and data in the same memory
D. Storing program instructions separately from data
14
Multiple Choice
How does a CPU execute instructions in the Von Neumann architecture?
A. Instructions and data are stored in separate memories
B. Instructions are executed first, followed by the execution of data
C. Both instructions and data are fetched from the same memory, decoded, and then executed
D. Instructions and data are fetched simultaneously
15
Multiple Choice
Which of the following best describes the role of the CPU ?
A. Executing complex instructions simultaneously/at the same time
B. Running multiple instructions at once
C. Running one simple instruction at a time, but billions of instructions per second
D. Storing program instructions and data in separate memories
16
CPU architecture
Unit 3 Computer architecture and storage
Components of the CPU
• The CPU has two major components
called the
• Control Unit
• Arithmetic-Logic Unit (ALU)
• There are also special purpose
registers that are used to carry out
these operations
• A register is a very fast memory location in
the CPU itself
• Cache memory is located on the CPU –
it is slower to access than registers but faster
than RAM
17
CPU architecture
Unit 3 Computer architecture and storage
Special purpose registers
• Program Counter (PC)
holds the address of the next instruction to be fetched then
executed
• Memory Address Register (MAR)
holds the memory address of the current instruction being fetched
from memory
• Memory Data Register (MDR)
holds the actual instruction or data that has been fetched from
memory
• Current Instruction Register (CIR)
holds the instruction currently being executed or decoded
• Accumulator (ACC)
holds the result of an instruction/operation that is being executed
18
CPU architecture
Unit 3 Computer architecture and storage
Control Unit
• The control unit coordinates and
controls the function and operation of the
CPU
• This includes the FE cycle (fetch, decode and
execute instructions)
• 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
19
CPU architecture
Unit 3 Computer architecture and storage
The Arithmetic Logic Unit
• The ALU or Arithmetic Logic Unit is where the actual
operations are done
• This includes basic arithmetic as well as logical operations,
such as AND, OR and NOT
Main
Memory
X = 3
Y = 5
Accumulator
8
ADD X, Y
ALU
20
CPU architecture
Unit 3 Computer architecture and storage
Worksheet 1
• Complete Task 1
21
CPU architecture
Unit 3 Computer architecture and storage
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 – analyses the
instruction
•
EXECUTE – the instruction
is computed
• This process is then repeated…
22
CPU architecture
Unit 3 Computer architecture and storage
23
CPU architecture
Unit 3 Computer architecture and storage
Program Counter (PC)
• The Program Counter holds
the address of the next
instruction to be fetched
and then executed
• The Program Counter is
incremented (increased by 1)
as soon as that instruction has
been fetched
1
2
3
4
5LDA 10
6ADD 11
7STO 12
8
9
10
50
11
17
12
Program
Counter
5
24
CPU architecture
Unit 3 Computer architecture and storage
25
CPU architecture
Unit 3 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
26
CPU architecture
Unit 3 Computer architecture and storage
27
CPU architecture
Unit 3 Computer architecture and storage
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), and sent to the memory via the address bus
• The instruction (or data) at that address is fetched from memory
and copied to the Memory Data Register (MDR) via the data bus
• 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
28
CPU architecture
Unit 3 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
MDR
(Memory
Data
Register)
MAR
(Memory
Address
Register)
29
CPU architecture
Unit 3 Computer architecture and storage
30
CPU architecture
Unit 3 Computer architecture and storage
Current instruction register (CIR)
• The current instruction register holds the
instruction whilst it is being decoded, then executed
• It is also known as the instruction register (IR), but the
name current instruction register gives you a clue that it is the
instruction that is ‘currently’ being decoded / executed that it
holds
• Once the instruction is loaded from memory it is stored in the
current instruction register (CIR)
• Once the instruction is in the CIR it is decoded
• If data is needed that is stored in memory it will be fetched
31
CPU architecture
Unit 3 Computer architecture and storage
Processor architecture
• What does each acronym stand for?
• What does each part do?
32
CPU architecture
Unit 3 Computer architecture and storage
1.
The Control Unit controls and coordinates
all the activities in the CPU
2.
The Program Counter holds the address
of the next instruction to be executed
3. The Address in the PC is passed to MAR and PC is incremented by one each time
the instruction is fetched. The Address bus is used to fetch the instruction from
RAM
4. The instruction is then copied from memory into the MDR using the data bus.
5. The instruction is passed to the CIR where the control Unit (6) decodes
it.(Determining the Opcode and Operand)
Opcode eg ADD, SUB, LDA, STO Operand eg #10(value) or 10 – (Address 10)
7. Depending on the Instruction at 6 above, at the Execute Stage, the instruction may
be operated upon ALU or value stored temporarily in the Accumulator. The ALU
can also make use of the Accumulator as its temporary storage.(9)
THE FDE CYCLE IN DETAIL
33
CPU architecture
Unit 3 Computer architecture and storage
Processor architecture
ACC:
Accumulator –
Temporarily stores
arithmetic results
ALU:
Arithmetic Logic
Unit – performs
calculations and
logic expressions
MDR:
Memory data register – Stores the
data to be sent/received from memory
RAM:
Random Access
Memory
PC:
Program Counter – points
to the next instruction
MAR:
Memory Address Register – stores the
address of the instruction to be executed
CIR:
Stores the current
instruction to be
decoded and
executed
34
CPU architecture
Unit 3 Computer architecture and storage
Example – Step 1
• PC points to next instruction in location 5
• Address 5 is passed to MAR and PC is
incremented. It now holds 6
• Instruction at Address 5 is copied from
memory to MDR
• Instruction passes to the CIR where it is
decoded by control unit. It knows LDA
means Load what is in address 10
• Address 10 passed to the MAR
• The value in location 10, i.e. 8, is passed
from main memory to the MDR
• 8 is loaded into the accumulator (ACC)
1
2
3
4
5
LDA 10
6
ADD #4
7
STO 11
8
9
10
8
11
12
Program
Counter
5
Acc
8
(Add 8 + 4)
35
CPU architecture
Unit 3 Computer architecture and storage
Example – Step 2
• PC now points to next instruction in
location 6
• Address 6 is passed to the MAR and
the PC is incremented
• Instruction at Address 6 passed to MDR
• The instruction is passed to the CIR and
then decoded
• No more data from memory is needed
• 4 is added to 8 in the ALU and the result
is stored in the accumulator (ACC)
1
2
3
4
5
LDA 10
6
ADD #4
7
STO 11
8
9
10
8
11
12
Program
Counter
6
Acc
12
36
CPU architecture
Unit 3 Computer architecture and storage
Example – Step 3
• PC points to the next instruction in
location 7
• Address 7 is passed to the MAR and the
PC is incremented
• Instruction at Address 7 passed to MDR
• The instruction is passed to the CIR to
be decoded
• The instruction is executed causing the
value 12 to be transferred from the
accumulator into memory location 11
1
2
3
4
5
LDA 10
6
ADD #4
7
STO 11
8
9
10
8
11
12
12
Program
Counter
7
Acc
12
37
CPU architecture
Unit 3 Computer architecture and storage
Worksheet 1
• Complete Task 2
38
39
Multiple Choice
Which component of the CPU is responsible for holding the result of an instruction or operation that is currently being executed?
A. Control Unit
B. Arithmetic-Logic Unit (ALU)
C. Memory Data Register (MDR)
D. Accumulator (ACC)
40
Multiple Choice
What is the function of the Memory Address Register (MAR) in the CPU?
A. Holds the result of an instruction or operation
B. Holds the memory address of the current instruction being fetched from memory
C. Holds the address of the next instruction to be fetched then executed
D. Holds the actual instruction or data fetched from memory
41
Multiple Choice
Where is cache memory located in the CPU, and how does its speed compare to RAM?
A. Located on the motherboard; slower than RAM
B. Located on the CPU; faster than RAM
C. Located on the CPU; slower than RAM
D. Located on the motherboard; faster than RAM
42
Multiple Choice
Which special purpose register in the CPU holds the instruction currently being executed or decoded?
A. Program Counter (PC)
B. Memory Address Register (MAR)
C. Current Instruction Register (CIR)
D. Accumulator (ACC)
43
Multiple Choice
What is the primary role of the Program Counter (PC) in the CPU?
A. Holds the result of an instruction or operation
B. Holds the memory address of the current instruction being fetched from memory
C. Holds the address of the next instruction to be fetched then executed
D. Holds the actual instruction or data fetched from memory
44
CPU architecture
Unit 3 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
45
CPU architecture
Unit 3 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)
46
CPU architecture
Unit 3 Computer architecture and storage
Processor architecture
ACC:
Accumulator –
Temporarily stores
arithmetic results
ALU:
Arithmetic Logic
Unit – performs
calculations and
logic expressions
MDR:
Memory data register – Stores the
data to be sent/received from memory
RAM:
Random Access
Memory
PC:
Program Counter – points
to the next instruction
MAR:
Memory Address Register – stores the
address of the instruction to be executed
CIR:
Stores the current
instruction to be
decoded and
executed
47
CPU architecture
Unit 3 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
48
CPU architecture
Unit 3 Computer architecture and storage
49
CPU architecture
Unit 3 Computer architecture and storage
Recap Questions - 100%= 1 Merit
50
CPU architecture
Unit 3 Computer architecture and storage
51
CPU architecture
Unit 3 Computer architecture and storage
52
CPU architecture
Unit 3 Computer architecture and storage
53
CPU architecture
Unit 3 Computer architecture and storage
54
CPU architecture
Unit 3 Computer architecture and storage
55
CPU architecture
Unit 3 Computer architecture and storage
56
CPU architecture
Unit 3 Computer architecture and storage
57
CPU architecture
Unit 3 Computer architecture and storage
58
CPU architecture
Unit 3 Computer architecture and storage
59
Quiz link CPU Architecture
60
61
CPU architecture
Unit 3 Computer architecture and storage
Objectives
• Understand the following terms and how they affect
the performance of a CPU:
• Cores
• Cache
• Clock
• Understand the purpose of buses including:
• The address bus
• The data bus
• The control bus
62
CPU architecture
Unit 3 Computer architecture and storage
Starter - recap
• Name at least five components inside a CPU
• What is the purpose of each component?
63
CPU performance and buses
Unit 3 Computer architecture and storage
Starter
• Components in a CPU
• Control unit (CU) – decodes the instructions; controls the
timing of operations in the CPU
• Arithmetic Logic Unit (ALU) – performs arithmetic and
logic operations
• Registers – including PC (program counter) for the next
instruction; MAR (memory address register) for the memory
location of data to be fetched; MDR (memory data register)
data retrieved from RAM; CIR (current instruction register) to
store the instruction currently being decoded or executed;
Accumulator (ACC) stores the results from the ALU
64
CPU architecture
Unit 3 Computer architecture and storage
What affects CPU performance?
• The following are three of the most common factors
which can affect a CPU’s performance
• Clock speed
• Processor cores
• Cache
• What is the purpose of each of these components?
• How can they affect the performance
of the CPU?
65
CPU architecture
Unit 3 Computer architecture and storage
Factors affecting CPU performance
Clock speed
Cache size
Number of cores
Cycles per second
measured in hertz (Hz)
The number of duplicate
processing units (cores)
placed in one CPU
Cache on the CPU
is faster than RAM but
slower than registers
66
CPU architecture
Unit 3 Computer architecture and storage
CPU
Control Unit
CPU
Control Unit
1. Clock speed
• The clock generates a signal that is used to synchronise
the operation of the processor and the movement of
data around other components of the computer
• Everything in a computer happens on the pulse of the internal clock
• Therefore, the faster the clock speed, the faster the
instructions are processed
Clock
Clock
Clock speed 1GHz
Clock speed 2GHz
1 Billion FDE cycles per second
2 Billion FDE cycles per second
Factors affecting CPU performance
67
CPU architecture
Unit 3 Computer architecture and storage
Processor Speed
• One cycle per second = 1 hertz (Hz) = 1 instruction
carried out each second
• 1 kilohertz (kHz) = 1000 cycles per second
• 1 Megahertz (MHz) = 1,000,000 cycles per second
• 1 Gigahertz (GHz) = 1,000,000,000 cycles per second
• How fast is your computer’s processor?
• Remember, a 1 GHz processor is performing one
billion cycles per second
68
CPU architecture
Unit 3 Computer architecture and storage
Check your device CPU speed
processor
69
Multiple Choice
What is the primary relationship between clock speed and CPU performance?
A. Higher clock speed always results in faster CPU performance
B. Lower clock speed always results in faster CPU performance
C. Clock speed has no impact on CPU performance
D. The relationship between clock speed and CPU performance depends on other factors
70
CPU architecture
Unit 3 Computer architecture and storage
2. Multi-core processors
• A dual-core processor has two processors in the
same integrated circuit, linked together
• A dual-core processor has the potential to perform two
instructions at the same time
• This allows twice as many instructions to be executed,
however, it doesn’t always perform at this rate as software
may not be able to take full advantage of both cores
• A quad-core processor has four linked processors
• Which processor would you prefer, a dual-core
1GHz, or a 3 GHz single core processor?
Factors affecting CPU performance
71
CPU architecture
Unit 3 Computer architecture and storage
Effect on speed
• A quad-core processor working on many different
tasks simultaneously, under ideal conditions can be
up to four times faster than a single-core processor
NOTE
• If the computer is running a single program,
it is not necessarily any faster, since the
program may have been designed to only
run on one core
• Therefore, its only in theory that multi cores
will guarantee multiple processes at the
same time.
72
Multiple Choice
How does a multi-core processor differ from a single-core processor in terms of potential performance?
A. Multi-core processors are always slower than single-core processors
B. Multi-core processors can perform multiple instructions simultaneously
C. Single-core processors have higher clock speeds than multi-core processors
D. Multi-core processors use less cache memory than single-core processors
73
CPU architecture
Unit 3 Computer architecture and storage
3. Cache memory
• Cache is a small amount of
very fast, expensive memory in
the CPU
• It can be accessed faster than
regular main memory (RAM)
• Why is this useful for
recently/frequently
used data?
CPU
Cache
Main Memory
Factors affecting CPU performance
When an instruction is fetched from main
memory, it is copied into cache so if it is needed
again soon after, it can be fetched quicker.
74
CPU architecture
Unit 3 Computer architecture and storage
Effect on speed of cache
• RAM is relatively slow memory to access and it is
further away from the processor than cache
• It takes longer to retrieve an instruction or data from RAM
than from cache
• Program instructions and data that are fetched are
stored in cache in case they are needed again soon
Example
If you have a ‘while’ loop in a program, for example, having all
the instructions in the loop in cache, speeds up execution
75
CPU architecture
Unit 3 Computer architecture and storage
Levels of cache memory
• There are different ‘levels’ of cache:
• Level 1 cacheis extremely fast but small (between 2-
256KB), located on the CPU. Each core will have its
own Level 1 cache
• Level 2 cacheis usually also given to each core. It is
very fast, but a little slower than Level 1 cache. The
typical size is 256KB-8MB
• Level 3 cache is the slowest type of cache, but still
faster than RAM. It is usually located on the CPU and
stores 4MB-50MB. The cache is shared between all the
cores on the processor
76
CPU architecture
Unit 3 Computer architecture and storage
Levels of cache memory
77
CPU architecture
Unit 3 Computer architecture and storage
The benefits of cache
• The data used most often by the CPU is held
in Level 1 cache so is available extremely
quickly
• In most systems, Level 1 cache is used about 50% of the
time, with Level 2 cache being accessed about 90% of the
time
• This greatly reduces the time that the CPU has to wait for
data from main memory
• The size of the Level 2 cache is a major factor
in determining the performance of the CPU
78
Multiple Choice
Which level of cache memory is typically the fastest but also the smallest in size?
A. Level 1 cache
B. Level 2 cache
C. Level 3 cache
D. Main memory (RAM)
79
CPU architecture
Unit 3 Computer architecture and storage
Which is (theoretically) faster?
1. A dual core processor running at 2.7GHz with 4MB of
shared cache memory
2. A quad core processor running at 1.5GHz with 8MB
of shared cache memory
3. A single core processor running at 3.2GHz with 2MB
of cache memory
4. A dual core processor running at 3.2GHz with 4MB of
shared cache memory
Calculate the maximum number of cycles per second in
each case and rank them in order of performance
80
Multiple Choice
Which CPU will run the fastest?
1
2
3
4
81
CPU architecture
Unit 3 Computer architecture and storage
Worksheet 2
• Complete Task 1 on Worksheet 2
82
CPU architecture
Unit 3 Computer architecture and storage
Buses
• When the CPU wishes to access a
particular main memory location, it
sends the address requested to
memory on/via the address bus
• The data in that location is then
returned to the CPU on the
data bus
• Control signals are sent along the
control bus
A bus is a set of parallel wires connecting two or
more components of the computer
83
CPU architecture
Unit 3 Computer architecture and storage
System bus
• The three buses that make up the system bus are:
1.
Address Bus: carries the address of the memory or device
controller to be read from or written to. This bus is unidirectional.
2.
Data Bus: carries data throughout the computer system. This bus is bidirectional.
3.
Control Bus: carries control signals necessary to complete
executing instructions in the CPU. This bus is bidirectional. There is a lot of data
flowing around the CPU, the Control bus ensures that the
right data is travelling to the right place at the right time.
84
CPU architecture
Unit 3 Computer architecture and storage
External buses
• The CPU is also
connected to the external
Input-output device
controllers by means of
the system bus
• Only one device can transmit
along a bus at any one time
• The address bus is one way
only, from the CPU
• What about the data bus?
I/O controllers are a series of microchips which help in the communication of data
between the CPU and the motherboard. The main purpose of this system is to help
in the interaction of peripheral devices with the control units (CU)
85
•Physical input and output devices are connected via the ports.
The CPU does not communicate directly with theI/O devices, but
rather the I/O controller.
•It translates signals from the device into the format required by
the processor.
Internal Components – Input / Output
Controllers
86
Multiple Choice
When the CPU wants to access a specific main memory location, what role does the address bus play in this process?
A. It carries the data from the requested memory location to the CPU
B. It carries control signals (e.g., read/write) to the memory
C. It carries the address of the memory location to be accessed
D. It carries control signals to the CPU
87
Multiple Choice
What is the primary function of the control bus in the system bus architecture?
A. Carrying data throughout the computer system
B. Transmitting data from external input-output devices
C. Carrying control signals necessary to complete executing instructions in the CPU
D. Carrying the address of the memory or device controller
88
Multiple Choice
How does the data bus contribute to the communication within a computer system?
A. It carries control signals necessary for executing instructions
B. It carries the address of the memory location to be accessed
C. It carries data throughout the computer system
D. It is only responsible for transmitting data from external input-output devices
89
CPU architecture
Unit 3 Computer architecture and storage
Buses – summary
• Explain this diagram:
‘M’ key pressed
CPU
Main memory
90
CPU architecture
Unit 3 Computer architecture and storage
Buses – summary
• Explain this diagram:
‘M’ key pressed
CPU
Main memory
Control Bus
Address Bus
Data Bus
1. Get ready to store the letter ‘M’ into Main Memory
3. Here is the data: “01011001”
2. Store it in the following memory address location
91
CPU architecture
Unit 3 Computer architecture and storage
Worksheet 2
• Complete Task 2 and Task 3 on Worksheet 2
92
CPU architecture
Unit 3 Computer architecture and storage
Plenary
1. Name three common factors
which affect the performance
of a CPU
2. Name three types of bus
that are used in
computer architecture
3. Other than the
accumulator (ACC),
name three registers in
a CPU
93
CPU performance and buses
Unit 3 Computer architecture and storage
Plenary
1. Clock speed, number of cores, cache size
2. Address bus, data bus and control bus
3. Three from:
PC (program counter), MAR (memory address
register), MDR (memory data register), CIR
(current instruction register)
94
Quiz on the factors the affect
CPU performance & buses
95
96
CPU architecture
Unit 3 Computer architecture and storage
Objectives
• Understand the purpose and use of an instruction set
for a CPU
• Understand what is meant by a microprocessor
• Describe the purpose and characteristics of an
embedded system
– Be able to identify devices which commonly use
embedded systems
97
Embedded systems and instruction sets
Unit 3 Computer architecture and storage
Starter
• CPUs fetch, decode and execute
instructions
• In a high level language, you may program an
instruction
such as
total <-- 0
FOR i <-- 1 TO 10 DO
total <-- total + i
ENDFOR
• What sort of instructions
does a CPU
actually use?
98
Embedded systems and instruction sets
Unit 3 Computer architecture and storage
Starter
• CPUs use very simple instructions known as
machine code or assembly language
• A high level instruction such as total <-- 0 may use an
instruction such as LOAD ACC, #0
• Complex / structured instructions are broken down
into simpler assembly code instructions
• For example,
FOR i <-- 1 TO 10 DO
may need several
instructions to move
data between RAM
and the Accumulator
99
CPU architecture
Unit 3 Computer architecture and storage
Instruction sets
• Instruction sets are all the possible
instructions that are able to be decoded and
executed by a CPU
• A particular CPU will have its own instruction set
• Programs written for one type of CPU won’t work
on another
• For example, a program written for an Intel Core i7
won’t work on an ARM processor contained in a
smartphone
100
CPU architecture
Unit 3 Computer architecture and storage
Operators and operands
• In ordinary Maths and programming we use the
words operator and operand
• An operator performs an operation (calculation) on the
operand(s)
• The operands are the values used
5
+
7
Operand
Operator
Operand
101
Embedded systems and instruction sets
Unit 3 Computer architecture and storage
Opcodes and operands
• When programming a processor a special language
called assembly code is used
• The program is then assembled into a binary form known as
machine code – this is what is run by the processor
• The assembly code (and machine code) make use of
opcodes and operands
• The opcode is the instruction and the operands are the values
that the instruction works on
Instruction:
STO
057
ACC
Opcode
Operand
Operand
Store…
…into memory
address 057…
…the contents
of the accumulator
102
Multiple Choice
What does an instruction set refer to in the context of a processor?
A. The speed at which instructions are executed
B. All the possible instructions that can be executed by a processor
C. The size of the processor's cache memory
D. The number of cores in the processor
103
Multiple Choice
Why won't a program written for an Intel Core i7 work on an ARM processor in a smartphone?
A. The Intel Core i7 has a faster clock speed
B. Different types of memory are used in the two processors
C. The ARM processor has a different instruction set
D. The Intel Core i7 has more cache memory
104
Multiple Choice
In ordinary Maths and programming, what does an operator do?
A. Performs an operation on the operand(s)
B. Carries out control signals in the CPU
C. Retrieves data from the cache memory
D. Transmits data along the address bus
105
Multiple Choice
What is the purpose of assembly code when programming a processor?
A. To represent high-level programming languages
B. To serve as a high-level programming language
C. To provide a graphical user interface for programming
D. To represent low-level instructions that the processor can execute
106
Multiple Choice
What is machine code in the context of programming a processor?
A. A high-level programming language
B. A graphical representation of program flow
C. Binary code that the processor directly executes
D. A set of assembly instructions
107
Multiple Choice
What are opcodes and operands in the context of assembly code?
A. Opcode is the type of processor, and operands are the memory addresses
B. Opcode is the instruction, and operands are the values the instruction works on
C. Opcode is the result of an operation, and operands are the input values
D. Opcode is the program counter, and operands are the data being processed
108
Multiple Choice
Why won't a program written in assembly code for one type of CPU work on another CPU?
A. Assembly code is not a programming language
B. Different CPUs have different clock speeds
C. Each CPU has its own instruction set
D. Assembly code is not compiled
109
Multiple Choice
In programming, what does the term "instruction set" specifically refer to?
A. The set of instructions for installing a software
B. The set of instructions executed by the CPU
C. The set of programming languages available
D. The set of control signals in a computer system
110
Multiple Choice
How does assembly code relate to machine code?
A. Assembly code is a higher-level language than machine code
B. Assembly code is a graphical representation of machine code
C. Assembly code is translated into machine code for execution
D. Assembly code is not used in programming processors
111
Embedded systems and instruction sets
Unit 3 Computer architecture and storage
Worksheet 5
• Complete Task 1
112
•Processors are designed to run
and understand a particular set
of 1s and 0s. These are the two
processor instruction sets:
1.
Reduced Instruction
Set(RISC)
2.
Complex Instruction
Set(CISC)
Processor Instruction Set
HIGH LEVEL
LANGUAGE
PRINT (“HELLO”)
ASSEMBLY
LANGUAGE
LDA,MULT,STA
MACHINE CODE
010100101
Processor Level
The processor will need to
understand the 01010010
and this instruction set will
have been embedded in its
design(RISC or CISC)
Compiler
/Interpreter
Converts HLL to
LLL
113
1.
Complex Instruction
Set(CISC)
•
Used in earlier generations of
computers. Most common in
embedded systems.
•
Designed to complete task with
as few assembly language lines
as possible
•
Processor is capable of
understanding even with a few
instructions because included in
a CISC instruction is a
LOAD/STORE sub instruction
which is executed along with
the calculation.
Processor Instruction Sets
High level
Language
a = a * b
Assembly
Language
for CISC
processor
MULT A,B
114
2. Reduced Instruction
Set(RISC)
•
More modern processors
where only simple
instructions are used and
executed, each taking one
clock cycle
•
The disadvantage is that the
compiler has to do more
work to translate high level
code into machine code and
more RAM is required to
store the instructions.
•
Its possible to have the
same execution speed as
CISC through pipelining.
Processor Instruction Sets
High level Language
a = a * b
Assembly Language
for RISC
processor
LDA R1, A
LDA R2, B
MULT, R1,R2
STA R1,A
115
• What is an Instruction Set?
• Describe the difference between RISC and
CISC processors
•
116
• An assembly language statement
consists of four parts
CMPR1, #10 ‘Compare the value in register
1 with the value 10’
Understanding Assembly Language
CMP – Operation Code
(Opcode)
A Mnemonic that uses 3-
4 characters to explain
the command e.g ADD,
MOV
R1 – Operands
Follows an Opcode and
determines with what the
opcode is to perform. In
this example,
CMP(compare) has to be
followed by two
operands. R1 is a register,
the second operand is the
value denoted by a #10
This is a
Comment
# depicts the
Addressing Mode
Immediate
addressing mode –
the value after the
hash is the actual
data item
117
• When accessing anything held in memory,
you need to know the address. Data is input
or copied out of memory in two different
ways:
• Direct Addressing – Tells the CPU which
addresscontains the data you want to access
LDA r1,100
• Immediate Addressing – Depicted with a
hash# - The actual data to be operated on
follows the hash eg MOV r1,#10
Addressing Modes
118
Multiple Choice
In the following assembly code instruction, what does the opcode represent?
ADD R1, R2, R3
A. The result of the addition operation
B. The register where the result is stored
C. The type of operation to be performed (addition)
D. The memory address of the operand
119
Multiple Choice
What does the operand #10 represent in this instruction?
SUB R4, R5, #10
A. A register address
B. An immediate value
C. The result of the subtraction
D. A memory address
120
Multiple Choice
What is the purpose of the following assembly code instruction?
MOV R6, #255
A. Move the content of register R6 to register #255
B. Move the immediate value 255 into register R6
C. Perform a conditional move operation
D. Move the content of register #255 to register R6
121
Multiple Choice
In the instruction JMP Label1, what does the opcode JMP signify?
A. Jump
B. Move
C. Add
D. Subtract
122
Multiple Choice
What does the CMP opcode typically indicate?
CMP R7, #0
A. Compare
B. Copy
C. Compute
D. Complement
123
CPU architecture
Unit 3 Computer architecture and storage
Microprocessor
• A microprocessor is an integrated circuit that is all
contained on a single chip
• CPUs contain one type of microprocessor, they include
Pentium microprocessors and ARM microprocessors
• Microcontrollers contain not only the
microprocessor, but also RAM and
ROM, or flash memory for volatile and
non-volatile storage – this allows
for an entire computer to
be contained on one chip
124
CPU architecture
Unit 3 Computer architecture and storage
Embedded systems
• Do these devices have inputs, processes and
outputs?
• Could they be classed as computers?
• Why or why not?
125
CPU architecture
Unit 3 Computer architecture and storage
Embedded computers
• An embedded computer is a single microprocessor
that includes RAM, ROM and a CPU
• An embedded computer is frequently used to control a device
using simple inputs
An embedded system is a small computer that forms part of a larger system, device or machine.
Its purpose is to control the device and to allow a user to interact with it.
126
CPU architecture
Unit 3 Computer architecture and storage
Embedded systems
• Without embedded systems, a digital device
would not be able to perform specific functions
• For example, a dishwasher wouldn’t know when
to heat the water, or a satnav wouldn’t know how
to communicate with a satellite
• What embedded functions do cars use?
127
Car embedded systems
• Some examples of embedded systems in
cars include:
– Cruise control
– Engine cooling fan
– Interior fans and temperature
– Interior lighting
– Rear cameras and remote parking
– Infotainment systems (entertainment / information /
satnav)
– Engine control unit (ECU)
128
CPU architecture
Unit 3 Computer architecture and storage
Other embedded systems
• Embedded systems are also used in:
• Security systems
• Lighting systems
• Vending machines
129
CPU architecture
Unit 3 Computer architecture and storage
Embedded vs General purpose
• The following table shows how the characteristics of
embedded systems compare to
general purpose machines
Characteristic
Embedded system
General purpose machine
CPU speed
Typically slow
Typically very fast
Software
Has one purpose and
cannot install new software
New software can be
installed
Storage
Programs stored on ROM
Programs stored on
hard drives
Reliability
Typically very reliable – e.g.
a microwave should not
have a bug that changes
defrost to full power
As it runs many software
programs it may be less
reliable and need restarting
the device
130
CPU architecture
Unit 3 Computer architecture and storage
Worksheet 3
• Complete Task 2 on Worksheet 3
131
Embedded systems and instruction sets
Unit 3 Computer architecture and storage
Plenary
• Work with a partner to explain
the following terms:
• Embedded system
• Microprocessor
• Instruction set
• Assembly code
• Machine code
• Opcode and operands
132
Embedded systems and instruction sets
Unit 3 Computer architecture and storage
Plenary
• Embedded system – a single processor that includes, RAM,
ROM and processor as one unit
• Microprocessor – a type of integrated circuit on a single chip
• Instruction set – a list of all the commands that can be
processed by a CPU
• Assembly code – code written in assembly language. The
instructions written are exact 1:1 representations of the
machine code that will be executed on the CPU
• Machine code – The binary representation of the assembly
code program. This will be executed by the CPU
• Opcode and operands – The opcode is the instruction and the
operands are the values that the instruction works on
133
134
135
Objectives
• Understand the meaning of primary storage
including the role of:
• Random Access Memory (RAM)
• Read Only Memory (ROM)
• Describe the difference between RAM and ROM
and why both are needed
• Describe what is meant by virtual memory including:
• How it is created and used
• The reason it is necessary
136
CPU architecture
Unit 3 Computer architecture and storage
Starter
• What are four types of
memory that are used
in computers systems?
137
CPU architecture
Unit 3 Computer architecture and storage
Starter
• From previous lessons:
• CPU registers
• Cache
• This lesson:
• RAM
• ROM
• Virtual memory
138
CPU architecture
Unit 3 Computer architecture and storage
What is Memory
Memory is where binary data (0s and 1s) is
stored.
The term memory is used interchangeably with
storage in the syllabus.
There are several devices in a modern computer
which store data. They store this data in different
ways and for different purposes.
139
CPU architecture
Unit 3 Computer architecture and storage
Types of primary storage
• There are many types of memory used in
computers
• In the Von Neumann architecture, primary storage
is directly accessed by the CPU
• The two types used as primary storage are:
• RAM (Random Access Memory)
• ROM (Read Only Memory)
RAM
ROM
140
Memory
Unit 3 Computer architecture and storage
RAM
• RAM stores programs or data that are currently
running or open
• It is directly accessed by the CPU
• When your computer is turned off, data stored in RAM is lost
• RAM is volatile as it loses data if the power is off
• All your programs and data are stored permanently
on your hard drive
• This is known as non-volatile storage as it doesn’t lose the
data if the power is off
141
CPU architecture
Unit 3 Computer architecture and storage
Worksheet 4
• Complete Task 1 on Worksheet 4
142
CPU architecture
Unit 3 Computer architecture and storage
RAM
• When the computer is first turned on,
no data is stored in RAM
RAM
Empty
143
CPU architecture
Unit 3 Computer architecture and storage
Operating system
• The computer first loads the operating
system from your hard drive into RAM
Operating
system
RAM
144
CPU architecture
Unit 3 Computer architecture and storage
Programs and data
• When applications or programs are
loaded, they are copied into RAM from
the hard drive
• Documents and files (data) that are used with
those programs are also opened by copying
them into RAM
• RAM starts to fill up as all these
programs, documents and files are copied
RAM
Operating
system
Word
Excel
Clipboard
Documents
in use
145
CPU architecture
Unit 3 Computer architecture and storage
Running out of space
• You now want to open a
browser to search the Internet
• The browser software needs
more memory than you have
free in RAM
• What do you think
happens?
RAM
Operating
system
Word
Excel
Clipboard
Documents
in use
Browser
146
CPU architecture
Unit 3 Computer architecture and storage
Virtual memory
• Virtual memory is part of the
hard drive used as an
extension to RAM
• A pageof data is a fixed-length
block of virtual memory
• When pages of data are moved
between RAM and hard disk this is
known as swapping or paging
• What are the advantages
and disadvantages of using
part of the hard disk in this
way?
RAM
Hard Disk
Browser
Operating
system
Word
Excel
Clipboard
Documents
in use
147
CPU architecture
Unit 3 Computer architecture and storage
Virtual memory
• Advantages
• Uses cheap secondary storage on the hard drive
• Prevents error messages saying ‘out of memory’ – the
programs and files will still open
• Disadvantages
• Accessing virtual memory is very slow
• To access data, the existing data in RAM needs to be copied
to the virtual memory, then data in virtual memory needs to be
copied to RAM
148
CPU architecture
Unit 3 Computer architecture and storage
Whathappens when RAM
completely fills up?
149
CPU architecture
Unit 3 Computer architecture and storage
Read-only memory (ROM)
• Some data needs to be permanently held in primary
storage, even when a computer has no power
• Read-only memory (ROM) is used to store this data
• Data is read from ROM, but cannot be written to it
• It is non-volatile as the data isn’t lost if the power is off
• What is stored
in ROM on a
modern computer?
150
CPU architecture
Unit 3 Computer architecture and storage
ROM
• ROM is used in modern computers to store:
• The initial program that is run when the computer is turned on
• This is known as the bootstrap
• It tells the computer where it will find the operating system on
the hard drive
• It also stores the Basic Input/Output System (BIOS)
• The BIOS can run without a hard drive or other secondary
storage being present
• It controls basic technical configuration of the computer such
as the processor speed and system time
151
CPU architecture
Unit 3 Computer architecture and storage
RAM vs ROM differences
Characteristic
RAM
ROM
Size
Typically 4 GB – 32 GB
Typically 4 MB – 8 MB
Used to store
Running programs and
operating system
BIOS and bootstrap
Read ability
Yes
Yes
Write ability
Yes
No
Volatile
Yes
No
152
CPU architecture
Unit 3 Computer architecture and storage
Memory speed
• The speed that data can be accessed changes
through the different components in a computer
• The slower components are far cheaper for each byte of
data stored
153
CPU architecture
Unit 3 Computer architecture and storage
Worksheet 4
• Complete Task 2 on Worksheet 4
154
CPU architecture
Unit 3 Computer architecture and storage
Exam Question
1. Abeel had a power cut whilst working on a
spreadsheet document. He said that he lost the entire
document but could still open the spreadsheet
program when the power came back on.
Explain why this was the case for Abeel.
2. An increase in RAM capacity can improve the
performance of your computer.
Explain why an increase in ROM size would not have
the same effect.
155
CPU architecture
Unit 3 Computer architecture and storage
Exam Question Solution
1. The spreadsheet program was stored on the hard
drive and copied to RAM / main memory while the
program was in use.[1] The document was created
and stored in RAM[1], and disappeared because it
was never saved[1]. If the document had been
saved, it would have been copied to the hard
disk[1].
2. ROM is only required to be as large as the start-up
instructions / BIOS inside it.[1] Any additional space
will make no difference.[1] New files cannot be written
into new space as it is read-only.[1]
156
CPU architecture
Unit 3 Computer architecture and storage
Plenary
• In pairs test each other on the following:
1.
What does RAM stand for?
2.
What does ROM stand for?
3.
Name one difference between RAM and ROM
4.
How much RAM is typically available in a modern
personal computer?
5.
Why is virtual memory much slower than RAM?
157
CPU architecture
Unit 3 Computer architecture and storage
Plenary
• RAM stands for Random Access Memory
• ROM stands for Read Only Memory
• RAM can be written to, ROM can’t
ROM is non-volatile, RAM is volatile
• Typically, a modern personal computer will have 8-32 GB of
RAM available
158
Copyright
© 2021 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.
CPU architecture
Unit 3 Computer architecture and storage
159
160
Objectives
• Understand the need for secondary storage
• Describe the operation of the following types of
storage and give examples of each:
• Magnetic storage
• Optical storage
• Solid-state storage
161
CPU architecture
Unit 3 Computer architecture and storage
Starter
• RAM is a type of primary storage
• It has a fast data rate but is volatile
(the data is lost if there
is no power)
• What storage
devices are
used that are
non-volatile?
162
CPU architecture
Unit 3 Computer architecture and storage
Secondary storage
• Secondary storage is not directly
accessed by the CPU and is needed
for permanent storage of data
• It is non-volatile, meaning
it will keep data even if there
is no power
• Secondary storage devices
may be internal or external
to the computer
• What is secondary storage
used for?
163
CPU architecture
Unit 3 Computer architecture and storage
Uses of secondary storage
• It has many different uses – for example:
• Programs and data are stored on hard drive
• Blu-rays may be used to distribute films
• Memory sticks may be used to transport data from one place
to another
• Magnetic tape or external hard drives may be used for backup
• SD cards can be used for additional storage on cameras
and smartphones – this is used for music, video and photos
164
CPU architecture
Unit 3 Computer architecture and storage
Storage types
• Primary storage
• RAM and ROM
• Secondary storage
• Hard Disk Drive (HDD)
• Solid State Drive (SSD)
• Offlinesecondary storage
• Compact Disc (CD), Digital Versatile Disc (DVD) or BluRay
• Flash memory, SD cards
• Removable HDD or SSD
• Magnetic tape
165
CPU architecture
Unit 3 Computer architecture and storage
Storage methods
• Magnetic: Mechanical parts move over the disks
surface to read and write data magnetically, or a
drive head reads a magnetic tape
• Optical: Lasers read and write data using light
• Solid State: Data is recorded onto solid memory
chips (NAND technology) without any moving parts
166
CPU architecture
Unit 3 Computer architecture and storage
Worksheet 9
• Complete Task 1
167
CPU architecture
Unit 3 Computer architecture and storage
Magnetic disks
Basic features:
• Disk contains concentric
circles called tracks
• Each track is divided
into sectors
• Disk heads mounted on
mechanical arms read
and write the data
• A disk with a solid
platter is a ‘hard’ disk
• Soft plastic disks are
known as ‘floppy’ disks
168
CPU architecture
Unit 3 Computer architecture and storage
Hard disks
• Parts of a hard disk
Drive read/write head reads data
on the drive using electromagnets
Magnetic platter
contains data –
Hard disks may
contain more than
one platter
Drive spindle
rotates
Actuator
moves the
read/write arm
169
CPU architecture
Unit 3 Computer architecture and storage
Magnetic storage: hard disks
• Fixed magnetic hard disks are still used in many
PCs and laptops
• They have a very large storage capacity, up to 6TB or more
• They are a cheaper form of storage compared to solid state
drives
• Portable hard disks can
be connected to a
computer via a USB port
• They are used for
backing up or
transporting data
170
CPU architecture
Unit 3 Computer architecture and storage
Magnetic storage
• Advantages:
• Cheaper, large storage capacities, relatively fast write speed
• Disadvantages:
• Lots of mechanical parts, durability an issue, sealed unit due
to disk head and platter precision and not very portable
• Uses:
• Personal computers, storage of large quantities of data
• Capacity:
• 500GB - 12TB or greater
171
CPU architecture
Unit 3 Computer architecture and storage
Optical storage
• Basic features:
• Data is stored as pits and
lands burnt or pressed into a
spiral track circulating
outwards from the centre
• A laser beam passes over the
pits and lands the level of
reflection is measured
• From this signal, 0s and 1s
can be derived
172
CPU architecture
Unit 3 Computer architecture and storage
Optical storage
• Advantages:
• Cheap, very easily portable, takes up little space physically
• Disadvantages:
• Less storage capacity compared to other types
• Easily damaged / scratched, requires a CD reader
• Slow write speeds
• Uses:
• Songs, videos and other multi-media storage, backup and
archiving of data
• Capacity:
• CD-ROM – up to 720 MB
• DVD – up to 8.4 GB (dual layered disk)
• Blu-Ray – up to 50 GB (dual layered disk)
173
CPU architecture
Unit 3 Computer architecture and storage
How CDs work
174
CPU architecture
Unit 3 Computer architecture and storage
CDs, DVDs and BluRay
• Why are the capacities of these discs different given
they are all the same physical size?
• Microscopic view of the surface of a CD ROM
175
CPU architecture
Unit 3 Computer architecture and storage
• A CD has bigger pits and lands than Blu-ray as red
light has a larger wavelength
• The smaller Blu-ray pits and lands allow it to store more data
Pit size and laser wavelength
176
CPU architecture
Unit 3 Computer architecture and storage
Worksheet 9
• Complete Task 2 and Task 3
177
CPU architecture
Unit 3 Computer architecture and storage
Solid State Drives (SSD)
• Basic features:
• Solid-state disks use
non-volatile flash memory to
store information
• Very fast read/write speeds
as it doesn’t need to wait for a
disk to spin to the correct
location and an arm to move
• No mechanical or moving
parts meaning these disks are
very durable
178
CPU architecture
Unit 3 Computer architecture and storage
Advantages /disadvantages
of SSDs
• Advantages:
• Highly durable, no moving parts, very fast read/write speeds,
no noisy fan or drive arm, faster start up times
• Disadvantages:
• More expensive than magnetic hard disks, similar storage
capacity as magnetic disks
• Uses:
• Higher end computers
• Laptops
• Smartphones and tablets
• Capacity:
• 100GB – 16TB
179
CPU architecture
Unit 3 Computer architecture and storage
Flash memory
• Low cost, portable, no moving parts, durable
• This makes them ideal for a range of offline devices:
• Cameras
• Mobile phones
• USB memory sticks
180
CPU architecture
Unit 3 Computer architecture and storage
How flash memory stores data
• A floating gate may store or not store electrons
• If no electrons are present in the floating gate the current will
flow, representing a 1
• If electrons are stored in the floating gate, the current doesn’t
flow, representing a 0
Control Gate
Isolation Layer
Floating Gate
Isolation Layer
SOURCE
DRAIN
Control Gate
Isolation Layer
Isolation Layer
SOURCE
DRAIN
Control Gate
Isolation Layer
Isolation Layer
SOURCE
DRAIN
Electrons
1
0
181
CPU architecture
Unit 3 Computer architecture and storage
The isolation layer
• The isolation layers are semiconductors known
as transistors
• In order to write to the flash memory cell, the electrons need
to pass through the isolation layer
• The electrons only move through this layer when writing
• Normally, they remain trapped in the floating gate
Control Gate
Isolation Layer
Isolation Layer
SOURCE
DRAIN
Electrons are
trapped
182
CPU architecture
Unit 3 Computer architecture and storage
How flash memory writes data
• The control gate is used to move electrons into or
out of the floating gate
• A negative voltage forces electrons out of the floating gate
• A positive voltage forces electrons into the floating gate
Control Gate
Isolation Layer
Floating Gate
Isolation Layer
SOURCE
DRAIN
-ve voltage
Isolation Layer
Isolation Layer
SOURCE
DRAIN
+ve voltage
Isolation Layer
Isolation Layer
SOURCE
DRAIN
Electrons
183
CPU architecture
Unit 3 Computer architecture and storage
Solid-state (flash memory)
• Two types of flash memory are available
• NOR flash memory is used for programs
• Reading from NOR flash is random access like RAM
• It is used to store code such as the BIOS and possibly an
operating system and code is executed directly by the CPU
• NAND memory is used for data storage
• NAND memory works like other secondary storage
• Data is first copied to RAM before it is accessed by the CPU
184
CPU architecture
Unit 3 Computer architecture and storage
Worksheet 9
• Complete Task 4
185
CPU architecture
Unit 3 Computer architecture and storage
Plenary
• In pairs, give answers to the following:
• Name 5 components inside a hard disk drive
• Name 4 components on a DVD or inside a DVD drive
• Name 3 technologies that storage
devices use
• Name 2 parts of a
memory cell in
solid state storage
• Name 1 word that
means 1024 Gibibytes
186
CPU architecture
Unit 3 Computer architecture and storage
Plenary
• Name 5 components inside a hard disk drive
Track, sector, platter, spindle/motor, read/write head, actuator
• Name 4 components on a DVD or inside a DVD drive
Pit, land, laser, light sensor, prism
• Name 3 technologies that storage devices use
Magnetic, optical, solid-state
• Name 2 parts of a
memory cell in solid
state storage
Control gate, floating
gate, isolation layer
• Name 1 word that means
1024 Gibibytes - Mebibyte
187
Copyright
© 2021 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.
CPU architecture
Unit 3 Computer architecture and storage
188
189
Objectives
• Understand what is meant by cloud storage
• Explain the advantages and disadvantages of storing data on
the cloud in comparison to storing it locally
190
Cloud storage
Unit 3 Computer architecture and storage
Starter
• Many people and companies
now use the cloud
• What is the cloud?
191
Cloud storage
Unit 3 Computer architecture and storage
The cloud
• The cloud is another name for services
offered via the Internet
• The name comes from network diagrams
that use a cloud symbol to represent
the Internet
• The cloud can be split into two
major areas:
• Cloud storage
• Cloud computing
• What is cloud storage?
192
Cloud storage
Unit 3 Computer architecture and storage
Cloud storage
• Cloud storage allows users to
store files and data on
the Internet
• The files are accessed remotely
by users
• Data may be stored in
multiple locations
• A professional company will manage
the data storage
• What are two other cloud storage features?
193
Cloud storage
Unit 3 Computer architecture and storage
Cloud storage features
• Further features include:
• Synchronisation of devices
with the cloud storage
• 24/7 Availability
• Redundancy
• Multiple file versions
• Only pay for storage used
• Scalability
• What do each of these
features mean?
194
Cloud storage
Unit 3 Computer architecture and storage
Redundancy
• Storage redundancy is where multiple copies of
files are stored in different locations
• In local storage this is normally carried out by having multiple
copies of files on two different hard drives in one server
• In cloud storage the locations that store redundant files may
be anywhere in the world
195
Cloud storage
Unit 3 Computer architecture and storage
Scalability
• Scalability is the ability of the storage system or
cloud computing resources to increase in size
• A home PC doesn’t have scalable storage. It may be possible
to have two or three hard disks, but not two or three hundred
• Cloud storage normally charges for the amount of
storage used
• Increasing offline storage usually requires
the purchase of new disks
196
Cloud storage
Unit 3 Computer architecture and storage
Data centres
• Data centres are buildings that
are dedicated to storing
physical servers
• Each server will contain an array
of hard drives
• Professional engineers will manage
the computers
• The buildings will have temperature
control and air conditioning
• Uptimes for data centres are often
better than 99.99%
197
Cloud storage
Unit 3 Computer architecture and storage
Worksheet 11
• Complete Task 1 and Task 2
198
Cloud storage
Unit 3 Computer architecture and storage
Privacy
• If data is stored in the cloud, the
security and privacy of the data
is controlled by an
external company
• Data stored locally is under the
control of a single person or organisation
• Both cloud storage and local storage
may be hacked, however, typically
cloud storage will be more secure
• Companies and organisations will need
to consider the level they trust an
external company to hold their data
199
Cloud storage
Unit 3 Computer architecture and storage
Data transfer speeds
• When a file is used that is on cloud storage it must
first be downloaded
• With a fast connection and a small office document this may
happen in a few seconds
• However, with files such as those used in video editing it may
take hours to open or save files to cloud storage
• Local storage is very fast to transfer data
• A local SATA solid state drive can read and write data at
around 500 MB per second
• A typical UK internet connection operates at around 70 Mb/s
giving speeds of less than 10 MB per second
200
Cloud storage
Unit 3 Computer architecture and storage
Worksheet 11
• Complete Task 3
201
Cloud storage
Unit 3 Computer architecture and storage
Plenary
• Work in a pair to answer the
following questions:
• What is cloud storage?
• How does it differ
from local storage?
• What are two
advantages and
disadvantages of
cloud storage
compared to
local storage?
202
Cloud storage
Unit 3 Computer architecture and storage
Plenary
• What is cloud storage? Remote storage provided by a
company that is bought as a service
• How does it differ from local storage? Local storage consists
of hard drives that are owned and maintained by the user or
organisation themselves
• What are two advantages and disadvantages of cloud
storage compared to local storage? Some suggestions:
Cloud storage advantages
Cloud storage disadvantages
Redundancy in many remote
locations
Takes longer to download data
in the case of a full restore
Managed by the cloud storage
provider
Not appropriate for large files
where quick access is needed
203
Copyright
© 2021 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.
CPU architecture
Unit 3 Computer architecture and storage
Show answer
Auto Play
Slide 1 / 203
SLIDE
Similar Resources on Wayground
191 questions
Untitled Presentation
Lesson
•
Professional Development
193 questions
NDEFINIDO#1 regulares + HACER e IR
Lesson
•
9th - 12th Grade
202 questions
untitled
Lesson
•
KG - University
195 questions
Present Simple vs Present Continuous
Lesson
•
KG - University
209 questions
STAAR REVIEW/ EXTENDED RESPONSEuntitled
Lesson
•
KG - University
197 questions
Persiapan PAS Informatika Kelas 7
Lesson
•
7th Grade
205 questions
nansy
Lesson
•
7th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
10 questions
Probability Practice
Quiz
•
4th Grade
15 questions
Probability on Number LIne
Quiz
•
4th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
6 questions
Appropriate Chromebook Usage
Lesson
•
7th Grade
10 questions
Greek Bases tele and phon
Quiz
•
6th - 8th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade
14 questions
[AP CSP] JavaScript Programming Quiz
Quiz
•
9th - 12th Grade
10 questions
Understanding Computers and Computer Engineering
Interactive video
•
7th - 12th Grade
37 questions
Python - Tuples, Lists, and List Methods
Quiz
•
9th - 12th Grade
60 questions
MOS Word Home, Insert, Reference Ribbon Basics
Quiz
•
9th Grade