[go: up one dir, main page]

0% found this document useful (0 votes)
25 views146 pages

Comp Notes

The document provides an overview of various internet-related topics including the differences between the Internet and the World Wide Web, the function of URLs, and the importance of HTTP and HTTPS protocols. It also covers digital currency, specifically cryptocurrencies and blockchain technology, as well as various cyber security threats and preventive measures against hacking and malware. Additionally, it emphasizes the significance of keeping data safe through proper security practices.
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)
25 views146 pages

Comp Notes

The document provides an overview of various internet-related topics including the differences between the Internet and the World Wide Web, the function of URLs, and the importance of HTTP and HTTPS protocols. It also covers digital currency, specifically cryptocurrencies and blockchain technology, as well as various cyber security threats and preventive measures against hacking and malware. Additionally, it emphasizes the significance of keeping data safe through proper security practices.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 146

Instagram, Twitter, DeviantArt, NG & Tumblr

Contents
Note From Author ..................................................................................................................................... 2

The Internet & The World Wide Web (WWW) ............................................................................... 3

Differences ................................................................................................................................................ 3

URLs ............................................................................................................................................................ 3

Parts ........................................................................................................................................................ 3

HTTP & HTTPS ...................................................................................................................................... 4

Web Browsers .......................................................................................................................................... 4

Common Features .............................................................................................................................. 4

Webpages Location & Retrieval........................................................................................................ 5

Cookies ........................................................................................................................................................ 6

Cookie Types......................................................................................................................................... 6

Digital Currency ......................................................................................................................................... 8

What Is It? ................................................................................................................................................ 8

The Blockchain ........................................................................................................................................ 9

Uses .......................................................................................................................................................... 9

How It Works .................................................................................................................................... 10

Cyber Security .......................................................................................................................................... 13

Cyber Security Threats ..................................................................................................................... 13

Brute Force Attacks ....................................................................................................................... 13

Data Interception............................................................................................................................ 14

DDoS & DOS Attacks.................................................................................................................... 15

Notes By MST_CREATOR Page 1


Instagram, Twitter, DeviantArt, NG & Tumblr

Hacking ............................................................................................................................................... 17

Malware .............................................................................................................................................. 18

Phishing............................................................................................................................................... 21

Pharming............................................................................................................................................ 23

Social Engineering........................................................................................................................... 24

Keeping Data Safe .............................................................................................................................. 26

Access Levels ..................................................................................................................................... 26

Anti-Malware ................................................................................................................................... 27

Authentication ................................................................................................................................. 28

Note From Author


Hey guys!

I just wanted to tell you that you SHOULD USE OTHER RESOURCES!!!

By that, I am talking about past papers, notes, the book, etc.

You can find these resources from many useful places like r/IGCSE!

You can get many past papers from places like dynamic papers or papa Cambridge.

Notes By MST_CREATOR Page 2


Instagram, Twitter, DeviantArt, NG & Tumblr

The Internet & The World Wide


Web (WWW)

Differences
Internet World Wide Web (WWW)
System of interconnected computer
Online content (like web pages)
networks.
Allow communication between HTTP(S) protocols are written using
computers (like emails or calls) HMTL
Use transmission protocols (TCP) & Use Uniform Resource Locator (URLs)
Internet Protocols (IP) are used to locate web pages.

URLs
A Uniform Resource Locator (URL) is a text-based address which is used to access a

website on the internet.

Parts

Notes By MST_CREATOR Page 3


Instagram, Twitter, DeviantArt, NG & Tumblr

HTTP & HTTPS


HTTP stands for “Hypertext Transfer Protocol.”

HTTP is a set of rules that must be obeyed when transferring files over the internet.

When we use security (like SSL or TLS), we use HTTPS (“S” means Security &

indicates a secure way of sending/receiving data over a network).

Web Browsers
A web browser is a software which renders HTML (Hypertext Markup Language) &

can display web pages.

Common Features
Feature Description
Homepage The page shown when software is opened.
Bookmarks Stores user’s favourite webpages for later use.
Keeps a list of websites visited by the user in chronological
User History
order.
Multi-Tabs Allows user to have multiple tabs open at the same time.
Cookies Details Here
Allows user to go to other opened webpages, pages opened
Navigation Tools
before or after and much more.
This is a box where we can enter the URL of a website and we
Address Bar
will be presented with the website.

Notes By MST_CREATOR Page 4


Instagram, Twitter, DeviantArt, NG & Tumblr

Webpages Location & Retrieval


To get a website, the browser needs to know the IP address, since users cannot

remember IP addresses but URLs, we enter that instead, the browser asks a DNS

(Domain Name Service) to get the IP.

A DNS is a sort of dictionary with the IP address of many URLs.

Notes By MST_CREATOR Page 5


Instagram, Twitter, DeviantArt, NG & Tumblr

Cookies
Cookies are small files or code stored on the user’s computer.

Cookies are sent by web servers to a browser on the user’s computer.

Cookies store data of a user like previous browser history, currency, language, etc.

Cookie Types
There are 2 types of cookies:

Session Cookies
These are cookies that stay until the user closes the website or the browser.

These cookies are stored in the temporary memory of the computer.

This type of cookie does not really collect any user information & cannot personally

identify the user.

Example: Virtual shopping basket.

Persistent Cookies
These cookies stay on the user’s system even after the close the site or browser.

They are stored on the hard drive of the computer & are deleted once they reach

their expiry date or the user deletes them.

These cookies save user data like login or personal details.

They also store user preferences to recommend them other content which they may

like (such as ads or YouTube videos).

Notes By MST_CREATOR Page 6


Instagram, Twitter, DeviantArt, NG & Tumblr

Cookies At Work (Diagrams)

Notes By MST_CREATOR Page 7


Instagram, Twitter, DeviantArt, NG & Tumblr

Digital Currency

What Is It?
Digital currency is currency that exists in digital format and is an accepted form of

payment to pay for goods & services, it also allows online banking & smartphone

payment as it exists as data on a computer system and can be transferred into

physical cash when needed.

Centralization Decentralization
This is when the transactions are This is when the transactions take place
processed through the central bank. directly between the 2 people.

Cryptocurrency uses cryptography to track transactions and was created to address

problems with centralization on transactions.

No country controls cryptocurrencies & the rules are set by the cryptocurrency

community.

Notes By MST_CREATOR Page 8


Instagram, Twitter, DeviantArt, NG & Tumblr

Transactions made using crypto can be tracked and are visible to the public.

The Blockchain
The cryptocurrency system works within the blockchain, this makes it more secure.

The blockchain is a decentralized database.

The blockchain is made up of many interconnected computers which are not

connected to a central server, this means that transaction data is stored on all the

computers in the network.

Uses
No. Use
1 Cryptocurrency exchanges
2 Smart contracts
3 Research (pharmaceutical companies)
4 Politics
5 Education

Notes By MST_CREATOR Page 9


Instagram, Twitter, DeviantArt, NG & Tumblr

How It Works
Whenever a new transaction takes place, a new block is created.

Every time a block is created, it is given a new hash value and is unique to every

block and is given a timestamp (identifies when an event will happen).

Structure

The first block is called the “genesis block.”

Notes By MST_CREATOR Page 10


Instagram, Twitter, DeviantArt, NG & Tumblr

How This System Is Useful

One thing to know is that the hash of a block changes when the data is changed.

When the hash is changed, the chain of blocks is broken as the previous hash of the

next block does not exist.

This prevents people from changing the data.

Notes By MST_CREATOR Page 11


Instagram, Twitter, DeviantArt, NG & Tumblr

Proof of Work

There is still one problem, what if the criminal makes a completely new chain like

the tampered one?

Well, proof of work prevents that from happening.

We have some special network users called “miners” who are given a commission for

each new block created.

These miners also help regulate the currency.

This means the entire process of chain creation is slowed down which makes it even

harder for hackers to tamper any values.

Every miner has a copy of the blockchain system, they get a copy of the newly

created block.

Notes By MST_CREATOR Page 12


Instagram, Twitter, DeviantArt, NG & Tumblr

Cyber Security

Cyber Security Threats


We must keep our data safe as it is important to us.

Data can be corrupted or deleted by mistake or through malicious acts.

Cyber security threats are the ways which can cause data to be intercepted

Brute Force Attacks


This is basically when the attacker uses many different combinations of passwords

until they eventually get it right.

They usually try using the common passwords to make it faster (like 12345).

They also have a word list which is a text file with many words that may be the

password.

Notes By MST_CREATOR Page 13


Instagram, Twitter, DeviantArt, NG & Tumblr

Data Interception
This is when someone tries stealing data by tapping into a wired/wireless connection.

The intent is usually to steal confidential data and compromise security.

How It Works (Wired Connections)


Interception for wired connections is conducted using a packet sniffer which

examines the data packets being sent over a network and sends them to the hacker.

Note: This method is usually used for wired connections.

How It Works (Wireless Connections)


This is conducted using Wardriving or Access Point Mapping.

Data is intercepted with a device (like laptop or smartphone), an antenna, and a

GPS (along with some software) outside the victim’s house.

The intercepted Wi-Fi signals reveal personal information of the victim without the

victim even knowing what is going on.

Prevention
As we know, encryption makes it a bit hard for the hacker to understand the

content, we can make it even harder using Wired Equivalency Privacy (WEP) to

prevent Wardriving along with a firewall.

We should also use complex passwords for your wireless routers & refrain from using

public networks as they have no encryption.

Notes By MST_CREATOR Page 14


Instagram, Twitter, DeviantArt, NG & Tumblr

DDoS & DOS Attacks

DoS Attacks
Denial of Service (DoS) attacks is an attempt of preventing anyone from accessing

part of a network (specifically, an internet server).

This is temporary, but it can be a damaging act or a major security breach.

DoS attacks can also happen to users, this prevents them from accessing

websites/webpages, online services, and their emails.

DoS Attacks work by sending many requests to a website’s server, this causes it to

crash as it cannot service the enormous number of requests.

This means that the server will not be able to service the request from a legitimate

user.

DDoS Attacks
A Distributed Denial of Service attack is when many computers send many requests

instead of one, this makes it harder to block the attack.

Example

The attacker may send many spam emails to the user.

Internet Service Providers (ISP) provide a certain data quota for all users, so if the

attacker sends thousands of emails and fills up the inbox, the data quota will be filled

and will not be able to receive any legitimate emails.

Notes By MST_CREATOR Page 15


Instagram, Twitter, DeviantArt, NG & Tumblr

Prevention
We can use an up-to-date malware checker.

We can set up a firewall to restrict the traffic to & from a web server or system.

We can also set up email filters to filter out the unwanted emails.

DDoS Signs
There are signs we can check for to see if we have become a victim of DDoS.

Slow network performance is one.

Another is the inability to access certain websites.

The last is that the suer is receiving a huge amount of spam mail.

Notes By MST_CREATOR Page 16


Instagram, Twitter, DeviantArt, NG & Tumblr

Hacking
It is the act of gaining illegal access to a computer without the user’s permission.

Hacking can lead to deletion, corruption, or the passing on of data.

It can also cause identity theft.

Encryption makes the data meaningless, but the hacker can still delete it.

Prevention
We can prevent hacking by using firewalls, usernames, strong passwords which are

changed regularly, anti-hacking software, and intrusion detection software.

Ethical Hacking
This is when companies authorise paid hackers the check the security measures and

how good their computers are when getting hacked.

Notes By MST_CREATOR Page 17


Instagram, Twitter, DeviantArt, NG & Tumblr

Malware
Malware is software that is specifically designed to disrupt, damage, or gain

unauthorized access to a computer system.

Viruses
Identity
They are programs or program code that replicate with the
Definition? intention of causing a computer malfunction and corrupting or
deleting files.
What It They can delete many important files and fill the hard drive with
Does useless data.
Most viruses need an active host program on the target
Activation computer/infected OS. They also have a trigger which causes the
virus to start destruction.
Where They Viruses come from many places, it is as email attachments or
Are infected websites or software.
Removal & Antivirus software removes them, and firewalls filter them out.
Prevention Be mindful of what you download and where you download it from.

Notes By MST_CREATOR Page 18


Instagram, Twitter, DeviantArt, NG & Tumblr

Worms
Identity
They are a type of standalone malware which can self-replicate and
Definition? have the intention of spreading and corrupting all the computers on
the network.
They delete/edit data and inject other malicious software onto a
What It computer.
Does They also take advantage of security failures of the network to travel
to other computers on the network.
Activation No activation is needed, and they don’t need an active host program.
Where They
Worms can be found as email attachments and message attachments.
Are
Removal & Firewalls filter them out & antivirus remove them.
Prevention Be mindful of what you download.
Examples ILOVEYOU, Stuxnet, Nimda, Code Red, etc

Trojan Horses
Identity
They are programs which are disguised as legitimate software but
Definition? have malicious instruction embedded on them and have the intent of
doing some harm to the computer.
It is designed to damage, disrupt, steal, or inflict dome sort of harm
to a user’s data or network.
What It
They also can give criminals access to the victim’s personal
Does
information and can function as a gateway to download other
malicious programs (like spyware or ransomware).
Activation Need to be executed by the victim.
Where They Trojans can be found as email attachments and can be downloaded
Are from infected (dodgy) websites.
Removal & Antiviruses can remove trojans.
Prevention Be mindful of what you download & run.
Examples EGABTR, Back Orifice, ANOM, etc.

Notes By MST_CREATOR Page 19


Instagram, Twitter, DeviantArt, NG & Tumblr

Spyware
Identity
This is software that gathers information by monitoring the user’s
Definition?
activities on his/her computer.
It gathers user interaction on a computer and sends it to the
What It cybercriminal who originally sent the spyware.
Does They are designed to monitor & capture web browsing (and other)
activities and capture personal data (like passwords).
Activation Activates when we run the software it comes along with.
Can come from many places, they can be injected by trojans,
Where
downloaded along with software, downloaded from suspicious sites,
They Are
etc.
Removal & Detected & removed by antivirus software.
Prevention Don’t download software from suspicious sites or emails.
Examples FinSpy, Huntbar, Pegasus, etc.

Adware
Identity
Software which automatically downloads and displays unwanted ads
Definition?
to a user.
It can flood a user’s screen with unwanted adverts, it can redirect
user’s browser to a website the adware promotes, etc.
What It It hijacks the browser and makes its own default search requests.
Does It doesn’t let antimalware software remove it as it is hard to
determine if it is harmful or not.
It highlights the weaknesses of a user’s defences.
Activation They are activated when we run the software it comes along with.
Where Generally downloaded along with software we download from the
They Are internet.
Removal & Antivirus software can remove it.
Prevention Be mindful of what you download & where you download it from.
Examples DeskAd, Look2Me, DollarRevenue, etc.

Notes By MST_CREATOR Page 20


Instagram, Twitter, DeviantArt, NG & Tumblr

Ransomware
Identity
They are programs that encrypt the data on a user’s computer and
Definition?
asks user to pay a ransom to get the decryption key.
What It It encrypts user’s files and gives them the decryption key once the
Does cybercriminal’s demands have been met.
Activation No activation is needed.
Where
Comes from Trojans or Social Engineering.
They Are
Antimalware/anti-ransomware software quarantines the malicious
Removal &
software.
Prevention
Back up files regularly, antimalware software & monitoring software.
Examples Bad Rabbit, Reveton, WannaCry, etc.

Phishing
This is when a cybercriminal sends out a legitimate looking email to users.

The email can contain attachment or links which take you to a fake website and can

trick you to enter personal information (like credit card number).

Fake Bank Page Real Bank Page

Notes By MST_CREATOR Page 21


Instagram, Twitter, DeviantArt, NG & Tumblr

The email usually appears to be genuine coming from a known bank or service.

The key point is that the victim must do something so the scam can take place, if

the mails are deleted or not opened, they do not inflict any harm.

Example of phishing email.

Prevention
No. Method
1 Be aware of the new phishing scams!
2 Do not click on any email links unless you know it is safe!
3 Run ant-phishing toolbars on browsers!
4 Check the protocol if it is https or not!
5 Check your online accounts, use strong passwords, and change them regularly!
6 Use up-to-date browser, run good desktop & network firewalls!
7 Make your browser block the popups or close them with the “X” button!

There is also “spear phishing” where cybercriminals target certain users or

companies to gain sensitive/confidential information.

Notes By MST_CREATOR Page 22


Instagram, Twitter, DeviantArt, NG & Tumblr

Pharming
This is malicious code installed on a user’s computer or on an infected website.

The malicious code redirects the user’s browser to a fake website when they enter the

URL.

Unlike phishing, pharming does not require user to do anything and can gain all the

personal information the user enters onto the website.

How Does It Redirect?


As we know, when the user enters the URL of a legitimate website, the browser

redirects the user to a fraudulent one.

This is done through DNS cache poisoning

DNS Server’s Database Which Is Edited BY The Hacker

Prevention
No. Method
1 Use anti-virus software!
2 Check the website spelling & the URL!
3 Ensure that the website uses HTTPs protocol!
4 Read the alerts that your browser shows you!

Notes By MST_CREATOR Page 23


Instagram, Twitter, DeviantArt, NG & Tumblr

Social Engineering
This is when cybercriminals put the victim into a social situation which causes them

to let their guard down and give them their personal information.

Types of Threats
Threat Description
Instant Malicious links are embedded into instant messages that pop up
Messaging onto the user’s screen.
Done using popups that persuade the user to accept something
Shareware
which is generally infected.
Emails & When user receives a genuine looking email which redirects them to
Phishing a website which looks genuine but is a fake copy which tricks the
Scams user into entering their personal information.
This is when the cybercriminal leaves a memory stick (physical)
Baiting somewhere near the victim who puts it into his/her computer (to
see who the owner is) and unknowingly installs malicious software.
This is when the cybercriminal tricks the victim into giving the
Phone Calls
criminal control over their device (like those tech support scams).

Emotions cybercriminals exploit

Notes By MST_CREATOR Page 24


Instagram, Twitter, DeviantArt, NG & Tumblr

The Process

Victims are identified,


information on them is
gathered, and attack
method is decided.

Criminal tries to remove Victim is targeted


all traces of malware to (through popups, emails,
cover their tracks. etc.)

Attack (decided in step 1)


takes place and criminal
does what they wanted to
do.

Notes By MST_CREATOR Page 25


Instagram, Twitter, DeviantArt, NG & Tumblr

Keeping Data Safe

Access Levels
Access levels are basically the different amounts of permission and restrictions users

have.

Users with higher access levels have more permission while the ones with less access

levels have less permissions.

Uses

Databases

It is important to determine whish users have the permission to read/write/delete

the data.

This can be done by having different views of the database (like master view and

reader view).

We can also make these views show limited data to users.

Social Networks

Level Name Description


1 Public Access This is the content the public can view.
This is data that can only be viewed by users who are
2 Friends
identified as “friends” by the owner.
This allows owner to show data that is viewed by friends but
3 Custom
some extra or exclude some data.
4 Data Owner This is data that can be viewed only by the owner.

The user generally has privacy settings rather than passwords to decide the access

levels.

Notes By MST_CREATOR Page 26


Instagram, Twitter, DeviantArt, NG & Tumblr

Anti-Malware
Most common ones are antiviruses and anti-spyware.

You can read about antiviruses on page 4 of my notes of Unit 4 (Software)

Anti-Spyware
This is software that detects & deletes spyware that were illegally installed onto a

user’s computer.

Methods

[1] Rules [2] File Structures

This is when the software looks for This is when the software checks for

certain features which are usually certain file structures which are

found in spyware & identifies potential commonly found in spyware.

risks.

General Features

No. Feature
1 Detect & remove spyware installed on the device.
2 Prevent user from downloading spyware.
3 Encrypt files to ensure data security.
4 Encrypt key stroke data to remove key logger risks.
5 Block access to user’s webcam & mic to not let spyware take over.
6 Scan for signs if user’s personal information was stolen & inform user about it.

Notes By MST_CREATOR Page 27


Instagram, Twitter, DeviantArt, NG & Tumblr

Authentication
This refers to the ability of a user to prove who they are.

Usernames & Passwords


Passwords are used to restrict access to data/systems.

Passwords are used on many occasions, like when accessing email account, when

banking or shopping online, accessing social media, etc.

Protecting Passwords

No. Method
1 Use anti-spyware to ensure nobody knows your passwords!
2 Change passwords regularly!
3 Passwords should not be straightforward or easy to crack.
Passwords must contain:
A number
4 A capital letter
A special character
At least 8 characters

Notes By MST_CREATOR Page 28


Instagram, Twitter, DeviantArt, NG & Tumblr

How They Work

All characters in a password are replaced with “*” so nobody can copy the user’s

password:

Pretty basic login screen

When either the user’s password or username is different from the correct data,

access is denied & some sort of error appears:

What happens when password or username is incorrect

Notes By MST_CREATOR Page 29


Instagram, Twitter, DeviantArt, NG & Tumblr

When users choose to create a new password, the system tends to ask them to re-

enter the new password as verification.

Change Password Prompt

To prevent brute force attacks, users are allowed to enter their password a few

times.

Resetting Passwords

If user forgets the password of their account or they want to reset it, they want to

reset it.

An email is sent with a link to the webpage to reset their account’s password.

This is to prevent unauthorized users from logging into your account.

Notes By MST_CREATOR Page 30


Instagram, Twitter, DeviantArt, NG & Tumblr

Biometrics
Biometrics are like passwords except that they are unique to every human being.

Fingerprints

Fingerprint images are different from person to person.

The image of a fingerprint is compared to the one in the database which was

scanned in the past.

The system compares the patterns of ridges & patterns which are unique.

No. Advantage
1 Improved security as fingerprints are unique.
Very useful as fingerprints don’t get stolen or lost unlike other devices (i.e.,
2
security cards).
It is impossible to ‘sign in’ if there is only one person with the fingerprints of
3
the user.
No. Disadvantage
1 Expensive to install & set up.
2 Scanning accuracy can be affected if the user’s finger is injured.
3 People may regard biometric devices as “infringement of civil liberties.”

Retina Scans

Retina scans use infrared light to scan the unique blood vessels in the retina.

It is very accurate & is secure.

The only problem is that a person must still for like 10 seconds to scan their retina.

Notes By MST_CREATOR Page 31


Instagram, Twitter, DeviantArt, NG & Tumblr

Advantages & Disadvantages of All Biometrics

Technique Advantages Disadvantages


1. Most developed method.
1. Intrusive to some people.
Fingerprint 2. Easy to use
2. Can make mistakes if skin is
Scanning 3. Small storage requirement for
dry or injured.
scanned images
1. High accuracy 1. Extremely intrusive
Retina
2. Hard to replicate someone’s 2. Slow verification process
Scans
retina. 3. Expensive to install & setup.
Face 1. Not intrusive Result can be affected by lighting,
Recognition 2. Relatively inexpensive different hair, glasses, age, etc.
1. Someone can record owner’s
1. Not intrusive voice and gain access
Voice
2. Fast verification method 2. Low accuracy
Recognition
3. Relatively inexpensive 3. Hard to identify voice of
owner when ill.

Example With Retina Scanner

A person stands facing the retina scanner which sends the scanned data to the ADC

which coverts this data to digital data and then goes t a microprocessor which

compares the scanned data with the data stored in the database. If the 2 data sets

match, the microprocessor sends signal to turn the green light on and unlock the

door, the door is controlled by a DAC & an actuator. On the other hand, if the data

sets do not match, then access is denied, and the light remains red. (Memorize this)

Notes By MST_CREATOR Page 32


Instagram, Twitter, DeviantArt, NG & Tumblr

2-Step Verification
This requires 2 methods of authentication to verify a user.

Mainly used when user makes online purchases using credit/debit card payment.

Example [Anime Character btw]

Let’s say Alucard decides to buy some little addons for his Jackal from a website.

Alucard would log in to the website using his username and password (step 1).

To improve security, an 8-digit pin (one time code) is sent to him via text message

or email.

Alucard enters the pin into the website and is now authorised to purchase parts for

Jackal.

Notes By MST_CREATOR Page 33


Instagram, Twitter, DeviantArt, NG & Tumblr

Automatic Software Updates


This is when software on devices is kept up to date.

This is done overnight or when you are logged off the device.

These updates are essential as they contain patches to improve the software’s

features, fix bugs, prevent irregular occurrences, and improve security.

The only disadvantage is that it may disrupt your device after installation.

This can be fixed by downloading another patch or just restore the older version of

the software.

Notes By MST_CREATOR Page 34


Instagram, Twitter, DeviantArt, NG & Tumblr

Check Spelling & Tone of Communication & URL Links

Notes By MST_CREATOR Page 35


Instagram, Twitter, DeviantArt, NG & Tumblr

Firewalls
A firewall is either software or hardware

It sits between user’s system and external network (like the internet).

It filters information in and out of your computer.

Firewalls defend against phishing, pharming, malware, hackers, etc.

They let user decide if they want communication with external sources and notifies

user when external source is attempting to access his/her system.

Tasks

No. Task
1 Examine traffic between an internal network & an external network
2 Checks if incoming & outgoing data meets a set criteria.
Traffic that fails to meet the criteria is blocked & user is warned about
3
security issues
4 Firewall is used to log all incoming & outgoing traffic for later interrogation
Criteria can be set to prevent user from visiting undesirable sites and has a list
5
of the blocked Ips
6 Firewalls help prevent malware and hackers from entering the computer
Warns user if a software they have is trying to access external data sources
7
and is given choice to allow this or not

Times When Firewall Cannot Block Harmful Traffic

No. Description
1 Cannot prevent users on the internal network from bypassing firewall
2 Employee carelessness or misconduct cannot be prevented by firewall
3 Firewalls cannot do anything if user disables them

Notes By MST_CREATOR Page 36


Instagram, Twitter, DeviantArt, NG & Tumblr

Proxy Servers
No. Feature
1 Allows traffic to be filtered and can block sites if needed
2 Keep user’s IP secret to improve security
3 Access to web server is allowed if the traffic is valid
4 Access to web server is denied if the traffic is invalid
5 Possible to block requests from certain IP addresses
6 Prevents direct web server access
7 Launched attacks hit the proxy server rather than user’s computer
8 Invalid traffic is directed away from web servers which adds protection
9 Cache allows webpages to load faster (they are downloaded on user’s first visit)
10 Function as firewalls

Privacy Settings
They are controls available on web browsers, social networks, etc.

They are designed to limit who can access user’s personal profile.

General Features

No. Feature
1 ‘Do Not Track’ option prevents sites from collecting and using browsing data
Check to see if payment methods were saved on site, this prevents user from
2
typing payment details every time
Safer Browsing, this means that browser alerts user if they opened a
3
dangerous website
4 Web browser privacy options (like history and cookies)
Web advertising opt-outs, this lets us prevent third parties from accessing or
5
browsing data for advertising purposes
6 Apps, to let or not let sites access information (like location)

Notes By MST_CREATOR Page 37


Instagram, Twitter, DeviantArt, NG & Tumblr

Secure Sockets Layer (SSL)


This is a type of protocol (set of rules used by computers for communication) which

allows data to be transferred securely over the internet.

Websites encrypt data with SSL, this means that only the user and the web server

understand the data.

When SSL is used, the padlock is present.

SSL Certificates

These are digital certificates which are used to authenticate websites.

If the certificate is authenticated, then any communication/data transfer is secure.

Notes By MST_CREATOR Page 38


FOLLOW ME ON:

Table of Contents
Note To Reader ............................................................................................................................... 2

Software Types & Interrupts .................................................................................................... 3

[1] System & Application Software .................................................................................. 3

System Software .................................................................................................................... 3

Application Software ............................................................................................................ 3

Utility Software (Utilities) .................................................................................................. 4

[2] Operating Systems (OS) .................................................................................................. 7

Human Computer Interface (HCI)................................................................................... 8

Memory Management .......................................................................................................... 9

Security Management .......................................................................................................... 9

Hardware Peripheral Management ................................................................................ 9

File Management ................................................................................................................. 10

Multitasking ........................................................................................................................... 10

User Accounts Management ........................................................................................... 11

[3] Running of Applications ............................................................................................... 11

How It Works ........................................................................................................................ 11

EEPROM ................................................................................................................................. 12

CMOS ....................................................................................................................................... 12

In The End… .......................................................................................................................... 12

[4] Interrupts ........................................................................................................................... 13

What Causes Them? ........................................................................................................... 13

What Happens When Interrupt Is Received ............................................................. 13

Buffers ..................................................................................................................................... 14

NOTES BY MST_CREATOR Page 1


FOLLOW ME ON:
Programming Language Types & IDEs .............................................................................. 15

[1] High & Low-Level Languages .................................................................................... 15

[2] Assembly Languages ....................................................................................................... 16

[3] Translators ......................................................................................................................... 16

Compilers, Interpreters, and Assemblers .................................................................. 16

[4] Advantages & Disadvantages of Compilers & Interpreters ........................... 17

[5] IDEs ....................................................................................................................................... 18

General Features.................................................................................................................. 18

Note To Reader
These notes are made according to the 2023 – 2025 computer science
syllabus so if you have your examinations for 2022, you may want to refer to
other places.

Another thing is that I would advise you to use other resources to revise just to
be safe (these notes may be missing information here and there).

I would also advise you to practice past papers as they are helpful when
preparing!

Anyway, if this helps you, I am happy for you 😊

That’s it for this note section thing so you can go to the actual content.

NOTES BY MST_CREATOR Page 2


FOLLOW ME ON:

Software Types & Interrupts

[1] System & Application Software


Software can be split into system & application software:

System Software Application Software


Examples: Examples:

1. Utilities 1. Photo editors


2. Operating System (OS) 2. Video editors
3. Device Drivers 3. Word processors

Functions: Functions:

1. Set of programs to manage & 1. Used to perform many tasks (apps)


control operations of computer on a computer.
hardware. 2. Allows user to perform certain tasks
2. Provides a platform on which using the computer’s resources.
other software can run. 3. May be a single program (like
3. Allow hardware & software to Notepad).
run without problems. 4. User can execute it when needed
4. Provides human computer
interface (HCI).
5. Controls allocation & usage of
hardware resources.

NOTES BY MST_CREATOR Page 3


FOLLOW ME ON:

Utility Software (Utilities)


Many utility programs are on the computer system, some can be run by the
user and some run in the background:

1. Virus Checkers
2. Defragmentation Software
3. Disk content analysis & repair
4. File compression & management
5. Back-up software
6. Security
7. Screen savers

Virus Checkers (Anti-Virus Software)


These are programs that scan and protect a computer from malware and virus
attacks in the background.

Common features of anti-virus software include:

1. Check software or files before they are run or loaded.


2. Compares a possible virus against a database with known viruses.
3. Checks software to check for suspicious activity that would be done by a
virus (heuristic checking).
4. Files that are suspicious are put into quarantine (meaning that the virus will
be automatically deleted).
▪ Also allows user to decide whether to keep or delete the file as user may
know if the file is not a virus (this is a false positive).
5. Full systems are carried out at least once a week.
6. Need to be updated every now and then as new viruses keep getting
discovered.

NOTES BY MST_CREATOR Page 4


FOLLOW ME ON:

Defragmentation Software
This software takes all the data fragments scattered around on the hard drive
and rearranges them into contiguous sectors.

This decreases read/write time and HDD head movements.

Backup Software
What it does:

1. Allow a schedule for backing up files to be made.


2. Only carry out backup when a file has been changed.

There are 3 version of a file for complete security:

1. Current version: Stored in internal SSD or HDD.


2. Locally backed up copy: Stored in other places (like portable SSD).
3. Remote backed up copy: Stored away from machine (like on cloud).

OS Windows Mac OS
Utility Name File History Time Machine
Takes snapshots of files and
stores them on external HDD Erases contents of selected
regularly, this builds a library drive and replaces them
What It Does of past file versions which with back up. It is necessary
allows the user to choose to connect external drive is
which version they want to connected.
back up.
Every hour
Daily back-up for past
How Often It
Every hour (default) month
Saves
Weekly back-ups for
previous months

NOTES BY MST_CREATOR Page 5


FOLLOW ME ON:

Security Software
What it does:

1. Manages user accounts and control.


2. Links into other utility software.
3. Protects network interfaces.
4. Uses encryption & decryption to ensure that intercepted data is useless
without the decryption key.
5. Oversees updating of software.

Screen Savers
They are programs that blank the screen or fill it with moving images when
the computer has been idle for a certain amount of time.

They are a way of customization and a way to maintain security as the


computer can be locked after a certain amount of time.

Screen savers also allow other programs to run in the background such as:

1. Virus scans
2. Distributed computer apps

Device Drivers
They are software that allow the communication between OS and peripheral
devices (like mouse or keyboard).

NOTES BY MST_CREATOR Page 6


FOLLOW ME ON:

[2] Operating Systems (OS)


Operating systems are software that allow computers to function correctly and
allow users to communicate with the system.

OS provides an environment for applications to run and provide an interface


for users to easily use computers.

Computers store the OS on the HDD or the SSD as they are very large
programs.

Operating systems of mobile phones are stored on their SSD (they don’t have
HDD).

Functions of an OS:

Human
Computer
File Interface Security
Management

Hardware
Peripheral Functions Multitasking
Management

Interrupt
User Account
Handling
Management
Memory Routines
Management

NOTES BY MST_CREATOR Page 7


FOLLOW ME ON:

Human Computer Interface (HCI)


The HCI is in the form of Command Line Interface (CLI) & Graphical User
Interface (GUI).

Name CLI GUI


What It Is This requires the user to This requires user to click on
type in commands to tell logos and images to tell the
the computer what to do. computer what to do.
Advantages 1. User communicates 1. User does not need to
directly with the learn any commands.
computer. 2. More user friendly.
2. User is not restricted to 3. Simple as we use a
predetermined options. pointing device to click on
3. Possible to alter an icon to carry out a
computer configuration task.
settings.
4. Uses small amount of
computer memory.
Disadvantages 1. User needs to learn 1. Uses more memory than
many commands to CLI.
carry out basic tasks. 2. User is limited to icons
2. Commands must be present on the screen.
typed; this is prone to 3. Needs an OS which
errors. consumes a lot of storage.
3. Each command must be
correctly spelt,
formatted, etc.

NOTES BY MST_CREATOR Page 8


FOLLOW ME ON:

Memory Management
Functions:

1. Manages primary storage (RAM) and allows movement of data between


RAM and HDD/SSD when executing a program.
2. Keeps track of all memory locations.
3. Carries out memory protection so applications do not store data in the
same memory slot as this could cause data loss, incorrect results (from
application), etc.

Security Management
Ensures the integrity, confidentiality, and availability of data by:

1. Carrying out OS updates when available.


2. Ensuring anti-virus and other security software is up to date.
3. Maintaining access rights for all users.
4. Making use of privileges to prevent users from entering certain areas on a
computer that permits multi-user activity.
5. Helping prevent illegal intrusion into your system.
6. Offering ability to recover data when it has been lost or corrupted.

Hardware Peripheral Management


1. Communicates with all input & output devices using device drivers.
2. Uses device drivers to take data from a file which is defined by the OS and
translates it, so the input/output device understands it.
3. Ensures that each hardware resource has a priority so they can be used and
released when needed.
4. Manages input & output devices by controlling queues & buffers.

NOTES BY MST_CREATOR Page 9


FOLLOW ME ON:

File Management
Main Tasks:

1. File naming conventions which can be used (filename.docx).


2. Perform certain tasks on a file (like delete or copy).
3. Maintains the directory structures.
4. Ensures access control mechanisms are maintained (like password
protection).
5. Ensures memory allocation for a file by reading it from HDD/SSD and
loading it into the memory.

Multitasking
This allows computers to carry out more than one task at a time.

Each process taking place uses a fraction of the hardware resource, this is
monitored by the OS to ensure that the processes are running properly:

1. Resources are allocated to a process for a specific amount of time.


2. The process can be interrupted while running.
3. Processes are organized into priority levels so they can use resources
according to the priority.

Multitasking is also helpful as the main memory, HDD/SSD and virtual


memory are better managed, this is an effective use of CPU time.

NOTES BY MST_CREATOR Page 10


FOLLOW ME ON:

User Accounts Management


Computers allow multiple users to use one computer, this means that the data
of each user must be kept separate from the other.

When this happens, each user is allowed to:

1. Customise their screen layouts and other settings.


2. Use separate files and folders and manage them by themselves.

Admins
The management of the user accounts is generally overseed by an admin.

The admin/administrator can create and delete users and can also restrict
their activity on the system.

[3] Running of Applications


The OS provides application software a platform to run on.

How It Works
When a computer starts:

1. Part of the OS is loaded into the RAM (this is called booting up or bootstrap
loading).
2. The start-up of the computer’s motherboard is handled by the BIOS (Basic
Input/Output System).
3. The BIOS then tells the system where the OS can be found.
4. The BIOS then loads the part of the OS that is required to be executed.

NOTES BY MST_CREATOR Page 11


FOLLOW ME ON:

Firmware
The BIOS is referred to as firmware.

Firmware is a program that provides low level control for devices.

EEPROM
The BIOS is stored in a special ROM called EEPROM which stands for
“Electronically Erasable Programmable ROM”.

The EEPROM is a flash memory chip which means that its contents remain the
same even when the computer is turned off.

The only problem is that the user can rewrite, update, or even remove the
BIOS.

Note: You do not need to know a lot about EEPROM, just this much is enough.

CMOS
CMOS stands for “Complementary Metal Oxide Semi-conductor”.

The CMOS chip stores the settings of the BIOS.

The CMOS is charged with the battery on the motherboard, this means that if
the user had changed the settings, they will be set to the factory settings.

In The End…
The application software will be under the control of the OS and will need to
access system software when running. Different parts of the OS will need to be
loaded from the RAM as the software runs.

NOTES BY MST_CREATOR Page 12


FOLLOW ME ON:

[4] Interrupts
An interrupt is a signal sent from a device or from a software to the
microprocessor.

Interrupts allow computers to multitask.

The interrupt causes the microprocessor to stop temporarily and service the
interrupt.

What Causes Them?


Interrupts can be caused by:

1. Timing signals
2. Input/output processes: like printer requiring more data
3. User interactions: Like key presses or mouse movement
4. Software errors that cause problems: Like trying to divide by 0 or trying to
access memory space that is being used by other software
5. Hardware fault: Like paper is jammed in the printer

What Happens When Interrupt Is Received


Once the interrupt signal is received, the microprocessor:

1. Continue doing what it was doing


2. Stops and services the device or software that sent the signal.

To decide what to do, the computer establishes “interrupt priorities”.

NOTES BY MST_CREATOR Page 13


FOLLOW ME ON:

Servicing The Interrupt


1. The computer first saves the task being run, this means that it saves the
contents of the Program Counter (PC) and other registers.
2. The Interrupt Service Routine (ISR) is executed by loading the start address
into the program counter (PC).
3. Once the interrupt is fully serviced, the status of the interrupted task is
reinstated, all the register contents are received, and the task proceeds.

Buffers
A buffer is a memory area that stores data temporarily.

NOTES BY MST_CREATOR Page 14


FOLLOW ME ON:

Programming Language Types & IDEs

[1] High & Low-Level Languages


Name High Level Languages (HLL) Low Level Languages (LLPL)
Definition A language like the human A language that relates to
language which programmers specific architecture and
can easily use and understand. hardware of a particular
system from machine code,
binary and hexadecimal.
Examples Python, Java, C++, etc. Machine code & Assembly
Languages
Advantages 1. Easier to read, write, debug, 1. Can make use of special
and understand the code. hardware.
2. Quicker to write programs. 2. Incudes special, machine
3. Easier to maintain programs dependant instructions.
in use. 3. Programs are fast and
4. Programs can be run on any don’t take up much space.
computer.
Disadvantages 1. Programs can be large. 1. Takes long time to debug
2. Programs may take long to and write the programs.
execute. 2. Code is hard to understand.
3. Programs may not be able
to make use of special
hardware.

NOTES BY MST_CREATOR Page 15


FOLLOW ME ON:

[2] Assembly Languages


Assembly language is made up of mnemonics (like LDA, STO, etc).

Mnemonic Meaning
LDA Gets the value of a variable and loads it into the accumulator.
STO Replaces the value of a variable with the value stored in the
accumulator.
ADD Adds the value of a variable with the variable in the accumulator.

[3] Translators
A translator is a utility program that translates the program into binary so it
can be run by a computer.

Compilers, Interpreters, and Assemblers


Name Compiler Assembler Interpreter
What it does Translate HLL Translates Executes a HLL
program to assembly program one line at a
machine code. language program time.
to machine code.
Action When Error is Generates an Generates an Stops running and
Found error report. error report. outputs error message
Executable Produced? Yes Yes No
How Many Machine One statement One statement is One statement may
Code Instructions? can be many one instruction. require execution of
instructions. many instructions.
Compiler Needed? Yes Yes No
When Is It Used? Distributed for Distributed for When program is in
general use. general use. development.

NOTES BY MST_CREATOR Page 16


FOLLOW ME ON:

[4] Advantages & Disadvantages of


Compilers & Interpreters

Name Compilers Interpreters


Advantages 1. Compiled programs can be 1. It is easy to edit the
stored ready to use. programs when in
2. Compiled programs can run development.
without a compiler. 2. Easier and quicker to debug
3. Compiled programs are & test programs in
executed in less time. development.
4. Compiled programs take less
memory when executed.
Disadvantages Takes long time to write, 1. Programs cannot be run
debug, and test programs without interpreter.
during development. 2. Programs take longer to
execute.

NOTES BY MST_CREATOR Page 17


FOLLOW ME ON:

[5] IDEs
IDE stands for “Integrated Development Environment”.

IDEs are used by programmers to aid the writing and development of


programs.

Examples of IDEs include PyCharm, VS Code, Notepad++, etc.

General Features
Feature Description
Code Editor Allows program to be written and edited without needing
separate text editor.
Translator This can be an interpreter and/or a compiler to enable the
program to be executed.
The interpreter is used for developing and the compiler is
used to produce a final version which can be used.
Runtime This used to check if there are any logic errors as this shows
environment with us how all the values of all the variables change in runtime.
debugger We can also use breakpoints which stope code execution at a
certain point of the code.
Error diagnostics Dynamic error checking finds possible errors in the code as
& Auto correction we type, the error is pointed out and corrected
automatically by the IDE.
Auto Completion Context sensitive prompts with text completion for variable
names, functions, and other reserved words.
Auto-Documenter These are helpful guides that tell us about functions, syntax,
etc.
Pretty Typing This is when the IDE gives colour to the code in a
meaningful way as it can show or categorise something (like
functions are blue or strings are orange)

NOTES BY MST_CREATOR Page 18


PYTHON vs PSUEDOCODE CHEAT SHEET
IGCSE COMPUTER SCIENCE 0478

Python (case-sensitive) Pseudocode


Data Types: Data Types:
int, float, bool, str INTEGER, REAL, BOOLEAN, STRING

Variable declaration (Python automatically detects) Variable declaration:


num = 0 #int INTEGER num <- 0
value = “hi” #str STRING value <- “hi”
check = true #bool BOOLEAN check <- true
deci = 0.00 #float REAL deci <- 0.00

Input and output: Input and output:


num = int(input(“Enter value: “)) INPUT “Enter value: “, num
schoolName = str(input(“Enter school name: “)) INPUT “Enter school name: “, schoolName
print(num) PRINT NUM
print(“Value entered: “, schoolName) PRINT “Value entered: “, schoolName
If condition: If condition:

if( condition ): IF( condition ) THEN


/// ///

elif( another condition ): ELSE IF ( condition ) THEN


/// ///

else: ELSE
/// ///

ENDIF
Python (case-sensitive) Pseudocode
For Loop For Loop

for val in range(10): FOR val <- 0 to 10


/// ///
NEXT val
ENDFOR

This loop would start from 0 and end at 9 (a total This loop would start from 0 and end at 10
count of 10)
For Loop For Loop

for val in range(2,10): FOR val <- 2 to 10


/// ///

NEXT val
ENDFOR

This loop would start from 2 and end at 9 (range This loop would start from 2 and end at 10
function in Python works till n-1)
For Loop For Loop

for val in range(1,10,2): FOR val <- 1 to 10 STEP 2


/// ///

NEXT val
ENDFOR

This loop would start from 1, end at 10 and This loop would start from 1, end at 10 and
increment the loop variable var by 2 instead of 1. increment the loop variable var by 2 instead of 1.
Python (case-sensitive) Pseudocode
In order to end the For loop for a condition In order to end the For loop for a condition
(Pseudocode does not have break or continue keywords)
for val in range(10):
x = int(input("Enter a value: ")) DECLARE x AS INTEGER
if(x>=0):
continue REPEAT
else: INPUT(“Enter a value: “), x
break UNTIL(x<0)

OR

INPUT(“Enter a value: “), x


WHILE(x >= 0)
INPUT(“Enter a value: “), x
ENDWHILE

For loop terminates as soon as you enter a negative


value otherwise finishes for 10 iterations
While loop While loop

while( condition ): WHILE( condition )


/// ///
ENDWHILE
Python (case-sensitive) Pseudocode
In order to end the while loop for a condition In order to end the while loop for a condition

counter= 0 INTEGER counter <- 0


while(counter < 10): INTEGER x <-0
x = int(input("Enter a value: "))
if(x>=0): WHILE(counter < 10)
continue REPEAT
else: INPUT(“Enter a value: “), x
break UNTIL(x<0)

counter= counter +1 counter <= counter + 1

ENDWHILE

While loop terminates as soon as you enter a While loop ends after 10 iterations and Repeat
negative value otherwise finishes for 10 iterations Until keeps repeating until user enters a value<0
Python (case-sensitive) Pseudocode
Taking input into the array Taking input into the array

DECLARE answers:ARRAY[1:5] of INTEGER


answers= [0,0,0,0,0] answers= [0,0,0,0,0]
for index in range(0, 5): #n is size of array FOR index <- 1 to 5
value= input(“Enter value: “) INPUT “Enter value: “, value
answers[index] = value answers[index] = value
NEXT index
ENDFOR
Reading a value from array Reading a value from array

answers= [1,5,3,0] DECLARE value as INTEGER


value = answers[2] #gets 3 since Py index start from 0 value <- answers[2]
print(value) PRINT value
Writing a value into the array Writing a value into the array

value= input(“Enter value: “) DECLARE value AS INTEGER


answers[index] = value INPUT “Enter value: “, value
answers[index] <- value
Printing whole array Printing whole array (N is size of array)

for index in range(len(answers)): FOR index <- 0 to N


print( answers[index] ) PRINT answers[index]
NEXT index
ENDFOR
Mr. Partington’s iGCSE Computer Science Revision Notes
Paper 1

Exam Technique
Know what the examiners can ask you questions about
Have a look at the I​ GCSE Computer Science syllabus​ that you have been studying and are going
to be taking the exam for. The list of topics will make a great checklist for your revision. If you
find something that you don’t understand or haven’t made any notes about, then find out about
it. A
​ nything​ that is mentioned in the syllabus could be used in an examination question.

Read and understand examination questions


What are you being asked to do?
1. Read the question
2. Understand the type of instruction you are being given: Complete, Describe, Draw, Explain,
Give and State all require different actions.
3. If the question makes use of a specific scenario or context then make sure that all of your
answers are relevant to that context. For example if the question is about security
measures for an offline device, then using a internet based firewall would not be
appropriate!
4. Decide on the information required but remember that you are sitting an iGCSE
examination and most answers will require more than just a single word. If you have
finished well before the time allotted, you may well have fallen into this trap.
5. Always use correct technical terms and avoid the use of trade names. For example, talk
about the use of an operating system rather than the use of ‘Windows 10’.
6. Decide how much information is required to fulfill the number of marks available and if in
doubt, add more!

Help the examiner help you!


- Make sure your answers are easy to read (if in doubt, write it again, clearer!).
- Read through the entire question before you start to answer it, give yourself thinking time
and decide how you will format your answer before writing.
- Make it easy for the examiner to see where he/she should give you the marks. This also
helps you make sure that you will can gain every mark available.
- Answer every question! There is no point leaving blank spaces, you will not lose marks for
incorrect answers, so you may as well have a guess.
1.1 - Data Representation

1.1.1 Binary systems

a) Recognise the use of binary numbers in computer systems

Binary​ is the b
​ ase 2​ number system. It is used in computer systems because computers store
data with the use of of switches that are in two states: on or off, 1 or 0.

b) Convert positive denary integers into binary and positive binary integers into denary
(a maximum of 16 bits will be used)

To convert binary (base 2) to denary (base 10) we use the following table. Adding up all of the
numbers where a ‘1’ bit occurs.

8-bit example:
Original number: 01101010
2​7 2​6 2​5 2​4 2​3 2​2 2​1 2​0

64 32 16 8 4 3 2 1

0 1 1 0 1 0 1 0
= 32 + 16 + 4 + 2 = 54

To convert denary (base 10) to binary (base 2) we use the same table, placing a 1 in the correct
positions until it adds up to the value we need.

c) show understanding of the concept of a byte and how the byte is used to measure
memory size

Measurement of memory size


Name of memory size Number of bits Equivalent value

1 bit 1 1 bit

1 nibble 4 1 nibble

1 byte 8 1 byte

1 kilobyte (1 KB) 2​10 1 024 bytes

1 megabyte (1 MB) 2​20 1 048 576 bytes

1 gigabyte (1 GB) 2​30 1 073 741 824 bytes

1 terabyte (1 TB) 2​40 1 099 511 627 776 bytes

1 petabyte (1 PB) 2​50 1 125 899 906 842 624 bytes


d) Use binary in computer registers for a given application

A register is a place to store a group of bits.


8 bit registers are often used to control electronic devices. Each bit is used to control a specific
value. For example:

1 0 1 0 0 1 1 0

Motor A Motor A off Motor B Motor B A direction A direction B direction B direction


on on off forward backward forward backward

This means that motor A and B are both on. Motor B is rotating forward and motor A is rotating
backwards.

1.1.2 Hexadecimal

a) represent positive numbers in hexadecimal notation

Hexadecimal is a base 16 number system that uses the digits 0 to 9 and the letters A to F to
represent each hexadecimal digit.
Denary​, B
​ inary​, H
​ exadecimal

0 1 2 3 4 5 6 7

0000 0001 0010 0011 0100 0101 0110 0111

0 1 2 3 4 5 6 7

8 9 10 11 12 13 14 15

1000 1001 1010 1011 1100 1101 1110 1111

8 9 A B C D E F

b) show understanding of the reasons for choosing hexadecimal notation to represent


numbers

Hexadecimal:
● Is easier/quicker to read than binary
● Is easier/quicker to write/type than binary
● Takes up less room on the screen than binary
● Is easier to debug than binary
● Is less prone to human error than binary
c) convert positive hexadecimal integers to and from denary (a maximum of four
hexadecimal digits will be required)

To convert hexadecimal integers to and from denary it is often easier to go through binary. To
start, write out each hexadecimal digit as 4 binary bits. For example: 4AE would become 0100 1010
1110. Then convert the number to denary as described in 1.1.1 (b).
0100 1010 1110 = 1024 + 128 + 32 + 8 + 4 + 2 = 1198.

d) represent numbers stored in registers and main memory as hexadecimal

A register is a place to store a group of bits. We can use our knowledge of how to convert
between base 2, base 10 and base 16 to represent numbers stored in registers and main memory
as hexadecimal.

e) identify current uses of hexadecimal numbers in computing, such as defining colours in


Hypertext Markup Language (HTML), Media Access Control (MAC) addresses, assembly
languages and machine code, debugging

The hexadecimal system is used for:


1. Memory Dumps​ - useful when developing new software, this allows the contents of the
memory to be seen by the writer, thus enabling errors to be detected; also used in
diagnostics when a computer malfunctions, hex is used since it is easier to use than a long
string of binary values.
2. HTML Colours -​ hypertext markup language uses 6 digit hexadecimal codes to represent
colours. The first two digits represent the amount of red, the next two represent green and
the last two represent the amount of blue.
3. MAC Address​ - See 1.2.2 e)
4. Web addresses​ - ASCII code can be used to replace the URL or parts of the URL.
5. Assembly code/machine code​ - using hex can make it easier and faster to write and less
error-prone than writing code in binary.

1.1.3 Data Storage

a) show understanding that sound (music), pictures, video, text and numbers are stored
in different formats

Examples of various file formats are shown below:


Sound .aif, .iff, .m4a, .mid, .mp3, .wav, .wma

Pictures .bmp, .gif, .jpg, .png, .psd, .tiff

Video .3gp, .avi, .flv, .m4v, .mov, .mp4, .mpg, .vob, .wmv

Text .doc, .docx, .odt, .pages, .rtf, .txt, .wpd

Numbers .xls, .xls, .db, .sheets


b) identify and describe methods of error detection and correction, such as parity
checks, check digits, checksums and Automatic Repeat reQuests (ARQ)

Parity checks
Parity checks can be e ​ ven ​(check for an even number of 1-bits) or o ​ dd (​ check for an odd number
of 1-bits). The bit that is added to make the even or odd total is known as the p ​ arity bit. ​It is
possible that t​ wo​ errors in the data could result in an error not being detected.

Automatic Repeat Request (ARQ)


ARQ uses an acknowledgement to indicate data has been received correctly. A timeout is used
which is the time allowed to elapse before an acknowledgement is received. If an
acknowledgement is not received before the timeout, then the data is sent again.

Checksum
Data is sent in blocks. An additional value, called the checksum, is sent at the end of the block of
data. The checksum is calculated based on the number of bytes in the block of data. If the
checksum calculated at the receiver’s end doesn't match the checksum that is sent at the end of
the data block, then an error has occurred.

Echo Check
Data is transmitted. The data is then returned to the sender. The sender compares the data sent
with the data received back. If they are different then an error has occurred and the data needs
to be sent again.

c) show understanding of the concept of Musical Instrument Digital Interface (MIDI) files,
JPEG files, MP3 and MP4 files

MIDI (Musical Instrument Digital Interface)


This system is associated with the storage of music files. No sounds are stored (as in WAV, MP3
or MP4) but instead, digital signals are sent using a protocol that allows musical instruments to
interact. Examples of signals might include: NOTE 64 On, NOTE 64 OFF, NOTE 70 On Velocity 50,
PITCH BEND -50%.
Since MIDI files don’t contain actual audio tracks, their size is relatively small. This makes them
good for devices with small storage capacity, for example: storing ringtones on a mobile phone.

MP3
MP3 uses lossy audio compression to store music in an MP3 file format. These can often be up to
90% smaller than comparable CD music files. The music quality is retained by removing sounds
that the human ear often can’t hear.
MP4 files are slightly different as they can often store video or photos and not just audio.

Text and number file formats


Text is stored in ASCII format and text files are usually stored in a lossless format.
Numbers can be stored as real, integer, currency, and so on. Lossless format is used since
accuracy of data is very important.
Joint Photographic Experts Group (JPEG) files
JPEG files use a lossy format file compression method. JPEG is used to store photographs as a
reduced file size. They rely on certain properties of the human eye (e.g. its inability to detect small
brightness differences or colour hues).

d) show understanding of the principles of data compression (lossless and lossy) applied
to music/ video, photos and text files

Lossless and lossy file formats


With lossless file compression, all the data from the original files is reconstructed when the file is
uncompressed. There is no loss in quality or loss in data when using lossless compression.
With lossy file compression, unnecessary data is eliminated forming a file and it can’t be
reconstructed to get back to the original file. For example: sending a large image file might be
unnecessary for the purpose you need it for, so the image is compressed first to make the file
take less time to upload and send.

1.2 - Communication and Internet Technologies

1.2.1 Data Transmission

a) show understanding of what is meant by transmission of data

Data transmission is where digital data is transferred from one device or component to
another. Data transmission can be wireless (wifi, bluetooth, NFC, 3g/4G/5G etc.) , or send
along a physical medium, such as a copper network cable, fibre optic cable etc.

b) distinguish between serial and parallel data transmission

Serial​ data transmission​ i​ s where data is sent ​one bit at a time​ over a s​ ingle wire​ or channel.
Parallel​ data transmission​ i​ s where data is sent ​several bits at a time o​ ver ​multiple wires o​ r
channels.

c) distinguish between simplex, duplex and half-duplex data transmission

Simplex d​ ata transmission is where data is sent in ​one direction only​.


Half-duplex ​data transmission is where data is sent in ​two directions, but not at the same time​.
Duplex ​data transmission is where data is sent in t​ wo directions at the same time​.
d) show understanding of the reasons for choosing serial or parallel data transmission

Serial ​data transmission is slower than parallel, but is good for long distances as the data cannot
become skewed.
Parallel d​ ata transmission is faster than serial, but data can become skewed over long distances
(so is more suitable for short distances)

e) show understanding of the need to check for errors

Data transmission is susceptible to interference. This can be electrical, environmental, physical,


magnetic etc. Interference will cause data to become skewed and not arrive in the correct order,
or for some data to not arrive at all. This is why we must check that a data transmission was
successful using an error checking method.

f) explain how parity bits are used for error detection

A parity bit is added to data to give it even or odd parity. It is usually added at the beginning or
the end of the data, or each byte of data. See 1.1.3 b).

g) show understanding of the use of serial and parallel data transmission, in Universal
Serial Bus (USB) and Integrated Circuit (IC)

As its name suggests, USB uses serial data transmission, an IC normally uses parallel data
transmission.

1.2.2 Security Aspects


a) show understanding of the security aspects of using the Internet and understand what
methods are available to help minimise the risks

Firewalls
Firewalls can help stop unauthorised access from the internet by examining the traffic between a
user’s computer or local network and a public network (e.g. the internet).
A firewall:
● Monitors incoming and outgoing traffic on a network
● Checks whether incoming and outgoing traffic meet certain criteria, if data fails criteria, the
firewall blocks the traffic and warns the user
● can log all incoming and outgoing traffic
● Criteria can be set to prevent access to certain websites, this can be done by the firewall
keeping a list of all undesirable IP addresses (a blacklist)
● Warns the user if software tries to access an external data source

b) show understanding of the Internet risks associated with malware, including viruses,
spyware and hacking

Hacking
Hacking is a method of gaining unauthorised (and sometimes illegal) access to a computer
system. This can lead to identity theft and loss or corruption of data. The risk of hacking can be
minimised by using strong passwords and firewalls.

Cracking
Cracking is the editing of a program source code so that it can be exploited or changed for a
specific purpose (usually without the owner's consent, and therefore illegal). It is often done for
malicious purposes, e.g. removing password protection or removing the need for a licence to run
the software. It is often difficult to guard against; software engineers need to make it difficult to
identify ‘back doors’ (ways of breaking into the software).

Viruses
A virus is program code that can replicate or copy itself with the intention of deleting or
corrupting data or files, or causing the computer to malfunction in another way. They can cause
the computer to run slow (due to the hard disk filling up with data, or the processor being
directed to other tasks) or crash (due to missing critical files). The risk of viruses can be
minimised by running anti-virus software or not opening emails or software from unknown
sources.

Phishing
Legitimate-looking emails are sent to users; on opening the email, the user could be asked to
supply personal or financial details or they may be asked to click on a link which sends them to a
fake website where the user could be asked to supply personal data. Many email providers try to
filter out phishing emails and are largely successful, but some still slip through the filter. There are
a number of signs to look out for in phishing emails:
● Poor spelling and grammar
● A unexpected message asks for personal information
● You did not initiate the action or communication
● A message that makes unrealistic threats e.g. sending something to everyone in your
contact list.
● A message that makes unrealistic promises e.g. cash prizes, lottery winning etc.

Pharming
Malicious code that is installed on a users computer or web server. The code redirects the use to
a fake website without their knowledge (it may look exactly like the genuine website and even
appear to have the correct URL). Once the user is sent to the fake website they may be asked to
give out personal or financial data.
Some anti-spyware or antivirus software can identify and remove pharming code on a computer.
The user could also look for clues such as lack of encryption, strange looking URL, computer
running slow etc.

Wardriving
This is the act of locating and using wireless internet connections illegally. It can lead to stealing
of internet time and bandwidth, also other user’s passwords and other data. It can be prevented
with the use of strong wireless network security (e.g WEP).

Spyware/key logging software


This gathers data by monitoring key presses on user’s keyboards and sending the data back to
the person who sent the spyware. Sends important data, such as passwords back to the
originator of the spyware. Prevented by use of anti-spyware or antivirus software or the use of a
mouse or drop down box to enter passwords rather than a keyboard.

c) explain how anti-virus and other protection software helps to protect the user from
security risks

Anti-virus software ​can scan for and detect viruses, quarantine viruses and delete viruses from a
computer system. It can be set to automatically scan new files, and periodically scan an entire
system. It will warn the user using an interrupt if it finds a virus. A f​ alse positive ​is when anti-virus
software flags something as a virus when it is not a virus.

Anti-spyware software ​can scan for and detect spyware. It will warn the user using an interrupt
if it detects spyware. It can delete spyware from a computer system.

Auto-Update software w ​ ill download and install updates for your software as and when they
are available. It is good to keep programs updated as updates are often more secure
(vulnerabilities have been identified and fixed), more features have been added, or compatibility
may have been improved.

1.2.3 Internet Principles of Operation

a) show understanding of the role of the browser

An i​ nternet browser​ is software which allows the user to display a web page on the computer
screen. The software interprets/translates the HTML from the website and shows the result.

b) show understanding of the role of an Internet Service Provider (ISP)

An I​ SP ​ is company that provides the user with access to the internet; they usually charge a
monthly fee. The ISP gives the user an account and sometimes provides the user with an email
address.

c) show understanding of what is meant by hypertext transfer protocol (http and https)
and HTML

Hypertext Transfer Protocol ​(http)​ is a set of rules that must be obeyed when transferring files
across the internet, this may include web pages or individual files.​ H
​ ttp​s ​indicates that the
protocol is using SSL encryption to send files or web pages securely.

d) distinguish between HTML structure and presentation

HTML is used when writing and developing web pages. HTML uses <tags> to bracket pieces of
codes. Hexadecimal values are used to represent different colours in HTML. In HTML some tags
are used to define ​structure ​(these do not make much difference to the front-end of the website,
for example <head> and <body> tags). Other tags are used to define p ​ resentation (​ these are
used to define how items are displayed on the page, for example <b> would make text appear
bold.

e) show understanding of the concepts of MAC address, Internet Protocol (IP) address,
Uniform Resource Locator (URL) and cookies

MAC address
a media access control address is used to uniquely identify a device on a network. The first 6 hex
digits represent the manufacturer and the latter 6 are unique to that specific device. MAC
addresses can be UAA (a universally administered address) or LAA (a locally administered
address).

IP (Internet Protocol) address


Each device is given an IP address as soon as it connects to the internet. The IP address will be
different each time the device connects.

URL (Uniform Resource Locator)


A URL is the address that you type in to access a website. It is made up of different parts, for
example:
https://​www.google.co.uk​/index.html
Protocol​ H
​ ostname or Domain Name ​ File name

Cookies
Pieces of data which allow detection of web pages viewed by a user and to store their
preferences. Cookies can be deleted from the user’s desktop although this can remove some of
the features of certain websites.

1.3 Hardware and Software

1.3.1 Logic gates

a) use logic gates to create electronic circuits

A ​logic gate​ takes in binary inputs and produces a binary output.


Logic circuits​ are made up of several logic gates and are designed to carry out a specific
function.

b) understand and define the functions of NOT, AND, OR, NAND, NOR and XOR (EOR)
gates, including the binary output produced from all the possible binary inputs (all
gates, except the NOT gate, will have 2 inputs only)

See below (d)


c) draw truth tables and recognise a logic gate from its truth table

See below (d)

d) recognise and use the standard symbols used to represent logic gates.

Type of Diagram Truth Table


GATE

AND
A B A∧B

1 1 1

1 0 0

0 1 0

0 0 0

OR
A B AVB

1 1 1

1 0 1

0 1 1

0 0 0

NOT
A ¬A

1 0

0 1

NAND
A B ¬(A ∧ B)

1 1 0

1 0 1

0 1 1

0 0 1
NOR
A B ¬(A V B)

1 1 0

1 0 0

0 1 0

0 0 1

XOR
A B A⊻B

1 1 0

1 0 1

0 1 1

0 0 0
e) Produce truth tables for given logic circuits.

If you are asked to do this you will be given a space to show your working. It is a good idea to
annotate the circuit adding in some locations where you will work out the intermediate answers
before you evaluate your overall answer.

An example might be: The student has added in locations d and e to help them work out the
overall answer.

With the truth table:

Inputs Working Output

A B C D E X

0 0 0 0 0 0

0 0 1 0 1 1

0 1 0 0 0 0

0 1 1 0 0 0

1 0 0 0 0 0

1 0 1 0 1 1

1 1 0 1 0 1

1 1 1 1 0 1

f) Produce a logic circuit to solve a given problem or to implement a given written logic
statement.

This is perhaps one of the hardest things you will be asked to do. It is useful to annotate the
question (particularly if it is quite wordy) highlighting the key words such as AND, OR, NOT. It is
also worth annotating what value is meant by the wording in the question (for example it might
say “if the temperature is over 25 degrees” in logic terms, this means something like T=1).
1.3.2 Computer architecture and the fetch-execute cycle

a) show understanding of the basic Von Neumann model for a computer system and the
stored program concept (program instructions and data are stored in main memory
and instructions are fetched and executed one after another)

The Von Neumann model holds both programs and data in the memory. Data moves between
the memory unit and the processor.
A register is a high-speed storage area within the processor. All data must be in a register before
it can be processed. There are 5 registered used in the Von Neumann model: Memory Address
Register (​MAR​), the Memory Data Register (​MDR​), the Accumulator (​ACC​), the Program Counter
(​PC​) and the Current Instruction Register (​CIR​).
A bus is the connection used to move data around the processor and also send out control
signals to synchronise the internal operations. There are three different buses used: A ​ ddress bus
(used to carry signals relating to addresses from the processor to the memory, it is
unidirectional), ​Data bus ​ (this sends data between the processor, memory uni and the input and
output devices, it is bi-directional) and the ​Control bus (​ this carried signals relating to control and
coordination of all activities within the computer; it can be unidirectional or bidirectional
depending on what it is connecting).
b) describe the stages of the fetch-execute cycle, including the use of registers and buses

1.3.3 Input devices

a) describe the principles of operation (how each device works) of these input devices: 2D
and 3D scanners, barcode readers, Quick Response (QR) code readers, digital
cameras, keyboards, mice, touch screens, interactive whiteboards, microphones

2D Scanners
These convert hard-copy documents into an digital format which can be stored in a computer
memory. Scanners operate by using a scan head which moves across the document shining a
bright light which reflects and produces an image which is sent to a lens via a series of mirrors.
Applications of 2D scanner include: scanning passports at airports, scanning newspapers for
archives, scanning textbooks for digital reading, scanning worksheets to complete online.

3D Scanners
3D scanners scan solid objects and produce an electronic 3D image. They use light or lasers and
measure their reflections to calculate the dimensions of an object. 3D scanners produce a 3D
model of a solid object.

Barcode Readers
Barcodes consist of a series of dark and light lines of varying thickness. Each digit or character is
represented by a number of lines. A barcode reader uses light or a laser to detect the series of
lines and input this as a series of characters into the computer.
Advantages of using barcode readers include:
● Allows for automatic stock control
● Allows for faster checkouts in shops
● Can check customer’s buying habits and customise offers based on trends
● Less chance of errors at tills

QR (quick response) codes


QR codes are a type of barcode. However, they can hold considerably more data. QR codes are
usually read by built-in cameras in smartphones or tablets using an app, but can be read by
conventional barcode scanners.

Digital Cameras
Digital cameras contain a microprocessor which automatically:
● Adjust shutter speed
● Focus the lense(s)
● Operates the flash
● Adjusts the aperture
● Removes ‘red eye’
● Reduce hand shake
Etc.
Images are captured when light passes through the lens onto a light-sensitive cell, which is made
up of thousands of tiny elements to capture each pixel.

Keyboards/keypads
Keyboards are the most common input device. Keys are pressed by the operator to enter data
directly into the computer. When a key is pressed, it completes a circuit and a signal is sent to the
microprocessor which interprets which key has been pressed.

Pointing Devices
The most common pointing devices are the mouse and the trackpad. They are used to control a
cursor on a screen or to select options from menus. Other pointing devices include: interactive
whiteboards and graphics tablets.

Microphone
Microphones are used to input sound into a computer. When the microphone picks up sound, a
diaphragm vibrates producing an electric signal. A analogue to digital converter then converts
the signal into digital values which can be processed by the computer. Voice and speech
recognition systems both use microphones.
Touchscreens
Touchscreens allow selection to be made by simply touching an icon or menu option. They are
also use in many devices to allow an input via a ‘virtual keyboard’.
Mobile phones and tablets are some of the biggest users of touchscreen technology. The most
common systems are capacitive, infra-red or resistive.

Capacitive Infrared Resistive

How it works - Uses layers of glass - Uses glass and can - uses upper layer of
that act as a capacitor either detect heat or polyester and bottom
- When the top layer is uses infrared sensors to layer of glass
touched the current detect touch. - when top layer touched,
changes - microprocessor works it completes a circuit
- The microprocessor out where the screen - microprocessor works
works out the was touched based on out coordinates of where
coordinates of where sensor/heat data the screen was touched
the screen was touched.

Benefits - this is a medium-cost - allows multi-touch - relatively inexpensive


technology capability technology
- good screen visibility - can use bare fingers, - can use bare fingers,
in strong sunlight gloved hand or stylus gloved hand or stylus
- allows multi-touch - good screen durability
capability
- very durable

Drawbacks - can only use bare - relatively expressive - poor visibility in strong
fingers or a conductive technology sunlight
stylus - heat-sensitive systems - doesn’t allow multi-touch
only allow bare fingers capability
to be used - screen is vulnerable to
scratches

b) describe how these principles are applied to real-life scenarios, for example: scanning
of passports at airports, barcode readers at supermarket checkouts, and touch
screens on mobile devices
Please see 1.3.3 a)
c) describe how a range of sensors can be used to input data into a computer system,
including light, temperature, magnetic field, gas, pressure, moisture, humidity, pH and
motion

Sensors
Sensors send data from the real world to a computer. They often require an analogue to digital
converter (ADC) to change the data into a format that the computer (or microprocessor) can
understand. Sensors form part of many monitoring or control systems.

d) describe how these sensors are used in real-life scenarios, for example: street lights,
security devices, pollution control, games, and household and industrial applications

● Sensors continuously send a signal to the system


● The signal is sent through a analogue to digital converter
● The value is compared to a predefined value.
● If the value is outside the acceptable range then a signal is sent to an actuator or alarm
● If the value is within the acceptable range then the system continuously checks the
incoming values

1.3.4 Output devices


a) describe the principles of operation of the following output devices: inkjet, laser and
3D printers; 2D and 3D cutters; speakers and headphones; actuators; flat-panel
display screens, such as Liquid Crystal Display (LCD) and Light-Emitting Diodes (LED)
display; LCD projectors and Digital Light Projectors (DLP)

Printers
The three most common types of printer are: laser, inkjet and dot matrix.

Type of Printer How it works Advantages Disadvantages

Laser Printer - Uses positive and - high quality of - can be expensive to


negative charges on printing maintain
the print drum and - relatively - produce health
paper. inexpensive to buy hazards such as
- Toner sticks to the printer ozone or toner
paper where it is - large toner particles in the air
charged cartridges and large
- Toner permanently paper trays
fixed using a fuser - very fast printing of
documents

Inkjet - Use liquid ink system - very high quality of - ink is expensive to
which sprays ink onto printing buy and quickly runs
the paper line by line - suitable for printing out on a large print
as the paper moves photos run
through the printer. - inexpensive to buy - usually have small
- The ink system uses printer paper trays
either thermal bubble - can be noisy in
or piezoelectric operation compared
technologies. to laser printer

Dot Matrix Printer - Use a matrix of pins - not adversely - relatively expensive
which strike an inked affected by damp or to buy printer
ribbon to produce dusty atmospheres - poor print quality
characters in a matrix - allows use of - very noisy and very
on the paper. multipart stationery slow at printing
(i.e. carbon copies)
- allows use of
continuous/fan-folde
d stationery

3D Printer
3D printers produce an actual solid objects. They are built up in the printer in a number of think
layers. Can use a number of different materials: powdered resin, powdered metal, ceramic power,
plastic reel, or even paper. 3D printer have been used to make prosthetic limbs, aerospace parts,
fashion and art item and even to make parts that are no longer in production by conventional
manufacturing.

2D/3D Cutters
These are used to cut into materials to form 3D objects and are controlled by computers and
software (CAD/CAM). Common materials include glass, crystal, metal, plastics and wood.

Headphones/Loudspeakers
Headphones and loudspeakers convert analogue voltages into sound. If the output is form a
computer, the digital signals are first converted into analogue voltages using a digital to
analogue converter.

Actuators
An actuator is a component of a machine that is responsible for moving and controlling a
mechanism or system, for example by opening a valve.

LCD and LED monitors


Modern flat screen monitors are usually either LCD or LED (sometimes OLED). LCD monitors use
liquid crystal to generate the image and require a backlight as LCD does not produce its own
light. LED and OLED screens use lots of light emitting diodes to generate coloured light that
makes up a display.

Light Projectors
DLP ​(digital light projectors) use millions of micro mirrors which can switch on or off several
thousand times a second creating various shades of light. Colour filters allow the shades of light
to be converted into colours which are projected onto a large screen.
LCD p ​ rojectors use chromatic-coated mirrors which reflect light at different wavelengths. The
light components pass through three LCD screens which are then recombined using a prism to
produce the colour image which is projected onto a large screen.
b) describe how these principles are applied to real-life scenarios, for example: printing
single items on demand or in large volumes; use of small screens on mobile devices
Please see 1.3.4 a)

1.3.5 Memory, storage devices and media

a) show understanding of the difference between: primary, secondary and off-line


storage and provide examples of each, such as: primary: Read Only Memory (ROM),
and Random Access Memory (RAM) secondary: hard disk drive (HDD) and Solid State
Drive (SSD); off-line: Digital Versatile Disc (DVD), Compact Disc (CD), Blu-ray disc, USB
flash memory and removable HDD

Primary memory​ is memory that is directly accessed by the CPU, e.g. RAM, ROM.
Secondary memory​ is memory that is not directly accessed by the CPU, e.g. HDD, SSD and
offline storage (including CDs, DVDs and blu-rays). O
​ ff-line ​storage is memory that can be safely
removed from the computer.

RAM - Random Access Memory


This memory is volatile (data is lost when the power is off). It is used to store programs and files
that are currently in use. For any program or file to be used it must be copied into the RAM first.

ROM - Read Only Memory


This memory is non-volatile. It is used to store the start-up procedures or BIOS (basic input output
system). This memory can only be read and not written to.

b) describe the principles of operation of a range of types of storage device and media
including magnetic, optical and solid state

Magnetic s​ torage devices use a magnetised medium to store data. Whether a bit is magnetised
or not indicated is that bit is a 1 or a 0. Examples include magnetic tape, standard HDDs (hard
disk drives). They are generally cheap, but not that reliable as the system includes moving parts.

Optical s​ torage devices use a laser to read/write data stored on a disk. Red lasers are used to
read DVDs and CDs and a blue laser is used to read/write to a blu-ray disk. Bumps and pits are
recorded onto a track, which represent 1s and 0s.Most disks have a single track that starts in the
centre of the disk and spirals outwards, however, a DVD-RAM disk has tracks in concentric circles.
CDs typically store 700MB, DVDs 4.7GB and Blu-Ray discs 25GB. Dual layer DVDs store 8.5GB and
dual layer Blu-Ray disks store 50GB. Optical memory is susceptible to scratches on the surface
on the disk which can skew data, as the disk has be spun round at high speeds it is also
susceptible to mechanical failure due to moving parts.

Flash ​storage uses semiconductors to store data. Millions of transistors are either on or off which
represent the 1s and 0s. Flash memory is solid. There are no moving parts, unlike magnetic and
optical, this makes it more reliable. It is more expensive to manufacture than magnetic or optical
storage. SSD (solid state drives) use flash memory, as do USB flash drives and SD cards.
c) describe how these principles are applied to currently available storage solutions,
such as SSDs, HDDs, USB flash memory, DVDs, CDs and Blu-ray discs

See 1.3.5 b)

d) calculate the storage requirement of a file

Files are measured using the measurements in 1.1.1 c). If you are asked to calculate the storage
requirements of a file you will be give all of the numbers you need in the question. They may ask
you to give your answer in a different form to that in the question (for example they may give
you a number of bits and ask you to work out the number of bytes). Image size is a popular
choice for this sort of question, it is important that you include the colour depth when calculating
this size ((height in pixels x width in pixels) x colour bit depth = total size). Be careful with units, and
simplify calculations where possible.

1.3.6 Operating systems

a) describe the purpose of an operating system (Candidates will be required to


understand the purpose and function of an operating system and why it is needed.
They will not be required to understand how operating systems work.)

An o
​ perating system i​ s the software running in the background of a computer. It manages
many of the basic functions of the computer, including:

● Human-computer interface (HCI) ● Processor management


● Multi-tasking ● Memory management
● Multiprogramming ● Real-time processing
● Batch Processing ● Interrupt handling
● Error handling/reporting ● Security (log on, username/password
● Load/run applications etc.)
● Management of user accounts ● Input and output control
● File utilities (such as copy and delete)

Not every computer requires an operating system, for example the microprocessors controlling
ovens or washing machines will not require one as they carry out simple, unchanging tasks.

b) show understanding of the need for interrupts

An i​ nterrupt ​is a signal sent from a device or software to the processor requesting its attention.
The interrupt will cause the processor to temporarily stop what it is doing to service the interrupt.
Examples include: pressing ALT+CTRL+BREAK, a paper jam in a printer, or software trying to
divide by zero.
1.3.7 High- and low-level languages and their translators

a) show understanding of the need for both high-level and low-level languages

A computer program is a list of instructions that enable a computer to perform a specific task.
Computer programs can be written in high-level or low-level language depending on the task to
be performed. Low level languages access the processor and memory directly however high
level languages require translating into a low level language before they can run. Most programs
are written in high-level languages.
High-level languages e ​ nable a programmer to focus on the problem to be solved and require no
knowledge of the hardware and instruction set of the processor that will be used. High-level
languages can be used on different types of computer.
Low-level languages r​ elate to the specific processor of a particular computer. Low-level
languages can refer to machine code or assembly language (which needs to be translates into
machine code).

b) show understanding of the need for compilers when translating programs written in a
high-level language

A compiler is a computer program that translates a program written in a high-level language into
machine code so that it can be directly used by a computer to perform a task. A compiler will
attempt to translate the entire code at once, and report all of the errors at the end, at once.

c) show understanding of the use of interpreters with high-level language programs

An interpreter is a computer program that reads a statement from a program written in a


high-level language, performs the action specified and the does the same with the next
statement and so on. This means that any errors are reported as they occur, line by line. If an
Interpreter encounters an error it will not move onto the next line.

d) show understanding of the need for assemblers when translating programs written in
assembly language

An assembler is a computer program that translates a program written in an assembly language


into machine code so that it can be directly used by a computer to perform a required task.

1.4 Security

1.4.1
a) show understanding of the need to keep data safe from accidental damage, including
corruption and human errors

Data can be accidentally damaged by a number of external factors e.g. fire, accidental deletion,
accidental overwriting, hardware failure, software faults etc.
b) show understanding of the need to keep data safe from malicious actions, including
unauthorised viewing, deleting, copying and corruption

Malicious acts can also prevent data from being safe. Most accidental methods of data damage
can be done intentionally.

1.4.2
a) show understanding of how data are kept safe when stored and transmitted,
including:
i) use of passwords, both entered at a keyboard and biometric
Strong passwords are important. Weak passwords are easy to guess and use
common, easy to remember words or letters.

ii) use of firewalls, both software and hardware, including proxy servers
Firewalls are described in 1.2.2

iii) use of security protocols such as Secure Socket Layer (SSL) and Transport
Layer Security (TLS)
SSL i​ s a protocol (set of rules) used by computers to communicate with each other
across a network. It allows data to be send a received securely across a network,
including the internet. HTTP​S ​indicated that SSL is being used. When a user wants to
access a website, the web browser asks the web server to identify itself, the web
server sends a copy of the SSL certificate which the web browser authenticates. If it
is OK then SSL data transfer beings between the user’s computer and the web
server.
TLS ​is similar to SSL but is more recent and more effective. Only recent web
browsers support TLS. It uses a record protocol and a handshake protocol.

iv) use of symmetric encryption (plain text, cypher text and use of a key) showing
understanding that increasing the length of a key increases the strength of the
encryption
Encryption can be symmetric:
● Uses a secret key; when the key is applied, the plain text goes through an
encryption algorithm to produce ciphertext. The recipient needs a key to then
decrypt the message back into plain text.
● The main risk is that the sender and recipient need the same key, which is
susceptible to being hacked or intercepted
Encryption can also be asymmetric:
● Asymmetric encryption uses public and private keys.
● The public key is available to everybody and the private key is only known to
the user.
● Both keys are needed to encrypt and decrypt messages
1.4.3
a) show understanding of the need to keep online systems safe from attacks including
denial of service attacks, phishing, pharming

A denial of service attack is an attempt at preventing users from accessing part of a network,
usually internet servers. They can prevent users from accessing certain websites or accessing
online services. This is achieved by the attacker flooding the network with useless traffic. For
example, sending thousands of requests to a website or sending out thousands of spam emails to
users ‘clogging up a system’.

Other definitions can be found in 1.2.2

1.4.4
a) describe how the knowledge from 1.4.1, 1.4.2 and 1.4.3 can be applied to real-life
scenarios including, for example, online banking, shopping

Make sure your answers to this sort of question relate directly to the context of the question. For
example, don’t mention internet security if the system in question is offline.

1.5 Ethics
a) Show understanding of computer ethics, including copyright issues and plagiarism.

Computer ethics is a set of principles set out to regulate the use of computers to stop unethical
things from happening. Copyright is a system to prevent somebody from copying something
without permission. Plagiarism is the act of copying somebody's work and claiming it is your own.

b) distinguish between free software, freeware and shareware

Free software - Users have the freedom to run, copy, change or adapt the software.
Freeware - Users can download free of charge, but it is subject to copyright laws so the user
cannot copy, change or adapt the software.
Shareware - Users are allowed to try out shareware free for a trial period. At the end of this
period, the user will be requested to pay a few. Sometimes the trial version does not have all of
the features of the full version.

c) show understanding of the ethical issues raised by the spread of electronic


communication and computer systems, including hacking, cracking and production of
malware

Ethical issues include:


● privacy - should authorities be able to see our personal data?
● Digital ownership - copyright and open source
● Data gathering - CCTV and other monitoring methods
● Access costs - should the internet be free?
● Ethical hacking - is hacking ever good?
Bits of Bytes and HODDERS Book has been used throughout for
images and all the content. 👽 Notes by Sakula
Topics which will be covered-
- logical binary shift on a positive 8-bit
binary integer and understand the effect this has
on the positive binary integer

- two’s complement to represent positive and


negative 8-bit binary integers

- Addition of binary

Addition of binary- (with 2 digits)

With 3 digits-
With the addition there sometimes is an error when you add and that
can be while adding 8-bit binary you might end up with a 9-bit number.
This type of error is known as an overflow error. (The maximum denary
value of an 8-bit binary number is 255).Hence the generation of 9th
bit value shows an error.
Example-

A generation of 9th bit shows the error.

Logical binary shifts-

Computers can carry out a logical shift on a sequence of binary


numbers. The logical shift means moving the binary number to the left
or to the right. Each shift left is equivalent to multiplying the
binary number by 2 and each shift right is equivalent to dividing the
binary number by 2.

However, we can only perform specific number of shifts for a number


and eventually it will contain only zeros after a while.For example-
if we shift 01110000 five places left, in an 8-bit register we would
end up with 00000000.112x32=0?

This would result in generation of an error message.

Example on how to do this-

Two’s complement (binary number)


-to allow the possibility of representing negative integers we make
use of two’s complement. There is a minor change in heading-

In two’s complement the left-most bit is changed to negative value.

Examples on how to do this makes it easier to know.

Question- Convert a)38 b)125 to 8-bit binary numbers using the two’s
complement format.

There are 2 ways to approach this. The second method is easier.

*Note that a two's complement number with a 1-value in the -128


column must represent a negative binary number

Practice few more questions and this will be easy af. List of
questions- Covert -79.Conevert -69.
Topics to be covered-
Character sets, representation of sound, representation of bit map
images and data compression stuff.

What to know list-

Understand how and why a computer represents


text and the use of character sets, including
American standard code for information
interchange (ASCII) and Unicode

Understand how and why a computer represents


sound, including the effects of the sample rate
and sample resolution

3) Candidates should be able to:

Understand how and why a computer represents


an image, including the effects of the resolution
and colour depth

Calculate the file size of an image file and a


sound file,

4) Candidates should be able to:

Understand the purpose of and need for data


compression

Understand how files are compressed using lossy


and lossless compression methods-

•Lossless compression reduces the file size


without permanent loss of data, e.g. run length
encoding (RLE)
• Lossy compression reduces the file size by
permanently removing data, e.g. reducing
resolution or colour depth, reducing the sample rate
or resolution

ASCII codes.
Character sets-are a list of recognized characters that can be
represented and used by a computer. In a character set each character
is represented by a denary number, Binary number and Hexadecimal
number.

Each character on your keyboard is represented by a binary number,


this means that when, for example you press the "H" key, the binary
number 01001000 is sent to the CPU. The CPU will then check the ASCII
table to see which character this is before outputting it in the
desired location.

Originally ASCII used only 7 bits to represent each character, this


allowed for 128 different characters to be represented. This quickly
became too little so an extra bit was added. ASCII now uses 8 bits to
represent each character.

1 is actually being treated as a string and not an integer.This can


cause an issue in programming if data types are not correctly stated.

Unicode
Being able to represent only 256 characters is fine for the English
language, however, as we know there are many languages in the world
that use different letters e.g. Russian, Chinese...
Unicode uses 16 bits to represent each character, this allows for up
to 65,536 different characters to be represented... more than enough
for every language and some special characters. ☺

Advantages of unicode-

Unicode can support the characters from any language in the world
where ASCII can only support the Basic English language. The character
set of ASCII was about 128 characters, and the Unicode supports over
1,000,000 characters. The Unicode encoding standard supports up to 4
bytes for each of the characters.

Bitmap images

Bitmap files are images that are made up from a number of tiny square

pixels.A Pixel is known as the smallest identifiable part of an image.

Each pixel can only be one single colour at a time,each pixel can

determine what colour to display as it is represented by a binary

value that corresponds to a colour.

Resolution is the concentration of pixels that are within a specific

area i.e. an image. The greater the number of pixels within a specific

area, the higher the image quality.

Representation of an image

Bitmap images have each pixel represented with a binary number and
this binary number will correspond to a colour. For simple black and
white images like this only 1 bit is require to represent each pixel.
This is because 1 bit offers 2 different states 1 or 0.

As the image only has 2 colours, black and white, 1 bit is enough to
offer 2 different representations.

Increasing the number of colours


To increase the detail of an image, you may find it necessary to add
colour. It is possible to add many colours to an image, however, to do
so you must increase the number of bits that represent each pixel.

NUMBER OF COLOURS - NUMBER OF BITS


Each time you increase the number of colours in an image you will need

to increase the number of bits being used to represent each pixel.

Effect on file size

Increasing the number of pixels

It is important to note that if you increase the resolution of an

image it will increase its quality, however it will also increase the

file size as there will be more pixels each represented by bits (data)

Increasing the number of colours

It is also important to note that increasing the number of colors will

improve the quality of the image, however it will also increase the

file size as each pixel will now be represented by more bits (data)

Calculating file size-

Formula- image resolution (in pixels) x colour depth (in bits) 8 bit =

1 byte

For sound it is- sample rate (in Hz) x sample resolution (in bits) x

length of sample (in seconds)


Representation of sound-

The sounds that we hear and that can travel through the real world

come in the form of analogue waves, analogue waves are continuous.

Analogue sound signals are continuous where as digital signals are

discrete

Sound Sampling

The process of converting an analogue signal into a digital one is


known as sampling. Sampling involves taking a sample of the analogue
signal at set intervals:

In the image above you can see the red line which represents the
analogue sound wave. The black line represents the digital signal and
the sampling process.

Each time the black line meets the analogue wave, a sample is taken.
This sample is essentially a binary representation of a sound note.

The Y Axis represents the bit depth. In this case there are 16
different possible notes (0 - 16), to represent 16 different states
you need 4 bits. This means that each sample is 4 bits.
The X axis represents the sample frequency, samples are always taken
at a consistent, set frequency.

Sampling rate- is the number of sound samples taken per second. This
is measured in hertz (Hz).

IMPROVING SOUND FILE QUALITY

Increasing the Bit Depth

In the above example. the bit depth is only 4 thus allowing for only

16 different sounds to be represented.

To achieve this we can increase the bit depth. Increasing the bit

depth will increase the accuracy of which the analogue wave can be

sampled.

Increasing the bit depth will increase the sound quality, but it will

also increase the file size as each sample will be represented by more

bits.

Increasing the Sample Frequency

Another way to improve the quality of the sound file is to increase

the sample frequency. The more frequently that you sample the

analogue wave, the less parts of the wave will be left out thus

increasing the quality.

Increasing the sample frequency will increase the sound quality, but

it will also increase the file size as there will now be more samples,

each to be represented by the bits that make the sample.


Data Compression

There are 2 types of compression-

Lossy- to work it must permanently remove data from the image


It will then try to reconstruct the image without the missing data.
This will result in a file size that is smaller, however, the quality
will be much lower. Compression algorithm used.

Lossless- Lossless compression does not remove any data from the file
instead it uses algorithms to spot patterns of similarly coloured
pixels. It then stores the pattern as an instruction so that the image
can be reconstructed to its original quality.

One popular lossless compression method is RLE (Run Length Encoding)

Run length encoding involves counting the number of pixels of similar

colour and stating how many of each are needed.

Example-

-> If we use this duck image as an example we can see that it has 4

colours therefor has a bit depth of 2.

If Green is 00 the first line would look like this:

00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00

With RLE the algorithm would count that there are 17 Green pixels and

simply represent this like below:

10001 - 00 (This means 17 x Green)

Run-length encoding (RLE)


» it reduces the size of a string of adjacent, identical data (e.g.
repeated colours in an image)

» a repeating string is encoded into two values:


- the first value represents the number of identical data items (e.g.
characters) in the run
- the second value represents the code of the data item (such as ASCII
code if it is a keyboard character)

» RLE is only effective where there is a long run of repeated


units/bits

For example if we use it on text-

Consider the following text string: 'aaaaabbbbccddddd'. Assuming each


character requires l byte then this string needs 16 bytes. We consider
it to be ASCII.

First parameter shows that how many times it is being repeated.The


second parameter shows the ASCII code for the value. Now the data is
only 8 bytes.

For data like 'cdcdcdcdcd' the RLE is not very effective so we use a
flag. A flag data shows that there is repetition.

Consider this example-

The coded version contains 18 values and would require 18 bytes of


storage. Introducing a flag (255 in this case) produces:

Compressing sound- With sound the compression algorithm works using


the scientific idea that humans cannot hear all parts of a sound wave.
(Human hear range 8Hz to 22Hz)

Works by taking out the samples of a sound wave that were outside of
the normal human hearing range. This in theory should not reduce
quality too much, but will decrease the file size. Know as Perceptual
Music Shaping and it is the method used for MP3 files
Topics to be covered-

Candidates should be able to:

(a) Understand that data is broken down into


packets to be transmitted
(b) Describe the structure of a packet
(c) Describe the process of packet switching

(d) Understand the universal serial bus (USB)


interface and explain how it is used to transmit
data

Candidates should be able to:

Understand how data is encrypted using


Symmetric and asymmetric encryption

Router- a device that enables data packets to be moved between


different networks, for example to join a LAN to a WAN

Packets- (Data sent over long distances is usually broken up into


data packets)

Before a file is sent across the internet it must be split up into a


series of packets. Packets are essentially smaller chunks of the
larger file that will be transmitted individually.
This data has now been split up into 291 packets which means we can
now create 291 different packets for transmission. However, we can’t
just send the raw packet. There needs to be additional information
with it too or else it will be arranged in any order. Hence, each
packet has 3 things -Header, Payload then Trailer. This will make the
packet to get correctly rebuilt.

The Header
The header contains information that allows the packet to reach the
correct destination and for the whole file to be correctly rebuilt
once all packets have been received. The key pieces of information
included in the header are:

● IP address of the recipient


● IP address of the sender
● Number of Packets being sent
● Packet sequence number (E.g. 5 /291)

The Payload
The payload is the section of the packet that holds the actual data
from the file segment that is being transmitted. The diagram below
shows the example for the packet transmitting section 213 of the
example beach image:

The trailer is also sometimes referred to as the footer. It simply

identifies the end of the packet.


PACKET SWITCHING
What is packet switching?

● Packet switching is the breaking down of large files into smaller

pieces (Packets).

● Each packet is then sent to the recipient separately rather than

together. Each packet can travel to its destination taking an

entirely different route.

● Upon receiving all of the packets, the recipient will use the

data contained in each packets header to check that all packets

have been received and rebuild the file in the correct order.

● If any packets are missing, a request will be sent back the

sender asking for the missing packet(s) to be resent.

● Each stage in the route contains a router.

● At each stage in the transmission, there are nodes that contain a

router. Each router will determine which route the packet needs

to take, in order to reach its destination.

What happens?

» each packet will follow its own path (route)

» routers will determine the route of each packet

» routing selection depends on the number of packets waiting to

be processed at each node

» the shortest possible path available is always selected - this

may not always be the shortest path that could be taken, since

certain parts of the route may be too busy or not suitable

» unfortunately, packets can reach the destination in a different

order to that in which they were sent.


Universal Serial Bus (USB)

The USB is now the most commonly used input/output port with modern
computers. This universal implementation makes for the very convenient
and easy interchangeability of peripheral devices.

Just how good is it?

Automatic detection - When a USB device is plugged in it is


automatically detected by the computer.

Automatic recognition and setup- When a USB device is plugged in, the
computer will automatically determine what type of device it is and it
will load the correct driver software.

Setup Assistance - If an unusual or new type of device is plugged in


and the correct device driver is not already available on the computer
system, the USB protocol will inform the user that new device software
is needed.

Another drawback to be considered- even the latest version 3 (V3)


and version 4 (V4) USB-C systems have a data transfer rate which is
slow compared to, for example, Ethernet connections

USB C is a new type of USB.It comes with backward compatible.It is


much smaller and thinner than older USB connectors, offers 100 watt
(20 volt) power connectivity, which means full-sized devices can now
be charged and it can carry data at 10 gigabits per second (10 Gbps);
this means it can now support 4K video delivery.
Encryption-

The scrambling of data so that it is no longer in an understandable


format.

There are 2 types-

Symmetric- One basic example of symmetric encryption is the Ceasar


shift cipher.

How it works:

1. First obtain the message that you wish to encrypt, in this


example our plain text is - "Bits of bytes"
2. The next step is to choose a key, the key is a number between one
and 26 (Number of letters in the alphabet)
3. To encrypt you simply shift each letter of the plain text forward
in the alphabet in correspondence to what number the key is
4. To decrypt, you shift the letters of the cipher text backwards
through the alphabet in correspondence to what number the key is.
Even after being a good method to protect data hackers can still skew
your data as you will send your encryption key with the data hence
they can use it and decrypt data easily.So here comes the second type
of encryption called Asymmetric Encryption.

Asymmetric Encryption-

The two keys involved in the process are both produced by the party
that wishes to securely receive data. These keys are:

The Public Key


This key is used by the sender to encrypt data before sending it to
the receiving party. The key is produced by the receiver and it can
be made available publicly for anyone that wishes to send data to the
receiving party. This key does not need to be kept secret as it can
only be used to encrypt data. It is impossible to decrypt data using
the public key.

The Private Key


The private key be kept securely by the person that wishes to receive
data securely. This is the key that can decrypt any data that
encrypted using the public key.
Chapter 3.exe from next page.

Topics to be covered-

Candidates should be able to:

a) Understand what is meant by a core, cache and


clock in a CPU and explain how they can affect
the performance of a CPU

b) Understand the purpose and use of an instruction


set for a CPU

c) Describe the purpose and characteristics of an


embedded system and identify devices in which
they are commonly used

Candidates should be able to:


a) Describe what is meant by virtual memory, how
it is created and used and why it is necessary

b) Understand what is meant by cloud storage

c) Explain the advantages and disadvantages of


storing data on the cloud in comparison to
storing it locally

d)Understand that a computer needs a network


interface card (NIC) to access a network

3(a) Understand what is meant by and the


purpose of an internet protocol (IP) address

(b) Understand that there are different types of


IP address

(c)Describe the role of a router in a network

Core,cache and Internal Clock

There are a lot of factors which effect the performance of a CPU.


There are 5 things which effect the performance:
1)System Clock-The clock defines the clock cycle run the computer
operations. By increasing clock speed the processing speed of the PC
also increased. Hence this means now your pc can carry out more task
in less time. 3.5GHz is a good clock speed. (means you pc carries out
3.5 billion cycles a second)

2) The width of address and data bus can also affect performance.

3) Overclocking-This means increasing your clock speed by accessing


your BIOS (Basic Input/output System) and altering their settings.
This however can cause some problems such as:
(i) Execution of instruction outside design limits. The computer would
frequently crash!
(ii) Overclocking can lead to overheating.
4)Use of cache memory-
● Cache is located in CPU
● Cache stores frequently used instructions
● CPU check cache then goes to RAM when reading memory
● Larger the size of cache memory better the performance.
5) The use of different number of cores as each core can handle a
different data thread simultaneously, allowing for a much quicker
transfer of data at any given time.

Embedded Systems

Embedded Systems is a combination of hardware and software which is


designed to carry specific task.
They can be based on-

Microcontroller-A microcontroller is an example of a single board


computer (SBC) and is manufactured as an integrated circuit (IC). It
can be programmed to perform different processing functions.

Microprocessor-integrated circuit which only has a CPU on chip (no ram


rom)

Systems on chips(SoC)- may contain microcontroller as one of its


components (always almost CPU)

Examples of embedded systems include:

● central heating systems


● engine management systems in vehicles
● domestic appliances, dishwashers and TVs
● digital watches
● electronic calculators
● GPS systems
● fitness trackers

Embedded systems can have advantages over general purpose computers in


that:

● Their limited number of functions means they are cheaper to


design and build.
● They tend to require less power. Some devices run from
batteries.
● They do not need much processing power. They can be built using
cheaper, less powerful processors.

Embedded Systems disadvantages-

● it can be difficult to upgrade some devices to take advantage of


new technology
● troubleshooting faults in the device becomes a specialist task
● the internet is also open to hackers, viruses, etc
● can lead to an increase in the ’throw away’ society if devices
are discarded just because they have become out-of-date

-> These are not programmable by user they are already programmed
by the manufacturer. It can be possible to update the software
though. This can be done by connecting them to your PC.

Data Storage

Solid State storage (SSD)

● Latency was issue in HDD.So SSD doesn’t have any moving


parts.
● It works by controlling movement of electrons by NAND or
NOR chips.
● The data is stored as 0s and 1s in millions of tiny
transistors
● This effectively produces a non-volatile rewritable memory.

Floating gate and control gate transistors

● This uses CMOS (complementary metal oxide semi-conductor) and


NAND.
● Flash memories make use of a matrix: at each intersection on the
matrix there is floating gate and control gate.
● A dielectric coating separates the two transistors which allows
the floating gate transistor to retain its charge.
● The floating gate has value 1 when charged and value 0 when
uncharged.
● A voltage is applied to the control gate and electrons move but
get stuck in floating gate
● By this you have control over the bits value stored

Benefits of SSD

● they are more reliable (no moving parts to go wrong)


● they are considerably lighter (which makes them suitable for
laptops)
● they don't have to 'get up to speed' before they work properly
● they have a lower power consumption
● they run much cooler than HDDs (both these points again make them
very suitable for laptop computers)
● because of no moving parts, they are very thin
● Data access is considerably faster than HDD.

virtualmemory.exe on the next page

Virtual memory uses both hardware and software to enable a


computer to compensate for physical memory shortages, temporarily
transferring data from random access memory (RAM) to disk
storage.

RAM = physical memory and virtual memory = RAM + swap space on


the HDD or SSD.

So to execute program in this data is loaded from HDD or SSD


whenever required.

Virtual memory gives the illusion of unlimited program being


present this can be true as even though RAM is full data can be
moved from HDD and SSD.
In OS paging is used by memory management to store and retrieve
data from HDD/SSD and copy it into RAM

A page is a fixed length consecutive block of data utilized in


virtual memory systems.

Virtual memory works by allowing data blocks to be moved from HDD


to RAM.

Benefits-

● » programs can be larger than physical memory and still be


executed
● > there is no need to waste memory with data that isn't
being used (e.g. during error handling)
● it reduces the need to buy and install more expensive RAM
memory (although as mentioned earlier there are limits to
the value of doing this).

Using HDD for virtual memory cause problem such as disk thrashing. As
main memory fills data needs to be swapped frequently leading to very
high rate of reading and writing movement(this is known as disk
thrashing).

More time is eventually spent moving data out of memory and processing
it this will reduce PC performance and will come a point where
everything will come to halt as the system gets busy ‘moving’ the
data.This is known as thrash point.

Can also lead to failure of HDD

Install RAM to avoid this or use SSD for virtual memory.

CLOUD STORAGE
Cloud Storage i

s a method of data storage where data is stored on remote


servers.

Data Redunduncy- Storing the same data on more than one server in
case of maintenance and repair to let the people access it
anytime.

3 common systems

Pulic cloud-storage environment where customer and cloud storage


provider are different companies

Private cloud-Private cloud provides a high level of security and


privacy to data through firewalls and internal hosting.For data which
is sensitive.

Hybrid Cloud-Combination of both.Some data is sensitive and the less


sensitive can be accessed by public cloud.

Instead of storing data in HDD or SSD we store it in ‘cloud’.

Potential data loss when using cloud


There is a risk that important data could be stolen and deleted from
cloud storage as there is always another loop hole in system.

Some risks-
● The XEN security threat which forced many cloud operators ro
reboot all cloud server.Problem cause by XEN hyoervisor
● Hackers can gain access to your account and sell your photos
personal sensitive information
● Cloud service provider lost data during back up routine.

Network Interface Card


A NIC is needed to allow a device to connect to a network.It contains
MAC Adress out in it during manufacturing.

WNIC (wireless) does the same job but allows wireless connectivity by
having antenna itself.

Types of MAC Address


UAA-Universally Administered MAC Address
LAA-Locally Administered MAC Address

UAA is the most common and it’s set at the manufacturing time in the
factory. Rare for user to want to change it.

The address can be changed but will cause problems if not unique.

There are a few reasons why the MAC address needs to be changed
using LAA:

» certain software used on mainframe systems need all the MAC


addresses of devices to fall into a strict format

» necessary to bypass a MAC address filter on a router or a firewall;


only MAC addresses with a certain format are allowed through,

» to get past certain types of network restrictions it may be


necessary to emulate unrestricted MAC addresses

There are 2 types of IP address IPv4 and IPv6


● IPv4 is based on 32 bits and the address is written as four
groups of eight bits
● 32 bits used in IPv4 which reduced number of router being used at
once

● To solve the problem we have IPv6 which has 128 bits in eight
groups and uses HEX code
● allows the internet to grow in terms of the number of hosts and
potential increase in the amount of data traffic
● Advantages over IPv4 are
● removes the risk of IP address collisions
● » has built-in authentication checks
● » allows for more efficient packet routes

There are 2 types of IP address.Staic and Dynamic


Static ram is usually assigned to you by your ISP and can;t be changed
even if you log onto any other device.
There are usually assigned to -
● An online database
● Remote server hosting website
● A File transfer protocol server

Dynamic Ip addresses are assigned by the ISP each time a device logs
onto the internet.This is done using DHCP (Dynamic Host configuration
protocol).A device with this changes IP address with every login.

Routers

● Routers enable data packets to be routed between different


networks, for example, to join a LAN to a WAN.
● It takes data transmitted in one format and changes it to the
format network could understand.

● Usually has internet cable in it which allows PC and other


devices to connect to LAN.

❖ Router's main function is to transmit internet and transmission


protocols between two networks

● also allow private networks to be connected together.

Broadband one sits behind the firewall which protects computers on a


network.

How things happens?


● Router inspects any data packet sent to it through the network
connected to it.Since every computer is connect on the same
network has the same part of IP Address.

● Router is able to send the data packet to appropriate switch then


the data will be sent to the correct device using MAC Address.

● If MAC Address doesn’t match any device connected to switch the


data is then forwarded and passed on until an appropriate device
is found.

Routers can be connected through wires and wirelessly.

INSTRUCTION SET

In a CPU, the instruction set refers to the different types of


operations that a CPU is capable of performing.
Instruction sets are referring to the low level machine code
instructions that a CPU is built to handle.
Low level operations are split into an opcode and an operand.

Opcode - Represents the machine instruction i.e. what it has to do -


ADD, LOAD, STORE or SUBTRACT

Operand - This is either the value to be operated on OR the address


that holds the value to be operated on.

Each CPU only has a limited number of opcodes available to them and
the available opcodes is what is referred to as the instruction set.

● As the instructions are hard coded with transistors it is


obviously not possible to add more with a software update

Registers

Registers are small amounts of high-speed memory contained within the


CPU. They are used by the processor to store small amounts of data
that are needed during processing, such as:

• the address of the next instruction to be executed


• the current instruction being decoded
• the results of calculations

BUS
A bus is a high-speed internal connection. Buses are used to send
control signals and data between the processor and other components.

Three types of bus are used:

• Address bus - carries memory addresses from the processor to other


components such as primary memory and input/output devices.
• Data bus - carries the actual data between the processor and other
components.
• Control bus - carries control signals from the processor to other
components. The control bus also carries the clock's pulses.

Cache

Cache is a small amount of high-speed random access memory (RAM) built


directly within the processor. It is used to temporarily hold data and
instructions that the processor is likely to reuse. This allows for
faster processing as the processor does not have to wait for the data
and instructions to be fetched from the RAM.

Stored Program Concept;

It uses a CPU which can directly access the memory. The computer memory
can store data as well as instructions. These instructions could be
fetched, decoded and then executed in a sequential order.

- Data stored on circular disks called platters which are divided into tracks and sectors - Spindle
rotates the platters under the read/write heads - Read/write heads access and add data to the
platters using electromagnets - Slower than SSD because of longer access time - Usually larger
storage than SSD - Less expensive than SSD
AS Computer Science Table of Contents 9/14/2023

Table of Contents
Table of Contents ............................................................... 1
Data Representation ............................................................. 3
Number Systems ................................................................ 3
Binary Numbering System ....................................................... 3
Conversions ................................................................. 3
Addition & Subtraction ...................................................... 5
Measurement of the Size of Computer Memories ................................ 9
Hexadecimal System ............................................................ 9
Converting Hexadecimal to Binary ............................................ 9
Converting Binary to Hexadecimal ........................................... 10
Use(s) of the Hexadecimal System ........................................... 10
Binary Coded Decimal (BCD) System ............................................ 11
Half Byte Method ........................................................... 11
Complete Byte Method ....................................................... 11
Uses of BCD ................................................................ 11
BCD Addition ............................................................... 12
ASCII & Unicode .............................................................. 12
Standard ASCII ............................................................. 12
Extended ASCII ............................................................. 12
Unicode .................................................................... 13
Multimedia ..................................................................... 13
Bit-map Images ............................................................... 13
Storing Bit-map Images ..................................................... 13
File Header ................................................................ 14
Vector Graphics .............................................................. 15
Vector Graphics vs Bit-map Images .......................................... 15
How to choose between the two .............................................. 16
Sound Files .................................................................. 16
Sound Varies ............................................................... 17
Vocabulary Time! ........................................................... 17
Pros & Cons of High Sampling Rate/Resolution ............................... 17

By Sarem Tahir Information Representation and Multimedia Page 1


AS Computer Science Table of Contents 9/14/2023
Sound Editing Software ..................................................... 17
Video ........................................................................ 18
File Compression ............................................................... 18
Lossless & Lossy Compression ................................................. 18
Applications ................................................................. 18
MPEG-3 or MP3 (Audio) ...................................................... 18
MPEG-4 or MP4 (Video) ...................................................... 19
Photographic (bit-map) Images .............................................. 19
Run-Length Encoding (RLE) .................................................. 19
General Methods of Compressing Files ......................................... 21
Sources (and Resources) Used ................................................... 22
Licence Information ............................................................ 22

By Sarem Tahir Information Representation and Multimedia Page 2


AS Computer Science Data Representation 9/14/2023

Data Representation
Number Systems
There are 3 main number systems which we need to be aware of.
We have already learnt this in IGCSE so I will summarize most of it into this
nifty little table:
Name Binary Denary Hexadecimal
Base Base-2 Base-10 Base-16
Example Uses Computers Everyday language Color codes
What does “base” mean?
When we say “base”, we are referring to the number of digits used by the
numbering system.
For example, the denary system is base 10 meaning it can use 10 digits (0 – 9).

Binary Numbering System


The binary system uses 1s and 0s which gives us these weights:
128 64 32 16 8 4 2 1
27 26 25 24 23 22 21 20

Conversions
Binary to Denary
Let’s say we want to convert 11010001 to denary:
1 1 0 1 0 0 0 1
Now, write down the weightings above the digits:
128 64 32 16 8 4 2 1
1 1 0 1 0 0 0 1
Now, we multiply the weight values with the binary values:
128 64 32 16 8 4 2 1
1 1 0 1 0 0 0 1
128 64 0 16 0 0 0 1
Finally, add up the final values:
128 + 64 + 16 + 1 = 209

By Sarem Tahir Information Representation and Multimedia Page 3


AS Computer Science Data Representation 9/14/2023
Denary to Binary
Let’s say we want to convert 156 to binary.
First up, write down the weights:
128 64 32 16 8 4 2 1

Now, the trick is to take the biggest weight which is smaller than the value and
put a one there.
In this case, 128 is the biggest weight which fits into 156.
128 64 32 16 8 4 2 1
1
Now, subtract the weight you chose in step one and then find the biggest weight
which is smaller than the answer.
In this case, 156 – 128 is 28.
The biggest weight which can fit in the number 28 is 16.
128 64 32 16 8 4 2 1
1 1
Now, do step 2 over and over until we have nothing left.
So, 28 – 16 = 12 and the largest weight which goes in 12 is 8.
12 – 8 is 4 and the largest weight which fits into 4 is 4.
So we end up with:
128 64 32 16 8 4 2 1
1 1 1 1
Now, fill the rest of the empty spaces with 0:
128 64 32 16 8 4 2 1
1 0 0 1 1 1 0 0
This means that the binary for 156 is 10011100.

By Sarem Tahir Information Representation and Multimedia Page 4


AS Computer Science Data Representation 9/14/2023
Addition & Subtraction
One’s Complement
When we use one’s complement, we simply invert each digit.
For example, let’s say we need to perform one’s complement on 11010011
(211 in denary).
First, let’s write down the value:
1 1 0 1 0 0 1 1

Now, just invert the digits (1 to 0 and 0 to 1):


1 1 0 1 0 0 1 1
0 0 1 0 1 1 0 0
This gives us 00101100 which is -211.
Two’s Complement
When we use two’s complement, we invert each digit and add 1.
For example, let’s say we need to convert 01011010 (90 in denary).
First, we invert the digits of the binary value:
0 1 0 1 1 0 1 0
1 0 1 0 0 1 0 1
Now, we add a 1 to the value:
1 0 1 0 0 1 0 1
+ 1
1
1 0 1 0 0 1 1 0
Note: When we add 1 and 1, we carry 1 to the next digit and 0 remains

This gives us 10100110 (binary for -90).


Binary Addition
Let’s look at a few examples:
Example 1
Add 00100101 (37) with 01011111 (58).
First, write down the weights and the binary numbers:
-128 64 32 16 8 4 2 1
0 0 1 0 0 1 0 1
0 0 1 1 1 0 1 0
You may notice that we have a -128 weight, this is for the two’s complement used
for binary subtraction.
By Sarem Tahir Information Representation and Multimedia Page 5
AS Computer Science Data Representation 9/14/2023
Now, we simply add each digit.
-128 64 32 16 8 4 2 1
0 0 1 0 0 1 0 1
0 0 1 1 1 0 1 0
1
0 1 0 1 1 1 1 1
There are 4 main rules of addition:
1. 0 + 1 = 1
2. 0 + 0 = 0
3. 1 + 1 = 0 remainder 1
4. 1 + 1 + 1 = 1 remainder 1
Example 2
Let’s say we want to add 00110111 (55) with 00011100 (28):
First, write down the weights and the binary numbers:
-128 64 32 16 8 4 2 1
0 0 1 1 0 1 1 1
0 0 0 1 1 1 0 0
Now, we add them up using the previous technique:

This leaves us with the binary value of 01010011 which is 83 in denary.

By Sarem Tahir Information Representation and Multimedia Page 6


AS Computer Science Data Representation 9/14/2023
Binary Subtraction
When we do binary subtraction, it’s a bit complicated.
Basically, instead of simply subtracting the way we did in addition, we perform
two’s complement on one of the values and then add them together.
Example 1
Perform 69 – 21.
1. Convert the numbers to binary:
69 = 01000101
21 = 00010101
2. Find the two’s complement for the second value (21 in this case):
First we invert:
0 0 0 1 0 1 0 1
1 1 1 0 1 0 1 0
Then we add 1:
1 1 1 0 1 0 1 0
+ 1
1 1 1 0 1 0 1 1
This gives us 11101011 (-21).
3. Now, we add the two’s complement value with the first value (69):
-128 64 32 16 8 4 2 1
0 1 0 0 0 1 0 1
1 1 1 0 1 0 1 1
1 1 1 1 1
1 0 0 1 1 0 0 0 0
So we end with 100110000.
However, we have 9 bits instead of 8, this means that there is an “overflow”.
This overflow bit is simple omitted which leaves us with 00110000 (48).

By Sarem Tahir Information Representation and Multimedia Page 7


AS Computer Science Data Representation 9/14/2023
Example 2
Carry out the subtraction 11-53.
1. Convert the numbers to binary:
11 = 00001011
53 = 00110101
2. Find the two’s complement for the second value (53 in this case):
First we invert:
0 0 1 1 0 1 0 1
1 1 0 0 1 0 1 0
Then we add 1:
1 1 0 0 1 0 1 0
+ 1
1 1 0 0 1 0 1 1
This leaves us with 11001011 (-53).
3. Now, we add the two’s complement value with the first value (11):
-128 64 32 16 8 4 2 1
0 0 0 0 1 0 1 1
1 1 0 0 1 0 1 1
1 1 1
1 1 0 1 0 1 1 0
So we end with 11010110 (-43).
How to Check the Answer?
Obviously, we need a way to check if our answer was correct.
Let’s take 11-53 as an example, here we got the answer as 11010110.
To check if this is -43, we first put it in the weights:
-128 64 32 16 8 4 2 1
1 1 0 1 0 1 1 0
Now, we multiply each value with its corresponding weight and add them up:
-128 64 32 16 8 4 2 1
1 1 0 1 0 1 1 0
-128 64 0 16 0 4 2 0
-128 + 64 + 16 + 4 + 2 = -42
And BOOM, done.

By Sarem Tahir Information Representation and Multimedia Page 8


AS Computer Science Data Representation 9/14/2023
Measurement of the Size of Computer Memories
There are 2 systems which are used for computer memory, the book doesn’t give any
specific names but we can call them the “binary system” and “decimal system”.
Decimal System Binary System
The system we are used to is the This is a system which is much more
decimal system, this one uses units accurate than the decimal system; this
which are to the powers of 10s. is because in reality, memory is
measured in powers of 2.
Name Short Form Bytes
1 Kilobyte 1 KB 1 × 103 Name Short Form Bytes
1 Megabyte 1 MB 1 × 106 1 Kibibyte 1 KiB 210
1 Gigabyte 1 GB 1 × 109 1 Mebibyte 1 MiB 220
1 Terabyte 1 TB 1 × 1012 1 Gibibyte 1 GiB 230
1 Petabyte 1 PB 1 × 1015 1 Tebibyte 1 TiB 240
1 Pebibyte 1 PiB 250

Hexadecimal System
This system is very similar to the binary system with the only difference being
that it uses powers of 16.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
0 1 2 3 4 5 6 7 8 9 A B C D E F

Converting Hexadecimal to Binary


This is done in the reverse of the binary to hexadecimal method.
Let’s say we want to convert 7D to binary:
1. We split the digits into 2 groups and then make 4 sub-groups with weights:
Group 2 Group 1
7 D
8 4 2 1 8 4 2 1
2. Since we have a letter, we should know what number it is.
In this case, it’s D which is 13.
Now, we do the same thing we did with binary conversions where we shared the
number into the weights:
Group 2 Group 1
7 D
8 4 2 1 8 4 2 1
0 1 1 1 1 1 0 1
3. This leaves us with 01111101.

By Sarem Tahir Information Representation and Multimedia Page 9


AS Computer Science Data Representation 9/14/2023
Converting Binary to Hexadecimal
Let’s say we wish to convert 110111001 to hexadecimal.
1. Split the binary value into groups of 4:
Group 3 Group 2 Group 1
1 1011 1001
Now, since group 3 is not completely filled.
Just put 0s like so:
Group 3 Group 2 Group 1
0001 1011 1001
2. Now, write down a weight above each digit for each group:
Group 3 Group 2 Group 1
8 4 2 1 8 4 2 1 8 4 2 1
0 0 0 1 1 0 1 1 1 0 0 1
3. Now, multiply each of the 1s and 0s with the weightings and add them up:
Group 3 Group 2 Group 1
8 4 2 1 8 4 2 1 8 4 2 1
0 0 0 1 1 0 1 1 1 0 0 1
1 8 2 1 8 1
1 8 + 2 + 1 = 11 8 + 1 = 9
4. Now, we can determine which values are letters and then simply join them:
1 stays the same, 11 is B, and 9 stays the same.
This gives us “1B9”.

Use(s) of the Hexadecimal System


The hexadecimal system has a bunch of uses, this includes:
1. Memory dumps
2. HTML colour codes
3. IP Addresses
4. MAC Addresses
More on Memory Dumps
When we use hexadecimals, it makes much easier for us to read.
This is why we use hexadecimal when developing software which makes error tracing
easier.
For example, when the memory contents are output to a printer/monitor, this is
called a memory dump.

By Sarem Tahir Information Representation and Multimedia Page 10


AS Computer Science Data Representation 9/14/2023
Binary Coded Decimal (BCD) System
This system uses a 4-bit code to represent each denary digit.
Here’s a quick cheat sheet section:

0 0 0 0 = 0 0 0 1 0 = 2 0 1 0 0 = 4 0 1 1 0 = 6 1 0 0 0 = 8
0 0 0 1 = 1 0 0 1 1 = 3 0 1 0 1 = 5 0 1 1 1 = 7 1 0 0 1 = 9
These codes are stored in 2 ways:

Half Byte Method Complete Byte Method


This is when the value takes up half a This is when each value takes up a
byte each since each code is 4 bits. complete byte.
Example: Example:
Store 3615 using BCD. Store 3615 using BCD.
0 0 1 1 0 1 1 0 0 0 0 0 0 0 1 1 3
0 0 0 1 0 1 0 1 0 0 0 0 0 1 1 0 6
This method is much more storage 0 0 0 0 0 0 0 1 1
efficient as compared to the complete 0 0 0 0 0 1 0 1 5
byte method but does not allow us to This method is more costly in storage
have extra information such as but allows us to store more information
negatives or operators. in each value.

Uses of BCD
BCD is used mainly to represent and perform operations on numbers.
BCD is used in accounting systems, calculators, clocks, etc.
One common question is that why not just use binary addition instead?
Well, the answer is that binary addition isn’t entirely accurate which is why we
do not use it in our systems (failing math exams because of your calculator is
nightmare fuel).
Instead, we use BCD which is much more accurate as compared to binary addition.

By Sarem Tahir Information Representation and Multimedia Page 11


AS Computer Science Data Representation 9/14/2023
BCD Addition
Let’s say we want to add 0.04 and 0.07.
1. First, we write down the BCD values of each:
0 0 4 0 0 7
8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1
0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1
2. Now, we add the values: 4. Now, we add 1 to the next value (0
in this case):
0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1
1 1
0 0 0 0 0 0 0 0 1 0 1 1
3. As we know, 1011 is 11 but that is 0 0 0 0 0 0 0 1 0 0 0 1
not part of BCD which is why we add 5. This ends up giving us 0000 0001
0110: 0001 which is 0 1 1 which is
correct once formatted into the
decimal place: 0.11.

ASCII & Unicode


Standard ASCII
Some important points:
→ Used to represent letters, numbers, special characters, control codes, etc.
→ Consists of 7 bit codes (0-127).
→ Each character has a different code (uppercase and lowercase a would have
different values despite being the same letter).
→ Supports mainly English.
Note: We are probably going to be given the ASCII table if needed.

Extended ASCII
This character set is different to the standard ASCII set:
→ Consists of 8 bit codes (takes more space than standard ASCII).
→ Supports more languages (mainly European).

By Sarem Tahir Information Representation and Multimedia Page 12


AS Computer Science Multimedia 9/14/2023
Unicode
Since computers were being used all over the world, we needed a system which
supports other languages too (not only a handful of European languages), this is
exactly what Unicode did.
A few important points:
→ Can support many languages (Urdu, Hindi, Arabic, German, English, etc.).
→ Consists of 16-bit codes and 32-bit codes (Takes MUCH more space than Extended
ASCII & Standard ASCII).
→ A superset of both extended ASCII and Standard ASCII.
Note: the 16-bit and 32-bit codes refer to separate systems.
Both systems are knows as encodings and have pros and cons (not needed).

Multimedia
Bit-map Images
Bit-map image is an image made up of pixels stored in a 2D matrix.
A pixel is simply the smallest picture element which makes up an image.

Storing Bit-map Images


First thing we need to look at is the number of bits we have per pixel because
some images may use more colors than the other:
→ For color images, we need at least 8 bits per pixel which gives us 256 possible
colors of varying intensity.
→ True color images require 24 bits per pixel giving us around a million colors.
→ Black & white images require 1 bit per pixel.
Bit-Depth vs Colour-Depth
Colour Depth refers to the number of Bit depth refers to the number of bits
bits used to represent the number of needed to represent the smallest unit
colours in each pixel. in a file (such as audio or image
file).
The formula to find colour depth is:
Bit-depth has the same formula as
2𝐶𝑜𝑙𝑜𝑢𝑟 𝐷𝑒𝑝𝑡ℎ = 𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑐𝑜𝑙𝑜𝑢𝑟𝑠 colour depth.
A black and white image has 2 colours,
and 21 is 2 therefore the number of bits
needed for each pixel is 1.

The main difference between the two is that colour depth is related only to
colour but bit depth has many uses with a range to different file formats.
By Sarem Tahir Information Representation and Multimedia Page 13
AS Computer Science Multimedia 9/14/2023
Image Resolution vs Screen Resolution
Image resolution Screen resolution
This refers to the number of pixels it This refers to the number of horizontal
takes to form an image. and vertical pixels used to make the
screen display.
The formula for this is:
𝐻𝑒𝑖𝑔ℎ𝑡 𝑊𝑖𝑑𝑡ℎ 𝐼𝑚𝑎𝑔𝑒 The formula for this is:
× =
(𝑖𝑛 𝑝𝑖𝑥𝑒𝑙𝑠) (𝑖𝑛 𝑝𝑖𝑥𝑒𝑙𝑠) 𝑅𝑒𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛 𝑆𝑐𝑟𝑒𝑒𝑛 𝐻𝑒𝑖𝑔ℎ𝑡 𝑆𝑐𝑟𝑒𝑒𝑛 𝑊𝑖𝑑𝑡ℎ 𝑆𝑐𝑟𝑒𝑒𝑛
× =
(𝑖𝑛 𝑝𝑖𝑥𝑒𝑙𝑠) (𝑖𝑛 𝑝𝑖𝑥𝑒𝑙𝑠) 𝑅𝑒𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛
For example, if we have a logo with the
resolution of 500x500, the image For example, a display with the
resolution would be 500 × 500 which is resolution of 1920x1080, the screen
250,000 pixels. resolution would be 1920 × 1080 which
gives us 2,073,600.

The main difference between the two is that image resolution stays the same
(unless we reduce the resolution with compression) and is related only to the
image, screen resolution is related to the display and may change for computer to
computer (there are many resolutions from 800x600 to 1920x1080).
What Does Changing Resolution Do?
Resolution Type Change Effect
1. If the screen resolution was less than the image
Resolution
resolution before, then the image would become
Screen Increase
less fuzzy.
Resolution
Resolution 1. May become fuzzy if the screen resolution is less
Decrease than the image resolution.
Resolution 1. Image becomes clearer and carries more detail.
Increase 2. File size increases.
Image
1. Image quality may reduce due to lower resolution
Resolution Resolution
as the amount of pixels for the image is less.
Decrease
2. File size decreases.
Calculating File Size
To calculate the file size of an image, we use the following formula:
𝐹𝑖𝑙𝑒 𝑆𝑖𝑧𝑒 (𝑖𝑛 𝑏𝑖𝑡𝑠) = 𝑅𝑒𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛 × 𝐵𝑖𝑡 𝐷𝑒𝑝𝑡ℎ
To find Bit Depth, we use the formula: To find resolution we use the formula:
𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝐵𝑖𝑡𝑠 = 2𝐵𝑖𝑡 𝐷𝑒𝑝𝑡ℎ 𝐻𝑒𝑖𝑔ℎ𝑡 𝑊𝑖𝑑𝑡ℎ
𝑅𝑒𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛 = × (𝑖𝑛
(𝑖𝑛 𝑝𝑖𝑥𝑒𝑙𝑠) 𝑝𝑖𝑥𝑒𝑙𝑠)
File Header
When we save a bit-map image, we need to include a file header which contains
items such as file type, file size, image resolution, etc.

By Sarem Tahir Information Representation and Multimedia Page 14


AS Computer Science Multimedia 9/14/2023
Vector Graphics
Vector graphics are images which use 2D points to describe lines and curves and
their properties that are grouped to form geometric shapes.
These are designed using CAD software using an app which uses a drawing canvas on
the screen.
Vector graphics also contain a drawing list (included in the file header) which
is made up of:
→ The command used for each object in the graphic.
→ The attributes which define the properties that make up each object (these
include the brush thickness, position of points, etc.).
→ The relative position of each object is also included.
→ The dimensions of each object are not defined, but the relative positions of
objects to each other in the final graphic need to be defined; this means that
scaling the graphic will not cause loss of quality.

Vector Graphics vs Bit-map Images


Vector Graphics Bit-map Images
Made up of geometrical shapes which Made up of tiny pixels of different
require definitions/attributes. colours.
We need to change each shape if we wish It is possible to alter/edit each of the
to change the design. pixels to change the image design.
Do not take lots of space as the image These take lots of space as they use
is made up of simple shapes. pixels and are more detailed.
Does not work with realistic images due
Works with realistic images as the
to the limited number of shapes we can
images are built up pixel by pixel.
use.
File formats are .svg, .cgm, etc. File formats are .bmp, .jpeg, etc.

By Sarem Tahir Information Representation and Multimedia Page 15


AS Computer Science Multimedia 9/14/2023
How to choose between the two
There are many questions which ask us to choose which image some imaginary person
should use.
When we are shown such questions, we must consider 4 things:
1. Does the image need to be resized?
→ If yes, then we should use a vector graphic as scaling them does not change
quality.
2. Does the image need to be drawn to scale?
→ If yes, then we should use a vector graphic.
3. Does the image need to be realistic?
→ If yes, we should use a bit-map image as they allow us to make realistic
images.
4. Do we have any file size restrictions?
→ If yes, then we should also consider whether or not we should use vector
graphics or bit-map images.
→ Once decided, we decide on how we can reduce the file size.
► If it was a vector graphic, then it shouldn’t be a problem as they barely
take space.
► If it was a bit-map image, then it’s best to reduce something like the
resolution.

Sound Files
Sound requires a medium through which it travels through, this is because sound
is transmitted by cause oscillations of particles within the medium.
Our ears pick up these oscillations and interpret them as sound.
Each sound wave has the following:
1. Frequency
2. Wavelength
3. Amplitude (determines the loudness of the sound)

By Sarem Tahir Information Representation and Multimedia Page 16


AS Computer Science Multimedia 9/14/2023
Sound Varies
The thing about sound is that it is an analogue value meaning that it varies
heavily and cannot really be stored digitally.
We can convert sound into a digital value to store it, this is done using an ADC
(analogue to digital converter).
How to Convert from Analogue to Digital
This is done by sampling the sound waves at a given time rate, this is what
defines the quality and accuracy of the digital version to the original.
Since we cannot measure the amplitude accurately, we also store it at approximate
values.
We also remove frequencies which are outside the hearing range of humans, this
greatly reduces the amount of measurements and the file size as well.

Vocabulary Time!
Sampling Resolution: Number of bits used to represent sound amplitude (bit rate).
Sample Rate: Number of sound samples taken per second.

Pros & Cons of High Sampling Rate/Resolution


Pros Cons
Larger dynamic range. Larger file size due to increased samples.
Better sound quality. Takes longer to transfer/transmit files.
Less distortion in the sound. Takes more processing power.

Sound Editing Software


There are many software used for editing sound files (such as Audacity).
Most programs used to edit sound have the following general features:
1. Edit the start/stop times of sound. 5. Convert to different audio formats
2. Extract parts of the sound. (.wav, .mp3, etc.).
3. Fade in and out effects. 6. Remove background noise.
4. Merge different sounds. 7. Delete parts of the sound.

By Sarem Tahir Information Representation and Multimedia Page 17


AS Computer Science File Compression 9/14/2023
Video
There are many specialist cameras however we also have cameras in our phones.
These take a lot of photos and simply stitch them, these are called “digital
video cameras”.
They take a lot of compressed JPEG images at a speed of 25mb per second, this is
called motion JPEG.
When we record a video one important term we should know is frame rate which
refers to the number of frames we record per second.

File Compression
Lossless & Lossy Compression
Lossless Lossy
This compression technique makes it so This compression technique deletes all
that we can decompress the file to get the data which does not contribute in
it original form back. making the original detail.
Examples include spreadsheets or Examples include mp3 files, mp4 files,
lossless JPEG. etc.

Applications
MPEG-3 or MP3 (Audio)
MP3 uses many audio compression techniques which allow us to reduce the final
file’s size to 90% of the original and gives us an mp3 file.
MP3 files are played by various devices such as music player, phones, computers,
etc.
While they do reduce the file size, they also reduce audio quality.
Obviously, this loss of quality is hardly noticeable but an mp3 file can never
match up to the quality of an original CD or DVD.
Perpetual Music Shaping
This is one of the techniques we use and it does the following:
Name Description
Removal of This is when we remove sounds which are outside the hearing
unneeded sounds range of humans.
This happens in sections where 2 or more sounds are played, we
Removal of Soft
simply remove the softer ones as they are masked by the louder
Sounds
ones.

By Sarem Tahir Information Representation and Multimedia Page 18


AS Computer Science File Compression 9/14/2023
Bit-Rate
Bit-rate refers to the number of bits per second that can be transmitted over a
network.
This means that the bit-rate also affects the audio quality.
Pros and Cons of High Bit-Rate
Pros Cons
Higher audio quality. File size is increased.
Less distortion.
A bit-rate over 200 kilobits/sec is usually enough to give us audio quality close
to a CD.

MPEG-4 or MP4 (Video)


This file format allows us to compress multimedia files rather than just audio.
This uses various different techniques ranging from MP3 audio compression to the
JPEG image compression alongside many others.
This format also makes it hard for us to tell the compressed version apart from
the uncompressed one.

Photographic (bit-map) Images


Bit-map Images Vector Graphics
When we compress bit-map image Scalable vector graphics (.svg) are
compression, we reduce both the file stored in .xml text files which allow
size and the image quality. compression as we can simply compress
the text.
A common file format for images is JPEG
which uses lossy file compression.
Once compressed using the JPEG
compression algorithm, we can no longer
retrieve the original file.

Run-Length Encoding (RLE)


RLE is a lossless compression technique which reduces the size of a string of
adjacent, identical data.
The Format
When we compress data using RLE, we write 2 values:

By Sarem Tahir Information Representation and Multimedia Page 19


AS Computer Science File Compression 9/14/2023
The Problem
The main problem with using RLE is that it works only for repeated data rather
than data with patterns or with unique value.
Using RLE on data which is random or unique usually causes the size to increase.
RLE in Text
Without Flags
Let’s say we wish to compress “aaaaabbb” using RLE, we do the following:
1. Split the repeated sections:
aaaabbb
0
aaaa bbb
2. Note down the ASCII values of the letters which are repeated:
aaaabbb
aaaa bbb
97 98
3. Write down the number of times the letter is repeated on the left side of the
ASCII value:
aaaabbb
aaaa bbb
97 98
4 3
4 97 3 98
4. This gives us “4 97 3 98” which takes much less space as compared to “aaaabbb”.
With Flags
The main problem with RLE is when we must compress data with both jumbled and
repeated data.
To cope with this, we have flags.
A flag is defined like this:

By Sarem Tahir Information Representation and Multimedia Page 20


AS Computer Science File Compression 9/14/2023
RLE in Images
Black & White Images
Let’s say we need to use RLE for the image on the
right.
We can take the white blocks as value 1 and the black
ones as value 0.
For each repeated colour block, we can simply count the
number of white blocks and then attach the colour
value.
The colour values would be:
8W 5B 2W 1B 6W 5B 6W 1B 2W 5B 8W
Now we can replace the colour values with the colour
values:
81 50 21 10 61 50 61 10 21 50 81
Coloured Images
Similar to the black & white images, we do the same
process for coloured images.
The only difference is that the values of each
colour are in RGB values as opposed to 1s and 0s.
That gives us a value like so:
2 255 0 0 2 0 0 255 3 255 0 0 1 0 0 0 2 0 0 255 1 0
0 0 1 255 0 0 12 0 0 255 1 255 0 0 1 0 0 0 2 0 0 255
1 0 0 0 3 255 0 0 2 0 0 255 2 255 0 0 Square Red Green Blue
Colour
0 0 0
0 0 255
255 0 0
General Methods of Compressing Files

Reduce the
sampling rate
Crop the image

Reduce the Decrease


Movie Files
sample resolution
Image Files
colour/bit depth

Reduce the frame Reduce image


rate resolution

By Sarem Tahir Information Representation and Multimedia Page 21


Contents

Introduction ...................................................................................................................................................... 2
How should teachers use this guide? ............................................................................................................ 2
1. Pseudocode in examined components ..................................................................................................... 3
1.1 Font style and size ................................................................................................................................... 3
1.2 Indentation ............................................................................................................................................... 3
1.3 Case and italics ....................................................................................................................................... 3
1.4 Lines and numbering ............................................................................................................................... 4
1.4 Comments ............................................................................................................................................... 4
2. Variables, constants and data types ......................................................................................................... 5
2.1 Atomic type names .................................................................................................................................. 5
2.2 Literals ..................................................................................................................................................... 5
2.3 Identifiers ................................................................................................................................................. 5
2.4 Assignments ............................................................................................................................................ 5
3. Arrays ........................................................................................................................................................... 7
3.1 Declaring arrays ....................................................................................................................................... 7
3.2 Using arrays ............................................................................................................................................. 7
4. Common operations .................................................................................................................................... 8
4.1 Input and output ....................................................................................................................................... 8
4.2 Arithmetic operations ............................................................................................................................... 8
4.3 Logic operators ........................................................................................................................................ 8
5. Selection ....................................................................................................................................................... 9
5.1 IF statements ........................................................................................................................................... 9
5.2 CASE statements .................................................................................................................................... 9
6. Iteration ....................................................................................................................................................... 11
6.1 Count-controlled (FOR) loops ................................................................................................................ 11
6.2 Post-condition (REPEAT UNTIL) loops ................................................................................................. 11
6.3 Pre-condition (WHILE) loops ................................................................................................................. 12
7. Index of symbols and keywords .............................................................................................................. 13
1. Pseudocode in examined components

1. Pseudocode in examined components

The following information sets out how pseudocode will appear within the examined components and is
provided to allow you to give learners familiarity before the exam.

1.1 Font style and size


Pseudocode is presented in a monospaced (fixed-width) font such as Courier New. The size of the font
will be consistent throughout.

1.2 Indentation
Lines are indented by four spaces to indicate that they are contained within a statement in a previous line.

Where it is not possible to fit a statement on one line any continuation lines are indented by two spaces. In
cases where line numbering is used, this indentation may be omitted. Every effort will be made to make sure
that code statements are not longer than a line of code, unless this is absolutely necessary.

Note that the THEN and ELSE clauses of an IF statement are indented by only two spaces (see Section 5.1).
Cases in CASE statements are also indented by only two places (see Section 5.2).

1.3 Case and italics


Keywords are in uppercase, e.g. IF, REPEAT, PROCEDURE. (Different keywords are explained in later
sections of this guide.)

Identifiers are in mixed case (sometimes referred to as camelCase or Pascal case) with uppercase letters
indicating the beginning of new words, for example NumberOfPlayers.

Meta-variables – symbols in the pseudocode that should be substituted by other symbols – are enclosed in
angled brackets < > (as in Backus-Naur Form). This is also used in this guide.

Example – meta-variables

REPEAT
<Statements>
UNTIL <condition>

Where the pseudocode contains descriptions rather than code symbols, keywords or literals, these are
written in italics.

Example – descriptions
REPEAT
<Statements>
UNTIL all seats are allocated

Cambridge IGCSE Computer Science 0478 – Pseudocode Guide for Teachers 3


1. Pseudocode in examined components

1.4 Lines and numbering


Where it is necessary to number the lines of pseudocode so that they can be referred to, line numbers are
presented to the left of the pseudocode with sufficient space to indicate clearly that they are not part of the
pseudocode statements.

Line numbers are consecutive, unless numbers are skipped to indicate that part of the code is missing. This
will also be clearly stated.

Each line representing a statement is numbered. However when a statement runs over one line of text, the
continuation lines are not numbered.

1.4 Comments
Comments are preceded by two forward slashes // . The comment continues until the end of the line. For
multi-line comments, each line is preceded by //.

Normally the comment is on a separate line before, and at the same level of indentation as, the code it refers
to. Occasionally, however, a short comment that refers to a single line may be at the end of the line to which
it refers.

4 Cambridge IGCSE Computer Science 0478 – Pseudocode Guide for Teachers


2. Variables, constants and data types

2. Variables, constants and data types

2.1 Atomic type names


The following keywords are used to designate atomic data types:

 INTEGER : A whole number


 REAL : A number capable of containing a fractional part
 CHAR : A single character
 STRING : A sequence of zero or more characters
 BOOLEAN: The logical values TRUE and FALSE

2.2 Literals
Literals of the above data types are written as follows:

 Integers : Written as normal in the denary system, e.g. 5, -3


 Real : Always written with at least one digit on either side of the decimal point, zeros being added if
necessary, e.g. 4.7, 0.3, -4.0, 0.0
 Char: A single character delimited by single quotes, e.g. ꞌxꞌ, ꞌCꞌ, ꞌ@ꞌ
 String: Delimited by double quotes. A string may contain no characters (i.e. the empty string) e.g. "This
is a string", ""
 Boolean: TRUE, FALSE

2.3 Identifiers
Identifiers (the names given to variables, constants, procedures and functions) are in mix case. They can
only contain letters (A–Z, a–z) and digits (0–9). They must start with a letter and not a digit. Accented letters
and other characters, including the underscore, should not be used.

As in programming, it is good practice to use identifier names that describe the variable, procedure or
function they refer to. Single letters may be used where these are conventional (such as i and j when
dealing with array indices, or X and Y when dealing with coordinates) as these are made clear by the
convention.

Keywords identified elsewhere in this guide should never be used as variables.

Identifiers should be considered case insensitive, for example, Countdown and CountDown should not be
used as separate variables.

2.4 Assignments
The assignment operator is ←.

Assignments should be made in the following format:

<identifier> ← <value>

The identifier must refer to a variable (this can be an individual element in a data structure such as an array
or an abstract data type). The value may be any expression that evaluates to a value of the same data type
as the variable.

Cambridge IGCSE Computer Science 0478 – Pseudocode Guide for Teachers 5


2. Variables, constants and data types

Example – assignments

Counter ← 0
Counter ← Counter + 1
TotalToPay ← NumberOfHours * HourlyRate

6 Cambridge IGCSE Computer Science 0478 – Pseudocode Guide for Teachers


3. Arrays

3. Arrays

3.1 Declaring arrays


Arrays are considered to be fixed-length structures of elements of identical data type, accessible by
consecutive index (subscript) numbers. It is good practice to explicitly state what the lower bound of the
array (i.e. the index of the first element) is because this defaults to either 0 or 1 in different systems.
Generally, a lower bound of 1 will be used.

Square brackets are used to indicate the array indices.

One-dimensional arrays are declared as follows (where l is the lower bound and n is the upper bound):

DECLARE <identifier> : ARRAY[<l>:<n>] OF <data type>

Example – array declaration

DECLARE StudentNames : ARRAY[1:30] OF STRING


DECLARE NoughtsAndCrosses : ARRAY[1:3] OF CHAR

3.2 Using arrays


In the main pseudocode statements, only one index value is used for each dimension in the square brackets.

Example – using arrays

StudentNames[1] ← "Ali"
NoughtsAndCrosses[2] ← 'X'
StudentNames[n+1] ← StudentNames[n]

Arrays can be used in assignment statements (provided they have same size and data type). The following
is therefore allowed:

Example – assigning an array

SavedGame ← NoughtsAndCrosses

A statement should not, however, refer to a group of array elements individually. For example, the following
construction should not be used.

StudentNames [1 TO 30] ← ""

Instead, an appropriate loop structure is used to assign the elements individually. For example:

Example – assigning a group of array elements

FOR Index = 1 TO 30
StudentNames[Index] ← ""
NEXT Index

Cambridge IGCSE Computer Science 0478 – Pseudocode Guide for Teachers 7


4. Common operations

4. Common operations

4.1 Input and output


Values are input using the INPUT command as follows:

INPUT <identifier>

The identifier should be a variable (that may be an individual element of a data structure such as an array, or
a custom data type).

Values are output using the OUTPUT command as follows:

OUTPUT <value(s)>

Several values, separated by commas, can be output using the same command.

Examples – INPUT and OUTPUT statements

INPUT Answer
OUTPUT Score
OUTPUT "You have ", Lives, " lives left"

Note that the syllabus for IGCSE (0478) gives READ and PRINT as examples for INPUT and OUTPUT
respectively.

4.2 Arithmetic operations


Standard arithmetic operator symbols are used:

 + Addition
 - Subtraction
 * Multiplication
 / Division

Care should be taken with the division operation: the resulting value should be of data type REAL, even if the
operands are integers.

The integer division operators MOD and DIV can be used. However, their use should be explained explicitly
and not assumed.

Multiplication and division have higher precedence over addition and subtraction (this is the normal
mathematical convention). However, it is good practice to make the order of operations in complex
expressions explicit by using parentheses.

4.3 Logic operators


The only logic operators (also called relational operators) used are AND, OR and NOT. The operands and
results of these operations are always of data type BOOLEAN.

In complex expressions it is advisable to use parentheses to make the order of operations explicit.

8 Cambridge IGCSE Computer Science 0478 – Pseudocode Guide for Teachers


5. Selection

5. Selection

5.1 IF statements
IF statements may or may not have an ELSE clause.

IF statements without an else clause are written as follows:

IF <condition>
THEN
<statements>

ENDIF

IF statements with an else clause are written as follows:

IF <condition>
THEN
<statements>
ELSE
<statements>
ENDIF

Note that the THEN and ELSE clauses are only indented by two spaces. (They are, in a sense, a continuation
of the IF statement rather than separate statements).

When IF statements are nested, the nesting should continue the indentation of two spaces. In particular,
run-on THEN IF and ELSE IF lines should be avoided.

Example – nested IF statements

IF ChallengerScore > ChampionScore


THEN
IF ChallengerScore > HighestScore
THEN
OUTPUT ChallengerName, " is champion and highest scorer"
ELSE
OUTPUT Player1Name, " is the new champion"
ENDIF
ELSE
OUTPUT ChampionName, " is still the champion"
IF ChampionScore > HighestScore
THEN
OUTPUT ChampionName, " is also the highest scorer"
ENDIF
ENDIF

5.2 CASE statements


CASE statements allow one out of several branches of code to be executed, depending on the value of a
variable.

CASE statements are written as follows:

Cambridge IGCSE Computer Science 0478 – Pseudocode Guide for Teachers 9


5. Selection

CASE OF <identifier>
<value 1> : <statement>
<value 2> : <statement>
...
ENDCASE

An OTHERWISE clause can be the last case:

CASE OF <identifier>
<value 1> : <statement>
<value 2> : <statement>
...
OTHERWISE <statement>
ENDCASE

It is best practice to keep the branches to single statements as this makes the pseudocode more readable.
Similarly single values should be used for each case. If the cases are more complex, the use of an IF
statement, rather than a CASE statement, should be considered.

Each case clause is indented by two spaces. They can be seen as continuations of the CASE statement
rather than new statements.

Note that the case clauses are tested in sequence. When a case that applies is found, its statement is
executed and the CASE statement is complete. Control is passed to the statement after the ENDCASE. Any
remaining cases are not tested.

If present, an OTHERWISE clause must be the last case. Its statement will be executed if none of the
preceding cases apply.

Example – formatted CASE statement

INPUT Move
CASE OF Move
'W': Position ← Position – 10
'S': Position ← Position + 10
'A': Position ← Position – 1
'D': Position ← Position + 1
OTHERWISE : Beep
ENDCASE

10 Cambridge IGCSE Computer Science 0478 – Pseudocode Guide for Teachers


6. Iteration

6. Iteration

6.1 Count-controlled (FOR) loops


Count-controlled loops are written as follows:

FOR <identifier> ← <value1> TO <value2>


<statements>
NEXT

The identifier must be a variable of data type INTEGER, and the values should be expressions that evaluate
to integers.

The variable is assigned each of the integer values from value1 to value2 inclusive, running the
statements inside the FOR loop after each assignment. If value1 = value2 the statements will be executed
once, and if value1 > value2 the statements will not be executed.

It is good practice to repeat the identifier after NEXT, particularly with nested FOR loops.

An increment can be specified as follows:

FOR <identifier> ← <value1> TO <value2> STEP <increment>


<statements>
NEXT

The increment must be an expression that evaluates to an integer. In this case the identifier will be
assigned the values from value1 in successive increments of increment until it reaches value2. If it goes
past value2, the loop terminates. The increment can be negative.

Example – nested FOR loops

Total = 0
FOR Row = 1 TO MaxRow
RowTotal = 0
FOR Column = 1 TO 10
RowTotal ← RowTotal + Amount[Row,Column]
NEXT Column
OUTPUT "Total for Row ", Row, " is ", RowTotal
Total ← Total + RowTotal
NEXT Row
OUTPUT "The grand total is ", Total

6.2 Post-condition (REPEAT UNTIL) loops


Post-condition loops are written as follows:

REPEAT
<Statements>
UNTIL <condition>

The condition must be an expression that evaluates to a Boolean.

Cambridge IGCSE Computer Science 0478 – Pseudocode Guide for Teachers 11


6. Iteration

The statements in the loop will be executed at least once. The condition is tested after the statements are
executed and if it evaluates to TRUE the loop terminates, otherwise the statements are executed again.

Example – REPEAT UNTIL statement

REPEAT
OUTPUT "Please enter the password"
INPUT Password
UNTIL Password = "Secret"

6.3 Pre-condition (WHILE) loops


Pre-condition loops are written as follows:

WHILE <condition> DO
<statements>
ENDWHILE

The condition must be an expression that evaluates to a Boolean.

The condition is tested before the statements, and the statements will only be executed if the condition
evaluates to TRUE. After the statements have been executed the condition is tested again. The loop
terminates when the condition evaluates to FALSE.

The statements will not be executed if, on the first test, the condition evaluates to FALSE.

Example – WHILE loop

WHILE Number > 9 DO


Number ← Number – 9
ENDWHILE

12 Cambridge IGCSE Computer Science 0478 – Pseudocode Guide for Teachers

You might also like