0% found this document useful (0 votes)
16 views243 pages

Chapter3 CS NPS

The document provides an overview of the Central Processing Unit (CPU) and the Von Neumann architecture, detailing its components and functions such as the fetch-decode-execute cycle. It explains the importance of registers, memory units, and system buses in processing data, as well as factors affecting CPU performance like clock speed, cores, and cache memory. Additionally, it introduces the concept of embedded systems, which are designed for specific tasks using a combination of hardware and software.

Uploaded by

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

Chapter3 CS NPS

The document provides an overview of the Central Processing Unit (CPU) and the Von Neumann architecture, detailing its components and functions such as the fetch-decode-execute cycle. It explains the importance of registers, memory units, and system buses in processing data, as well as factors affecting CPU performance like clock speed, cores, and cache memory. Additionally, it introduces the concept of embedded systems, which are designed for specific tasks using a combination of hardware and software.

Uploaded by

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

GRADE 9 Computer Science

What is a CPU?

CENTRAL UNIT
PROCESSING (CPU)

Mr. Vijay Raj


NPS International School
THE CENTRAL PROCESSING UNIT (CPU)

• The CPU is central to all modern computer systems.


• It is very often installed as an integrated circuit on a single microchip.
• The CPU has the responsibility for the execution or processing of all the
instructions and data in a computer application.
INTRODUCING THE VON NEWMANN ARCHITECTURE

• Early computers were fed data while the machines were actually running; it wasn’t possible to store
programs or data, which meant they couldn’t operate without considerable human intervention.
• In the mid-1940s, John von Neumann developed the concept of the ‘stored program computer’,
which has been the basis of computer architecture ever since.
• The von Neumann architecture had the following main novel features the concept of a central
processing unit (CPU or processor)
• The CPU was able to access the memory directly
• Computer memories could store programs as well as data
• Stored programs were made up of instructions which could be executed in sequential order.
VON NEUMANN ARCHITECTURE CONTROL BUS

DATA BUS
ADDRESS BUS
Central Processing Unit (CPU)

MAR
CU
PC

MDR

CIR

ALU ACC

Input Memory Unit (RAM) Output


keyboards, touch screens and printers, monitors and loudspeakers
microphones
VON NEUMANN ARCHITECTURE CONTROL BUS

DATA BUS
ADDRESS BUS
Central Processing Unit (CPU)

Input Output
keyboards, touch screens and printers, monitors and loudspeakers
microphones
VON NEUMANN ARCHITECTURE CONTROL BUS

DATA BUS
ADDRESS BUS
Central Processing Unit (CPU)

ALU

Input Output
keyboards, touch screens and printers, monitors and loudspeakers
microphones
Input 1 Input 2
ARITHMETIC & LOGIC UNIT
(ALU)

Enables processor to carry out mathematical operations


1 on data (adding, subtracting, multiplying and dividing)

2 Enables logical operations to be carried out


ALU
It is possible for a computer to have more than one ALU
3 to carry out specific function. Multiplication and division
are carried out by a sequence of addition, subtraction
and left or right logical shift operations
Output
VON NEUMANN ARCHITECTURE CONTROL BUS

DATA BUS
ADDRESS BUS
Central Processing Unit (CPU)

ALU

Input Memory Unit (RAM) Output


keyboards, touch screens and printers, monitors and loudspeakers
microphones
RANDOM ACCESS MEMORY (BRIEF)
MEMORY UNIT

The memory unit (RAM) of the CPU stores instructions


1 and processes that the computer needs regularly when
processing data.

The CPU takes data and programs held in a hard disk


2 drive and puts them into RAM temperorily.

Read and Write operations carried out using the RAM RAM is a type of volatile memory, in that it does not
3 are considerably faster than read/write operations to a 4 retain its contents when the computer is powered
hard disk drive. off.
VON NEUMANN ARCHITECTURE CONTROL BUS

DATA BUS
ADDRESS BUS
Central Processing Unit (CPU)

MAR

PC

MDR

CIR

ALU ACC

Input Memory Unit (RAM) Output


keyboards, touch screens and printers, monitors and loudspeakers
microphones
One of the most fundamental components of
REGISTERS the von Neumann architecture.
There are 5 of them (Special
purpose registers)
FUNCTIONS
This register stores the current instruction being decoded and
1 Current Instruction Register CIR
executed

This register is used when carrying out ALU calculations; it stores


2 Accumulator ACC
data temporarily during the calculations

This register stores the address of the memory location currently


3 Memory Address Register MAR being read from or written to

This register stores data which has just been read from memory or
4 Memory Data (Buffer) Register MDR data which is about to be written to memory

This register stores the address where the next instruction to be


5 Program Counter PC read can be found
VON NEUMANN ARCHITECTURE CONTROL BUS

DATA BUS
ADDRESS BUS
Central Processing Unit (CPU)

MAR
CU
PC

MDR

CIR

ALU ACC

Input Memory Unit (RAM) Output


keyboards, touch screens and printers, monitors and loudspeakers
microphones
CONTROL UNIT
Coordinator

Reads an instruction (from input device) from memory.


The address of the location where the instruction can be
1 found is stored in the program counter.

This instruction is then interpreted during the Fetch-


2 Decode-Execute cycle.
The Control Unit (CU) is responsible for making sure all
these components follow the instructions it has
During that process, signals are generated along the
processed from the input.
3 control bus to tell the other components in the
computer what to do.
VON NEUMANN ARCHITECTURE CONTROL BUS

DATA BUS
ADDRESS BUS
Central Processing Unit (CPU)

MAR
CU
PC

MDR

CIR

ALU ACC

Input Memory Unit (RAM) Output


SYSTEM BUSES
*width of the address bus and data bus is important.
Several buses, otherwise known as
connections, carry data around a The wider the bus, the larger the word length that can
computer. be transported.

Carries the address between the memory unit and


1 Address Bus CPU

Carries the data between the memory unit and CPU


2 Data Bus and to and from from input/output devices.

Control Bus It carries signals from the control unit (CU) to all the
3 other computer components.
VON NEUMANN ARCHITECTURE CONTROL BUS

DATA BUS
ADDRESS BUS
Central Processing Unit (CPU)

MAR
CU
PC

MDR

CIR

ALU ACC

Input Memory Unit (RAM) Output


PA S T Y E A R Q U E S T I O N
PA S T Y E A R Q U E S T I O N
PA S T Y E A R Q U E S T I O N
PA S T Y E A R Q U E S T I O N
YEAR 10 COMPUTER SCIENCE
CPU (2)
FETCH-DECODE-
EXECUTE CYCLE
by Mr. James
VON NEUMANN ARCHITECTURE RECAP CONTROL BUS

DATA BUS
ADDRESS BUS
Central Processing Unit (CPU)

MAR
CU
PC

MDR

CIR

ALU ACC

Input Memory Unit (RAM) Output


Fetch-Decode-Execute Cycle
• All modern computers with the Von Neumann Architecture use a method of
processing data known as the fetch-decode-execute cycle.
• This cycle happens in a matter of milliseconds and enables a computer to logically
process the data it receives in the correct order for the user's requirement.
• All the components of the Central Processing Unit (CPU) are used to make the cycle
work.
Fetch-Decode-Execute Cycle

Both data and instruction can be stored in The CPU passes the
MDR. In the Fetch–Decode–Execute cycle, The instruction is then decoded instruction as a
the next instruction is fetched from the decoded so that it can be set of control signals to
memory address currently stored in the interpreted in the next part the appropriate
MAR and the instruction is stored in the of the cycle.
components within the
MDR. The contents of the MDR are then
computer system. This
copied to the Current Instruction Register
allows each instruction
(CIR). The PC is then incremented
(increased by 1) so that the next instruction to be carried out in its
can be then be processed. logical sequence.
Fetch-Decode-Execute Step by Step

• The program counter stores the address location of the next instruction to be carried out. This location
number is copied into the memory address register.
• The program counter is incremented by one and this register now stores the next instruction to be
processed.
• The control unit (CU) makes a request to the RAM for the instruction and obtains the address of the
instruction from the MAR by sending a signal along the address bus.
• The data that is being held in the RAM in the correct address is carried along the data bus to the
memory register (MDR).
• Once the instruction arrives at the MDR, it is copied into the current instruction register (CIR).
• The instruction is then decoded in the CIR using the arithmetic logic unit (ALU) and then carried out.
The result of this processing is stored in the accumulator.
Clock Speed, Cache Memory and Cores

• Other components make up part of the CPU and can make a significant difference to the overall
operating speed of a computer.
• While the CPU processes instructions and data extremely quickly, other factors can affect a computer's
performance.
Clock Speed
• Clock speed is an important measure in terms of CPU performance capabilities. This refers to the
number of electrical pulses that the clock inside the CPU can produce every second. This measurement
is made in hertz, and modern clock speeds are usually measured in gigahertz.
• By increasing clock speed, the processing speed of the computer is also increased (a typical current
value is 3.5GHz – which means 3.5 billion clock cycles (Fetch-Decode-Execute a second)
• Overclocking - using a clock speed higher than the computer was designed for. Problems:
• Lead to seriously unsynchronised operations (i.e. an instruction is unable to complete in time
before the next one is due to be executed) – the computer would frequently crash and become
unstable
• Serious overheating of the CPU leading to unreliable performance.
Cores
• The use of a different number of cores can improve computer performance. One core is made up of an
ALU, a control unit and the registers. Many computers are dual core (the CPU is made up of two cores)
or quad core (the CPU is made up of four cores).
• The idea of using more cores alleviates the need to continually increase clock speeds.
One Core
Central Processing Unit (CPU)

MAR
CU
PC

MDR

CIR

ALU ACC
Dual Core

Central Processing Unit (CPU) Central Processing Unit (CPU)

MAR MAR
CU CU
PC PC

MDR MDR

CIR CIR

ALU ACC ALU ACC

However, doubling the number of cores doesn’t necessarily double the computer’s performance since we have to take into
account the need for the CPU to communicate with each core; this will reduce overall performance.
Multi Core - 8 cores
Central Processing Unit (CPU) Central Processing Unit (CPU) Central Processing Unit (CPU)

MAR MAR MAR


CU CU
CU PC PC PC

MDR MDR MDR

CIR CIR CIR

ALU ACC ALU ACC ALU ACC

Central Processing Unit (CPU) Central Processing Unit (CPU) Central Processing Unit (CPU)

MAR MAR MAR


CU CU
CU PC PC PC

MDR MDR MDR

CIR CIR CIR

ALU ACC ALU ACC ALU ACC

Central Processing Unit (CPU) Central Processing Unit (CPU)

MAR MAR
CU CU
PC PC

MDR MDR

CIR CIR

ALU ACC ALU ACC


Cache
• The use of cache memories can also improve CPU performance.
• Unlike RAM, cache memory is located within the CPU itself, which means it has much faster data access
times than RAM.
• Cache memory stores frequently used instructions and data that need to be accessed faster, which
improves CPU performance.
• When a CPU wishes to read memory, it will first check out the cache and then move on to main
memory/RAM if the required data isn’t there.
• The larger the cache memory size the better the CPU performance.
PA S T Y E A R Q U E S T I O N
PA S T Y E A R Q U E S T I O N
0100 01101011

I NSTRUC TIO N SET AND


EMBEDDED SYSTEMS
MR JAMES
Instruction Set
• A set of common instructions have been developed by processor
manufacturers so that CPUs operate as efficiently as possible.
• This instruction set is all the commands that can be processes by a CPU.
• The instructions are the most basic types of command a computer can
respond to and execute, and these are referred to as operations.
• These operations ensure that the control unit and arithmetic logic unit can
carry out their respective jobs easily.
Instruction Set
Operations are made up of opcodes and operands.

Load 10
Add 11
Store 12
Fetch-Decode-Execute Recap

Load 10 101
Add 11 102
Store 12 103
Instruction Set
Operations are made up of opcodes and operands.

Opcode:
- Operational Code
- Gives the CPU a precise job
Load 10
job that is required to
happen
Add 11
Store 12
The opcode are stored on a computer's hard disk and would usually be copied into the main memory
RAM when the computer is powered on. The most regularly used opcodes would then be moved from
the RAM to the cache memory.
Instruction Set
Operations are made up of opcodes and operands.

Load 10
Add 11
Store 12
An operand is the data that is required for the specific job as detailed by the opcode. The operand may
be a piece of data itself, or it may be an address location within the main RAM or register.
Instruction Set
• Example : X86 Instruction Set
• 1503
• Used by Intel Pentium and AMD Athlon CPU
• Instruction Set is not programming code. Instruction sets are the low-level language instructions
that instruct the CPU how to carry out an operation
• Example:
• Python Code -> Instruction Set -> Computer
EMBEDDED SYSTEMS
Processors and Computer System
• Traditionally, we would think of computers as desktop and laptop computers.
• They are referred to as general purpose computers, capable of providing a wide range
of different activities.

Discussion: Where could we find a processor, besides a computer or a laptop.


Embedded System
• A type of computer system that carry out rather more specific tasks and jobs.
• With an embedded system. a device would use a small built-in computer to carry out
its functions in a more effective way. In other words, it's a combination of hardware
and software which is designed to carry out a specific set of functions.
• The computer system usually has a very specific job, and only carries out that job when
required.
General Idea of an Embedded System

User
Interface
Sensors,
actuators

Analogue or Some form


digital input Software and hardware on of Output
an embedded system
Vending Machine
Inputs to this system come from the keypad (item
selection) and from sensors (used to count the coins
inserted by the customer, the temperature inside the
machine and a ‘tilt sensor’ for security purposes).

The outputs are:


- Signals to operate the cooling system if the
temperature is too high
- Item description and any change due shown on an LCD
display panel
- Data sent back to the vending machine company so that
they can remotely
check sales activity (which could include instructions to
refill the machine) without the need to visit each
machine.
Lightning System
An embedded system can automatically control the
lighting using a number of inputs (such as light sensors)
and key data stored in memory

The time of day or day of the week is important data in


an office environment since energy is saved if the system
switches to low lighting levels when unoccupied.

Some lighting systems use Bluetooth light bulbs. This allows the
embedded system to control each bulb independently. Many of
the bulbs available today use LEDs and many come in a number
of colours to change the mood.
Embedded System
• Embedded system tends to be low power devices.
• Calculator uses battery
• Depending on the device, embedded systems are either programmable or non- programmable.
Non-programmable devices need, in general, to be replaced if they require a software upgrade.
Programmable devices permit upgrading by two methods:
• connecting the device to a computer and allowing the download of updates to the
software (for example, this is used to update the maps on a GPS system used in a vehicle)
• automatic updates via a Wi-Fi, satellite or cellular (mobile phone network) link (for
example, many modern cars allow updates to engine management systems and other
components via satellite link).
Amazon Smart Warehouse

https://www.youtube.com/watch?v=IMPbKVb8y8
s&ab_channel=VISION
Amazon Go

https://www.youtube.com/watch?v=zdbumR
6Bhd8&ab_channel=TechInsider
Input
Devices
VON NEUMANN ARCHITECTURE RECAP CONTROL BUS

DATA BUS
ADDRESS BUS
Central Processing Unit (CPU)

MAR
CU
PC

MDR

CIR

ALU ACC

Input Memory Unit (RAM) Output


Our Focus this week!

Input
Keyboards
What it It has a selection of keys that
has all perform different tasks.

Entering and typing letters and


What it
numbers. Used to given data
does
and instruction to the computer.

Connected to the computer


How to using either a universal serial
use bus port or wirelessly using a
Bluetooth connection.
Other types of keyboards
How does it work?

Central Processing Unit (CPU)

MAR
CU
PC

MDR

CIR

01101000 ALU ACC

Input Memory Unit (RAM)


Note this down:

 Each character on a key board has an ASCII value.


 Each character pressed is converted into a digital signal,
interpreted by the computer

Negatives

 Relatively slow method of data entry and are also prone to


errors
 Frequent use of these devices can lead to injuries, such as,
repetitive strain injury (RSI) in the hands and wrists.
Optical Mouse
What it It has a left and right button, and a jog
has wheel in between button for easy scrolling

What it It is used as a pointing device


does (Able to interact with the computer)

How to Connected to the computer using a USB


port or a Bluetooth connection
use
How does it work?
• A red LED is used in the base of the mouse and the red light is bounced off the
surface and the reflection is picked up by a complementary metal oxide semiconductor
(CMOS).
• The CMOS generates electric pulses to represent the reflected red light and these
pulses are sent to a digital signal processor (DSP).
• The processor can now work out the coordinates of the mouse based on the changing
image patterns as it is moved about on the surface.
• The computer can then move the on-screen cursor to the coordinates sent by the mouse.
Other types of pointing device

Touch pad

Stylus

Gaming
Controller
Benefits of optical mouse over
mechanical mouse
 No moving parts, which makes it more reliable
 Dirt cannot get trapped in any of the
mechanical components
 Can work on any surface, eliminates the need
for a special surface
Benefits of wired mouse over
Bluetooth connectivity
 No signal loss
 Cheaper to operate (eliminated need to
change batteries)
 Fewer environmental issues (no need to dispose
of old batteries)
PA S T Y E A R Q U E S T I O N
Touch Screens
What it A touch screen is made of glass and reacts
has to a finger press.

What it They allow the user to carry out the same


does functions as they would with a pointing
device, such as mouse.

3 types • Capacitive touch screens


of • Resistive touch screens
touch • Infrared touch screens
screens
Capacitive touch screens

• Capacitive touch screens are composed of a layer of


glass (protective layer), a transparent electrode
(conductive) layer and a glass substrate.
• Since human skin is a conductor of electricity, when bare
fingers touch the screen, the electrostatic field of the
conductive layer is changed.
• The installed microcontroller is able to calculate where
this change took place and hence determine the
coordinates of the point of touching.
Capacitive touch screens
• There are two main types of capacitive touch screens
• Surface
• Projective

Surface Capacitive screens

• Sensors are placed at the corners of a screen


• Small voltages are applied at the corners, creating
an electric field

• The finger touching the screen surface will draw


current, reducing capacitance.

• Microcontroller measures the decrease in


capacitance and determines the point where the
finger touched the screen
Capacitive touch screens
Projective Capacitive screens

• Transparent conductive layer is now in the form of an X-Y


matrix, which creates a 3D electrostatic field

• When the finger touches the screen, it disturbs the 3D


electrostatic field allowing the microcontroller to
determine the coordinates of the point of contact

• Works with bare fingers, stylus, thin gloves


• Also allows multi-touch facility (Pinching or sliding)
Capacitive touch screens
Advantage Disadvantage

• Better image • More expensive to


clarity than manufacture
resistive • Works with bare
screens, fingers or a special
stylus
• Multitouch
PA S T Y E A R Q U E S T I O N
Answer to Question
 Electrical charge is spread across the screen.

 Sensors are located around the screen, to read the


electric field.

 Since the human skin is a conductor of electricity, when


the bare finger touches the screen, the electrostatic field
of the conductive layer is changed.

 Thus, the coordinates of touch is determined by the


micro-controller.
Part (b): If Remy is wearing a glove, why would
his touch not be registered by the touch
screen?

 Wearing gloves restricts the flow of electricity from the touchscreen


device to your body.

 Capacitive touchscreen devices, work by measuring capacitance,


therefore, if gloves are worn, Remy’s finger would not be able to
absorb the capacitive touchscreen device’s electrostatic charge.
Therefore, the device would not register his touch.
Resistive touch screens
• The name resistive relates to resistance - the
amount of downward pressure made on the screen
by the user.

• The pressure causes a change in the resistance, or


an increase in voltage.

• The layers of the screen detects the voltage change


and calculates the coordinates of where the
pressure change has happened.

• This then enables the processor to react to the


pressure and display the item the user requires.
Resistive touch screens
Advantage Disadvantage
• Can be used in • Low touch
bare fingers, stylus sensitivity
and gloved hand
• No multitouch
• Good resistance to
dust and water • Poor visibility
under strong light
Infrared touch screens
• They emit a constant grid of lights underneath the
top surface layer.

• The technology works when this light grid is


interrupted, and a touch on the infra-red screen
causes a disturbance.

• The disturbance is then located by the processor and


translated into co-ordinates.
Infrared touch screens
Advantage Disadvantage

• Allows multi- • Screen can be


touch sensitive to water or
moisture
• Good screen
durability • Sensitive to light
interference
Scanner
What it Scanner are used to convert text or images
has on paper into digital information.

• A paper document is placed on the


What it
scanner and a beam of light is shone
does onto the paper.
• This light reflects onto a sensor, which
determines the colour of the text or
image on the paper.
• The information is used by the computer,
as an input, to create a digital copy of
the document
Optical character recognition
Computers equipped with optical character recognition (OCR)
software allow the scanned text from the document to be converted
into a text file format. This means the scanned image can now be
edited and manipulated by importing it into a word processor.

If the original document was a photograph or image, then the


scanned image forms an image file such as JPEG.
3D Scanner
Scanners can also work in three dimensions and use reflected laser
light to build up a 3D model of a scanned object. These images can
then be used with a 3D printer to create a model.
Application of 2D and 3D Scanner
2D scanners are used at airports to read passports
They make use of OCR technology to produce digital images
which represent the passport pages. Because of the OCR
technology, these digital images can be manipulated in a
number of ways.
For example, the OCR software is able to review these images,
select the text part, and then automatically put the text into
the correct fields of an existing database

Computed tomographic (CT) scanners are used to create a 3D image


of a solid object. This is based on tomography technology, which
basically builds up an image of the solid object through a series of
very thin ‘slices’. Each of these 2D ‘slices’ make up a representation of
the 3D solid object.
Barcode Reader
What it The Barcode uses infra-red light to read the
has bars in the code.

What it It accesses information about a product


within the store.
does
The Barcode
• The barcode holds
information such as the
product identification number,
country of origin and
manufacturer. It does not
store the price of products,
which is held in a database..
• During the purchase process
the computer scans the
barcode information and
matches the data to the
database to check the most
up-to-date price.
How does the Barcode Reader work?

• The Barcode uses infra-red light to read


the bars in the code.
• The light is reflected back to the device
and is converted into digital data.
After the barcode has been read,
what happens?
 The barcode number is looked up in the stock database ( the
barcode also known as the key field, uniquely identifies each stock
item)
 When the barcode number is found, the stock item record is looked
up.
 The price and other stock items details are sent back to the
checkpoint
 The number of stock items in the record is reduced by 1.
Quick Response Scanner
What it Consists of a block of small squares
has (light and dark) known as pixels

What it It allows characters, digits and also


does internet addresses to be encoded.

Avoid the user from having to remember


long telephone numbers and website
Benefits
addresses, because the QR Reader will
quickly convert the QR code into the
information
QR Code Barcode

They can hold much more More than one QR


information
format is available,
whereas
QR codes are easier to QR codes can be
read; they don’t need
expensive laser or LED
used to transmit
malicious codes
It is also possible to encrypt
QR codes which gives them
greater protection
than traditional barcodes.
Digital Camera (Webcam)

It takes a digital image of the view in


What it front of its lens. If the camera set images
does one after the other at a high enough
frame rate, this can be viewed on a
computer screen as a video feed.
How does it work?
The image is captured when light passes through the lens
on to a light-sensitive cell; this cell is made up of millions
of tiny sensors which are acting as photodiodes (i.e. charge
couple devices (CCD) which convert light into electricity)

Each of the sensors are often referred to as pixels


(picture elements) since they are tiny components that
make up the image

The image is converted into tiny electric charges


which are then passed through an analogue to digital
converter (ADC) to form a digital image array
Cameras are controlled by an
embedded system
 To carry out some, of the following tasks:
 Adjust the shutter speed
 Focus on the image automatically
 Adjust the size of the image
 Adjust the aperture size
Microphones
Either built into the computer or are
Description
external devices connected through the
USB port or using Bluetooth connectivity.

It converts sound analogue signals


into digital information. It is
mainly used with webcams for
What it video-conferencing.
does
The digital signal are sent to
another computer user and can be
heard as a sound.
1000 0001
1100 0101
0100 1001
Digital
Hut
information
Questions to attempt (Workbook)

 Question 5 (a) – (c) [Page 46]

 Question 6 (a) – (b) [Page 47]

 Questions 7 and 8 [Page 48]


PA S T Y E A R Q U E S T I O N
PA S T Y E A R Q U E S T I O N
PA S T Y E A R Q U E S T I O N
PA S T Y E A R Q U E S T I O N
PA S T Y E A R Q U E S T I O N
PA S T Y E A R Q U E S T I O N
Output
Devices
VON NEUMANN ARCHITECTURE RECAP CONTROL BUS

DATA BUS
ADDRESS BUS
Central Processing Unit (CPU)

MAR
CU
PC

MDR

CIR

ALU ACC

Input Memory Unit (RAM) Output


Our Focus this week!

Output
Output Devices
• Output devices are the hardware a computer uses to display or send
out the data that has been processed.
• Input devices that provide the computer with the instructions are
linked to the output devices, so the user can see or hear the results of
those instructions.
• The choice of output device depends on the most appropriate use of
the data that has been processed.
Output Devices
• Monitor
• Touch Screens
• Projector
⚬ DLP Projector
⚬ LCD Projector
• Printer
⚬ Laser Printer
⚬ Inkjet Printer
⚬ 3D Printer
• Speaker
• Actuator
Output Devices
• Monitor
• Touch Screens
• Projector
⚬ DLP Projector
⚬ LCD Projector
• Printer
⚬ Laser Printer
⚬ Inkjet Printer
⚬ 3D Printer
• Speaker
• Actuator
Monitor
• Monitor can display a certain number of pixels
depending on the quality - more pixels mean a better
quality of picture output.
• The larger the monitor the more expensive they tend
to be.
Size in inch
• Modern monitors connect to a computer using high-
definition multimedia interface (HTML) connector)
⚬ Display high definition image and sound using
one cable.
⚬ HDMI is a standard connection port for
audio/visual devices in computers.
Monitor - LED vs LCD

LCD - Liquid Crystal Display LED - Liquid Emitting Diode

- made up of tiny liquid crystals - made up of tiny light-emitting diodes


- These tiny crystals make up an array of - each LED is either red, blue and green
pixels that are affected by changes in applied - By varying the electric current sent to each LED,
electric fields its brightness can be controlled, producing a vast
- Because LCD’s don’t produce any light, LCD range of colours.
screens are back-lit using light-emitting diode
(LED) technology
Monitor - OLED
OLED - Organic Liquid Emitting Diode

- These use organic materials (made up of carbon


compounds) to create semi-conductors that are very
flexible
- The important aspect of OLED technology is how thin
this makes the screen. It is possible, using OLED
technology, to bend screens to any shape
Some benefits of OLED
Output Devices
• Monitor
• Touch Screens
• Projector
⚬ DLP Projector
⚬ LCD Projector
• Printer
⚬ Laser Printer
⚬ Inkjet Printer
⚬ 3D Printer
• Speaker
• Actuator
Touch Screen
• A touch screen can be used as an input device and an
output device.
• Touch screens are used on smartphones and tablets.
• Once the user has made a selection with a finger
press, the screen reacts by displaying a different
screen.
Output Devices
• Monitor
• Touch Screens
• Projector
⚬ DLP Projector
⚬ LCD Projector
• Printer
⚬ Laser Printer
⚬ Inkjet Printer
⚬ 3D Printer
• Speaker
• Actuator
Digital Lightning Processing (DLP) Projector

• A digital light processing (DLP) projector is a device


that connects to a computer and a monitor to
project the video output from the computer onto a
wall or a whiteboard. The video can be viewed at a
much larger size when projected.
• They are often used in school classrooms or home
cinemas for showing video or presentations.
• They are connected to a computer with a HDMI
connector.
• DLPs can be large and use powerful bulbs to project
the image.
Liquid Crystal Display (LCD) Projector

• A LCD projector works in a similar way to a DLP


projector.
• However, the key difference is that red, green
and blue lights are shone through three
prisms, then brought together, or converged,
through a second prism to produce the image.
• LCD projectors tend to display more vivid
images than DLP projectors, however they are
often larger and heavier.
DLP Projector vs LCD Projector

- Higher reliability/longevity - Better colour saturation


- Quieter than LCD - Poorer longevity
- High contrast ratio - More efficient in their use of energy
- Less efficient in their use of energy
(generate more heat
Output Devices
• Monitor
• Touch Screens
• Projector
⚬ DLP Projector
⚬ LCD Projector
• Printer
⚬ Laser Printer
⚬ Inkjet Printer
⚬ 3D Printer
• Speaker
• Actuator
Laser Printer
• A laser printer produces a printed output by
transferring powdered toner onto paper using
heat.
• The printer connects to a computer using a
universal serial bus (USB) interface, or
wirelessly across a network.
• It prints quickly and produces good quality
results.
• The quality of output and the low noise levels
make laser printers popular choices for
workplaces.
Inkjet Printer
• Inkjet printers are the cheapest type of printer.
• They work by spraying ink directly onto paper
as it is heated by the printer. The ink follows
from a cartridge through tiny holes and when
the paper is fed out from the printer the ink is
still slightly wet.
• Inkjet printers can produce either black and
white or colour output and are popular
choices for use at home and for printing
photographs.
• The printer connects to a computer using a
universal serial bus interface, or wirelessly
across a network.
3D printer
• Three dimensional or 3D printers are output
devices that can create objects rather than
printed piece of paper.
• 3D printers often use heated liquid such as
plastic or metal. The type of liquid used
depends on the item being produced. This
liquid is given instructions by the computer to
create a surface and then it solidifies. The
printer uses several layers of this liquid
material to create the shape.
• 3D printers are used mainly by designers to
create prototypes of objects and have been
used in car manufacturing for many years.
Output Devices
• Monitor
• Touch Screens
• Projector
⚬ DLP Projector
⚬ LCD Projector
• Printer
⚬ Laser Printer
⚬ Inkjet Printer
⚬ 3D Printer
• Speaker
• Actuator
Speaker
• Speakers are used to output music, sound and
video soundtracks for a high quality
multimedia experience.
• The sound quality of the speaker depends on
the type of speaker used.
• The internal speakers supplied as standard
within a computer tend to produce lower
quality sound, but externally powered
speakers connected to a computer's sound
card through an audio port produce better
quality output.
• Sound card: An internal device of a computer
that provides a method of input and output of
audio signals for use with multimedia
applications.
Output Devices
• Monitor
• Touch Screens
• Projector
⚬ DLP Projector
⚬ LCD Projector
• Printer
⚬ Laser Printer
⚬ Inkjet Printer
⚬ 3D Printer
• Speaker
• Actuator
Actuator
• An actuator is a mechanical motor that carries
out an action when a computer gives it an
instruction.
• For example, a digital camera has an actuator
built into the lens and the motor moves the
lens in and out depending on the level of zoom
required. It is the actuator that control this
movement.
• Actuator can be small, as in the case of a
camera, or can be large, such as those that
control duty computer-controlled drills.
PA S T Y E A R Q U E S T I O N
PA S T Y E A R Q U E S T I O N
PA S T Y E A R Q U E S T I O N
PA S T Y E A R Q U E S T I O N
Sensor
VON NEUMANN ARCHITECTURE CONTROL BUS

DATA BUS
ADDRESS BUS
Central Processing Unit (CPU)

MAR
CU
PC

MDR

CIR

ALU ACC

Input Memory Unit (RAM) Output


VON NEUMANN ARCHITECTURE CONTROL BUS

DATA BUS
ADDRESS BUS
Central Processing Unit (CPU)

MAR
CU
PC

MDR

CIR

ALU ACC

Sensor
(Automatic Memory Unit (RAM) Output
Input)
Function of a sensor
Read and measure physical properties from their surrounding.
Function of a sensor
Read and measure physical properties from their surrounding.

Acidity
Temperature Pressure Length
Level
Analogue to Digital
Converter (ADC)
Reason ADC is needed
Computer cannot make sense of physical quantities (Boiling point etc)

Function of an ADC
Convert physical quantities to a digital format. It convert physical values (analogue
data) into digital data.

Extra: Digital to Analogue Converter (DAC)


Analogue to Digital
Converter (ADC)
Analogue data
Temperature sensors, FM radio signals, Photocells, Light sensor

Digital data
Binary code

Extra: Digital to Analogue Converter (DAC)


Feedback

Sensor readings may cause microprocessor to alter a valve or motor


that will then change the next reading taken by the sensor. So the
output from the microprocessor will impact on the next input received
as it attempts to bring the system within the desired parameters.
Feedback

Input Ouput:
Release cold air

40 celcius 00101000
ADC Microprocessor

Sensor
This will run constantly!

Input Ouput:
Release cold air

ADC Microprocessor

Sensor
Exam Question

 Why is analogue to digital converter (ADC)


needed?

 Read data is analogue is nature, this means that it is constantly


changing and does not have a single discrete value and needs
some form of interpretation by the user.

 Computer cannot make sense of these physical quantities so the


data needs to be converted into a digital format. This is usually
achieved by an analogue to digital converter (ADC).
Brainstorming

What are the


types of sensors
available?
Brainstorming

What are the


applications of
these sensors?
Common Sensors (Page 112)

SENSOR
T E M P E R AT U R E MOISTURE

Measures temperature
Measures water levels in, for example,
FUNCTION of the surrounding by soil
sending signal.

• control/monitor moisture levels in soil in a


• control of a central heating system
greenhouse
APPLICATION • control/monitor a chemical process
• monitor the moisture levels in a food processing
• control/monitor temperature in a greenhouse
factory
Common Sensors

SENSOR
HUMIDITY LIGHT

This is slightly different to moisture; this These use photoelectric cells that produce an output (in
measures the amount of water vapour in, for the form of an electric current) depending on the
FUNCTION
example, a sample of air. brightness of the light

• monitor humidity levels in a factory • switching street lights on or off depending on light
manufacturing microchips levels
APPLICATION
• monitor/control humidity levels in the air • switch on car headlights automatically when it gets
in a greenhouse dark
Common Sensors

SENSOR
INFRARED PRESSURE

These use an invisible beam of infrared radiation picked up by a


A pressure sensor is a transducer and generates
detector; if the beam is broken, then there will be a change in
FUNCTION
different electric currents depending on the pressure
the amount of infrared radiation reaching the detector.
applied

• turn on car windscreen wipers automatically when it detects • weighing of lorries at a weighing station
rain on the windscreen
APPLICATION • measure the gas pressure in a nuclear reactor
• security alarm system (intruder breaks the infra- red beam)
Common Sensors

SENSOR
SOUND GAS

These are basically microphones that Most common ones are oxygen or carbon dioxide sensors; they
use various methods to detect the gas being monitored and
FUNCTION convert detected sound into electric
produce outputs that vary with the oxygen or carbon dioxide
signals/pulses levels present

• pick up the noise of footsteps in a security system • monitor oxygen and carbon dioxide
• detect the sound of liquids dripping at a faulty
APPLICATION levels in a greenhouse
pipe joint
Common Sensors

SENSOR
PH MAGNETIC FIELD

These measure acidity through These sensors measure changes in magnetic fields –
FUNCTION changes in voltages in, for example, the signal output will depend on how the magnetic
soil field changes

• monitor/control acidity levels in the soil in a greenhouse • Detect magnetic field changes (for example, in
APPLICATION • control acidity levels in a chemical process mobile phones and CD players)
Common Sensors

SENSOR
ACCELEROMETER P ROX IMI T Y

These are sensors that measure acceleration and These sensors detect the presence of a nearby
motion of an application, i.e. the change in velocity. object .
FUNCTION

• Used in cars to measure rapid deceleration and apply • Detect when a face is close to a mobile phone
air bags in a crash
APPLICATION screen and switches off screen when held to the ear
• Used by mobile phones to change between portrait
and landscape mode
Common Sensors

SENSOR
FLOW LEVEL
These sensors measure the flow rate of a moving liquid or
These sensors use ultrasonics (to detect
gas and produce an output based on the amount of liquid
FUNCTION changing liquid levels in, for example, a tank) or
or gas passing over the sensor.
capacitance/ conductivity

• Used in respiratory devices and inhalers in hospitals • Monitor levels in a petrol tank in a car
• Measure gas flows in pipes (for example, natural gas)
APPLICATION • Leak detection in refrigerant (air conditioning)
S E N S O RS A R E U S E D I N B OT H M O N I TO R I N G A N D CO N T RO L
A P P L I C AT I O N S .

Monitoring Controlling
Application Application
1. Security System 1. Control of Street Lighting
2. Monitoring of patients in a hospital 2. Anti-lock braking system
3. Control Heating Systems
4. Chemical Process Control
5. Greenhouse Environmental Control
F LOWC H A RT O F H OW
M O N I TO R I N G A N D
CO N T RO L A P P L I C AT I O N
WO R K
M O N I TO R I N G
A P P L I C AT I O N
- JUST SEND
WA R N I N G
Monitoring system (1) - Security System

• Sensors
• The infrared sensor will pick up the movement of an intruder in the building
• The acoustic sensor will pick up sounds such as footsteps or breaking glass
• The pressure sensor will pick up the weight of an intruder coming through a door or through a window
• The sensor data is passed through an ADC if it is in an analogue form to produce digital data.
• The computer/microprocessor will sample the digital data coming from these sensors at a given frequency.
• The data is compared with the stored values by the computer/microprocessor
• If any of the incoming data values are outside the acceptable range, then the computer sends a signal
• Siren to sound alarm
• Light to start flashing
6. A DAC is used if devices need analogue values to operate them.

7. The alarm continues to sound/lights continue to flash


until the system is reset with a password.
Monitoring system (2) - Monitoring of patients in a hospital

• Sensors
• Sensors are attached tto the patient to measure temperature, heart
rate, breathing rate, etc.
• These sensors are all attached to a computer system. It constantly send
data back to the computer system. The sensor data is passed through an
ADC if it is in an analogue form to produce digital data.
• The computer samples the data at frequent intervals.
• The range of acceptable values for each parameter is keyed into the
computer.
• The data is compared with the keyed in values by the
computer/microprocessor.
• If any of the incoming data values are outside the acceptable range, then
the computer sends a signal
• To sound an alram
• If data from the sensors is within range, the values are shown in either
graphical form on a screen and/or a digital read out.
• Monitoring continues until the sensors are disconnected from the patient.
M O N I TO R I N G
A P P L I C AT I O N
- JUST SEND
WA R N I N G
CO N T RO L L I N G A P P L I C AT I O N
- DO SOMETHING
Controlling system (1) - Control of Street Lighting

• The light sensor sends data to the ADC interface. This changes the data into
digital form and sends it to the microprocessor.
• The microprocessor samples the data every minute/5 minutes.
• If the data from the sensor < value stored in memory
• a signal is sent from the microprocessor to the street lamp.
• and the lamp is switched on
• The lamp stays switched on for 30 minutes before the sensor readings are
sampled again
• If the data from the sensor >= value stored in memory
• a signal is sent from the microprocessor to the street lamp
• the lamp is switched off
• The lamp stays switched off for 30 minutes before sensor readings are
sampled again.
Controlling system (2) - Anti-lock braking (ABS) systems

• Anti-lock braking systems (ABS) on cars use magnetic field sensors to stop
the wheels locking up on the car if the brakes have been applied too sharp.
• One of the car wheels rotates too slowly (i.e. it is locking up), The sensor
data is first sent to an ADC to convert the analogue data into digital data.
• The microprocessor checks the rotation speed of the other three wheels. If
they are different (i.e. rotating faster), the microprocessor sends a signal to
the braking system.
• The braking pressure to the affected wheel is reduced.
• The wheel’s rotational speed is then increased to match the other wheels.
• The checking of the rotational speed using these magnetic field sensors is
done several times a second.
• The braking pressure to all the wheels can be constantly changing to prevent
any of the wheels locking up under heavy braking.
Controlling system (3) - Central Heating Systems

• The required temperature is keyed in and this is stored in the microprocessor memory (this is called the
pre-set value).
• The temperature sensor is constantly sending data readings to the microprocessor.
• The sensor data is first sent to an ADC to convert the analogue data into digital data.
• The digital data is sent to the microprocessor.
• The microprocessor compares this data with the pre-set value.
• If the temperature reading >= pre-set value then no action is taken.
• If the temperature reading < pre-set value, then a signal is sent
• To an actuator (via a DAC) to open the gas valve to the heater
• To an actuator (via a DAC) to turn on the water pump
• The process continues until the central heating is switched off.
Controlling system (4) - Chemical process control
Requirement: A certain chemical process only works if the temperature is above 70°C and
the pH (acidity) level is less than 3.5. Sensors are used as part of the control system. A heater is used to heat the
reactor and valves are used to add acid when necessary to maintain the acidity.

Steps:
• Temperature and pH sensors read data from the chemical process.
• This data is converted to digital using an ADC and is then sent to the computer
• The computer compares the incoming data with pre-set values stored in memory
• Temperature:
• If the temperature < 70°C, a signal is sent to switch on the heater.
• If the temperature >= 70°C, a signal is sent to switch off the heaters
• PH
• If the pH > 3.5, then a signal is sent to open a valve and acid is added
• If the pH <= 3.5, then a signal is sent to close this valve
• The computer signals will be changed into analogue signals using a DAC so that it can control the heaters and
valves
• This continues as long as the computer system is activated.
Controlling system (5) - Greenhouse environment control
EXAM QUESTION
Answer

 1. Sensors send signals to the microprocessor/computer


 2. Signals are converted to digital using an analogue to digital
converter (ADC)
 3. The computer/microprocessor analyses the data received by
checking it against stored values.
 4. If the data does not match/outside the acceptable range, the
computer sends a signal…
 5. …the counter is incremented by 1
 6. This is a continuous process
EXAM QUESTION
Answer

 1. Sensors send signals to the microprocessor/computer


 2. Signals are converted to digital using an analogue to digital
converter (ADC)
 3. The computer/microprocessor analyses the data received by
checking it against stored values.
 4. If the data does not match/outside the acceptable range, the
computer sends a signal…
 5. …to an actuator to help operate to switch the lights on.
 6. The timer is set for 2 minutes (120s), every time the movement is
detected, the timing is reset
 7. When the timer reaches 120s, the microprocessor sends a signal to
switch the lights off.
 8. This is a continuous process
Question 13(b) Page 52

 1. The sensors continually send data to the


microprocessor.
 2. Signals are converted to digital using an analogue to
digital converter (ADC)
 3. The computer/microprocessor analyses the data
received by checking it against stored values.
 4. If an infrared beam is broken, the microprocessor
sends a signal to an actuator to operate a siren/flashing
lights.
 5. This is a continuous process
....01010100101011010101010010101001010.

Data
Storage
Secondary Storage
Memory Unit (RAM) / ROM
(HDD, SSD, Removable Disk, CD)

Primary Memory Secondary Storage

Store data that is key to running the computer


(program executable code, bootup code) Store applications, data and files

Directly addressable by the CPU Not directly addressable by the CPU


Compare
(High retrieval speed) (Low retrieval speed)
and
RAM is volatile Contrast All secondary storage devices
ROM is non volatile are non volatile

Can be external or internal to the computer


Built internally into the computer

Example: HDD, SSD, DVD, memory stick,


Example: RAM, ROM and cache memory
Blu-ray disc
Secondary Storage
Memory Unit (RAM) / ROM
(HDD, SSD, Removable Disk, CD)

Primary Memory Secondary Storage

Store data that is key to running the computer


(program executable code, bootup code) Store applications, data and files

Directly addressable by the CPU Not directly addressable by the CPU


Compare
(High retrieval speed) (Low retrieval speed)
and
RAM is volatile Contrast All secondary storage devices
ROM is non volatile are non volatile

Can be external or internal to the computer


Built internally into the computer

Example: HDD, SSD, DVD, memory stick,


Example: RAM, ROM and cache memory
Blu-ray disc
Secondary Storage
Memory Unit (RAM) / ROM
(HDD, SSD, Removable Disk, CD)

Primary Memory Secondary Storage

Store data that is key to running the computer


(program executable code, bootup code) Store applications, data and files

Directly addressable by the CPU Not directly addressable by the CPU


Compare
(High retrieval speed) (Low retrieval speed)
and
RAM is volatile Contrast All secondary storage devices
ROM is non volatile are non volatile

Can be external or internal to the computer


Built internally into the computer

Example: HDD, SSD, DVD, memory stick,


Example: RAM, ROM and cache memory
Blu-ray disc
Secondary Storage
Memory Unit (RAM) / ROM
(HDD, SSD, Removable Disk, CD)

Primary Memory Secondary Storage

Store data that is key to running the computer


(program executable code, bootup code) Store applications, data and files

Directly addressable by the CPU Not directly addressable by the CPU


Compare
(High retrieval speed) (Low retrieval speed)
and
RAM is volatile Contrast All secondary storage devices
ROM is non volatile are non volatile

Can be external or internal to the computer


Built internally into the computer

Example: HDD, SSD, DVD, memory stick,


Example: RAM, ROM and cache memory
Blu-ray disc
Secondary Storage
Memory Unit (RAM) / ROM
(HDD, SSD, Removable Disk, CD)

Primary Memory Secondary Storage

Store data that is key to running the computer


(program executable code, bootup code) Store applications, data and files

Directly addressable by the CPU Not directly addressable by the CPU


Compare
(High retrieval speed) (Low retrieval speed)
and
RAM is volatile Contrast All secondary storage devices
ROM is non volatile are non volatile

Can be external or internal to the computer


Built internally into the computer

Example: HDD, SSD, DVD, memory stick,


Example: RAM, ROM and cache memory
Blu-ray disc
Primary Memory: Internal devices used to store data that the
computer can access directly

Memory Unit (RAM) / ROM


Memory
any memory location in RAM can be accessed 8
0
independent of which memory location was
0 9
last used
2 10
3 11

When you run an application or program, data 0 12


is retrieved from secondary storage and placed 0 13
temporarily into RAM
Memory
0 8
0 9
• Can be written to or read from, and the data can be
2 10
changed by the user or the computer
3 11

• Used to store data, files, part of an application or part of 0 12

the operating system currently in use 0 13

• It is volatile, which means memory contents are lost


when powering off the computer

• Larger the size of RAM, faster the computer will operate.


Common types of RAM Used in memory cache

Dynamic RAM (DRAM) Static RAM (SRAM)

Consists of many chips. Each ship contain millions of Make use of flip flops
transistor (switch) and capacitor (holds the bits of which hold each bit of
information). memory

There are 2
Needs to be refreshed (The capacitor needs to be types of RAM
Doesn’t need to be constantly refreshed
re-charged every 15 microseconds) otherwise it technologies
would lose its value.

Advantages: Advantages:
• Much less expensive than SRAM • Faster data access
• Consume less power than SRAM
• Higher memory capacity than SRAM
Common types of RAM Used in memory cache

Dynamic RAM (DRAM) Static RAM (SRAM)

Consists of many chips. Each ship contain millions of Make use of flip flops
transistor (switch) and capacitor (holds the bits of which hold each bit of
information). memory

There are 2
Needs to be refreshed (The capacitor needs to be types of RAM
Doesn’t need to be constantly refreshed
re-charged every 15 microseconds) otherwise it technologies
would lose its value.

Advantages: Advantages:
• Much less expensive than SRAM • Faster data access
• Consume less power than SRAM
• Higher memory capacity than SRAM
Common types of RAM Used in memory cache

Dynamic RAM (DRAM) Static RAM (SRAM)

Consists of many chips. Each ship contain millions of Make use of flip flops
transistor (switch) and capacitor (holds the bits of which hold each bit of
information). memory

There are 2
Needs to be refreshed (The capacitor needs to be types of RAM
Doesn’t need to be constantly refreshed
re-charged every 15 microseconds) otherwise it technologies
would lose its value.

Advantages: Advantages:
• Much less expensive than SRAM • Faster data access
• Consume less power than SRAM
• Higher memory capacity than SRAM
VON NEUMANN ARCHITECTURE CONTROL BUS

DATA BUS
Central Processing Unit (CPU)
ADDRESS BUS

MAR
CU
PC

SRAM MDR

CIR

ALU ACC

Input DRAM Output

Load executable code


when needed

Secondary Storage
(HDD, SSD, Removable Disk, CD)
it cannot be changed or written to.

the contents can only be read


they are non-volatile (the contents are not lost
after powering off the computer)
they are often used to store data that the
computer needs to access when
they are permanent memories powering up for the first time. these are known
as the start-up instructions
RAM ROM

Temperory memory device Permanent memory device

Volatile memory Non-volatile memory

Compare and
Can be written to and read from Contrast Data stored cannot be altered

Used to store data, files, programs, part Used to store BIOS and other data needed at start
of OS currently in use up
RAM ROM

Temperory memory device Permanent memory device

Volatile memory Non-volatile memory

Compare and
Can be written to and read from Contrast Data stored cannot be altered

Used to store data, files, programs, part Used to store BIOS and other data needed at start
of OS currently in use up
RAM ROM

Temperory memory device Permanent memory device

Volatile memory Non-volatile memory

Compare and
Can be written to and read from Contrast Data stored cannot be altered

Used to store data, files, programs, part Used to store BIOS and other data needed at start
of OS currently in use up
RAM ROM

Temperory memory device Permanent memory device

Volatile memory Non-volatile memory

Compare and
Can be written to and read from Contrast Data stored cannot be altered

Used to store data, files, programs, part Used to store BIOS and other data needed at start
of OS currently in use up [start-up instructions]
Memory
0 8
0 9
Primary memory
2 10
• directly addressable by the CPU
3 11
• part of the CPU/motherboard
• contains RAM/ROM/cache 0 12
0 13
Secondary storage
• not directly addressable by CPU
• non-volatile devices
• often external to computer
Description RAM [ √ ] ROM [√ ]

Temporary memory device

Non –volatile memory

Data stored in this memory


cannot be altered

Permanent memory device

Stores data and part of the


operating system currently in
use

Can be increased in size to


improve the operational
speed of a computer
• radio frequency to control the device

• software to carry out the basic functions of a device

• start-up procedures when the device is powered up


• a user’s own programs/routines to control the car

• part of the software needed to control the car’s


manoeuvres

• temporary new radio frequencies


Load executable code
when needed

Secondary Storage
(HDD, SSD, Optical Disk)

Secondary Storage:
Allow users to store applications, data and files.
Non volatile.
Slower access time by the CPU
Used to store data. Data is Consist of electromagnets that
stored in a digital format on the are used to read data from or
magnetic surfaces of the disks. write data to the platters. A
The platters can spin about number of read-write heads can
7000 times a second. access all of the surfaces which
can be used to store data. moves
50 times a second
A sector on a given track will contain a fixed
number of bytes.
ELECTROMAGNET
PLAT TER TRACK AND SEC TOR
HEADS
Unfortunately, hard disk drives have
very slow data access when
compared to, for example, RAM.
Many applications require the read-
write heads to constantly look for
the correct blocks of data; this
means a large number of head
movements. The effects of latency
then become very significant.
Latency is defined as the time it
takes for a specific block of data on
a data track to rotate around to the
read-write head.
When a file or data is stored on a HDD,
the required number of sectors needed
to store the data will be allocated.
However, the sectors allocated may not
be adjacent to each
other. Through time, the HDD will
undergo numerous deletions and editing
which leads to sectors becoming
increasingly fragmented resulting in a
gradual deterioration of the HDD
performance (in other words, it takes
longer and longer to access data).
Defragmentation software can improve
on this situation by ‘tidying up’ the disk
sectors.
Removable hard disk drives are
essentially HDDs external to the
computer that can be connected to
the computer using one of the USB
ports. In this way, they can be used
as a back-up device or another way
of transferring files between
computers.
DESCRIPTION

They have no moving parts and all data is retrieved


at the same rate
• The data is stored as 0s and 1s in millions of tiny transistors
• Store data by controlling the movement of electrons within through logic
(NAND and NOR) gates
• The electric current reaches the control gates and flows through to the
floating gates to be stored
• A dielectric coating separates the two transistors, which allows the floating
gate transistor to retain its charge (which is why the memory is non-volatile)
As they have no moving parts, SSD is :
• Lighter
• More Reliable
• Thinner
• Faster in data access
• Cooler

• Poor longevity - is still not used in all servers

*memory sticks/flash memories use solid state technology


red laser blue laser

red laser
laser
binary =
binary = 1
0

land

pit

• As with a HDD, a CD/DVD is divided into sectors allowing direct access to


data.
• The data is stored in ‘pits’ and ‘lands’ on the spiral track.
• A red laser is used to read and write the data
• When a disk spins, the optical head moves to the point where the laser
beam ‘contacts’ the disk surface and follows the spiral track from the centre
outwards.
• DVD has more storage capacity than CD.
• DVD can be dual layered:
• Reading and writing of the second layer is done by a red laser focusing
at a fraction of a millimetre difference compared to the first layer.
• Single layer DVDs still have a larger storage capacity than CDs. This is due to
the smaller ‘pit’ size and track width.
CD vs DVD
• A blue laser, rather than a red laser, is used to carry out read and write operations; the
wavelength of blue light is only 405nanometres (red laser is of 650 - 780 nm).
• The shorter the wavelength of the laser light, the greater the storage capacity of the
medium.
• Blu-ray disks automatically come with a secure encryption system that helps to prevent
piracy and copyright infringement.
• The data transfer rate for a DVD is 10Mbps and for a Blu-ray disc it is 36Mbps (this
equates to 1.5hours to transfer 25GiB of data).
• Single layer and Double layer
DISK SIZE CAPACITY

27 GB (Single Layer)
700MB
50 GB (Dual Layer)

4.7 GB
Virtual
Memory

Part of the memory in HDD or SSD when we need more memory - RAM

When do we need virtual memory


When processes run out of memory. If the amount of available RAM is exceeded due to
multiple programs running, it is likely to cause a system crash. This can be solved by utilising the
hard disk drive (or SSD) if we need more memory.
An example showing the importance of
virtual memory

1. Imagine we want to run 5 instructions, but we only have 4 available


slot in the RAM.
An example showing the importance of
virtual memory
To solve this problem, we store the extra instruction into the
HDD/SSD temporarily (waiting state)
An example showing the importance of
virtual memory
To solve this problem, we store the extra instruction into the hdd/ssd
temperorily (waiting state)
An example showing the importance of
virtual memory
Virtual memory now moves the oldest data out of RAM into the
HDD/SSD to allow program 4 to gain access to RAM. The 32-bit ‘map’
is now updated to reflect this new situation
An example showing the importance of
virtual memory

• All of this will continue to occur until RAM is no longer being over-utilised by the competing
programs running in memory.
• Virtual memory gives the illusion of unlimited memory being available. Even though RAM is full,
data can be moved in and out of the HDD/SSD to give the illusion that there is still memory
available.
• In computer operating systems, paging is used by memory management to store and retrieve data
from HDD/SSD and copy it into RAM.
• However, accessing data in virtual memory is slower so, as mentioned earlier on in this chapter, the
larger the RAM the faster the CPU can operate. This is one of the benefits of increasing RAM size as
far as possible.
Main benefits of virtual memory

• Programs can be larger than physical memory and can still be executed
• Eliminates wasting money with data that is not being used
• Reduces the need to buy and install expensive RAM memory
Disk thrashing

When using HDD for virtual memory the main drawback is Disk Thrashing. As main memory fills, more
and more data needs to be swapped in and out of virtual memory leading to a very high rate of hard
disk read/write head movements; this is known as disk thrashing. If more and more time is spent on
moving data in and out of memory than doing any processing, then the processing speed
of the computer will be considerably reduced. A point can be reached when the execution of a process
comes to a halt since the system is so busy moving data in and out of memory rather than doing any
actual execution – this is known as the thrash point. Due to large numbers of head movements, this can
also lead to premature failure of a hard disk drive.

Thrashing can be reduced by installing more RAM, reducing the number of programs running at a time
or reducing the size of the swap file. Another way of reducing this problem is to make use of a solid
state drive (SSD) rather than using HDD.
Cloud Storage
A method of data storage where data is stored on remote servers.
Instead of saving data on a local hard disk or other storage device, a user can save their data ‘in the
cloud’.
Advantages Disadvantages

Client files stored on the cloud can be accessed at any If the customer/client has a slow or unstable internet
time from any device anywhere in the world provided connection, they would have many problems
internet access is available accessing or downloading their data/files

There is no need for a customer/client to carry an


external storage device with them, or even use
Costs can be high if large storage capacity is
the same computer to store and retrieve
required
information

The potential failure of the cloud storage


The cloud provides the user with remote back-up
company is always possible – this poses a
of data with obvious benefits to alleviate data
risk of loss of all back-up data
loss/disaster recovery
EXAM QUESTION
EXAM QUESTION
• SSD’s have only 20GB of write operations per day (SSD endurance), thus,
HDD’s will have more read/write cycles over its lifetime.

• Cheaper per unit of data stored, it will be better value for the company to
purchase.

• Trusted technology, it has been used traditionally for many years.

• Read/write speed is sufficient, even though it is slower than the solid-state.


EXAM QUESTION
EXAM QUESTION
EXAM QUESTION
EXAM QUESTION
EXAM QUESTION
EXAM QUESTION
EXAM QUESTION
EXAM QUESTION
NETWORK HARDWARE
IGCSE COMPUTER SCIENCE
NETWORK INTERFACE
CARD (NIC)

Needed to allow a device to connect to a


network (such as the internet)

WIRELESS NETWORK
INTERFACE CARD (NIC)
They use wireless connectivity utilising an
antenna to communicate with networks via
microwaves
INTERNET PROTOCOL (IP) ADDRESS
WHEN A ROUTER CONNECTS TO THE INTERNET IT IS GIVEN A
UNIQUE PUBLIC IP ADDRESS

254.26.38.77

254.25.28.77

254.16.48.102
WHEN A DEVICE CONNECTS TO A PRIVATE NETWORK, A ROUTER ASSIGNS A PRIVATE
IP ADDRESS TO IT. THAT IP ADDRESS IS UNIQUE ON THAT NETWORK, BUT MIGHT BE
THE SAME AS AN IP ADDRESS ON A SEPARATE NETWORK.

254.25.28.6

254.25.28.12 254.25.28.13

254.25.28.1
SUPPLIED BY ISP
ALL THE DEVICES CONNECTED TO THAT ROUTER HAVE THE SAME PUBLIC IP ADDRESS AS THE ROUTER BUT EACH HAVE
THEIR OWN DIFFERENT PRIVATE IP ADDRESSES ON THAT NETWORK.

ON MY MAC

ON MY IPHONE
CONNECTED TO THE SAME WIFI
IP ADDRESS FORMAT - IPV4

DD.DD.DD.DD
• EACH DIGIT RANGE FROM 0-255
• EACH DIGIT = 8 BITS
• EACH DIGIT IS SEPARATED BY DOT
• 4.3 BILLIONS COMBINATION

EG
252.25.28.77
CAN BE REPRESENTED IN HEXA TOO..
IP ADDRESS FORMAT - IPV6

HHHH:HHHH:HHHH:HHHH:HHHH:HHHH:HHHH:HHHH
• EACH DIGIT RANGE FROM 0-65536 / 0000 - FFFF (HEXA)
• EACH DIGIT = 16 BITS
• EACH DIGIT IS SEPARATED BY COLON
• COMBINATIONS? 65535 POWER OF 8 (DON'T COUNT)

EG

A8FB:7A88:FFF0:0FFF:3D21:2085:66FB:F0FA
WHY IS IPV6 NEEDED?
SOME POSSIBLE ANSWERS
• REMOVES THE RISK OF IP ADDRESS COLLISIONS
• HAS BUILT-IN AUTHENTICATION CHECKS
(STORES ADDITIONAL VALUE IN THE HEADER
USING THE PAYLOAD)
• IPV6 HAS BEEN DESIGNED TO ALLOW THE
INTERNET TOEGGROW IN TERMS OF THE
NUMBER OF HOSTS AND POTENTIAL INCREASE
IN THE AMOUNT OF DATA TRAFFIC
Static IP Address

STATIC IP ADDRESSES ARE PERMANENTLY ASSIGNED TO


A DEVICE BY THE INTERNET SERVICE PROVIDER (ISP);
THEY DON’T CHANGE EACH TIME A DEVICE LOGS ONTO
THE INTERNET.

Static vs Dynamic
USED BY
1.REMOTE SERVERS WHICH ARE HOSTING A IP Address
WEBSITE
2. AN ONLINE DATABASE

ADVANTAGE:
ALLOW FOR FASTER UPLOAD AND
DOWNLOAD SPEEDS
Static IP Address Dynamic IP Address

STATIC IP ADDRESSES ARE PERMANENTLY ASSIGNED TO


A DEVICE BY THE INTERNET SERVICE PROVIDER (ISP); DYNAMIC IP ADDRESSES ARE ASSIGNED BY THE ISP
THEY DON’T CHANGE EACH TIME A DEVICE LOGS ONTO EACH TIME A DEVICE LOGS ONTO THE INTERNET.
THE INTERNET.

Static vs Dynamic
USED BY DYNAMIC HOST CONFIGURATION PROTOCOL
1.REMOTE SERVERS WHICH ARE HOSTING A IP Address (DHCP) I USED BY THE ISP TO AUTOMATICALLY
WEBSITE ASSIGN AN IP ADDRESS TO A DEVICE
2. AN ONLINE DATABASE

ADVANTAGE: ADVANTAGE:
ALLOW FOR FASTER UPLOAD AND GREATER PRIVACY SINCE THEY CHANGE
DOWNLOAD SPEEDS EACH TIME
A USER LOGS ON
THEN, HOW TO UNIQUELY IDENTIFY A DEVICE
ON A LAN?
Media Access Control (MAC) Address
Function
Uniquely identify a computer on a Local Area Network
(LAN)

Format
NN - NN - NN - DD - DD - DD
Manufacturer Code Serial Number

Each digit is represented in Hexadecimal


If the NIC card is replaced, the MAC address will also change

Eg. 00 - 1C - B3 - 4F - 25 - FF
Universally Administered Locally Administered
MAC Address (UAA) MAC Address (LAA)

• Most common type of • Useful when a user or


MAC address organisation wishes to
• Set by manufacturer at Types of change their MAC adderss
the factory MAC address • Cause big problem if
changed address isn't unique
• Rare for a user to
• Useful when certain software
change this address
used on mainframe systems
need all the MAC addresses
of devices to fall into a strict
format.
ROUTER FUNCTION 1: ENABLE DATA PACKETS TO BE ROUTED
BETWEEN DIFFERENT NETWORKS

254.26.38.77

254.25.28.77

254.16.48.102
ROUTER FUNCTION 2: TAKES DATA TRANSMITTED IN ONE FORMAT FROM A
NETWORK (WHICH IS USING A PARTICULAR PROTOCOL) AND
CONVERTS THE DATA TO A PROTOCOL AND FORMAT UNDERSTOOD BY
ANOTHER NETWORK, THEREBY ALLOWING THEM TO COMMUNICATE.

254.26.38.77

254.25.28.77
ROUTER SINCE EVERY COMPUTER ON THE SAME NETWORK HAS THE SAME PART OF AN
INTERNET PROTOCOL (IP) ADDRESS, THE ROUTER IS ABLE TO SEND THE DATA
PACKET TO THE APPROPRIATE SWITCH, AND THE DATA WILL THEN BE
DELIVERED TO THE CORRECT DEVICE USING THE
MAC DESTINATION ADDRESS

00 - 1C - B3 - 4F - 25 - FF
DESTINATION:
254.25.28.77

00 - 1C - B3 - 4F - 26 - FF

254.25.28.77
EXAM QUESTION
EXAM QUESTION
EXAM QUESTION
EXAM QUESTION

You might also like