0% found this document useful (0 votes)
5 views97 pages

1 September Computer Science Notes

The document explains how sound is sampled and stored through analogue to digital conversion, detailing the processes of sample rate and sample resolution. It also covers the fundamentals of bitmap images, including pixel composition, resolution, and color depth, as well as the impact of these factors on file size. Additionally, it discusses the characteristics of CPUs, including clock speed, cache size, and the number of cores, which influence computer performance.
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)
5 views97 pages

1 September Computer Science Notes

The document explains how sound is sampled and stored through analogue to digital conversion, detailing the processes of sample rate and sample resolution. It also covers the fundamentals of bitmap images, including pixel composition, resolution, and color depth, as well as the impact of these factors on file size. Additionally, it discusses the characteristics of CPUs, including clock speed, cache size, and the number of cores, which influence computer performance.
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

Sound

How is sound sampled & stored?


• Measurements of the original sound wave are captured and stored as binary on
secondary storage
• Sound waves begin as analogue and for a computer system to understand them they must
be converted into a digital form
• This process is called Analogue to Digital conversion (A2D)
• The process begins by measuring the amplitude of the analogue sound wave at a point
in time, called samples
• Each measurement (sample) generates a value which can be represented in binary and
stored
• Using the samples, a computer is able to create a digital version of the original analogue
wave
• The digital wave is stored on secondary storage and can be played back at any time by
reversing the process

• In this example, the grey line represents the digital wave that has been created by taking
samples of the original analogue wave
• In order for the digital wave to look more like the analogue wave the sample rate and bit
depth can be changed

Sample Rate & Sample Resolution


Sample rate
• Sample rate is the amount of samples taken per second of the analogue wave
• Samples are taken each second for the duration of the sound
• The sample rate is measured in Hertz (Hz)
• 1 Hertz is equal to 1 sample of the sound wave

In this example you can see that the higher the sample rate, the closer to the original sound
wave the digital version looks

• The sampling rate of a typical audio CD is 44.1kHz (44,100 Hertz or 44,100 samples per
second)
• Using the graphic above helps to answer the question, “Why does telephone hold music
sound so bad?”
What is sample resolution?
• Sample resolution is the number of bits stored per sample of sound
• Sample resolution is closely related to the colour depth of a bitmap image, they measure
the same thing in different contexts
Bitmap Images

What is a bitmap?

• A bitmap image is made up of squares called pixels

• A pixel is the smallest element of a bitmap image


• Each pixel is stored as a binary code

• Binary codes are unique to the colour in each pixel

• A typical example of a bitmap image is a photograph

• The more colours and more detail in the image, the higher the quality of the image and
the more binary that needs to be stored
Resolution & Colour Depth

Resolution

• Resolution is the total amount of pixels that make up a bitmap image

• The resolution is calculated by multiplying the height and width of the image (in
pixels)

• In general, the higher the resolution the more detail in the image (higher quality)
• Resolution can also refer to the total amount of pixels horizontally in a display, such as:
o Computer monitors - 1440p means 1440 pixels horizontally compared to 4K
which is 3840 pixels (roughly 4 thousand)

o TVs - HD (high definition) channels have a resolution of 1080p, 1080 pixels


horizontally compared to newer UHD (ultra high definition) channels with 3840
pixels (4K)

o YouTube - The quality button allows a user to change the video playback
resolution from 144p (144 pixels horizontally) up to 4K
Colour depth

• Colour depth is the number of bits stored per pixel in a bitmap image

• The colour depth is dependent on the number of colours needed in the image
• In general, the higher the colour depth the more detail in the image (higher quality)

• In a black & white image the colour depth would be 1, meaning 1 bit is enough to create
a unique binary code for each colour in the image (1=white, 0=black)

• In an image with a colour depth of 2, you would have 00, 01, 10 & 11 available binary
codes, so 4 colours
• As colour depth increases, so does the amount of colours available in an image

• The amount of colours can be calculated as 2n (n = colour depth)

Colour Depth Amount of Colours

1 bit 2 (B&W)

2 bit 4

4 bit 16

8 bit 256

24 bit 16,777,216 (True Colour)

What is the impact of resolution and colour depth

• As the resolution and/or colour depth increases, the bigger the size of the file becomes
on secondary storage
• The higher the resolution, the more pixels are in the image, the more bits are stored

• The higher the colour depth, the more bits per pixel are stored
• Striking a balance between quality and file size is always a consideration
Worked Example
1. Define the term Pixel [1]

2. If an image has a colour depth of 2 bits, how many colours can the image represent? [1]

3. Describe the impact of changing an images resolution from 500x500 to 1000x1000 [2]

Answers

1. The smallest element of a bitmap image (1 square)

2. 4

3. The image quality would be higher [1] the file size would be larger [1]

Units of Data Storage


• A unit of data is a term given to describe different amounts of binary digits stored on a
digital device
• These are the units you need to know for IGCSE:

Unit Symbol Value

Bit b 1 or 0

Nibble 4b

Byte B 8b

Kibibyte KiB 1,024 B (210)

Mebibyte MiB 1,024 KiB (220)

Gibibyte GiB 1.024 MiB (230)

Tebibyte TiB 1,024 GiB (240)

Megabyte vs Mebibyte
• 1 kibibyte (1KiB) = 1024 bytes (1024 B) - binary prefixes (to the power of 2)
• 1 kilobyte (1KB) = 1000 bytes (1000 B) - decimal prefixes (to the power of 10)
Converting between units
• It is often a requirement of the exam to be able to convert between different units of
data, for example bytes to mebibytes (larger) or kibibytes to bytes (smaller)
• This process involves division, moving up in size of unit and multiplication, moving
down in size of unit
• When dealing with all units bigger than a byte we use multiples of 1024 (210)
• For example, 2000 kibibytes in mebibytes would be 2000 / 1024 = 1.95 MiB and 2
tebibytes in gibibytes would be 2 * 1024 = 2048 GiB
• When dealing with bits and bytes the same process is used with the value 8 as there are 8
bits in a byte
• For example, 24 bits in bytes would be 24 / 8 = 3 B and 10 bytes in bits would be 10 * 8
= 80 b
Unit
Bit Divide by 8 ⇓
Multiply by 8 ⇑
Byte
Kibibyte
Mebibyte Divide by 1024 ⇓
Multiply by 1024 ⇑
Gibibyte
Tebibyte
Hardware

The CPU & Microprocessors


• 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
• 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

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

A diagram showing the input, process, output sequence followed by computer systems
Microprocessors
• A microprocessor is a type of integrated circuit that is contained on a single chip
• It contains the CPU and sometimes other components such as:
o Memory controllers
o I/O interfaces
• It is a hardware chip that houses the CPU

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

• The 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

Name Acronym Purpose

• Holds the memory address of the next


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

Memory • Holds the memory address of where data or


MAR instructions are to be fetched from memory
Address Register

Memory Data • Stores the data or instruction which has been


MDR fetched from memory
Register

Current Instruction • Stores the instruction the CPU is currently decoding


CIR or executing
Register

• Stores the results of any calculations that have taken


Accumulator ACC 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..

Question
Describe the role of the control unit, the control bus, the data bus and the address bus
when fetching an instruction from memory [4]
Fetch-Decode-Execute Cycle (FDE)

• 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

• 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

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

• 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

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

Any 2 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

• 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

Opcode and operand


• In IGCSE Computer Science, the opcode and operand make up the binary code

o The opcode (operation code) 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

Instruction Mnemonic Binary code Command

Add ADD 10100001 Adds a value to the value currently stored in the accumulator (ACC)

Subtract SUB 00100010 Subtract a value from the values stored in the accumulator

Load LDA 10111111 Load the value stored in a memory location into the accumulator

Store STA 01100000 Store the value in the accumulator in a 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

Worked Example

Using the instruction set in the table above what would be the operation if the instruction was
00100010 00000010?
[1]
Answer

Either of:

• The operation would be SUB [1]

• If the operand was raw data the complete instruction would be to subtract 2 from
the value in the accumulator [1]
Embedded Systems

• 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

Properties of an embedded system

• They are small in size


• They use less power than a general-purpose computer
• They have a lower cost

Examiner Tips and Tricks

Always use key examples from the list above and don’t try to use different examples such as a
fridge or kettle as these will not appear on mark schemes because although they have a single
purpose, most fridges and kettles do not have a CPU.

Worked Example

1) Tick two boxes below to show which are an example of an embedded system

[2]

Is it an example of an embedded system

Laptop

Washing Machine

Mobile Phone

Car Engine Management System

2) Justify your choice to question 1

[2]

Answers
1) Tick two boxes below to show which are an example of an embedded system. [2]

Is it an example of an embedded system

Laptop

Washing Machine ✓

Mobile Phone

Car Engine Management System ✓

2) Justify your choice to question 1 [2]


Any two of:

• A washing machine and car engine management system are not general-purpose
computers [1]
• A washing machine and car engine management system have a single purpose and
are both housed inside a larger mechanical unit [1]

• A washing machine and car engine management system have a microprocessor [1]
Input Devices

• 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

• Supermarkets
• Reads barcodes to • Quickly and accurately
Barcode
capture product • Warehouses retrieves product details
Scanner
information. for stock and checkout
• Libraries

• Photography
• Captures photographs
• High-quality visual
Digital Camera or videos as digital • Smartphones
content
images
• Webcams

• Computers • Type documents


• Inputs text and
Keyboard commands by pressing • Tablets • Enter data
keys
• Laptops • Control software

• Recording
• Captures analogue studios • Audio recording
Microphone sound and converts it
• Smartphones • Voice communication
into digital signals
• Computers

• Moves the cursor on


• Computers • Precise control and
the screen based on
Optical Mouse navigation on a
hand movements over • Laptops computer screen
a surface

• Quickly retrieves data


• Reads QR codes to • Retail shops from QR codes
QR Code
access stored
Scanner • Mobile apps • Website links or product
information
information
• ATMs
• Detects touch by
Touch Screen • Older • Direct interaction with
pressing a flexible
(Resistive) smartphones and the device
screen layer
tablets

• Detects touch by • Kiosks • Accurate touch detection


Touch Screen interrupting infrared
(Infra-red) light beams across the • Large touch • Works well in various
screen displays lighting conditions

• Modern
• Detects touch through
smartphones • Smooth, responsive
Touch Screen changes in electrical
touch experience with
(Capacitive) charge on the screen • Tablets
multi-touch capabilities
surface
• Touch monitors

• Offices
Two- • Captures flat, 2D • Digitises documents and
Dimensional images of documents • Libraries photos for storage,
(2D) Scanner or photos editing, or sharing
• Schools

• Manufacturing
Three- • Captures detailed 3D • Creates digital models of
Dimensional shapes and dimensions • Design objects for design,
(3D) Scanner of objects analysis, or reproduction
• Medical imaging
Output Devices

• 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 device What does it do? Where is it used? Why is it used?

• Converts energy into motion


• Make a robot's
• Makes things move arm move • Essential in any
Actuator system that requires
• Performs physical tasks • Open a valve
movement
based on instructions from a
• Rotate a motor
computer or control system

• Projects images onto a screen • Cinemas


Digital Light
• Shows images or video by • Classrooms
Processing (DLP) • High-quality images
projector shining light through tiny • Large
mirrors presentations

• Home
• Prints text and images onto • Low cost compared
Inkjet printer paper by spraying tiny • Schools to other types of
droplets of ink printer
• Offices

• Heat from a laser fuses toner • Offices • High-quality prints


Laser printer
(fine powder) onto paper • Schools • Fast print speed

• Televisions • High-quality images


Light Emitting • Bright
• Displays images and video • Computer
Diode (LED)
using tiny lights called LEDs monitors • Energy efficient
screen
• Smartphones • Thin

• Offices • Bright
Liquid Crystal • Projects images or video onto
Display (LCD) a screen by shining light • Classrooms • Excellent balance of
projector through liquid crystal panels quality and
• Home cinemas affordability
• Televisions • Energy efficient
Liquid Crystal • Displays images and video • Monitors • Thin
Display (LCD) using liquid crystals with a
screen backlight • Smartphones • Sharp images

• Laptops • Lightweight

• Televisions
• Converts electrical signals
• Multiple shapes and
Speaker into analogue sound waves to • Radios
sizes
play music
• Smartphones

• Manufacturing
• Adds thin layers of plastic, • Medicine • Create prototypes
3d printer one on top of another to form
a three dimensional object • Education • Custom parts

• Home

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

Examiner Tips and Tricks

• You are likely to be given a scenario and asked to identify the sensors that would be used.

• The 14 sensors you need to be aware of are in the table below

Sensor type What it measures Typical use

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


Accelerometer Acceleration rate, tilt, vibration features if needed

In mobile phones to detect orientation of the device

Flow Rate of gas, liquid or powder flow Detect changes in the flow through pipes in water system

Presence of a gas e.g. carbon Detect levels of gas in confined spaces


Gas
monoxide Detect gas levels when fixing gas leaks
Humidity Levels of water vapour Monitor humidity in greenhouses

Security systems detecting intruders who break the beam


Infra-red Detecting motion or a heat source Measures heat radiation of objects - used by emergency ser
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 gets dark (street


Light Light levels
headlights)

Anti-lock braking system


Magnetic field Presence and strength
Monitoring rotating machinery such as turbines

Monitoring moisture in the soil


Moisture Presence and levels of 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


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

Monitoring the position of objects in robotics


Proximity Distance
Used in safety systems to prevent objects from colliding

Temperature in Celsius, Fahrenheit Used to maintain temperature in swimming pools


Temperature
or Kelvin Used to control temperature in chemical processes

Worked Example

What type of sensor would be used to help drivers when reversing? [1]

A Motion

B Infra-red

C Light
D Proximity

Is this a monitoring system or a control system? [1]

A Monitoring

B Control

Answer

A Motion

B Infra-red

C Light

D Proximity

A Monitoring

B Control
Data Storage

Primary Storage

• Primary storage is directly accessed by the CPU


• Computer systems need both primary and secondary storage to operate

• Both types of storage play a crucial role in the operation of a computer system

• A quick comparison of primary and secondary storage shows:

Primary Secondary

Volatile (with the exception of ROM) Non-volatile

Small capacity Large capacity

• A computer needs primary storage because access times are considerably faster than
secondary

• This means the time taken to complete operations such as the Fetch-Execute
Cycle is dramatically reduced

• Primary storage holds the data and instructions that the CPU needs to access whilst the
computer is turned on

• Due to the fast access times, primary storage is used as short-term, working memory, in
hardware that is directly connected to the CPU such as RAM, and components that
reside inside the CPU such as Cache and Registers

• Performance of primary storage means a much higher cost which limits the amount that
is used

• For example, RAM is commonly purchased in 16 or 32 gigabytes whereas secondary


storage such as a hard drive is in terabytes

RAM

• RAM (Random Access Memory) is primary storage that is directly connected to the
CPU and holds the data and instructions that are currently in use

• RAM is volatile which means the contents of RAM are lost when the power is turned off

• For the CPU to access the data and instructions they must be copied from secondary
storage
• RAM is very fast working memory, much faster than secondary storage
• RAM is read/write which means data can be read from and written to

• In comparison to ROM, it has a much larger capacity

Worked Example

A smart television allows the user to search the Internet and watch videos online.
The smart television uses RAM

Give two examples of data that the smart television could store in RAM [2]

Possible answers

• Current channel being watched

• Current volume

• Current video/file/tv program being watched

• Web browser/applications that are running

• Data being downloaded/buffered


ROM

• ROM (Read Only Memory) is primary storage that holds the first instructions a
computer needs to start up (Bootstrap)

• ROM contains the BIOS (Basic Input Output System)

• ROM is a small memory chip located on the computers motherboard

• ROM is fast memory, much faster than secondary storage but slower than RAM

• ROM is non-volatile which means the contents of ROM are not lost when the power is
turned off
• ROM is read only which means data can only be read from

• In comparison to RAM, it has a much smaller capacity

Worked Example

Quinn has 512 kilobytes of ROM and 16 gigabytes of RAM in her computer
1. Describe the purpose of the ROM in Quinten computer [2]

2. Describe the purpose of the RAM in Quinten computer [2]

Answer
1. ROM
• Store start-up instructions/bootstrap

• Used to start the computer

2. RAM

• Stores the parts of the OS / programs that are running


• Stores data currently in use

• ...for access by the CPU

NB: Do not confuse the purpose with characteristics, describe what it does, not what it is
Secondary Storage

• Storage devices are non-volatile secondary storage, that retain digital data within a
computer system

• They provide a means of storing, accessing, and retrieving data, which can include
software applications, documents, images, videos, and more

• There are 3 types of storage:

o Magnetic

o Solid-state (flash memory)

o Optical
• Computer systems need both primary and secondary storage to operate

• Both types of storage play a crucial role in the operation of a computer system

• A quick comparison of primary and secondary storage shows:

Primary Secondary

Volatile (with the exception of ROM) Non-volatile

Small capacity Large capacity

• A computer needs secondary storage for long term storage of programs and data that
are currently not in use

• Secondary storage is needed as ROM is read only and RAM is volatile


• Secondary storage holds the programs and data whilst the computer is turned off (non-
volatile)
• Performance of secondary storage is slower than primary storage but capacity is
much higher which makes it perfect for backup & archive of data files

Characteristics

• Capacity - What is the maximum amount of data that can be stored?

• Speed - How fast can data be read from and written to? (R/W)

• Cost - How much does it cost?


• Portability - How easy is it to move around? What is the physical size? Weight?
• Durability - How robust is the storage?

• Reliability - What is the probability that the device will consistently perform its
function?

Worked Example

A games console has secondary storage.

State, using an example, why the games console needs secondary storage [2]

Answer
• To store data once the power is turned off / permanently // for non-volatile storage

• Examples could include:


o Storing games

o Save games

o User data/profiles

o Downloaded content/applications/updates
Magnetic Storage

• Magnetic storage is a type of non-volatile media that uses magnets (polarity) to store
binary 0s and 1s

• A magnetic hard disk is made up of several metal discs coated with a magnetic material

o These are called platters

o Iron particles on each platter are magnetized to represent a 0 or 1

• Each platter is divided by concentric circles creating several tracks and wedge
shaped sectors

• Where they intersect is a track sector


• The hard drive spins the metal disk(s) at a high speed (typically around 5400-7200
RPM) using a motor

• A read/write arm, controlled by an actuator, moves the head over the surface of the disc
to the location of the data
• The data is read/written using electromagnets

Advantages Disadvantages

Capacity - High storage Durability - Moving parts can get damaged if dropped

Cost - Low per gigabyte Portability - Heavy & bulky making them less convenient for transpor

Speed - Moderate read/write access Reliability - Prone to mechanical failure

Noise - Loud (spinning disks)


Solid-state (Flash Memory)

• Solid-state (flash memory) storage is a type of non-volatile media that uses electronic
circuits to store binary 0s and 1s

• Examples of solid state storage devices include:

o Solid state drives (SSD) - replacing magnetic hard drives as a computers primary
secondary storage device as capacity increases and cost decreases

o USB flash memory - most common form of portable storage device

• It uses NAND and NOR gates in electrical circuits to persistently control the flow of
electrons

• Solid-state (flash memory) is memory made up of tiny cells that can contain one bit of
data (1 or 0)

• Each cell contains a transistor that acts as a switch that can be turned on or off

• The transistor contains two main parts:

o Control gate - top layer of transistor, connects to circuit and controls if current
can flow through the transistor

o Floating gate - can hold a charge (like a tiny rechargeable battery) and is
sandwiched between two layers of insulating material (Oxide)

• To store data a charge is placed on the floating gate

o A high voltage is applied to the control gate, which allows electrons to


be pushed through the oxide layer and onto the floating gate

• To remove data, a high voltage charge is applied in the opposite direction, pulling the
electrons off the floating gate
Advantages Disadvantages

Capacity - Medium/high storage Cost - Very high per gigabyte

Speed - Very fast read/write access Reliability - Limited read/write cycles

Durability - No moving parts

Portability - Small and no moving parts

Noise - Silent
Optical Storage

What is optical storage?

• Optical storage is a type of non-volatile media that uses lasers to burn the surface of a
disk, creating pits and lands suitable for storing binary 0s and 1s

• Examples of optical storage include:

o Blu-rays have the largest capacity

o CDs have the lowest capacity


o CD-R are read-only (you cannot save data on to them)

o CD-RW can be written to and read from


o DVD-RW can be written to and read from

• All optical devices work by shining a laser at the disk and processing the reflection

• An arm moves the laser across the surface of the disk

• In CD-Rs a laser burns the data, permanently on to the disk, by creating pits and lands

• The laser is also used to read the data from the pits and lands

• When the laser light hits the point where the pit changes into a land or vice versa
the light scatters and is not reflected back as well.

• This is captured by a sensor and can be interpreted as a change in the binary value

Advantages Disadvantages

Cost - Very low per gigabyte Capacity - Very low

Durability - No moving parts Speed - Very slow read/write access

Portability - Small and no moving parts Reliability - Prone to scratches


Noise - Silent

Worked Example
Zarmeen has purchased a new tablet computer. The tablet has an internal secondary storage
device.
The storage device is a solid state device.

1. Give three benefits of the tablet having a solid state device instead of a magnetic
device [3]
2. Give two drawbacks of the tablet having a solid state device instead of a magnetic
device [2]
Answers

• Benefits

o Faster access / read/write speeds

o Smaller in physical size

o More durable // no moving parts

• Drawbacks

o More expensive (per gigabyte)


o Smaller capacity (usually)

o Limited number of read/write cycles

Guidance

• Portable is not enough on it's own


• No moving parts is not enough on it's own
Virtual Memory

• Virtual memory is an extension of primary storage (RAM) located on secondary


storage
• In situations where RAM is close to being full, virtual memory can be used so that the
computer remains operational

• Programs and data not currently being executed are transferred to virtual memory
• Programs and data are transferred back to RAM when they are needed

• Programs are stored as pages of data

• Pages of data are transferred between RAM and virtual memory when needed

• Virtual memory is much slower than RAM and its use will impact negatively on system
performance

• To avoid the use of virtual memory, increase the size of the RAM

Examiner Tips and Tricks

Virtual memory does not increase the actual size of RAM. It creates temporary space on
secondary storage. It makes the system usable, not faster.

Example

• In the example above, the computer is turned on and the elements of the operating system
are loaded into RAM
• The user opens some spreadsheet and video editing software but RAM is full
• The program not currently being used (video editing) is transferred to virtual memory

• When the user wants to use the video editing software again, it is transferred back from
virtual memory to RAM

Case Study

A student uses software to create 3D models.

• 3D modelling often means processing large amounts of data

• This takes up a large amount of RAM

• If there is not enough physical RAM, virtual memory is used to:

o Extend the RAMs capacity


o Ensure the software does not freeze/crash when RAM gets full

Worked Example

A computer only has 4GB of RAM, Anesu says that virtual memory can be used instead of
adding more RAM.

1. Explain how virtual memory can compensate for the lack of RAM in Anesu's
computer [3]

2. Explain why it would be beneficial for Anesu to get more RAM instead of relying on
virtual memory [2]
How to answer these questions

1. What is the definition of virtual memory? how does it work?

2. What is the downside of using virtual memory? turn this into an advantage of adding
more RAM

Answers

• How can Virtual Memory compensate


o Virtual Memory is used when RAM is full
o ...part of the secondary storage used as (temporary) RAM

o Data from RAM is moved to the secondary storage/Virtual Memory (to make
space in RAM)

o RAM can then be filled with new data

o When data in Virtual Memory is needed it is moved back to RAM

• Benefit of more RAM

o More RAM will improve the performance of the computer // More RAM will
speed up the access to data

o Virtual Memory is slower to access than RAM direct (because it has to go back to
RAM first)

o Moving data between RAM and VM takes processor time


Cloud Storage

• Cloud storage is a term to describe long-term (secondary) storage of data that resides in
a remote location, accessible only via a wide area network (Internet)

• Data is stored on remote servers, typically using magnetic storage (HDD), but
increasingly using solid state (SSD)

Advantages Disadvantages

Reliability - Access data anywhere, any time, from


Cost - Typically a monthly/yearly subscription plan
any device

Security - Automatic backups Availability - No access without an internet connection

Capacity - Endless storage space (cost permitting),


uses less space on own device

Collaboration - Multiple people can access the


same file at the same time
Advantages of Cloud Storage

• Cloud storage offers several advantages over storing data on a local secondary storage
device

Benefit Explanation

• Data can be accessed from anywhere

• Data can be accessed by anyone with the relevant permissions, making it quick to
Accessibility
share files and collaborate with others

• Data can be accessed on any device with an internet connection

• Cloud storage providers allow customers to increase or decrease their storage


Scalability
capacity as needed

• Cloud storage providers often use multiple servers to store and backup data, reducing
Reliability
the risk of data loss due to hardware failure

• Cloud storage providers offer advanced security features, such as


data encryption and multi-factor authentication multi-factor authentication, to
Security protect user data from unauthorised access

• There is no need to hire specialist staff as IT services being provided by the cloud
storage provider

• You also do not need to purchase local secondary storage devices

• One cloud storage centre is more environmentally friendly than millions of individual
servers

• There are some drawbacks to using cloud storage

o If the user has a slow or unreliable internet connection they would have
problems accessing their files

o If you are storing a lot of data it can be expensive

▪ You have to pay the cloud storage provider

▪ You may need to commit to an annual subscription


▪ You may have to pay for high download and upload data transfer limits

o Data being sent over the internet has the potential to be intercepted
o Security is managed by the cloud storage provider which means the user does not
have complete control over it but is still legally responsible for ensuring
any personal and sensitive data is secure

Worked Example

A school currently stores all of their data on local servers. They are considering upgrading their
system to utilise cloud storage.

Explain two disadvantages to the school of storing their data in the cloud.

[4]

• You need a constant internet connection [1]

• if the internet connection failed, teachers would not be able to access lesson files [1]

• if the internet connection failed, teachers would not be able to access student data/take
electronic registers [1]

• if the internet connection failed, students would not be able to access their
work/coursework [1]

• Reliant on third party to carry out security procedures [1]

• but the school is still legally responsible if data is accessed by unauthorised people [1]
• Data stored on the cloud could be hacked or intercepted [1]

Explain two advantages to the school of storing their data in the cloud.
[4]

• Additional storage can be purchased if needed [1]

• The cloud hosting company provides back up [1]

• The cloud hosting company provides security [1]

• Data can be accessed from anywhere and from any device provided there is an internet
connection [1]

• So teachers would be able to access data from home [1]

• So students would be able to access work from home [1]


Network Hardware

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)

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
MAC Addresses

• 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

• 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 by full stops

• Each block is one byte (8 bits), each address is 4 bytes (32 bits)

• IPv4 provides over 4 billion unique addresses (232), however, with over 7 billion people
and countless devices per person, a solution was needed

IPv6

• Internet Protocol version 6 is represented as 8 blocks of 4 hexadecimal digits, separated


by colons

• Each block is 2 bytes (16 bits), each address is 16 bytes (128 bits)

• IPv6 could provide over one billion unique addresses for every person on the planet (2128)

Worked Example

Computers in a network can be identified using both IP addresses and MAC addresses.
Describe two differences between IP addresses and MAC addresses [2]

Answer

• IP address is dynamic/can change // MAC address is static/cannot change


• IP address is used to communicate on a WAN/Internet // MAC address is used to
communicate on a LAN
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

Image of a router

Image of how a router connects LANs to other networks


Worked Example

State 3 tasks carried out by a router [3]

To answer the question you must simply identify 3 tasks a router does

• Send and Receive packets of data


• Connect a local network to the internet

• Assign IP addresses to nodes/devices

• Converts packets from one protocol to another


SOFTWARE

System Software & Application Software

• Software can be broken down in to two categories, system and application software

Examiner Tips and Tricks

System Software

• System software is software essential for the operation of the computer system

• It gives users a platform to run applications and carry out tasks

• Examples of system software include:

o The operating system

o Utility software

Utility software

• Utility software is software designed to


help maintain, enhance and troubleshoot/repair a computer system

• Designed to perform a limited number of tasks


• Interacts with the computers hardware, for example, secondary storage devices
• Some utility software comes installed with the operating system
• Examples of utility software and their function are:

o Defragmentation (maintain)

o Compression (enhance)

o Encryption (enhance)
o Task manager (troubleshoot/repair)

Application Software

• Application software is software chosen by a user to help them carry out a specific task

• Installed on top of system software and is user-chosen to best suit individual


requirements
• Common categories of application software include:

o Productivity - get things done efficiently (word processors, spreadsheets &


presentation)

o Communication - stay connected (email, browser, messaging)

o Entertainment - Watch movies, play games or listen to music


Operating Systems

An operating system (OS) is software that manages computer hardware and provides a
platform for running applications

• It provides an interface between the user and the hardware in a computer system

• It hides the complexities of the hardware from the user, for example:

o A user does not need to know 'where' on secondary storage data is kept, just that it
is saved for when they want it again

• An operating systems main functions can be divided in to eight key areas

In the exam, you’re often asked to name and describe two functions of an OS. Don’t waffle. Say
what the OS does and why, for example:

“Memory management [1] allocates RAM between programs so they run efficiently [1].”

1. File Management
• File management is a process carried out by the operating system creating, organising,
manipulating and accessing files and folders on a computer system
• The OS manages where data is stored in both primary and secondary storage

• File management gives the user the ability to:

o Create files/folders

o Name files/folders

o Rename files/folders

o Copy files/folders

o Move files/folders
o Delete files/folders

• The OS allows users to control who can access, modify and delete files/folders
(permissions)
• The OS provides a search facility to find specific files based on various criteria

2. Handling Interrupts

• Interrupt events require the immediate attention of the central processing unit

• In order to maintain the smooth running of the system, interrupts need to be handled and
processed in a timely manner
• For example, if a user clicks cancel on a file conversion process, a signal is sent from the
mouse, interrupts the processor, and the operating system will trigger the cancellation
routine

3. User Interface

• A user interface is how the user interacts with the operating system

• Examples of user interfaces include:

o Command Line Interface (CLI)

o Graphical User Interface (GUI)

o Menu
o Natural language (NLI)

What is a command line interface?

• A Command Line Interface (CLI) requires users to interact with the operating system
using text based commands

• CLIs are more commonly used by advanced users

• Examples of CLIs are MSDOS (Microsoft Disk Operating System) and Raspbian (for
Raspberry Pi)

What is a graphical user interface?

• A Graphical User Interface (GUI) requires users to interact with the operating system
using visual elements such as windows, icons, menus & pointers (WIMP)
• GUIs are optimised for mouse and touch gesture input
• Examples of GUIs are Windows, Android and MAC OS

What is a menu interface?

• A menu interface is successive menus presented to a user with a single option at each
stage

• Often performed with buttons or a keypad

• Examples include

o Chip and pin machines


o Vending machines

o Entertainment streaming services


What is a natural language interface?

• A natural language interface (NLI) uses the spoken word to respond to spoken or textual
inputs from a user

• Examples include

o Virtual assistants - Amazon Alexa, Google Assistant, Siri

o Search engines

o Smart home devices


Advantages and disadvantages of user interfaces

Interface Advantages Disadvantages

• Uses less system resources • Requires users to remember


commands
Command line • Useful for automation of tasks
(CLI) • Typing errors are common
• Commands are often faster to type than
navigating menus • Less intuitive than GUI

• Uses more system resources


• Intuitive and user-friendly
• Can be slower to find and exe
• Requires no previous knowledge to use
Graphical (GUI) commands
• Information is visual, making it easier to
• Can be frustrating when doin
understand
repetitive tasks

Menu • Simplicity • Limited flexibility


• Efficiency • Accessibility issues

Natural language • Can be used by people with disabilities • Not always reliable
(NLI) • Intuitive • Privacy concerns

4. Peripheral Management & Device Drivers

• Peripheral management is a process carried out by the operating system managing the
way peripherals (hardware) interact with software

• The OS allocates system resources to peripherals to ensure efficient operation


• Peripheral management makes plug-and-play (PnP) functionality
possible, automatically detecting and configuring new peripherals without the need
for manually installing device drivers or power cycling the system

Device Drivers

• A device driver is a piece of software used to control a piece of hardware


• Peripherals require device drivers in order to be used by the operating system

• The OS has generic device drivers built in which makes basic compatibility possible
and enables plug-and-play (PnP)
• In order for hardware to be used to its maximum capacity, often a separate device
driver must be downloaded from the manufacturer
• Device drivers are OS specific and are regularly updated

5. Memory management?

• Memory management is a process carried out by the operating system allocating main
memory (RAM) between different programs that are open at the same time

• The OS is responsible for copying programs and data from secondary to primary
storage as it is needed

• Programs and data require different amounts of RAM to operate efficiently and the
OS manages this process
• RAM is allocated based on priority and fairness, for example, system applications
(essential) may have a higher priority than user applications
• The OS dynamically manages the memory, adjusting allocation as needed to maintain
optimal system performance
• Memory management makes multitasking possible

6. Process Management

• Multitasking is a process made possible by the OS simultaneously managing system


resources (memory, CPU etc) to give a user the perception of being able to use
multiple programs at the same time

• The OS splits tasks and allocates system resources based on a priority

• The CPU can only execute one instruction at a time, it can can execute billions of them
in one second.

• This makes it appear that multiple programs are running at the same time

ExamTips and Tricks

Just naming functions (e.g. “File management, memory management…”) won’t earn full
marks. You must explain each one using exam-friendly language like “allocates,” “controls,”
or “manages.”

7. Providing a Platform for Running Applications

• Operating systems provide a platform on which application software can run, this is
mainly by allowing software access to system resources

• For example, if a computer game has intensive graphics and online play, the operating
system will grant it access to the GPU and the network card
Organisation of application layer, operating system components, and input/output

8. Providing System Security

• Operating systems provide various security features such as password-protected system


accounts, a firewall, virus scanning and file encryption

• Password-protected system accounts are a very common feature in operating systems

• System accounts can also be restricted from performing certain actions, e.g. editing
network settings, installing unapproved software, changing the account settings of other
users
9. User Management

• User management is a process carried out by the operating system enabling different
users to log onto a computer

• The OS is able to maintain settings for individual users, such as desktop backgrounds,
icons and colour schemes

• A system administrator is able to allocate different access rights for different users on a
network

Worked Example

Ella uses her computer to create artwork for a magazine

Ella makes use of system software.

One type of system software is the operating system.

Identify and describe two functions of an operating system [6]


How to answer this question

• Break down the 6 marks, 1 mark each for identifying a function of the operating system.
For each function you need to make 2 points about how they work

Answer

• Memory management

o Allocates memory to programs currently in use

o Gets data from RAM

o Stores data in RAM

• File management
o Creating/editing/renaming files

o Creating/editing/renaming folders

o Movement of files/folders
Hardware, Firmware & the Operating System

How does application software, the operating system and hardware communicate?

• Application software talks to the operating system, this allows it to interact with
the hardware

• The hardware processes and sends the information to the operating system which talks
directly to the applications software

• This process is repeated while application software is in use

Examiner Tips and Tricks

Always describe the communication flow as:


Application software → Operating System → Hardware.
The OS acts as a bridge. Saying software “talks to hardware” without the OS in between will
lose you marks.
Firmware

• Firmware is embedded directly in to the hardware of a device, to make them function

• When a computer is turned on, it has to explore the ROM for its initial boot-up
instructions, these are contained in a Bootstrap loader

• The initial process is handled by the basic input/output system (BIOS) which is known
as firmware

• Once start-up is complete, instructions are sent to RAM to be processed by the operating
system

• This layer ensures that hardware devices e.g. keyboard and mouse are available and can
be communicated directly by the operating system
• Firmware translates between the hardware and the software
Interrupts

• An interrupt is a signal for the CPU to stop what it is currently doing and do
something else as a higher priority

• The CPU is in a continuous loop of carrying out the fetch-decode-execute cycle, however
there are occasions when this needs to be interrupted

How is an interrupt generated?

• An interrupt can be generated by hardware and software:

o Hardware - this is caused by a hardware device such as a hardware failure

o Software - this occurs when an application stops or requests services from the OS
• Interrupts are added to an area called the interrupt service routine

• The interrupt service routine holds instructions that will need to be fetched, decoded and
executed to complete the commands of the interrupt
• The contents of the registers within the CPU cannot be lost by an interrupt, so contents
are copied to a reserved area in RAM called a stack
• Contents are added to the top of the stack, which will save them for later retrieval when
the interrupt is complete
• The interrupt will be executed instead of the original instructions

In exam answers, always mention that the CPU saves the current state to a stack before
executing the ISR. Just saying “the CPU stops” won’t earn full marks, you must include the idea
of resuming the original task after the interrupt.

Hardware interrupts examples


o power button may have been pressed

o moving the mouse

o clicking an icon to open a new program

o keyboard presses e.g. ctrl, alt, delete

Software interrupts examples

• Software

o a program is not responding


o division by zero
o two processes trying to access the same memory location

Worked Example

Describe the purpose of an interrupt in a computer system

[4]
Answer

Four from:

• Used to attend to certain tasks/issues

• Used to make sure that vital tasks are dealt with immediately

• The interrupt/signal tells the CPU/processor (that its attention is required)

• A signal that can be sent from a device (attached to the computer)

• A signal that can be sent from software (installed on the computer)

• The interrupt will cause the OS/current process to pause


• The OS/CPU/ISR will service/handle the interrupt

• They have different levels of priority

• After the interrupt is serviced, the (previous) process is continued

• It enables multi-tasking to be carried out on a computer

• A valid example of an interrupt e.g. ‘out of paper’ message for a printer


Programming languages

Cambridge IGCSE 0478 expects you to explain the difference between low-level and high-level
languages, and name advantages and disadvantages of each. This page is structured to mirror
the format used in real exam questions.

• A programming language acts as a bridge between what humans understand and what
a computer understands

• Early computers were complex and instructions would have to be in written in binary
code, 0s and 1s

• This process was slow, taking days to program simple tasks

• Over time, new generations of programming languages have enabled people to


become faster and more efficient at writing programs as they resemble human
language
• Generations of programming languages can be split in to two categories:

o Low-level

▪ First generation

▪ Second generation

o High-level

▪ Third generation

Low-Level Languages
• A low-level language is a programming language that directly translates to machine
code understood by the processor
• Low-level languages allow direct control over hardware components such
as memory and registers

• These languages are written for specific processors to ensure they embed the correct
machine architecture

First generation
• Machine code is a first-generation language

• Instructions are directly executable by the processor

• Written in binary code


Second generation
• Assembly code is a second-generation language

• The code is written using mnemonics, abbreviated text commands such as LDA (Load),
STA(Store)

• Using this language programmers can write human-readable programs that


correspond almost exactly to machine code

• One assembly language instruction translates to one machine code instruction

• Needs to be translated into machine code for the computer to be able to execute it

Advantages Disadvantages

Complete control over the system


Difficult to write and understand
components

Occupy less memory and execute faster Machine dependent

Direct manipulation of hardware More prone to errors

Knowledge of computer architecture is key to program


effectively

When describing low-level languages, don’t just say “they are faster” , you must say they allow
direct control over hardware or memory, which leads to greater efficiency. Be specific to earn
the mark.

High-Level Languages
• A high-level programming language uses English-like statements to allow users to
program with easy to use code
• High-level languages allow for clear debugging and once programs are created they
are easier to maintain

• High level languages were needed due to the development of processor speeds and
the increase in memory capacity

• One instruction translates into many machine code instructions


• Needs to be translated into machine code for the computer to be able to execute it

• Examples of high-level languages include:

o Python
o Java
o Basic

o C++

Advantages Disadvantages

Easier to read and write The user is not able to directly manipulate the hardware

Easier to debug Needs to be translated to machine code before running

Portable so can be used on any computer The program may be less efficient

One line of code can perform multiple commands


Assembly Language

Assembly language is a second generation, low-level language designed to simplify the writing
of machine code instructions for programmers

• Programmers use assembly language for the following reasons:

o Need to make use of specific hardware or parts of the hardware

o To complete specific machine dependent instructions

o To ensure that too much space is not taken up in RAM


o To ensure code can completed much faster

• Assembly languages allow programmers to program with mnemonics. e.g.


o LDA Load - this will ensure a value is added to the accumulator

o ADD Addition - this will add the value input or loaded from memory to the value
in the accumulator

o STO, Store - stores the value in the accumulator in RAM

• Assembly language allowed continuation of working directly with the hardware but
removed an element of complexity

• A mnemonic is received by the computer and it is looked up within a specific table

• An assembler is needed to check the word so that it can be converted into machine code

• If a match from the word is found e.g. STO the word is replaced with the relevant binary
code to match that sequence

Worked Example

Complete the table to identify whether each example of computer code is High-level, Assembly
language or Machine code

Computer code High-level Assembly Machine code

10110111

00110110

11100110

FOR X = 1 to 10
PRINT x
NEXT X

INP X

STA X

LDA Y

[3]

Answer

Computer code High-level Assembly Machine code

10110111

00110110 X

11100110

FOR X = 1 to 10

PRINT x X

NEXT X

INP X
STA X X

LDA Y
Translators, Compilers & Interpreters

Translator

• A translator is a program that translates program source code into machine code so that
it can be executed directly by a processor

• Low-level languages such as assembly code are translated using an assembler

• High-level languages such as Python are translated using a compiler or interpreter

Compiler
• A compiler translates high-level languages into machine code all in one go

• Compilers are generally used when a program is finished and has been checked for
syntax errors

• Compiled code can be distributed (creates an executable) and run without the need for
translation software
• If compiled code contains any errors, after fixing, it will need re-compiling

Advantages Disadvantages

Speed of execution Can be memory intensive

Optimises the code Difficult to debug

Original source code will not be seen Changes mean it must be recompiled

It is designed solely for one specific processor

Interpreter

• An interpreter translates high-level languages into machine code one line at a time

• Each line is executed after translation and if any errors are found, the process stops

• Interpreters are generally used when a program is being written in the development stage

• Interpreted code is more difficult to distribute as translation software is needed for it


to run


Advantages Disadvantages

Stops when it finds a specific syntax error in the code Slower execution

Easier to debug Every time the program is run it has to be translated

Require less RAM to process the code Executed as is, no optimisation

Worked Example

A computer program is written in a high-level programming language.


(a) State why the computer needs to translate the code before it is executed.[1]

(b) Either a compiler or an interpreter can translate the code. Describe two differences between
how a compiler and an interpreter would translate the code.[2]
How to answer this question

• (a) what time of language does a computer understand?

• (b) the keyword is 'how'

Answer

(a)

• To convert it to binary/machine code

• The processor can only understand machine code


(b)

• Compiler translates all the code in one go...

• ...whereas an interpreter translates one line at a time


• Compiler creates an executable...
• ...whereas an interpreter does not/executes one line at a time

• Compiler reports an error at the end...

• ...whereas an interpreter stops when it finds an error


Tools & Facilities in IDEs

IDE

An Integrated Development Environment (IDE) is software designed to make writing high-


level languages more efficient

• IDEs include tools and facilities to make the process of creating/maintaining code
easier, such as:

o Editor

o Error diagnostics

o Run-time environment
o Translators

Editor

• An editor gives users an environment to write, edit and maintain high-level code
• Editors can provide:

o Basic code formatting tools - changing the font, size of the font and making text
bold etc

o Prettyprint - using colour to make it easier to identify keywords, for example


'print', 'input' and 'if' in Python
o Code editing - auto-completion and auto-correction of code, bracket matching
and syntax checks
o Commenting code - allows sections of code to be commented out easily to stop it
from being run or as comments on what the program is doing

Error-diagnostics
• Tools that help to identify, understand and fix errors in code, such as:

o Identifying errors - highlight particular areas of code or provide direct error


messages where the error may have appeared e.g. indentation errors etc

o Debugger - provide a 'step through' command which provides step by step


instructions and shows what is happening to the code line by line, useful for
finding logic errors

Run-time environment

• Gives users the ability to run and see the corresponding output of a high-level language

Translator

• Built in to compile or interpret code without the need for an extra piece of software
The Internet & its Uses

The Internet & the World Wide Web

The Internet
• The Internet is a global network of networks

• The Internet is the most well-known Wide Area Network (WAN)

• The Internet is the infrastructure used to provide connectivity to the World Wide Web

The World Wide Web

• The world wide web, or simply the web, is a collection of websites and web pages that
are accessed using the internet

• It was created in 1989 by Tim Berners-Lee, who envisioned it as a way


to share and access information on a global scale

• The web consists of interconnected documents and multimedia files that are stored
on web servers around the world

• Web pages are accessed using a web browser, which communicates with web servers to
retrieve and display the content

NB: Students often say the web is the Internet. It’s not, the Internet includes email, FTP, VoIP,
and other services too, not just websites.
HTTP & HTTPS

• Hypertext Transfer Protocol (HTTP) allows communication between clients and servers
for website viewing

• HTTP & HTTPS are protocols, a set of rules governing communication between devices
on a network

• HTTP allows clients to receive data from the server (fetching a webpage) and send
data to the server (submitting a form, uploading a file)

• HTTPS works in the same way as HTTP but with an added layer of security

• All data sent and received using HTTPS is encrypted

• HTTPS is used to protect sensitive information such as passwords, financial


information and personal data

NB:A common 2-mark question is:


“Describe one difference between HTTP and HTTPS.”

To get both marks, say:

“HTTPS encrypts the data being transmitted to keep it secure, unlike HTTP.”
Web Browser

• A web browser is a piece of software used to access and display information on the
internet

• A web browser displays web pages by rendering hypertext markup language


(HTML)

• Web browsers interpret the code in HTML documents and translate it into a visual
display for the user

Functions of a web browser

Function Description

Render HTML Display the web page

Provide navigation tools E.g. back/forward buttons and home button, to help users move between pages

Storing bookmarks &


Allow users to save links to frequently visited websites and access them easily
favourites

Storing cookies Cookies

Record user history Allow users to quickly revisit recently viewed web pages

Provide address bar A place for user to type in the URL (link to URL page) of a web page to visit

Allow multiple web pages to be open at once so users can quickly switch
Multiple tabs
between them
Loading a Web Page

• Web pages are held on web servers (1), known as 'hosting'

• To access a web page on a web server, a web browser is used

• In the browser, a user enters a web page URL (2)


• The browser sends the domain name to a DNS (3)

• The browser connects to the web server and requests to access the page

• HTML (4) is transferred and rendered by the browser, displaying the web page

Web Servers

• A web server is a remote computer that stores the files needed to display a web
page on the Internet

• Web servers are generally available 24/7 and security is managed by the owner of the
hardware

• Web servers provide access to multiple users at the same time

Uniform Resource Locator (URL) (2)

• A Uniform Resource Locator (URL) is a unique identifier for a web page, known as
the website address

• It is text based to make it easier to remember

• A user enters a URL into a web browser to view a web page

• An example of a URL is:


[Link]

• A URL can typically be split into three parts:

o Protocol

o Domain name

o Web page/file name

• Using the example about the URL would be split as follows:


Communication method to transfer data between
Protocol https
client and server

Domain name [Link] Name of the server where the resource is located

Web page/file /igcse/computer-


Location of the file or resources on the server
name science/cie/23/revision-notes/

Domain Name System (DNS) (3)

• The Domain Name System (DNS) can be thought of as the Internet's equivalent to
a phone book

• It is essentially a directory of domain names and is used to translate human-readable


domain names to the numeric IP addresses that computers use

• When you type a URL into your browser, the DNS translates the domain name into its
associated IP address so your computer can connect to the server hosting the website

• Without DNS, we would have to remember the IP address of every site we want to visit

HTML (4)
• Hypertext Markup Language (HTML), is the foundational language used to structure
and present content on the web

• HTML consists of a series of elements, often referred to as "tags"


• Most tags are opened and closed e.g. <html> and </html>, whereas some tags are only
opened e.g. <img> and <link>
Structure

• HTML is used to define the basic structure of a webpage by organising content


into sections such as headers, paragraphs, and footers
• The <html> tag is the root element of an HTML page and includes all other HTML
elements used to create a page structure
%%%%% This is a simple website for Progress Christian College. Feel free to edit it to your
liking. You are not expected to write the code in your notebook%%%


• <!DOCTYPE html>
• <html>
• <head>
• <title>Progress Christian College</title>
• </head>
• <body style="background-color: blue;">>
• <header>
• <h1>Welcome to Progress Christian College</h1>
• </header>
• <main>
• <section>
• <h2>About Me</h2>
• <p>This is a paragraph about me.</p>
• </section>
• <section>
• <h2>My Projects</h2>
• <p>This is a paragraph about my projects.</p>
• </section>
• </main>
• <footer>
• <p>Contact: myemail@[Link]</p>
• </footer>
• </body>
• </html>

• In this example, HTML is used to create a structure with a header, two sections in
the main body, and a footer
• Other examples of HTML being used for structure include:

o Creating lists to structure information

o Positioning of text on the screen

o Embedding media and interactive elements

Present

• HTML is also used to present and display information in a visually meaningful way
• The content layer of a web page is made up of HTML elements such as headings (<h1>,
<h2>, etc.), paragraphs (<p>), links (<a>), images (<img>), and more

• This layer is mainly handled by CSS (Cascading Style Sheets)

Worked Example

A company sells products over the Internet.

Explain how the information stored on the company’s website is requested by the customer, sent
to the customer’s computer and displayed on the screen.

[7]

Answer
Seven from:

Requested

• a web browser is used

• user enters the URL / web address (into the address bar) // clicks a link containing
the web address // clicks an element of the webpage

• the URL / web address specifies the protocol

• protocols used are Hyper Text Transfer Protocol (HTTP) / Hyper Text Transfer
Protocol Secure (HTTPS)

Sent

• the URL / web address contains the domain name

• the domain name is used to look up the IP address of the company

• the domain name server (DNS) stores an index of domain names and IP addresses
• web browser sends a request to the web server / IP address

Received

• Data for the website is stored on the company’s web server

• webserver sends the data for the website back to the web browser

• web server uses the customer’s IP address to return the data

• the data is transferred into Hyper Text Mark-up Language (HTML)


• HTML is interpreted/rendered by the web browser (to display the website)
Cookies

• A cookie is a tiny data file stored on a computer by browser software that holds
information relating to your browsing activity

• Typically a cookie will contain:

o Browsing history - what websites you have visited

o Login information - usernames & passwords

o Preferences - language/font size/themes


• The two types of cookie are:

o Session - Created and replaced every time a user visits a website


o Persistent - Created and saved the first time a user visits a website, retained until
they expire

What is the Privacy and Electronic Communications Regulations (2003)?

• The Privacy and Electronic Communications Regulations (2003) is a law that governs
the use of cookies

• Any website that wants to store a cookie must:

o Tell users the cookies are there

o Explain what the cookies are doing

o Obtain users consent to store the cookie


Digital Currency

• Digital currency is one that only exists in digital form

• Currency is stored in digital wallets or accounts, there is no physical bank


notes or coins

• It can be exchanged online to pay for goods and services or for transferring money
internationally

• Unlike traditional currencies, digital currency is not controlled or monitored by central


banks or government (decentralised)

• This can make digital currencies highly volatile, their value can fluctuate rapidly in a
short period of time
• Digital currency investment can be risky due the volatility

• Digital currency can also be known as crypto currency

• All transactions made using crypto currency are publicly available and tracked
using cryptography

• Examples include

o Bitcoin
o Ethereum

NB: In the IGCSE exam digital currency and crypto currency are the same thing, although in real
life they are not strictly the same thing.
Blockchain

• A blockchain is a digital ledger that records every transaction made with a particular
digital currency

• Transactions are time-stamped and added to the blockchain in


a permanent and unalterable way
• A blockchain is a decentralised technology, meaning that it is not controlled by a single
entity or authority
o Instead, every participant in the network has a copy of the ledger and
can verify the transactions independently

• The blockchain is made up of "blocks" of transactions that are linked together in a


"chain" using cryptographic algorithms
o This creates a secure and tamper-proof record of every transaction made with
the digital currency

• Each transaction in the blockchain must be verified by multiple participants in the


network

o This verification process ensures that the transaction is legitimate and prevents
any fraudulent activity
Cyber Security Threats

Forms of cyber security threat

• Computers face a variety of forms of attack and they can cause a large number of issues
for a network and computers

• The main threats posed are:

o Brute-force attacks

o Data interception & theft


o DDos attack

o Hacking
o Malware

o Pharming

o Phishing

o Social engineering

Brute Force Attack


• A brute force attack works by an attacker repeatedly trying multiple combinations of a
user's password to try and gain unauthorised access to their accounts or devices
• An example of this attack would be an attacker finding out the length of a PIN code, for
example, 4-digits

• They would then try each possible combination until the pin was cracked, for example
o 0000

o 0001

o 0002

• A second form of this attack, commonly used for passwords is a dictionary attack

• This method tries popular words or phrases for passwords to guess the password as
quickly as possible

• Popular words and phrases such as 'password', '1234' and 'qwerty' will be checked
extremely quickly.

Data interception
• Data interception and theft is when thieves or hackers
can compromise usernames and passwords as well as other sensitive data

• This is done by using devices such as a packet sniffer

• A packet sniffer will be able to collect the data that is being transferred on a network

• A thief can use this data to gain unauthorised access to websites, companies and more

DDoS Attack

• A Distributed Denial of Service Attack (DDoS attack) is a large


scale, coordinated attack designed to slow down a server to the point of it
becoming unusable

• A server is continually flooded with requests from multiple distributed


devices preventing genuine users from accessing or using a service

• A DDoS attack uses computers as 'bots', the bots act as automated tools under the
attackers control, making it difficult to trace back to the original source

• A DDoS attack can result in companies losing money and not being able to carry out
their daily duties

• A DDoS attack can cause damage to a company's reputation

Hacking

• Hacking is the process of identifying and exploiting weaknesses in a computer system


or network to gain unauthorised access

• Access can be for various malicious purposes, such as stealing data, installing malware,
or disrupting operations

• Hackers seek out opportunities that make this possible, this includes:
o Unpatched software

o Out-of-date anti-malware
Malware

• Malware (malicious software) is the term used for any software that has been created
with malicious intent to cause harm to a computer system

• Examples of issues caused by malware include

o Files being deleted, corrupted or encrypted


o Internet connection becoming slow or unusable
o Computer crashing or shutting down

• There are various types of malware and each has slightly different issues which they
cause

Malware What it Does

• Contains code that will replicate and cause unwanted and unexpected events to occur

• Examples of issues a user may experience are


Virus o Corrupt files

o Delete data

o Prevent applications from running correctly

• Very similar to viruses, main difference being that they spread to other drives and comput
the network

• Worms can infect other computers from

Worms o Infected websites


o Instant message services

o Email

o Network connection

• Sometimes called a Trojan Horse


Trojan
• Trojans disguise themselves as legitimate software but contain malicious code in the backg

• Allow a person to spy on the users' activities on their devices

• Embedded into other software such as games or programs that have been downloaded
Spyware
from illegitimate sources

• Can record your screen, log your keystrokes to gain access to passwords and more

• Displays adverts to the user

Adware • Users have little or no control over the frequency or type of ads

• Can redirect clicks to unsafe sites that contain spyware

• Locks your computer or device and encrypts your documents and other important files
Ransomware
• A demand is made for money to receive the password that will allow the user to decrypt th
• No guarantee paying the ransom will result in the user getting their data back

Pharming

• Pharming is typing a website address into a browser and it being redirected to a 'fake'
website in order to trick a user into typing in sensitive information such as passwords

• An attacker attempts to alter DNS settings, the directory of websites and their matching
IP addresses that is used to access websites on the internet or change a users browser
settings

• A user clicks a link which downloads malware


• The user types in a web address which is then redirected to the fake website

How can you protect against it?


• To protect against the threat of pharming:
o Keep anti-malware software up to date

o Check URLs regularly

o Make sure the padlock icon is visible

Phishing

• Phishing is the process of sending fraudulent emails/SMS to a large number of people,


claiming to be from a reputable company or trusted source

• Phishing is an attempt to try and gain access to your details, often by coaxing the user to
click on a login button/link
Social Engineering

• Social engineering is exploiting weaknesses in a computer system by targeting the


people that use or have access to them

• There are many forms of social engineering, some examples include

o Fraudulent phone calls: pretending to be someone else to gain access to their


account or their details

o Pretexting: A scammer will send a fake text message, pretending to be from the
government or human resources of a company, this scam is used to trick an
individual into giving out confidential data

• People are seen as the weak point in a system because human errors can lead to
significant issues, some of which include:

o Not locking doors to computer/server rooms

o Not logging their device when they're not using it

o Sharing passwords

o Not encrypting data

o Not keeping operating systems or anti-malware software up to date


Worked Example

A company is concerned about a distributed denial of service (DDoS) attack.

(i) Describe what is meant by a DDoS attack.

[4]

(ii) Suggest one security device that can be used to help prevent a DDoS attack.[1]
Answers

(i) Any four from:

• multiple computers are used as bots; designed to deny people access to a website; a
large number / numerous requests are sent (to a server) …; … all at the same time

• the server is unable to respond / struggles to respond to all the requests


• the server fails / times out as a result.

(ii)
• firewall OR proxy server
Keeping Data Safe

Access Levels

• Access levels ensure users of a network can access what they need to access and do not
have access to information/resources they shouldn't

• Users can have designated roles on a network

• Access levels can be set based on a user's role, responsibility, or clearance level

o Full access - this allows the user to open, create, edit & delete files
o Read-only access - this only allows the user to open files without editing or
deleting
o No access - this hides the file from the user

• Some examples of different levels of access to a school network could include:

o Administrators: Unrestricted - Can access all areas of the network

o Teaching Staff: Partially restricted - Can access all student data but cannot
access other staff members' data

o Students: Restricted - Can only access their own data and files

• Users and groups of users can be given specific file permissions

Anti Malware

• Anti-malware software is a term used to describe a combination of different software to


prevent computers from being susceptible to viruses and other malicious software

• The different software anti-malware includes are

o Anti-virus
o Anti-spam

o Anti-spyware

How does anti-malware work?

• Anti-malware scans through email attachments, websites and downloaded files to search
for issues

• Anti-malware software has a list of known malware signatures to block immediately if


they try to access your device in any way
• Anti-malware will also perform checks for updates to ensure the database of known
issues is up to date

Authentication

• Authentication is the process of ensuring that a system is secure by asking the user
to complete tasks to prove they are an authorised user of the system

• Authentication is done because bots can submit data in online forms

• Authentication can be done in several ways, these include

o Usernames and passwords

o Multi-factor authentication
o CAPTCHA - see example below
Biometrics

• Biometrics use biological data for authentication by identifying unique physical


characteristics of a human such as fingerprints, facial recognition, or iris scans

• Biometric authentication is more secure than using passwords as:

o A biometric password cannot be guessed

o It is very difficult to fake a biometric password

o A biometric password cannot be recorded by spyware


o A perpetrator cannot shoulder surf to see a biometric password

Automating Software Updates


• Automatic software updates take away the need for a user to remember to keep software
updated and reduce the risk of software flaws/vulnerabilities being targeted in out of
date software
• Automatic updates ensure fast deployment of updates as they release

Communication

• One way of protecting data is by monitoring digital communication to check for errors
in the spelling and grammar or tone of the communication

• Phishing scams often involve communication with users, monitoring it can be effective
as:

o Rushed - emails and texts pretending to be from a reputable company are focused
on quantity rather than quality and often contain basic spelling and grammar
errors
o Urgency - emails using a tone that creates panic or makes a user feel rushed is
often a sign that something is suspicious

o Professionalism - emails from reputable companies should have flawless spelling


and grammar

URL
Checking the URL attached to a link is another way to prevent phishing attacks

• Hackers often use fake URLs to trick users into visiting fraudulent websites

o e.g. [Link] rather than [Link]


• If you are unsure, always check the website URL before clicking any links contained in
an email

Firewalls

• A firewall monitors incoming and outgoing network traffic and uses a set of rules to
determine which traffic to allow

• A firewall prevents unwanted traffic from entering a network by filtering requests to


ensure they are legitimate

• It can be both hardware and software and they are often used together to provide
stronger security to a network

o Hardware firewalls will protect the whole network and prevent unauthorised
traffic

o Software firewalls will protect the individual devices on the network, monitoring
the data going to and from each computer

What form of attack would this prevent?

• Hackers

• Malware

• Unauthorised access to a network

Privacy Settings

• Privacy settings are used to control the amount of personal information that is shared
online

• They are an important measure to prevent identity theft and other forms of online fraud
• Users should regularly review their privacy settings and adjust them as needed

Proxy Servers

• A proxy-server is used to hide a user's IP address and location, making it more difficult
for hackers to track them

• They act as a firewall and can also be used to filter web traffic by setting criteria for
traffic

• Malicious content is blocked and a warning message can be sent to the user

• Proxy-servers are a useful security measure for protecting against external security
threats as it can direct traffic away from the server
SSL

• Secure Socket Layer (SSL) is a security protocol which is used to encrypt


data transmitted over the internet

• This helps to prevent eavesdropping and other forms of interception

• SSL is widely used to protect online transactions, such as those involving credit card
information or other sensitive data

• It works by sending a digital certificate to the user’s browser

• This contains the public key which can be used for authentication

• Once the certificate is authenticated, the transaction will begin


Worked Example

(i) ) Identify a security solution that could be used to protect a computer from a computer virus,
hacking and spyware.
Each security solution must be different

Threat Security solution

Computer virus

Hacking

Spyware

[3]

(ii) Describe how each security solution you identified in (i) will help protect the computer.

[6]

Answers

(i)

Threat Security solution

Computer virus Anti-malware/virus (software) Firewall

Firewall

Hacking Passwords
Biometrics
Two-step verification

Anti-malware/virus (software)

Spyware Two-step verification

Firewall

(ii) Two marks for each description

• Anti-malware/virus (software)
o Scans the computer system (for viruses)

o Has a record of known viruses

o Removes/quarantines any viruses that are found

o Checks data before it is downloaded

o … and stops download if virus found/warns user may contain virus

• Anti-malware/spyware (software)

o Scans the computer for spyware


o Removes/quarantines any spyware that is found

o Can prevent spyware being downloaded

• Firewall

o Monitors traffic coming into and out of the computer system

o Checks that the traffic meets any criteria/rules set

o Blocks any traffic that does not meet the criteria/rules set // set
blacklist/whitelist
• Passwords

o Making a password stronger // by example

o Changing it regularly
o Lock out after set number of attempts // stops brute force attacks // makes it
more difficult to guess

• Biometrics
o Data needed to enter is unique to individual
o … therefore it is very difficult to replicate

o Lock out after set number of attempts

• Two-step verification

o Extra data is sent to device, pre-set by user


o … making it more difficult for hacker to obtain it

o Data has to be entered into the same system

o … so if attempted from a remote location, it will not be accepted

You might also like