Skip to the page
Year 11 · Computer Science · Spring 2 – Summer 1 · Final revision and the exams

Command words and timing

Exam practicePresent ▶

What this lesson covers

3.3 Data storage

Cambridge IGCSE Computer Science 0478 · Topic 3: Hardware · Paper 1

5.3 Cyber security

Cambridge IGCSE Computer Science 0478 · Topic 5: The internet and its uses · Paper 1

7.3 The purpose of an algorithm

Cambridge IGCSE Computer Science 0478 · Topic 7: Algorithm design and problem-solving · Paper 2

You will learn to

  • Define the command words: state, identify, give, describe, explain, compare, calculate, evaluate and suggest.
  • Sort the questions from one past paper by command word.
  • Calculate how many minutes each question is worth from its marks.
  • Use a fast start: underline, circle the marks, write the first point straight away.

Success criteria

  • I can say what each command word asks me to do.
  • I can tell a 'describe' answer from an 'explain' answer.
  • I can work out roughly how long to spend on a question from its marks.
The syllabus points for these sections
  • Describe RAM and ROM and explain why a computer needs both.
  • Explain why secondary storage is needed.
  • Describe how magnetic, optical and solid-state storage work.
  • Explain virtual memory and why it is needed.
  • Give advantages and disadvantages of cloud storage compared with local storage.
  • Describe each cyber security threat: brute-force attack, data interception, DDoS, hacking, malware, pharming, phishing and social engineering.
  • Describe the six types of malware: virus, worm, Trojan horse, spyware, adware and ransomware.
  • Explain how each security solution helps keep data safe.
  • Explain how proxy servers and SSL work.
  • Choose the best defence for a given threat and justify it.
  • State the purpose of a given algorithm in one clear sentence.
  • Describe the processes an algorithm carries out, in order.
  • Use the variable names and values in the algorithm to support your answer.

Key words

Say each word, then read what it means. Every one is in the glossary too.

CPU
The central processing unit, which processes instructions and data by fetching, decoding and executing them.
ALU
Arithmetic logic unit: does calculations and logical comparisons.
Control unit
Manages the fetch–decode–execute cycle and sends control signals.
Cache
Small, very fast memory in or near the CPU that holds frequently used data and instructions.
Instruction set
The list of all the instructions a particular CPU can carry out.
Sensor
An input device that measures a physical property and sends the reading to a computer.
Volatile
Loses its contents when the power is switched off.
Virtual memory
Part of secondary storage used as extra RAM, with pages moved between them.
NIC
Network interface card: the hardware that connects a device to a network.
IP address
A number that identifies a device on a network, such as 151.101.0.81.
Internet
The worldwide network of connected computer networks: the physical infrastructure.
URL
Uniform resource locator: the text address of a web page, made of protocol, domain name and file name.
HTTP / HTTPS
The rules for sending web pages; HTTPS adds encryption using SSL.
Web browser
Application software that fetches web pages and renders HTML so you can see them.
DNS
Domain Name System: servers that find the IP address that matches a domain name.
Digital currency
Money that exists only electronically.
Brute-force attack
Trying every possible password or key until the right one is found.
DDoS
Distributed denial of service: flooding a server with requests from many computers so real users cannot reach it.
Malware
Software designed to cause harm, such as a virus, worm, Trojan horse, spyware, adware or ransomware.
Phishing
A fake message that tricks the user into clicking a link and giving personal details on a fake site.
Pharming
Malicious code or a tampered DNS server redirects the user to a fake website, even if they type the correct URL.
Social engineering
Manipulating people into breaking normal security rules.
Firewall
Hardware or software that checks traffic in and out against rules and blocks anything that breaks them.
Proxy server
A server between the user and the internet that filters requests, hides the user's IP address and caches pages.
SSL
Secure Sockets Layer: a protocol that uses certificates and encryption to secure data between browser and server.
Algorithm
A precise, ordered set of steps that solves a problem.
Program development life cycle
The four stages of making a program: analysis, design, coding and testing.
Pseudocode
A structured, code-like way of writing an algorithm that is not tied to one language.
Verification
A check that data has been copied or typed in exactly as the original.
Check digit
An extra digit calculated from the other digits, used to catch typing errors.
Normal data
Test data that should be accepted.

The explanation

Read it here, or open the study page below to go one step at a time with things to try.

What each command word wants

The command word is the first word of the question. It tells you what kind of answer to write.

Command wordWhat it wantsExample question
StateSay it in clear words. No reason is needed.State one function of an operating system.
IdentifyName it or pick it out.Identify the type of error in line 4.
GiveWrite an answer from memory or from the source.Give two examples of application software.
DescribeSay what it is like or what happens. Give the main features.Describe how a blockchain records transactions.
ExplainSay why or how, with reasons.Explain why a computer needs both RAM and ROM.
CompareSay what is the same and what is different.Compare serial and parallel transmission.
CalculateWork it out from the numbers. Show your working.Calculate the file size of the image in KiB.
EvaluateJudge how good or useful it is. Give both sides, then a conclusion.Evaluate the use of robots in a car factory.
SuggestUse what you know in a new situation. More than one answer can be right.Suggest a suitable primary key for this table.
★Remember

In a 'compare' answer, each point mentions both things. Words like 'whereas' and 'but' help.

e.g.Example

Compare: 'Serial sends one bit at a time, whereas parallel sends several bits at once.'

Marks tell you the time

Paper 1 and Paper 2 are each 75 marks in 105 minutes.

Spend about 1¼ minutes per mark. That leaves about 10 minutes to check.

MarksAbout how long
11 minute
22½ minutes
45 minutes
67½ minutes
15 (the Paper 2 scenario)30 minutes: it is a whole program
!Watch out

When a question's time is up, put a star by it and move on. Come back if there is time.

Start fast

  1. Underline the command word.
  2. Circle the marks.
  3. Write the first point straight away, even if it is simple.
  4. Add points until you have as many as there are marks.
  5. Move on.
?Why?

Why write a simple point first?

A blank page slows you down. One written point gets your thinking going, and it may earn a mark.

3.3 Data storage

Primary storage: RAM and ROM

Primary storage is memory the CPU can access directly. It includes RAM and ROM.

RAM (random access memory) holds the data and programs currently in use, including parts of the operating system. It can be read and written. It is volatile: everything is lost when the power goes off.

ROM (read-only memory) holds the start-up instructions (the bootloader firmware) that run when you switch on. It can only be read. It is non-volatile: it keeps its contents without power.

RAMROM
Volatile?Yes: loses data without powerNo: keeps data without power
Read / write?Read and writeRead only
What it holdsPrograms and data in use nowStart-up instructions (bootloader)
Size in a laptopLarge, e.g. 16 GiBSmall, e.g. a few MiB
?Why?

Both are needed. RAM is fast and changeable, so programs can run and data can change. But RAM is empty at switch-on, so ROM must hold the instructions that start the computer and load the operating system.

Secondary storage

Secondary storage is non-volatile storage that the CPU does not access directly. Data is copied into RAM first.

It is needed to keep files, programs and the operating system when the power is off. It also holds far more than RAM, for less money per gigabyte.

There are three types: magnetic, optical and solid-state.

Magnetic storage: the hard disk drive

A hard disk drive (HDD) has metal or glass platters coated with a magnetic material. They spin very fast, for example 7,200 times a minute.

A read/write head on a moving arm floats a tiny distance above each surface. To write, it magnetises tiny areas in one direction for 1 and the other direction for 0. To read, it senses the direction.

Each platter is divided into tracks (circles) and sectors (slices of each track). Data is found by moving the head to the right track, then waiting for the right sector to spin past.

AdvantagesDisadvantages
Large capacity, cheap per gigabyteMoving parts can break if dropped
Can be rewritten many times without wearing outSlower to access data than solid-state (head must move, disk must spin)
Good for servers and backupHeavier, noisier and uses more power

Optical storage: CD, DVD and Blu-ray

An optical disc has a single spiral track with tiny dips called pits and flat areas called lands.

A laser shines on the spinning disc. Lands reflect the light back strongly; pits scatter it. A sensor reads these changes as 1s and 0s.

To write a recordable disc, a stronger laser changes small areas of a dye layer, so they reflect differently.

DiscLaserTypical capacity (one layer)
CDRed700 MB
DVDRed4.7 GB
Blu-rayBlue (shorter wavelength)25 GB
?Why?

Blue light has a shorter wavelength, so it can focus on smaller pits. Smaller pits packed closer together means more data on the same size disc.

!Watch out

Optical discs are cheap and portable, but slow, easily scratched and small compared with modern drives. They are used for films, games and software distribution.

Solid-state (flash) storage

Solid-state storage has no moving parts. It stores data in flash memory chips using transistors.

Each cell has a control gate and a floating gate. Electric charge (electrons) can be trapped in the floating gate. Charge trapped, or not, stands for a 0 or a 1, and stays without power.

Flash memory is built using NAND or NOR technology. NAND is denser and cheaper, so it is used in SSDs, SD cards and USB flash drives.

AdvantagesDisadvantages
Very fast access: no head to moveMore expensive per gigabyte than HDD
No moving parts: survives knocks and dropsEach cell can only be written a limited number of times
Light, small, silent, low power: good for phones and laptopsUsually smaller capacity for the same price
e.g.Example
SSD in a laptop; SD card in a camera; USB flash drive for school work; flash chip in a phone.

Virtual memory

When RAM is full, the computer can use part of secondary storage as if it were extra RAM. This is virtual memory.

Data is split into fixed-size blocks called pages. Pages that are not needed right now are moved from RAM to virtual memory. When they are needed again, they are moved back into RAM.

It is needed so the computer can run more programs, or larger programs, than RAM can hold. Without it, programs could crash or refuse to open.

e.g.Example
A student has a browser with 40 tabs, a video editor and a game open on a laptop with 8 GiB of RAM. The tabs not being viewed are moved out to the SSD. Clicking an old tab brings its pages back into RAM, which causes a short pause.
!Watch out

Virtual memory is much slower than RAM. If pages are swapped in and out all the time, the computer becomes very slow. Adding more RAM is the real fix.

Cloud storage

Cloud storage keeps your files on remote servers owned by a company, which you reach over the internet.

The servers are real, physical computers in large data centres. Your data is usually copied onto several servers in case one fails.

Local storage means a drive you own and keep with you, such as a laptop's SSD or a USB drive.

Cloud: advantagesCloud: disadvantages
Access files from any device, anywhere with internetNo internet connection means no access
Easy to share and work on files with othersSecurity and privacy depend on the provider; data can be hacked
Provider handles backups and copies; less risk of losing dataMonthly fees for large amounts of storage
Buy more space whenever you need it; no hardware to buyUploading and downloading large files can be slow
5.3 Cyber security

Brute-force attack

A brute-force attack is when a criminal tries every possible password (or key) until one works. Software tries millions of guesses each second.

The aim is to get into an account or system, then steal data or cause harm.

Longer passwords with a mix of character types have far more possible combinations, so they take much longer to crack.

e.g.Example
A 4-digit PIN: 10 choices per digit. 10 × 10 × 10 × 10 = 10,000 possible PINs. An 8-character password using a–z, A–Z and 0–9: 62 choices per character. 62^8 = 218,340,105,584,896 possible passwords (about 218 million million).
?Why?

Each extra character multiplies the number of guesses needed. That is why length matters more than anything else.

!Watch out

Defences: long, complex passwords; locking the account after a few failed attempts; two-step verification.

Data interception

Data interception is when data is stolen while it is being sent, for example over Wi-Fi or across the internet.

A criminal can use a packet sniffer, a program that captures and examines data packets as they pass. On an unsecured public Wi-Fi network this is easy.

The aim is to read passwords, card numbers or private messages.

e.g.Example
In a café, someone on the same free Wi-Fi captures the packets from your laptop. If a website uses plain HTTP, they can read the password you typed.
!Watch out

Defences: encryption (HTTPS/SSL so captured data cannot be read); avoid public Wi-Fi for banking, or use a VPN; use strong Wi-Fi encryption at home.

Distributed denial of service (DDoS)

A denial of service (DoS) attack floods a web server with so many requests that it cannot cope. Real users cannot reach the website.

In a distributed DoS (DDoS), the requests come from thousands of computers at once. These are often ordinary devices infected with malware and controlled by the criminal. This group is called a botnet.

The aim is to take a website offline, often to cause loss of sales or to demand money.

e.g.Example
On the morning concert tickets go on sale, a botnet of 50,000 infected computers and cameras sends requests to the ticket website. The server is overloaded and real fans see an error page.
?Why?

Requests from so many different places are hard to block, because they look like normal visitors.

!Watch out

Defences: a proxy server or firewall that filters out the flood of traffic; anti-malware on your own devices so they do not join a botnet.

Hacking

Hacking is gaining unauthorised access to a computer system. Unauthorised means without permission.

A hacker may steal, change or delete data, or install malware. This is illegal in most countries.

Ethical hacking is different: a company pays an expert to try to break in, so weaknesses can be found and fixed.

!Watch out

Defences: firewalls, strong passwords and authentication, access levels, and keeping software updated so known weaknesses are fixed.

Malware: virus, worm and Trojan horse

Malware (malicious software) is any software written to cause harm. Cambridge lists six types. The first three spread or get in; the last three do specific damage.

TypeHow it worksExample of harm
VirusAttaches itself to a program or file. Needs a user to run that file. Then copies itself to other files.Deletes or corrupts files; makes the computer crash
WormA standalone program that copies itself across a network on its own. No user action needed.Uses up bandwidth and slows networks; can carry other malware
Trojan horseDisguised as useful, legitimate software. The user installs it willingly.Once installed, it lets in other malware such as spyware, or gives the criminal remote access
e.g.Example
A student downloads a free "game cheat" from an unknown site. It works, but it also installs spyware. That download was a Trojan horse.
!Watch out

Virus versus worm: a virus needs a host file and a user to run it. A worm spreads by itself across a network.

Malware: spyware, adware and ransomware

These three types are named after what they do once they are on a device.

TypeHow it worksExample of harm
SpywareSecretly records what the user does and sends it to the criminal. A keylogger records every key pressed.Steals passwords and bank details
AdwareShows unwanted adverts, often as pop-ups. May redirect the browser to advertising sites.Annoying, slows the device; some adware also contains spyware
RansomwareEncrypts the user's files so they cannot be opened. Demands payment for the key to unlock them.A hospital cannot open patient records until it pays or restores from backup
?Why?

Regular backups are the best answer to ransomware. If the files are backed up elsewhere, the victim can restore them without paying.

!Watch out

Defences for all malware: anti-malware software, automatic updates, not opening unknown attachments, downloading only from trusted sources.

Phishing and pharming

Phishing is sending a fake email or message that looks like it comes from a trusted organisation, such as a bank. It tries to make the user click a link to a fake website and type in their personal details.

Pharming is when malicious code is installed on the user's computer, or a DNS server is tampered with. It redirects the user to a fake website, even when they type the correct URL.

Both aim to steal login details, card numbers or other personal data.

PhishingPharming
How the user reaches the fake siteClicks a link in an email or textIs redirected automatically, even after typing the correct URL
Needs the user to click a link?YesNo
Main defenceCheck spelling, tone and URLs; do not click links in unexpected messagesAnti-malware; check the URL and padlock before entering details
e.g.Example
Phishing: a text says "Your Correos parcel is held. Pay 1.99 euros here" with a link to a fake site. Pharming: you type your bank's correct address, but malware on your PC sends you to a copy of the bank's site.
!Watch out

Learn the difference: phishing tricks you into clicking; pharming redirects you without you knowing.

Social engineering

Social engineering is manipulating people, rather than computers, into breaking security. It uses trust, fear, curiosity or urgency.

Phishing is one kind. Another is a phone call from someone pretending to be the IT department.

Baiting leaves a USB stick labelled "Salaries" in the car park, hoping someone plugs it in. Scareware is a fake pop-up saying "Your PC is infected, call now".

The aim is to get passwords, access to a building or system, or to get malware installed.

e.g.Example
A caller says: "Hi, it's Sam from IT. Your account is locked. Tell me your password and I'll fix it now." The caller is not from IT.
?Why?

People are often the weakest link. The best technical security fails if someone gives away a password.

!Watch out

Defence: training staff to be suspicious, never sharing passwords, checking who is really asking.

Solutions: access levels, anti-malware and authentication

Access levels give each user only the rights they need. A student can read the school timetable but cannot change it. This limits the damage if an account is hacked.

Anti-malware software includes anti-virus and anti-spyware. It scans files and compares them with a database of known malware. It quarantines or deletes anything harmful and checks downloads as they arrive.

Authentication proves a user is who they say they are.

Authentication methodHow it worksStrength / weakness
Username and passwordUser types a secret word or phraseEasy to use; can be guessed, stolen or brute-forced
BiometricsUses a body feature: fingerprint, face, iris, voiceHard to fake and cannot be forgotten; costly; cannot be changed if copied
Two-step verificationAfter the password, a second step: a code sent to your phone or an appA stolen password alone is not enough; needs the phone with you
?Why?

Anti-malware needs to update its database often, because new malware appears every day.

Solutions: updates, checking messages and links

Automating software updates means the OS and apps download and install fixes by themselves. Updates close security holes that hackers and malware use.

Checking the spelling and tone of communications helps spot phishing. Warning signs are spelling mistakes, a general greeting such as "Dear customer", and an urgent or threatening tone.

Checking URLs in links before clicking: hover over the link to see where it really goes. Look for misspellings such as `paypa1.com` or extra words such as `bbva-secure-login.net`.

e.g.Example
Email: "URGENT!! Dear costumer, your acount will be close in 24 hours. Click here." Red flags: spelling errors (costumer, acount), generic greeting, urgent threat. The link shows http://santander.verify-acc.ru when you hover. The domain is not the bank's real domain.

Solutions: firewalls and privacy settings

A firewall sits between a computer (or network) and the internet. It can be hardware, software or both.

It examines all traffic coming in and going out. It checks each packet against a set of rules, such as allowed IP addresses or ports. Traffic that breaks the rules is blocked.

It can also log traffic and warn the user when a program tries to connect to the internet.

Privacy settings control who can see your information, for example on social media. Setting a profile to "friends only" stops strangers seeing your location and photos, which social engineers use.

!Watch out

A firewall does not remove malware that is already on a computer. That is the job of anti-malware.

Solutions: proxy servers

A proxy server is a server that sits between the user's computer and the web server. Requests go to the proxy first, and the proxy fetches the page on the user's behalf.

It can filter requests, blocking access to certain websites. Schools use this to block unsuitable sites.

It hides the user's IP address, because the web server only sees the proxy's address. This protects the user's identity.

It can cache (store copies of) popular pages, so they load faster the next time.

In front of a web server, it can absorb and filter heavy traffic, helping to protect against DDoS attacks.

?Why?

Putting a middle step between the user and the internet means harmful traffic can be stopped before it reaches either side.

Solutions: SSL

SSL (Secure Sockets Layer) is a security protocol that encrypts data sent between a browser and a web server. Its modern version is called TLS, but the exam uses the name SSL.

It is what turns HTTP into HTTPS. It uses an SSL certificate: a digital document that proves the website is who it claims to be.

e.g.Example
How an SSL connection starts: 1. The browser asks the web server to identify itself. 2. The server sends a copy of its SSL certificate. 3. The browser checks the certificate is real and trusted. 4. If it is, the browser sends a message back to the server. 5. The server replies with a digitally signed acknowledgement to start the session. 6. All data sent from now on is encrypted.
?Why?

Even if the data is intercepted, it cannot be read. The certificate also helps the user know they are on the real website.

!Watch out

SSL protects data in transit (while it travels). It does not stop malware on your own computer or protect data stored on the server.

Matching threats to defences

Exam questions often give a scenario and ask you to name the threat and the best defence. Try the threats toy: read each scenario, name the threat, then pick the defence.

Always explain how the defence stops that threat. "Install a firewall" is a weak answer. "A firewall blocks incoming traffic that does not meet its rules" is stronger.

ThreatGood defences
Brute-force attackLong, complex passwords; lock after failed attempts; two-step verification
Data interceptionEncryption, SSL/HTTPS; avoid public Wi-Fi
DDoSProxy server; firewall; anti-malware so devices do not join a botnet
HackingFirewall; strong authentication; access levels; automatic updates
MalwareAnti-malware; automatic updates; do not open unknown attachments; backups for ransomware
PhishingCheck spelling, tone and URLs; do not click links in unexpected messages
PharmingAnti-malware; check the URL and SSL certificate before entering details
Social engineeringStaff training; privacy settings; never share passwords

There is something to try for this step in the IGCSE library.

7.3 The purpose of an algorithm

Stating the purpose

The purpose of an algorithm is the job it does overall. It is the reason the algorithm exists.

To find it, look at the inputs, then look at what is output at the end. The purpose links the two.

Write one sentence: 'The algorithm inputs … and outputs …'.

e.g.Example
Purpose: the algorithm lets a user enter a bank card PIN up to three times. It outputs 'Card unlocked' if the PIN is correct, or 'Card blocked' after three wrong attempts. Test: 1111 then 4821 → Card unlocked (2 attempts). Test: 1111, 2222, 3333 → Card blocked.
CONSTANT CorrectPin ← "4821"
DECLARE Guess : STRING
DECLARE Attempts : INTEGER
Attempts ← 0
REPEAT
  OUTPUT "Enter your PIN: "
  INPUT Guess
  Attempts ← Attempts + 1
UNTIL Guess = CorrectPin OR Attempts = 3
IF Guess = CorrectPin
  THEN
    OUTPUT "Card unlocked"
  ELSE
    OUTPUT "Card blocked"
ENDIF
CORRECT_PIN = "4821"
attempts = 0
guess = ""
# Python has no REPEAT ... UNTIL, so the loop condition is reversed
while guess != CORRECT_PIN and attempts < 3:
    guess = input("Enter your PIN: ")
    attempts = attempts + 1
if guess == CORRECT_PIN:
    print("Card unlocked")
else:
    print("Card blocked")
!Watch out

Do not translate each line into English ('it sets Total to 0, then it starts a loop…'). That describes the code but does not state the purpose.

Describing the processes

Sometimes a question asks you to describe the processes. Now you do go through the steps, but in plain words and in order.

Mention the loop, what is checked, and what is changed or output. Use the identifiers from the algorithm.

e.g.Example
Describe the processes (4 marks): 1. Attempts is set to 0. 2. The user is asked to input a PIN, and Attempts goes up by 1. 3. This repeats until the PIN matches CorrectPin or 3 attempts have been made. 4. If the last guess matches, 'Card unlocked' is output. Otherwise 'Card blocked' is output.
?Why?

'State' wants a short answer. 'Describe' wants the steps. Reading the command word tells you how much to write.

Study it

Open the study page and go one step at a time.

Check yourself

One question at a time. The reason shows after each answer.

Saved on this device.