0% found this document useful (0 votes)
6 views

Chapter 3

The document explains the purpose and function of the CPU, detailing its role in fetching, decoding, and executing instructions as the brain of a computer. It covers the Von Neumann architecture, components of the CPU, the fetch-decode-execute cycle, and characteristics affecting CPU performance, such as clock speed, cache size, and number of cores. Additionally, it discusses instruction sets, embedded systems, input and output devices, and their respective functions.

Uploaded by

rohprak88
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Chapter 3

The document explains the purpose and function of the CPU, detailing its role in fetching, decoding, and executing instructions as the brain of a computer. It covers the Von Neumann architecture, components of the CPU, the fetch-decode-execute cycle, and characteristics affecting CPU performance, such as clock speed, cache size, and number of cores. Additionally, it discusses instruction sets, embedded systems, input and output devices, and their respective functions.

Uploaded by

rohprak88
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 20

The CPU & Microprocessors

What is the purpose of the CPU?

•The purpose of the Central Processing Unit (CPU) is to fetch, decode and
execute instructions
• The CPU is the brain of the computer and its job is to take an input, process data
and produce an output
• It is central to all devices including:
o Laptops o
Desktops o Games-
Consoles o Mobile
Devices
• The words CPU and Microprocessor are interchangeable and can be used to
mean the same thing
• A microprocessor is a type of integrated circuit on a single chip
• Data and commands are inputted by the user using an input device, the central
processing unit (CPU) processes data by executing instructions and the
results are outputted to an output device
• Below is an example of data being inputted, processed and the results being
outputted
Step Example

Input A keyboard is used to input a number

If the instruction being executed is ADD, the inputted value is


added to an Process existing value

The result of the calculation is outputted to the user via the


monitor Output

A diagram showing the input, process, output sequence followed by computer


systems

Von Neumann Architecture


What is the Von Neumann architecture?
• The Von Neumann Architecture is a design of the CPU which was proposed by
Mathematician John Von Neumann in the 1940s, which most general-purpose
computers are built upon
• The Von Neumann Architecture outlines how the computer memory, input/output
devices and processor all work together

The Von-Neumann architecture


• Th e Von Neumann architecture consists of:
o Control unit
(CU) o Arithmetic
logic unit (ALU)
o Registers o
Buses
What is the function of each component?

Arithmetic logic unit (ALU)


• Performs arithmetic operations
• Performs logical decisions
o IF X > 5 THEN
DO ……….
Control unit (CU)
• Coordinates how data moves around the CPU by sending a signal to control
the movement of the data
• Decodes the instructions fetched from memory
Registers
• Extremely small, extremely fast memory located in the CPU
• Hold small amounts of data needed as part of the fetch-execute cycle
• Each register has its own specific purpose
• It consists of 5 main registers o The Program Counter (PC) o The Memory
Address Register (MAR) o The Memory Data Register (MDR) o The
Accumulator (ACC) o Current Instruction Register (CIR)
• For each of the registers you must know o The name of the register o Its
acronym
o The purpose of the register
Acrony
Name Purpose
m

Program PC • Holds the memory address of the


Counter next instructions to be executed
• Increments by 1 as the fetch-decode-
execute cycle runs

Memory MA • Holds the memory address of where


Address R data or instructions are to be fetched
Register from memory

Memory Data
MD • Stores the data or instruction which
Register R has been fetched from memory

Current
Instruction
CIR
Register
• Stores the instruction the CPU is
currently decoding or executing

Accumulator ACC • Stores the results of any calculations that have


taken place in the Arithmetic Logic Unit
(ALU) Buses
• Components within the CPU and wider computer system are connected by buses
• A bus is a set of parallel wires through which data/signals are transmitted
from one component to another
• There are 3 types of bus:
o Address - unidirectional, carries location data (addresses), data is
written to/read from
o Data - bidirectional, carries data or instructions
o Control - bidirectional, carries commands and control signals to tell
components when they should be receiving reads or writes etc..

Examiner Tips and Tricks


If asked to describe the purpose of the PC, MAR or the MDR make sure you explain
how the data is being fetched or written to memory
Worked Example
Describe the role of the control unit, the control bus, the data bus and the address bus
when fetching an instruction from memory [4]
Answer
• The address of memory (holding instruction) is placed on the address bus
(1)
• The control unit sends a signal (1) on the control bus (to start a read
operation) (1)
• The instruction is/the contents of the memory are placed on the data bus
(1)
Fetch-Decode-Execute Cycle (FDE) What
is the purpose of the CPU?

• The purpose of the Central Processing Unit (CPU) is to fetch, decode and
execute instructions
• The CPU is the brain of the computer and its job is to take an input, process data
and produce an output
What is the Fetch-Decode-Execute cycle?
• The Fetch-Decode-Execute Cycle is the cycle that the central processing unit
(CPU) runs through billions of times per second to make a computer work
• A computer takes an input, processes the input and then delivers an output for
the user
o Input: Clicking a button on the gamepad
o Process: The CPU inside the console follows a set of instructions to
carry out the task o Output: The player moving on screen

The Fetch-Decode-Execute cycle stages

Fetch stage

• During the fetch stage of the cycle, the program counter holds the address of
the next instruction to be fetched from memory
• The address of the next instruction or data to be fetched is copied into the
memory address register (MAR)
• The address of the instruction or data is then sent along the address bus and
awaits a signal from the control bus
• The signal sent along the control bus is sent from the control unit (CU) to the
main memory
• The data or instructions received from main memory is fetched to the memory
data register (MDR) via the data bus
• A copy of the instruction or data is stored in the current instruction register
(CIR)
• The program counter (PC) increments by 1 so it is pointing to the next
instruction to be executed
Decode stage
• During the decode stage of the cycle, the CPU needs to work out what is
required from the instruction
• This is done as the instruction is split into two parts:
o Opcode - what the instruction is o
Operand - what to do it to
▪ This could be either data or an address where the data is stored
Execute stage
• During the execute stage of the cycle, the CPU will carry out the instruction
that was fetched
• Some examples that would take place at this stage are
o Performing a calculation
o Storing a result or data back in main memory (RAM) o
Going to main memory to fetch data from a different location
The important things to remember are:

• An instruction or data is fetched from memory


• The instruction is decoded
• The instruction is executed
• The cycle repeats billions of times per second
Examiner Tips and Tricks
Make sure you read the question carefully and look at the number of marks allocated to
judge the level of detail required. Often questions on the fetch-decode-execute cycle
only require you to describe the steps rather than explain how the registers and buses
are used during each step
Worked Example
Explain how an instruction is fetched using Von Neumann architecture

[6]

Answer
• The Program Counter (PC) holds the address/location of the next
instruction to be fetched [1]
• The address held in the PC is sent to the Memory Address Register (MAR)
[1]
• The memory address is sent using the address bus [1]
• The Program Counter is incremented [1]
• The instruction is sent from the address in memory to the Memory Data
Register (MDR) [1]
• The instruction is transferred using the data bus [1]
• The instruction is sent to the Current Instruction Register (CIR) [1]

Characteristics of the CPU

What are the common characteristics of the CPU?


• There are 3 common characteristics
o Clock Speed o
Cache Size o
Number of Cores
• Each of these characteristics has a significant impact on the performance of the
CPU

How do the characteristics of the CPU affect performance?

Clock speed
• The clock speed is measured in Hertz (Hz)
• The clock speed measures the number of fetch-decode-execute cycles that can
take place in 1 second
• The faster the clock speed, the more instructions can be fetched and executed
per second
• Modern computers have a clock speed in Gigahertz (GHz), meaning billion
• A clock speed of 3.5GHz can perform up to 3.5 billion instructions per second
Cache size
• Cache is very small, very fast memory on or close to the CPU
• Cache is used as temporary storage to provide quick access to a copy of
frequently used instructions and data
• The larger the cache size, the more frequently used instructions or data can be
stored
• This results in the CPU having to complete fewer fetch cycles from memory
(RAM), speeding up the performance
• Cache also has a significantly faster read/write speed than RAM, making it much
quicker to retrieve instructions from there instead of from memory (RAM)
Number of cores
• A core works like it is its own CPU
• Multiple core processors mean they have multiple separate processing units that
can fetch, decode and execute instructions at the same time
• For example, a dual-core processor would have 2 processing units, each with
their own
o Control Unit (CU) o
Arithmetic Logic Unit (ALU) o
Accumulator (ACC) o
Registers
• Multi-core processors can run more powerful programs with greater ease
• Multiple cores increase the performance of the CPU by working with the clock
speed
o Example: A quad-core CPU (4 cores), running at a clock speed of 3Ghz
▪ 4 cores x 3GHz
▪ 4 x 3 billion instructions
▪ 12 billion instructions per second
Worked Example
One computer has a single core processor and the other has a dual core processor.

Explain why having a dual core processor might improve the performance of the
computer

[2]

Answer

Any2 from:

• The computer with the dual core processor has two cores/double the
amount of cores [1]
• Parallel processing can take place [1]
• Each core can execute a separate instruction at the same time [1]
• Each core can process instructions independently of each other [1]

CPU Instruction Sets


• What is an Instruction set?

• An instruction set is a list of all the commands that can be processed by a CPU
• Each command has a binary code which is called machine code
• The binary code is made up of an operation code (opcode) and an operand o
The opcode is the operation to be performed
o The operand is the location where the operation is to be performed in
• The table below shows an example instruction set
• Each instruction has a mnemonic that indicates what the instruction does
alongside an example binary code
• After an instruction is decoded into an opcode and an operand, the CPU finds the
opcode in the processor’s instruction set
• It then knows what operation to perform when executing the instruction
Instructi Mnemo Binary Command
on nic code

Adds a value to the value currently stored


Add ADD 10100001
in the accumulator (ACC)

Subtract a value from the values stored in


Subtract SUB 00100010
the accumulator

Load the value stored in a memory location


Load LDA 10111111
into the accumulator

Store the value in the accumulator in a


Store STA 01100000
specific location in memory

Stop HLT 00000000 Stop the program


• Instruction lists are machine-specific o A program created using one computer’s
instruction set would not run on a computer containing a processor made by a
different manufacturer
o For example, a computer program created using Intel’s instruction set would
not run on a device containing an ARM processor
Embedded Systems
What is an embedded system?
• An embedded system is a computer system which is used to perform a
dedicated function, inside a larger mechanical unit
• Examples of embedded systems include o Heating thermostats o Hospital
equipment o Washing machines o Dishwashers o Coffee machines o
Satellite navigation systems
o Factory equipment
o Security systems o
Traffic lights
What are the properties of an embedded system?
• They are small in size
• They use less power than a general-purpose computer
• They have a lower cost

Input Devices
What is an Input Device?
• Input devices are hardware components that allow users to interact with a
computer system
• They enable the user to input data or commands into the system, which the
computer then processes to produce an output
Types of input devices

Device What It Does Where It Is Used Why It Is Used

Barcode • • Supermar • Quickly and


Scanner kets accurately
Reads barcodes retrieves
• Warehous
to capture product details
product es
for stock and
information. • Libraries
checkout
Digital • • Photograp •
Camera hy
Captures High-quality
• Smartpho
photographs or visual content
nes
videos as digital
images • Webcams
Keyboard • • Computer Type
s • documents
Inputs text and • Tablets • Enter data
commands by • Laptops • Control
pressing keys software
Microphone • • Recording • Audio
studios • recording Voice
Captures • Smartpho communication
analogue nes
sound and • Computer
converts it into s
digital signals
Optical • Moves the Computer • Precise control
Mouse and navigation
cursor on the • s
screen based Laptops on a computer
on hand screen

movements
over a surface
QR Code • • • Quickly
Scanner retrieves data
Retail
• shops from QR codes
Reads QR codes
Mobile • Website links
to access
apps or product
stored
information
information
Touch Screen • • ATMs •
(Resistive) • Older Direct
Detects touch smartpho
by pressing a interaction
nes and with the device
flexible screen tablets
layer
Touch Screen • Detects touch by • Kiosks • Accurate
(Infra-red) interrupting • Large touch
infrared light touch • detection
beams across displays Works well in
the screen various
lighting
conditions
Touch Screen • • Modern • Smooth,
(Capacitive) Detects touch smartpho responsive
through nes touch
changes in • Tablets experience
electrical Touch with multi-

charge on the monitors touch
screen surface capabilities
Two- • • Digitises
Dimensional • Offices documents
(2D) Scanner Captures flat, and photos
• Libraries
2D images of for storage,
• Schools
documents or editing, or
photos sharing
ThreeDimensio • • Manufactu • Creates digital
nal Captures ring models of
(3D) Scanner detailed 3D • Design objects
shapes and • Medical for design,
dimensions imaging analysis, or
of objects reproduction
Output Devices
What is an Output device?
• Output devices are hardware components that receive information from a
computer system and present it to the user in an understandable form
• They enable the computer to communicate the results of processed data or
commands
Types of output devices

Name of Where is it
What does it do? Why is it used? device used?

• Make a
Actuator • Converts energy into robot's • Essential in

motion arm move any system

• Makes things move • Open that


• Performs physical a requires
tasks based on • valve movement
instructions from a Rotate
computer or control a
system motor
Digital Light • • Cinemas •
Processing Projects images • Classroo
(DLP) projector • onto a screen ms High-
Shows images or • Large quality
video by shining presentati images
light through tiny ons
mirrors
Inkjet printer • Prints text and • Low cost
images onto • Home compared
paper by • Schools to other
spraying tiny • Offices types of
droplets of ink printer
Laser printer • Heat from a • High-
laser fuses quality
• Offices
toner (fine • prints Fast
• Schools
powder) onto print
paper speed
Light • • Television • High-
Emitting s quality
Diode • Computer • images
(LED) monitors
Displays images • Bright
screen
and video using • Smartpho Energy
nes
tiny lights called • efficient
LEDs Thin
Liquid Crystal • • Offices • Bright
Projects images or
Display (LCD) • Classro • Excellent
video onto a
projector o ms balance of
screen by shining
light through • Home quality and
cinema affordabilit
liquid crystal
s y
panels
Liquid Crystal •
Display (LCD) Displays images • Television • Energy
screen and video using s efficient
liquid crystals with • Monitors • Thin
a backlight
• Smartpho • Sharp
nes images
• Laptops • Lightweig
ht
Speaker • Converts • Television •
electrical signals s
Multiple
into analogue • Radios
shapes
sound waves to • Smartpho and sizes
play nes
music
3d printer • Adds thin layers of • Manufact • Create
plastic, one on top uring prototype
of another to form • Medicine • s Custom
a three • Education parts
dimensional • Home
object
Choosing the right device
When recommending a device for a specific situation, consider the following factors:

• User Needs o What tasks will the user be performing? A graphic designer might
need a graphics tablet, while a data entry clerk might need a keyboard with a
number pad
• User Skills o Is the user comfortable with the device? A touch screen might be
more intuitive for some users, while others might prefer a mouse and keyboard
• Environment o Where will the device be used? A wireless mouse might be
suitable for a clutter-free office, while a wired mouse might be better for a public
computer lab to prevent theft
• Cost o Higher-end devices often have more features but are also more
expensive. Consider the budget and whether the extra features are worth the
cost
Sensors
• Sensors are input devices
• They measure a physical property of their environment such as light levels,
temperature or movement
• Sensors can be used for monitoring systems and control systems
o A monitoring system tracks the state of a system, it gathers data and
may issue warning messages
o A control system will control the system based upon the input from
sensors
o For example, if the water temperature in a fish tank fell below the
acceptable level, a control system would start up a heater
o The system will then continue to check the water temperature readings
(outputs) and when they are within the acceptable range it will switch off
the heater
• A process where outputs are recycled and used as inputs, creating a
continuous cycle is called a feedback loop

Sensor
What it measures Typical use
type

To detect changes in sound levels of


industrial machinery
Acoustic Sound levels To monitor noise pollution

In security system to detect suspicious


sounds

Detecting sudden changes in vehicle


movement and deploy safety features if
Accelerom Acceleration rate, tilt, needed
eter vibration
In mobile phones to detect orientation of the
device

Rate of gas, liquid or Detect changes in the flow through pipes in


Flow
powder flow water system

Detect levels of gas in confined spaces


Presence of a gas e.g.
Gas
carbon monoxide Detect gas levels when fixing gas leaks

Humidity Levels of water vapour Monitor humidity in greenhouses

Detecting motion or a heat Security systems detecting intruders who


Infra-red source break the beam
Measures heat radiation of objects - used by
emergency services to detect people
Detects levels of petrol in a car tank
Level Liquid levels Detect levels of water in a water tank

Detect a drop in water levels due to a leak


Automatically switching on lights when it
Light Light levels
gets dark (street lights, headlights)

Anti-lock braking system


Magnetic
Presence and strength
field Monitoring rotating machinery such as
turbines

Monitoring moisture in the soil


Presence and levels of
Moisture
moisture
Monitoring dampness in buildings

Monitoring soil to ensure optimum growing


conditions
pH Acidity or alkaline
Monitor ph levels in chemical processes

Monitoring tyre pressure


Gas, liquid or physical
Pressure Monitoring pressure in pipes during the
pressure
manufacturing process

Monitoring the position of objects in robotics


Proximity Distance
Used in safety systems to prevent objects
from colliding

Used to maintain temperature in swimming


pools

Temperatu Temperature in Celsius, Used to control temperature in chemical


re Fahrenheit or Kelvin processes
Local Area Network Hardware: Network Interface Card (NIC)

• Network hardware is a selection of essential components that enable the


connectivity and communication of devices within computer networks
• Networks use a variety of hardware to function, some of which include:
o Router
o Wireless access point (WAP)
o Switch o Transmission media o Network interface card (NIC)
• The exam requires you to understand the purpose of the network interface card
(NIC)
What is a network interface card (NIC)?
• The Network Interface Card (NIC) is required for a computer to connect to a
network
• A NIC can be both wired and wireless and allows your computer to send and
receive data over a network Router

What is a router?

• The router is responsible for routing data packets between different networks
• An example of data the router can direct is, sending internet traffic to the correct
destination/devices in your home network
• The router connects networks together, local area networks (LAN) to the wider
internet which is a type of wide area network (WAN)
• The router can manage and prioritise data traffic, which can help to keep
connections stable
• The router will assign IP addresses to the devices on the network

Devices on a network send and receive data, a device needs an address to


ensure it sends data to the correct place
• Th ere are two types of network address systems:
o MAC Address o
IP Address

• MAC Addresses

• What is a MAC address?

• A MAC (Media Access Control) address is a unique identifier given to devices


which communicate over a local area network (LAN)
• A network interface card is given a MAC address at the point of manufacture
• MAC addresses are static, meaning they can never change
• MAC addresses make it possible for switches to efficiently forward data to the
intended recipient
• Any device that contains a Network Interface Card (NIC) has a MAC address
assigned during manufacturing
• A device connecting to a local network already has a MAC address, if it moves to
a different network then the MAC address will stay the same

• A MAC address is represented as 12 hexadecimal digits (48 bits), usually
grouped in pairs
• The first three pairs are the manufacturer ID number (OUI) and the last three
pairs are the serial number of the network interface card (NIC)
• There are enough unique MAC addresses for roughly 281 trillion devices

• IP Addresses

• What is an IP address?

• An IP (Internet Protocol) address is a unique identifier given to devices which


communicate over the Internet (WAN)
• IP addresses can be static, meaning they stay the same or dynamic, meaning
they can change
• IP addresses make it possible to deliver data to the right device
• A device connecting to a network will be given an IP address, if it moves to a
different network then the IP address will change
• IPv4

• Internet Protocol version 4 is represented as


4 blocks of denary numbers
between 0 and 255, separated byfull stops
• Each block isone byte(8 bits), each address is4 bytes (32 bits)


32
• IPv4 provides over4 billion unique addresses(2 ), however, with over7
billion people andcountless devices per person , a solution was needed
• IPv6

• Internet Protocol version 6 is represented as


8 blocks of 4 hexadecimal digits
,
separated bycolons
• Each block is2 bytes (16 bits), each address is16 bytes (128 bits)


• IPv6 could provide overone billion unique addressesfor every personon the
planet (2128 )

You might also like