Home / IGCSE / Computer Science

IGCSE Computer Science

Data representation and transmission, hardware, software, the Internet, emerging technologies, algorithms, programming in pseudocode and Python, databases and Boolean logic, following the Cambridge IGCSE Computer Science syllabus.

Syllabus

Syllabus Overview

This topic outlines what Cambridge assesses in IGCSE Computer Science. It is taken from the Cambridge International syllabus, which is linked at the bottom of the page. Use it to see how the two papers are set, how the marks are shared between the objectives, which command words to expect and where each part of the syllabus is covered in these notes.

How the exam is set

Every candidate takes the same two papers, which are eligible for grades A* to G. All questions are compulsory and calculators are not allowed. The syllabus lets you write programs in pseudocode or in Python, Visual Basic or Java; answer in the language you have studied.

ComponentWhat it containsTimeMarksWeight
Paper 1: Computer SystemsShort-answer and structured questions on Topics 1 to 61 hour 45 minutes7550%
Paper 2: Algorithms, Programming and LogicShort-answer and structured questions and a scenario-based question on Topics 7 to 101 hour 45 minutes7550%

What the examiners test

Every question tests one of three assessment objectives.

Assessment objective 1. You must know and understand the principles and concepts of computer science.

Assessment objective 2. You must apply that knowledge to a given context, including analysing and designing computational and programming problems.

Assessment objective 3. You must give solutions by evaluating computer systems, making reasoned judgements and presenting conclusions.

The grid shows how much of the qualification and of each paper each objective carries.

Assessment objectiveQualificationPaper 1Paper 2
AO1 Knowledge and understanding40%60%20%
AO2 Application and problem design40%20%60%
AO3 Evaluation and solutions20%20%20%

How to use the grid

  • Paper 1 is mostly recall, so learn definitions and explanations of each hardware, software and network idea.
  • Paper 2 is mostly application: 60% of its marks are for writing, tracing and correcting algorithms and programs.
  • One fifth of each paper asks you to evaluate or justify, so practise giving a reasoned judgement.

Command words

The first word of a question tells you what to do. The syllabus uses these command words, so learn what each one asks for.

Command wordWhat to do
Calculatework out a numerical answer from the figures given
Comparesay how things are similar and how they differ
Definegive the exact meaning
Demonstrateshow how, or give an example
Describeset out the main features or points
Evaluatejudge the quality, importance or value, weighing the evidence
Explaingive reasons, showing why or how, and back them with evidence
Givewrite down an answer from the source or from memory
Identifyname or pick out
Outlinegive the main points only
Show (that)give clear steps that lead to the result stated
Stategive a short, clear answer
Suggestuse what you know to put forward ideas where several answers are acceptable

Grades and tiers

All candidates take the same papers and are eligible for grades A* to G. There are no tiers.

Where each part is covered in these notes

Syllabus areaTopics in these notes
Paper 1: Computer Systems (Topics 1 to 6)Data Representation; Data Transmission; Hardware; Software; The Internet and Its Uses; Automated and Emerging Technologies
Paper 2: Algorithms, Programming and Logic (Topics 7 to 10)Algorithm Design and Problem-solving; Programming; Databases; Boolean Logic

The official syllabus

Read the full document: Cambridge IGCSE Computer Science syllabus (PDF). This outline follows that edition, so check the Cambridge International website for a later one.

Topic 1

Data Representation

1.1 Number systems

Binary, denary and hexadecimal

Computers are built from billions of tiny electronic switches, each of which is either on or off. For this reason, a computer stores and processes everything, numbers, text, pictures and sound, as patterns of two symbols: 0 and 1. This system is called binary, and each 0 or 1 is a bit (binary digit). People use the denary (decimal) system, which has ten digits, 0 to 9, because we have ten fingers. Programmers also use hexadecimal, with sixteen symbols, because it is a compact way to write long binary numbers.

In every number system, the value of a digit depends on its place value. In denary, the places from the right are units, tens, hundreds, thousands: 1, 10, 100, 1000, each ten times bigger. In binary, each place is twice the one to its right: 1, 2, 4, 8, 16, 32, 64, 128. An eight-bit number has places 128, 64, 32, 16, 8, 4, 2, 1. To convert binary to denary, add the place values wherever there is a 1. For example, 01101001 has 1s in the places 64, 32, 8 and 1, so the value is 64 + 32 + 8 + 1 = 105.

To convert denary to binary, work from the largest place value and ask whether it fits. For 150: 128 fits (150 − 128 = 22), 64 does not, 32 does not, 16 fits (22 − 16 = 6), 8 does not, 4 fits (6 − 4 = 2), 2 fits (2 − 2 = 0), 1 does not. Writing 1 where it fits and 0 where it does not gives 10010110. An alternative is to divide repeatedly by 2 and read the remainders from bottom to top. An eight-bit number can hold values from 0 (00000000) to 255 (11111111), which is 28 − 1, so 256 different values.

Hexadecimal uses the digits 0 to 9 and the letters A to F for ten to fifteen (A = 10, B = 11, C = 12, D = 13, E = 14, F = 15). Each place is sixteen times the one to its right. One hex digit represents exactly four bits (a nibble), so an eight-bit byte is two hex digits. To convert binary to hex, split the number into groups of four bits from the right and convert each group: 1011 0110 becomes B6, because 1011 is 11 (B) and 0110 is 6. To convert hex to binary, replace each digit by its four-bit pattern. To convert hex to denary, multiply: B6 = 11 × 16 + 6 = 182.

Hex is used because it is shorter and easier for people to read and to copy without mistakes than binary. It appears in colour codes on web pages (#FF0000 is red), in MAC addresses, in error messages, and in memory addresses.

DenaryBinary (8 bits)Hexadecimal
50000010105
10000010100A
650100000141
1501001011096
25511111111FF
Place values in binary and how they add up to a denary number.
Place values in binary and how they add up to a denary number.
Worked example Convert 10110100 Convert the binary number 10110100 to denary and to hexadecimal.
Denary: 128 + 32 + 16 + 4 = 180. Hexadecimal: split into 1011 and 0100, which are B and 4, so the hex number is B4. Check: 11 × 16 + 4 = 180.
Worked example Convert 202 to binary Write 202 as an 8-bit binary number.
128 fits (74 left), 64 fits (10 left), 32 no, 16 no, 8 fits (2 left), 4 no, 2 fits (0 left), 1 no: 11001010.

Exam tip

  • Learn the place values 128, 64, 32, 16, 8, 4, 2, 1.
  • An 8-bit number goes from 0 to 255; one hex digit = 4 bits.
  • Show your working: write the place values above the bits.

Binary addition, overflow and shifts

Computers add binary numbers using the same method that you use in denary, working from the right and carrying to the next column. There are only four rules for one column: 0 + 0 = 0; 0 + 1 = 1; 1 + 1 = 10 (write 0, carry 1); and 1 + 1 + 1 = 11 (write 1, carry 1), which happens when there is a carry coming in. Here is an example with eight bits:

Binary addition, overflow and shifts: illustration.
Binary addition, overflow and shifts.

Adding 00110101 and 00011011

  00110101   (53)
+ 00011011   (27)
----------
  01010000   (80)

Working from the right: 1 + 1 = 10, so write 0 and carry 1; 0 + 1 + the carried 1 = 10, write 0 and carry 1; 1 + 0 + the carried 1 = 10, write 0 and carry 1; 0 + 1 + the carried 1 = 10, write 0 and carry 1; 1 + 1 + the carried 1 = 11, write 1 and carry 1; 1 + 0 + the carried 1 = 10, write 0 and carry 1; 0 + 0 + the carried 1 = 1; and the last column is 0. The result 01010000 is 64 + 16 = 80, which is correct (53 + 27 = 80). Writing the carries above each column helps you to avoid mistakes.

If the sum is too large to fit in the number of bits available, an overflow error occurs. In eight bits the largest number is 255, so 200 + 100 = 300 cannot be stored: the ninth bit is lost, and the result would be wrong (44). The overflow is shown by a carry out of the left-hand column. Programs must be written to avoid overflow, or use more bits.

A logical shift moves all the bits in a binary number to the left or the right by a number of places; the bits that fall off the end are lost, and the empty places are filled with 0. Shifting left by one place multiplies the number by 2, and shifting left by two places multiplies by 4. Shifting right by one place divides by 2 (ignoring any remainder). For example, 00001100 (12) shifted left one place is 00011000 (24); shifted right one place it becomes 00000110 (6). If a 1 is shifted off the left end, the answer is wrong, which is a kind of overflow. Shifts are very fast operations for the processor, so they are often used for quick multiplication and division by powers of two.

Two's complement is a method for storing negative integers. In an eight-bit two's complement number, the left-hand place value is −128 instead of +128, so the places are −128, 64, 32, 16, 8, 4, 2, 1. A number with a 1 in the leftmost bit is negative. For example, 11111111 is −128 + 127 = −1, and 10000000 is −128, while 01111111 is +127. The range of numbers is −128 to +127. To turn a positive number into its negative: write the positive number in binary, invert every bit, and add 1. For −5: 5 is 00000101, inverted is 11111010, add 1 gives 11111011. Using two's complement means the computer can use the same addition circuit for both positive and negative numbers.

Worked example Overflow Add 11001000 and 01100100 as 8-bit numbers and say whether overflow occurs.
11001000 (200) + 01100100 (100) = 300, which needs nine bits (100101100). The extra carry out of the left-hand column means overflow occurs in 8 bits.
Worked example Shifts Shift 00010110 two places to the left and state the effect.
Result: 01011000. The number 22 has been multiplied by 4 to give 88.

Exam tip

  • Binary addition rules: 1 + 1 = 10, and 1 + 1 + 1 = 11.
  • Overflow = the answer needs more bits than are available.
  • Left shift multiplies by 2; right shift divides by 2; two's complement: invert and add 1.

1.2 Text, sound and images

Representing text

Computers store text by giving every character a number, called its character code, and then storing that number in binary. A character set is the list of all the characters that a computer system can recognise, with the code for each. The characters include letters, digits, punctuation marks and symbols, and even the space and the Enter key.

The earliest widely used character set was ASCII (American Standard Code for Information Interchange). Standard ASCII uses 7 bits for each character, which gives 27 = 128 different characters, enough for the English alphabet, the digits and common symbols. The codes are in an order that makes sorting easy: capital A is 65, B is 66, and so on to Z at 90; lower-case a is 97, b is 98 up to z at 122; the digits 0 to 9 are 48 to 57; the space is 32. So if you know that A is 65, then E is 65 + 4 = 69, and lower-case e is 69 + 32 = 101. Extended ASCII uses 8 bits for 256 characters, which adds accented letters and more symbols.

ASCII cannot represent the alphabets of languages such as Chinese, Arabic or Japanese, or many of the special symbols in other languages. The solution is Unicode, a character set that gives a unique code to the characters of almost all the world's writing systems, as well as symbols and emoji. Unicode uses more bits per character (commonly 16 or 32), so it can represent over a million characters; the first 128 codes are the same as ASCII. The price is that a text file in Unicode needs more storage than one in ASCII: a text of 1000 characters needs 1000 bytes in ASCII at 8 bits per character, but 2000 bytes at 16 bits per character. Unicode lets a document display Setswana, English, French and Chinese side by side, and lets a computer in Botswana send text to a computer in Japan and have it show correctly.

The storage needed by text is calculated by multiplying the number of characters by the number of bits per character. A message of 250 characters in 7-bit ASCII needs 250 × 7 = 1750 bits, or about 219 bytes (if stored in 8-bit bytes, 250 bytes).

Character setBits per characterNumber of charactersNotes
ASCII7128English letters, digits, symbols
Extended ASCII8256Adds accents and symbols
Unicode16 or moreOver a millionAlmost every language and emoji
Data is stored in binary, with a code for every character.
Data is stored in binary, with a code for every character.
Worked example Character codes The ASCII code for "C" is 67. What is the code for "G", and for "g"?
G is four letters after C, so its code is 67 + 4 = 71. Lower-case letters are 32 higher, so "g" is 71 + 32 = 103.
Worked example File size A text file has 4000 characters and uses 16-bit Unicode. Calculate its size in bytes and in kilobytes.
4000 × 16 = 64 000 bits; 64 000 ÷ 8 = 8000 bytes, which is 8 kilobytes (using 1000 bytes = 1 kilobyte).

Exam tip

  • ASCII: 7 bits, 128 characters; Unicode: more bits, many more characters.
  • Capital and lower-case letters differ by 32.
  • Size = characters × bits per character.

Representing sound

Sound in the real world is analogue: the pressure of the air varies smoothly. To store it in a computer, the sound must be converted into digital data by an analogue-to-digital converter (ADC). A microphone changes the sound waves into an electrical signal; then the signal is sampled: its height (amplitude) is measured at regular, very short intervals of time, and each measurement is stored as a binary number. To play the sound back, a digital-to-analogue converter (DAC) changes the numbers into an electrical signal for the speaker.

Two settings control the quality of the recording. The sampling rate is the number of samples taken every second, measured in hertz (Hz). A CD uses 44 100 samples per second (44.1 kHz). A higher sampling rate takes the sound more accurately, because there are more points on the wave, but it makes the file larger. The sampling resolution (bit depth) is the number of bits used to store each sample. With 8 bits, each sample can take one of 256 levels; with 16 bits, 65 536 levels, which describes the sound far more accurately and so gives a better quality, again at the cost of a larger file.

The size of a sound file is: sampling rate × sampling resolution × length in seconds, giving bits. For a 10-second recording at 44 100 Hz and 16 bits, the size is 44 100 × 16 × 10 = 7 056 000 bits, which is 882 000 bytes, about 0.88 MB for mono sound. A stereo recording has two channels and so is twice as big. To reduce the size, we can lower the sampling rate or the resolution, shorten the recording, or compress the file, which is dealt with in Topic 1.3.

The sampled sound is only an approximation of the original, because it is stored as a set of steps. If the sampling rate is too low, high-pitched sounds are missed. A good enough rate lets the human ear, which hears up to about 20 kHz, hear no difference, which is why speech on a phone sounds thinner than music on a CD: phones use a lower sampling rate.

Sampling a sound wave: the sampling rate and the resolution.
Sampling a sound wave: the sampling rate and the resolution.
Worked example Sound file size Calculate the size in bytes of a 30-second mono recording sampled at 8000 Hz with 8 bits per sample.
8000 × 8 × 30 = 1 920 000 bits; 1 920 000 ÷ 8 = 240 000 bytes (240 kB).

Exam tip

  • Sound is sampled: amplitude measured at regular intervals.
  • Higher sampling rate and resolution = better quality and bigger file.
  • Size = rate × resolution × seconds (÷ 8 for bytes).

Representing images

A digital image is a grid of tiny squares called pixels (picture elements). Each pixel has a colour, stored as a binary number. The number of pixels in the image is its resolution, usually written as width × height, such as 1920 × 1080. More pixels give more detail and a sharper picture, but a bigger file. When an image is enlarged too far, the individual pixels become visible and it looks blocky (pixelated).

The colour depth is the number of bits used for each pixel. With 1 bit, there are only two colours (black and white); with 2 bits, four colours; with 8 bits, 256 colours; with 24 bits, over 16 million colours ("true colour"). In general, n bits give 2n colours. A greater colour depth allows more subtle shades and a more realistic picture, but also a larger file.

The file size of an image is: number of pixels × colour depth (in bits). A picture of 800 × 600 pixels with 24-bit colour has 480 000 pixels, so 480 000 × 24 = 11 520 000 bits = 1 440 000 bytes, about 1.4 MB. Real image files also store metadata, extra data about the file such as its width and height, the colour depth, the date and the camera used, and this adds a little to the size.

For a black and white picture with 1 bit per pixel, a small grid can be stored as rows of bits: an 8 × 8 image needs 64 bits, which is 8 bytes. Drawing a letter in an 8 × 8 grid and writing 1 for a black pixel and 0 for a white pixel is a common exercise.

Bitmap images (photographs) are made of pixels. Vector graphics are stored as mathematical descriptions of shapes (lines, curves, circles with their positions, sizes and colours), so they can be enlarged without losing quality, and the file is small; they suit logos and diagrams. The next section explains how file size can be reduced by compression.

Bitmap and vector images compared.
Bitmap and vector images compared.
Worked example Image file size Calculate the file size in kilobytes of an image that is 200 × 100 pixels with 8 bits per pixel.
200 × 100 = 20 000 pixels; 20 000 × 8 = 160 000 bits; ÷ 8 = 20 000 bytes = 20 kilobytes.
Worked example How many colours? How many different colours can be stored with 12 bits per pixel?
212 = 4096 colours.

Exam tip

  • File size = pixels × colour depth; n bits give 2n colours.
  • Higher resolution and colour depth mean better quality but bigger files.
  • Metadata describes the file (size, depth, date).

1.3 Data storage and compression

Units of storage and calculating file sizes

All data in a computer is stored in binary. The smallest unit is the bit. A group of four bits is a nibble, and eight bits make a byte, which can store one ASCII character. Larger amounts are counted in multiples. In the current Cambridge syllabus, the units go up in steps of 1024, written with the names kibibyte (KiB), mebibyte (MiB), gibibyte (GiB), tebibyte (TiB) and pebibyte (PiB): 1 kibibyte = 1024 bytes, 1 mebibyte = 1024 kibibytes, 1 gibibyte = 1024 mebibytes, and so on. These are used because computer memory is built in powers of two (1024 is 210). In everyday life, you will hear kilobyte, megabyte and gigabyte used loosely for the same amounts, and some manufacturers use 1000 instead of 1024, which is why a new "500 GB" disk shows a bit less in the computer.

To calculate a file size, work out the number of bits, divide by 8 to get bytes, and then divide by 1024 for each step up. For example, 11 520 000 bits ÷ 8 = 1 440 000 bytes; ÷ 1024 = 1406 kibibytes; ÷ 1024 = 1.37 mebibytes. To go down a unit, multiply by 1024.

Storage devices are chosen on the basis of the capacity they provide for the data. A device with a capacity of 8 GiB holds 8 × 1024 × 1024 × 1024 bytes. A school that wants to store 600 photographs of 3 MiB each needs 1800 MiB, which is about 1.76 GiB, so an 8 GiB flash drive is enough with plenty to spare. A film of two hours needs several gibibytes; a text document a few kibibytes.

UnitSymbolSize
Nibble4 bits
ByteB8 bits
KibibyteKiB1024 bytes
MebibyteMiB1024 KiB
GibibyteGiB1024 MiB
TebibyteTiB1024 GiB
PebibytePiB1024 TiB
Units of storage and how they increase in steps of 1024.
Units of storage and how they increase in steps of 1024.
Worked example Converting units A video file is 3 GiB. Express its size in MiB and in KiB.
3 × 1024 = 3072 MiB; 3072 × 1024 = 3 145 728 KiB.
Worked example Will it fit? Will 150 sound files of 4 MiB each fit on a 512 MiB memory card?
150 × 4 = 600 MiB. This is more than 512 MiB, so it will not fit; about 128 files would.

Exam tip

  • Steps of 1024: KiB, MiB, GiB, TiB, PiB.
  • bits ÷ 8 = bytes; then ÷ 1024 for each larger unit.
  • 1 nibble = 4 bits; 1 byte = 8 bits.

Data compression

Compression reduces the size of a file. This saves storage space, and makes the file quicker to send over a network because less data has to be transmitted, and so it uses less bandwidth. There are two kinds: lossy and lossless.

Lossless compression reduces the file size without losing any of the original data. When the file is decompressed, it is identical to the original. It works by finding patterns or repeated data and storing them in a shorter form. It is essential for text, program files and data, where every character matters, since losing one letter could change the meaning. Formats such as ZIP and PNG use lossless compression. A simple lossless method is run-length encoding (RLE). It replaces a run of repeated values with a single value and a count. The text AAAAABBBCC would be stored as 5A3B2C, using six characters instead of ten. In an image, a row of 12 white pixels followed by 3 black pixels and 5 white could be stored as (12, white), (3, black), (5, white). RLE works best where there are long runs of the same data, such as simple cartoons or diagrams, and works badly on photographs where neighbouring pixels differ slightly.

Lossy compression reduces the file size by permanently removing some of the data, in a way that people are unlikely to notice. The original cannot be recovered. It is used for photographs, music and video, where the human eye and ear cannot detect small losses. In an image, JPEG compression reduces the number of colours or combines similar neighbouring pixels. In sound, MP3 removes sounds at frequencies the ear cannot hear well, and lowers the sampling resolution or rate. In video, MP4 discards details that change little from one frame to the next. The files are much smaller, but quality falls as more data is removed; heavy compression makes pictures blurry and sound tinny.

The choice depends on the purpose. For a legal document or a program, use lossless. For streaming a film over a slow mobile connection, use lossy. In examination answers, always state what is removed or kept: "lossless means that no data is lost, and the original file can be restored exactly".

Lossless and lossy compression compared.
Lossless and lossy compression compared.
Worked example Run-length encoding Use RLE to compress the string WWWWWWBBBWWWW and state how many characters are saved.
6W3B4W. The original has 13 characters and the compressed version has 6, so 7 characters are saved.
Worked example Which type? Which compression suits (a) a photograph on a web page, (b) a spreadsheet of marks?
(a) Lossy (JPEG), because small losses are not noticed and the file is much smaller. (b) Lossless, because every value must be kept exactly.

Exam tip

  • Lossless = no data lost, can be restored; lossy = data permanently removed.
  • RLE stores value and count for each run.
  • Compression saves storage and transmission time.

Topic 2

Data Transmission

There's more where that came from ✨

Start a free 15-day trial to open more, or subscribe and get everything:

✅ Full notes, every topic ✅ All exam questions ✅ Every flashcard deck ✅ Complete mock papers
Start your free trial →

Topic 3

Hardware

There's more where that came from ✨

Start a free 15-day trial to open more, or subscribe and get everything:

✅ Full notes, every topic ✅ All exam questions ✅ Every flashcard deck ✅ Complete mock papers
Start your free trial →

Topic 4

Software

There's more where that came from ✨

Start a free 15-day trial to open more, or subscribe and get everything:

✅ Full notes, every topic ✅ All exam questions ✅ Every flashcard deck ✅ Complete mock papers
Start your free trial →

Topic 5

The Internet and Its Uses

There's more where that came from ✨

Start a free 15-day trial to open more, or subscribe and get everything:

✅ Full notes, every topic ✅ All exam questions ✅ Every flashcard deck ✅ Complete mock papers
Start your free trial →

Topic 6

Automated and Emerging Technologies

There's more where that came from ✨

Start a free 15-day trial to open more, or subscribe and get everything:

✅ Full notes, every topic ✅ All exam questions ✅ Every flashcard deck ✅ Complete mock papers
Start your free trial →

Topic 7

Algorithm Design and Problem-solving

There's more where that came from ✨

Start a free 15-day trial to open more, or subscribe and get everything:

✅ Full notes, every topic ✅ All exam questions ✅ Every flashcard deck ✅ Complete mock papers
Start your free trial →

Topic 8

Programming

There's more where that came from ✨

Start a free 15-day trial to open more, or subscribe and get everything:

✅ Full notes, every topic ✅ All exam questions ✅ Every flashcard deck ✅ Complete mock papers
Start your free trial →

Topic 9

Databases

There's more where that came from ✨

Start a free 15-day trial to open more, or subscribe and get everything:

✅ Full notes, every topic ✅ All exam questions ✅ Every flashcard deck ✅ Complete mock papers
Start your free trial →

Topic 10

Boolean Logic

There's more where that came from ✨

Start a free 15-day trial to open more, or subscribe and get everything:

✅ Full notes, every topic ✅ All exam questions ✅ Every flashcard deck ✅ Complete mock papers
Start your free trial →

Flashcards

Key Terms and Quick Checks

264 cards covering every topic below.

1.1 · Term
Binary
1.1 · Definition
A number system with two digits, 0 and 1, used by computers
1.1 · Term
Denary
1.1 · Definition
The base-10 number system that people use
1.1 · Term
Hexadecimal
1.1 · Definition
A base-16 system using the digits 0 to 9 and the letters A to F
1.1 · Term
Bit
1.1 · Definition
A single binary digit
1.1 · Term
Nibble
1.1 · Definition
A group of four bits
1.1 · Term
Byte
1.1 · Definition
A group of eight bits
1.1 · Term
Place value
1.1 · Definition
The value of a digit according to its position in a number
1.1 · Term
Maximum 8-bit value
1.1 · Definition
255 (11111111)
1.1 · Term
Hex digit
1.1 · Definition
Represents exactly four bits
1.1 · Term
Why use hexadecimal
1.1 · Definition
It is shorter and easier for people to read and copy than binary
1.1 · Term
Overflow error
1.1 · Definition
When a calculation gives a result too large for the number of bits available
1.1 · Term
Logical shift
1.1 · Definition
Moving all the bits left or right and filling the gaps with zeros
1.1 · Term
Left shift by one place
1.1 · Definition
Multiplies the number by 2
1.1 · Term
Right shift by one place
1.1 · Definition
Divides the number by 2
1.1 · Term
Two's complement
1.1 · Definition
A method of storing negative integers; the left-hand bit has a negative place value
1.1 · Term
Making a negative in two's complement
1.1 · Definition
Invert all the bits and add 1
1.2 · Term
Character set
1.2 · Definition
The list of characters a computer can recognise, each with a code
1.2 · Term
ASCII
1.2 · Definition
A 7-bit character set with 128 characters
1.2 · Term
Unicode
1.2 · Definition
A character set with codes for almost every language and symbol
1.2 · Term
Analogue
1.2 · Definition
Data that varies continuously, such as sound waves
1.2 · Term
Sampling
1.2 · Definition
Measuring the amplitude of a sound wave at regular intervals
1.2 · Term
Sampling rate
1.2 · Definition
The number of samples taken per second, in hertz
1.2 · Term
Sampling resolution
1.2 · Definition
The number of bits used to store each sample
1.2 · Term
Sound file size
1.2 · Definition
Sampling rate × resolution × length in seconds
1.2 · Term
Pixel
1.2 · Definition
One coloured dot in a bitmap image
1.2 · Term
Image resolution
1.2 · Definition
The number of pixels in an image
1.2 · Term
Colour depth
1.2 · Definition
The number of bits used for the colour of each pixel
1.2 · Term
Image file size
1.2 · Definition
Number of pixels × colour depth
1.2 · Term
Metadata
1.2 · Definition
Data about a file, such as its size, date and colour depth
1.3 · Term
Kibibyte
1.3 · Definition
1024 bytes
1.3 · Term
Mebibyte
1.3 · Definition
1024 kibibytes
1.3 · Term
Gibibyte
1.3 · Definition
1024 mebibytes
1.3 · Term
Compression
1.3 · Definition
Reducing the size of a file
1.3 · Term
Lossless compression
1.3 · Definition
Compression in which no data is lost and the original can be restored
1.3 · Term
Lossy compression
1.3 · Definition
Compression that permanently removes some data
1.3 · Term
Run-length encoding
1.3 · Definition
Compression that stores each run of repeated data as a value and a count
1.3 · Term
JPEG
1.3 · Definition
A lossy image format
1.3 · Term
MP3
1.3 · Definition
A lossy audio format
1 / 38

Click/tap the card to flip it

2.1 · Term
Packet
2.1 · Definition
A small piece of data sent across a network
2.1 · Term
Packet header
2.1 · Definition
Holds the destination and source addresses, packet number and number of packets
2.1 · Term
Payload
2.1 · Definition
The actual data in a packet
2.1 · Term
Packet switching
2.1 · Definition
Sending packets independently by different routes and reassembling them at the destination
2.1 · Term
Serial transmission
2.1 · Definition
Sending bits one after another along one wire
2.1 · Term
Parallel transmission
2.1 · Definition
Sending several bits at the same time along separate wires
2.1 · Term
Skewing
2.1 · Definition
Parallel bits arriving at slightly different times
2.1 · Term
Simplex
2.1 · Definition
Data travels in one direction only
2.1 · Term
Half-duplex
2.1 · Definition
Data travels in both directions but not at the same time
2.1 · Term
Full-duplex
2.1 · Definition
Data travels in both directions at the same time
2.1 · Term
USB
2.1 · Definition
Universal Serial Bus: a standard serial connection for devices
2.2 · Term
Parity bit
2.2 · Definition
An extra bit added so that the number of 1s is even or odd
2.2 · Term
Even parity
2.2 · Definition
The total number of 1s, including the parity bit, is even
2.2 · Term
Checksum
2.2 · Definition
A value calculated from data and sent with it to detect errors
2.2 · Term
Echo check
2.2 · Definition
The receiver sends the data back to the sender for comparison
2.2 · Term
Check digit
2.2 · Definition
A digit calculated from the other digits to detect entry errors
2.2 · Term
ARQ
2.2 · Definition
Automatic repeat query: uses acknowledgements and a timeout to resend data
2.2 · Term
ACK
2.2 · Definition
A positive acknowledgement that data arrived correctly
2.2 · Term
Timeout
2.2 · Definition
The time the sender waits for an acknowledgement before resending
2.3 · Term
Encryption
2.3 · Definition
Scrambling data so it cannot be understood without the key
2.3 · Term
Plaintext
2.3 · Definition
Data before encryption
2.3 · Term
Ciphertext
2.3 · Definition
Data after encryption
2.3 · Term
Symmetric encryption
2.3 · Definition
Encryption in which the same key encrypts and decrypts
2.3 · Term
Asymmetric encryption
2.3 · Definition
Encryption using a public key to encrypt and a private key to decrypt
2.3 · Term
Public key
2.3 · Definition
A key that can be shared and is used to encrypt
2.3 · Term
Private key
2.3 · Definition
A secret key used to decrypt
2.3 · Term
Brute-force attack
2.3 · Definition
Trying every possible key until one works
1 / 27

Click/tap the card to flip it

3.1 · Term
Von Neumann architecture
3.1 · Definition
A design in which program instructions and data are stored in the same memory
3.1 · Term
Stored program concept
3.1 · Definition
Instructions and data are held in memory as binary and fetched by the CPU
3.1 · Term
ALU
3.1 · Definition
Arithmetic logic unit: performs calculations and logical comparisons
3.1 · Term
Control unit
3.1 · Definition
Fetches, decodes and controls the execution of instructions
3.1 · Term
Program counter (PC)
3.1 · Definition
Holds the address of the next instruction to be fetched
3.1 · Term
Memory address register (MAR)
3.1 · Definition
Holds the address of the memory location to be read or written
3.1 · Term
Memory data register (MDR)
3.1 · Definition
Holds data or an instruction fetched from or to be written to memory
3.1 · Term
Current instruction register (CIR)
3.1 · Definition
Holds the instruction being decoded and executed
3.1 · Term
Accumulator (ACC)
3.1 · Definition
Holds the results of ALU calculations
3.1 · Term
Address bus
3.1 · Definition
Carries the address of a memory location from the CPU
3.1 · Term
Data bus
3.1 · Definition
Carries data and instructions between the CPU, memory and devices
3.1 · Term
Control bus
3.1 · Definition
Carries control signals such as read and write
3.1 · Term
Fetch-decode-execute cycle
3.1 · Definition
The repeated process in which the CPU fetches, decodes and executes instructions
3.1 · Term
Clock speed
3.1 · Definition
The number of cycles the CPU completes per second
3.1 · Term
Core
3.1 · Definition
One independent processing unit in a CPU
3.1 · Term
Cache
3.1 · Definition
Very fast memory close to the CPU that stores frequently used data
3.1 · Term
Instruction set
3.1 · Definition
The commands a particular CPU can carry out
3.1 · Term
Embedded system
3.1 · Definition
A computer built into a device to do one specific job
3.2 · Term
Barcode scanner
3.2 · Definition
Reads the pattern of reflected light from the lines of a barcode
3.2 · Term
QR code
3.2 · Definition
A square pattern that stores more data than a barcode
3.2 · Term
Resistive touch screen
3.2 · Definition
Two layers touch under pressure to complete a circuit
3.2 · Term
Capacitive touch screen
3.2 · Definition
Detects the change in charge when a finger touches it
3.2 · Term
Infrared touch screen
3.2 · Definition
Detects touches that break a grid of infrared beams
3.2 · Term
Sensor
3.2 · Definition
Measures a physical quantity and sends data to a processor
3.2 · Term
LCD
3.2 · Definition
A screen using liquid crystals and a backlight
3.2 · Term
Inkjet printer
3.2 · Definition
Fires drops of ink through nozzles onto paper
3.2 · Term
Laser printer
3.2 · Definition
Uses a laser, a charged drum and toner fused by heat
3.2 · Term
3D printer
3.2 · Definition
Builds an object by adding layers of material
3.2 · Term
Actuator
3.2 · Definition
An output device that causes movement or a physical action
3.3 · Term
DRAM
3.3 · Definition
Dynamic RAM: needs constant refreshing; used as main memory
3.3 · Term
SRAM
3.3 · Definition
Static RAM: faster and costlier; used for cache
3.3 · Term
Virtual memory
3.3 · Definition
Part of secondary storage used as extra RAM
3.3 · Term
Thrashing
3.3 · Definition
Slowdown caused by too much swapping between RAM and virtual memory
3.3 · Term
Hard disk drive
3.3 · Definition
Magnetic storage with spinning platters and read/write heads
3.3 · Term
Optical storage
3.3 · Definition
Storage read and written with a laser using pits and lands
3.3 · Term
Solid-state storage
3.3 · Definition
Flash memory with no moving parts
3.3 · Term
Cloud storage
3.3 · Definition
Data stored on remote servers reached through the Internet
3.4 · Term
NIC
3.4 · Definition
Network interface card: connects a device to a network
3.4 · Term
MAC address
3.4 · Definition
A unique 48-bit hardware address given to a network card
3.4 · Term
IP address
3.4 · Definition
The address of a device on a network
3.4 · Term
IPv4
3.4 · Definition
32-bit IP addresses, written as four numbers from 0 to 255
3.4 · Term
IPv6
3.4 · Definition
128-bit IP addresses written in hexadecimal
3.4 · Term
Router
3.4 · Definition
Forwards packets between networks using the destination IP address
3.4 · Term
Static IP address
3.4 · Definition
An address that is fixed
3.4 · Term
Dynamic IP address
3.4 · Definition
An address assigned by the network for a time
1 / 45

Click/tap the card to flip it

More flashcards are waiting ✨

Start a free 15-day trial to open more, or subscribe and get everything:

✅ Full notes, every topic ✅ All exam questions ✅ Every flashcard deck ✅ Complete mock papers
Start your free trial →

More flashcards are waiting ✨

Start a free 15-day trial to open more, or subscribe and get everything:

✅ Full notes, every topic ✅ All exam questions ✅ Every flashcard deck ✅ Complete mock papers
Start your free trial →

More flashcards are waiting ✨

Start a free 15-day trial to open more, or subscribe and get everything:

✅ Full notes, every topic ✅ All exam questions ✅ Every flashcard deck ✅ Complete mock papers
Start your free trial →

More flashcards are waiting ✨

Start a free 15-day trial to open more, or subscribe and get everything:

✅ Full notes, every topic ✅ All exam questions ✅ Every flashcard deck ✅ Complete mock papers
Start your free trial →

More flashcards are waiting ✨

Start a free 15-day trial to open more, or subscribe and get everything:

✅ Full notes, every topic ✅ All exam questions ✅ Every flashcard deck ✅ Complete mock papers
Start your free trial →

More flashcards are waiting ✨

Start a free 15-day trial to open more, or subscribe and get everything:

✅ Full notes, every topic ✅ All exam questions ✅ Every flashcard deck ✅ Complete mock papers
Start your free trial →

More flashcards are waiting ✨

Start a free 15-day trial to open more, or subscribe and get everything:

✅ Full notes, every topic ✅ All exam questions ✅ Every flashcard deck ✅ Complete mock papers
Start your free trial →

Data Representation

9 multiple-choice quick checks and 3 structured questions in the style of the theory papers, with worked solutions.

1
1 mark
What is the denary value of the binary number 01101001?
  • A.97
  • B.109
  • C.105
  • D.89
2
1 mark
Which is the hexadecimal value of 11010110?
  • A.B6
  • B.D6
  • C.6D
  • D.E6
3
1 mark
What is the largest value that can be stored in 8 bits?
  • A.256
  • B.128
  • C.255
  • D.127
4
1 mark
Shifting 00001100 one place to the left gives
  • A.00011000
  • B.00000110
  • C.00011001
  • D.01100000
5
1 mark
A sound recording has a higher sampling rate. Which is the effect?
  • A.Poorer quality and a smaller file
  • B.Better quality and a larger file
  • C.Same quality and a larger file
  • D.Better quality and a smaller file
6
1 mark
How many colours can 8 bits per pixel represent?
  • A.8
  • B.64
  • C.65 536
  • D.256
7
1 mark
Which compression method stores 6 white pixels as (6, white)?
  • A.JPEG
  • B.MP3
  • C.Parity
  • D.Run-length encoding
8
1 mark
How many bytes are in 2 kibibytes?
  • A.2000
  • B.2048
  • C.1024
  • D.4096
9
1 mark
Which character set can represent most of the world's languages?
  • A.ASCII
  • B.Binary
  • C.Unicode
  • D.Hexadecimal
10
5 marks
  1. (a) Convert 150 into 8-bit binary. [2]
  2. (b) Convert your answer to hexadecimal. [2]
  3. (c) Give one reason why hexadecimal is used. [1]
Worked solution

(a) 128 + 16 + 4 + 2 (1) = 10010110 (1).

(b) 1001 = 9 and 0110 = 6 (1) so 96 (1).

(c) It is shorter and easier for people to read and copy than binary (1).

11
5 marks

An image is 400 pixels wide and 300 pixels high with a colour depth of 16 bits.

  1. (a) Calculate the file size in kibibytes. [3]
  2. (b) State two ways of reducing the file size. [2]
Worked solution

(a) 400 × 300 = 120 000 pixels (1); × 16 = 1 920 000 bits ÷ 8 = 240 000 bytes (1); ÷ 1024 = 234.4 KiB (1).

(b) Reduce the colour depth; reduce the resolution; use compression (any two) (1 each).

12
3 marks

Add the 8-bit numbers 01101100 and 01011010 and state what happens. [3]

Worked solution

01101100 (108) + 01011010 (90) = 11000110 (198) (2); there is no overflow because 198 is less than 255 (1).

Data Transmission

7 multiple-choice quick checks and 3 structured questions in the style of the theory papers, with worked solutions.

1
1 mark
Which part of a packet holds the destination address?
  • A.Payload
  • B.Trailer
  • C.Checksum
  • D.Header
2
1 mark
Which transmission method sends several bits at the same time?
  • A.Parallel
  • B.Serial
  • C.Simplex
  • D.Half-duplex
3
1 mark
A telephone call uses
  • A.simplex transmission
  • B.full-duplex transmission
  • C.half-duplex transmission
  • D.parallel only
4
1 mark
Using even parity, the parity bit for 1011001 is
  • A.1
  • B.0
  • C.2
  • D.4
5
1 mark
A parity check may not detect an error if
  • A.one bit is changed
  • B.two bits are changed
  • C.the parity bit is 0
  • D.the data is text
6
1 mark
In asymmetric encryption, data is encrypted with the
  • A.receiver's private key
  • B.sender's private key
  • C.same key at both ends
  • D.receiver's public key
7
1 mark
In ARQ, the sender resends a packet when
  • A.a positive acknowledgement arrives
  • B.the parity bit is 1
  • C.the packet is encrypted
  • D.a negative acknowledgement or timeout occurs
8
6 marks
  1. (a) Describe the three parts of a packet. [3]
  2. (b) Explain how packets reach the destination by different routes and are put in order. [3]
Worked solution

(a) Header: destination and source addresses and packet number (1); payload: the data (1); trailer: end marker and error-checking data (1).

(b) Each packet is routed separately by routers and may take a different path (1); the packets may arrive out of order (1); the packet numbers in the headers are used to reassemble them in order (1).

9
4 marks
  1. (a) Calculate the even parity bit for 1100101 and write the byte sent. [2]
  2. (b) A byte 01101011 arrives. State whether an error is detected using even parity. [2]
Worked solution

(a) Four 1s so the parity bit is 0 (1); byte 01100101 with the parity bit first, or 11001010 with it last (1).

(b) The byte contains five 1s, an odd number (1) so an error is detected (1).

10
4 marks

Explain the difference between symmetric and asymmetric encryption. [4]

Worked solution

Symmetric uses the same key to encrypt and decrypt (1); the key must be shared safely, which is a problem (1). Asymmetric uses a public key to encrypt (1) and a different private key to decrypt, so no secret key has to be sent (1).

Hardware

7 multiple-choice quick checks and 3 structured questions in the style of the theory papers, with worked solutions.

1
1 mark
Which register holds the address of the next instruction?
  • A.MAR
  • B.MDR
  • C.Accumulator
  • D.Program counter
2
1 mark
The ALU is used to
  • A.store the program
  • B.perform calculations and logic
  • C.control the bus
  • D.hold the address
3
1 mark
Which bus carries addresses from the CPU to memory?
  • A.Data bus
  • B.Control bus
  • C.System bus
  • D.Address bus
4
1 mark
Which type of touch screen needs a finger's electrical charge?
  • A.Capacitive
  • B.Resistive
  • C.Infrared
  • D.Optical
5
1 mark
Which memory is used for cache?
  • A.DRAM
  • B.SRAM
  • C.ROM
  • D.Virtual memory
6
1 mark
A MAC address has
  • A.32 bits
  • B.128 bits
  • C.8 bits
  • D.48 bits
7
1 mark
Which storage has no moving parts?
  • A.Hard disk drive
  • B.Magnetic tape
  • C.DVD
  • D.Solid-state drive
8
4 marks

Describe the fetch stage of the fetch-decode-execute cycle, naming the registers. [4]

Worked solution

The address in the program counter is copied to the MAR (1); the instruction at that address is fetched from memory to the MDR (1); the instruction is copied to the CIR (1); the program counter is incremented (1).

9
5 marks
  1. (a) State three factors that affect the performance of a CPU. [3]
  2. (b) Explain what virtual memory is. [2]
Worked solution

(a) Clock speed; number of cores; cache size (1 each).

(b) Part of secondary storage used as if it were RAM when RAM is full (1); data is moved between RAM and the disk as needed (1).

10
4 marks

Describe how a laser printer produces a printed page. [4]

Worked solution

A laser draws the image as a pattern of charge on a drum (1); toner is attracted to the charged parts (1); the paper passes the drum and the toner transfers to it (1); heat fuses the toner to the paper (1).

Topic 4

Software

There's more where that came from ✨

Start a free 15-day trial to open more, or subscribe and get everything:

✅ Full notes, every topic ✅ All exam questions ✅ Every flashcard deck ✅ Complete mock papers
Start your free trial →

Topic 5

The Internet and Its Uses

There's more where that came from ✨

Start a free 15-day trial to open more, or subscribe and get everything:

✅ Full notes, every topic ✅ All exam questions ✅ Every flashcard deck ✅ Complete mock papers
Start your free trial →

Topic 6

Automated and Emerging Technologies

There's more where that came from ✨

Start a free 15-day trial to open more, or subscribe and get everything:

✅ Full notes, every topic ✅ All exam questions ✅ Every flashcard deck ✅ Complete mock papers
Start your free trial →

Topic 7

Algorithm Design and Problem-solving

There's more where that came from ✨

Start a free 15-day trial to open more, or subscribe and get everything:

✅ Full notes, every topic ✅ All exam questions ✅ Every flashcard deck ✅ Complete mock papers
Start your free trial →

Topic 8

Programming

There's more where that came from ✨

Start a free 15-day trial to open more, or subscribe and get everything:

✅ Full notes, every topic ✅ All exam questions ✅ Every flashcard deck ✅ Complete mock papers
Start your free trial →

Topic 9

Databases

There's more where that came from ✨

Start a free 15-day trial to open more, or subscribe and get everything:

✅ Full notes, every topic ✅ All exam questions ✅ Every flashcard deck ✅ Complete mock papers
Start your free trial →

Topic 10

Boolean Logic

There's more where that came from ✨

Start a free 15-day trial to open more, or subscribe and get everything:

✅ Full notes, every topic ✅ All exam questions ✅ Every flashcard deck ✅ Complete mock papers
Start your free trial →

Mock Exams & Past Papers

Full Papers

Full-length practice papers in the format of the Cambridge IGCSE Computer Science examination. Paper 1 (Computer Systems, 1 hour 45 minutes, 75 marks) covers data representation, transmission, hardware, software, the Internet and emerging technologies. Paper 2 (Algorithms, Programming and Logic, 1 hour 45 minutes, 75 marks) covers problem-solving, programming, databases and Boolean logic, and includes a scenario question. Neither paper allows a calculator. Work each paper under timed conditions, then open the worked solutions to mark yourself. These are Morutabana practice papers written to the syllabus, not Cambridge past papers.

Mock Set 1

Mock Set 1 · Paper 1 (Computer Systems)1 hour 45 minutes · 75 marks · No calculator

Instructions

  • Answer all the questions. The number of marks is shown in brackets at the end of each part.
  • You may not use a calculator. Show your working in calculations.
  • Open the worked solutions only after you have attempted the paper.
1
8 marks
  1. (a) Convert the binary number 10110101 to denary. [2]
  2. (b) Convert the denary number 200 to 8-bit binary. [2]
  3. (c) Convert your answer to (b) to hexadecimal. [2]
  4. (d) Add the binary numbers 01001011 and 00110110. Show your working. [2]
Worked solution

(a) 128 + 32 + 16 + 4 + 1 (1) = 181 (1).

(b) 128 + 64 + 8 (1) = 11001000 (1).

(c) 1100 = C and 1000 = 8 (1) so C8 (1).

(d) 01001011 (75) + 00110110 (54) (1) = 10000001 (129) (1).

2
8 marks
  1. (a) A sound clip is recorded for 20 seconds, mono, at a sampling rate of 8000 Hz and a resolution of 8 bits. Calculate the file size in kibibytes. [3]
  2. (b) State the effect of increasing the sampling resolution. [2]
  3. (c) An image is 100 × 50 pixels with 4 bits per pixel. Calculate the file size in bytes. [3]
Worked solution

(a) 8000 × 8 × 20 = 1 280 000 bits (1); ÷ 8 = 160 000 bytes (1); ÷ 1024 = 156.25 KiB (1).

(b) The recording is more accurate / better quality (1) and the file is larger (1).

(c) 100 × 50 = 5000 pixels (1); × 4 = 20 000 bits (1); ÷ 8 = 2500 bytes (1).

3
6 marks
  1. (a) Describe the difference between lossless and lossy compression. [2]
  2. (b) Compress the data AAAABBBCCCCCCD using run-length encoding. [2]
  3. (c) State which type of compression is suitable for a photograph sent over a slow connection, and why. [2]
Worked solution

(a) Lossless: no data is lost and the original can be restored (1); lossy: some data is permanently removed (1).

(b) 4A3B6C1D (2; 1 for the method and 1 for correct counts).

(c) Lossy (JPEG) (1) because the file becomes much smaller so it is sent faster (1).

That's the first 3 questions ✨

Start a free 15-day trial to see more of every paper, or subscribe for the full papers and your grade:

✅ Full notes, every topic ✅ All exam questions ✅ Every flashcard deck ✅ Complete mock papers
Start your free trial →
Mock Set 1 · Paper 2 (Algorithms, Programming and Logic)1 hour 45 minutes · 75 marks · No calculator

Instructions

  • Answer all the questions. The number of marks is shown in brackets at the end of each part.
  • You may answer programming questions in pseudocode or in a high-level language such as Python.
  • You may not use a calculator. Open the worked solutions only after you have attempted the paper.
1
10 marks

A school uses a program to record quiz scores for 20 learners.

  1. (a) Name the four stages of the program development life cycle. [2]
  2. (b) Describe what is meant by decomposition and give one benefit. [2]
  3. (c) The scores are whole numbers from 0 to 10. Give one example each of normal, abnormal and extreme test data. [3]
  4. (d) State the name and describe one validation check suitable for a score. [2]
  5. (e) State why verification is also needed. [1]
Worked solution

(a) Analysis, design, coding, testing (2 for all four in order; 1 for three).

(b) Breaking a problem into smaller sub-problems (1); each can be solved, written and tested separately / shared among programmers (1).

(c) Normal: 6 (1); abnormal: 15 or "abc" (1); extreme: 0 or 10 (1).

(d) Range check (1): only whole numbers from 0 to 10 are accepted (1).

(e) Validation only shows data is reasonable, not that it is correct (1).

2
10 marks
  1. (a) Complete the trace table for the algorithm with the inputs 3, 8, 2, 7. [5]
Total ← 0
Highest ← 0
FOR Count ← 1 TO 4
   INPUT Number
   Total ← Total + Number
   IF Number > Highest THEN
      Highest ← Number
   ENDIF
NEXT Count
OUTPUT Total, Highest
  1. (b) State what the algorithm does. [2]
  2. (c) The algorithm contains no check for the largest value if all inputs are negative. Explain the error and correct it. [3]
Worked solution

(a) Total: 3, 11, 13, 20 (2); Highest: 3, 8, 8, 8 (2); output 20 and 8 (1).

(b) It finds the total (1) and the largest of four numbers entered (1).

(c) Highest starts at 0 (1) so if all numbers are negative the output of 0 is wrong, a logic error (1); set Highest to the first number input, or to a very small number, before the loop (1).

3
12 marks

A teacher stores the names of 8 learners in an array Names and their marks in an array Marks.

  1. (a) Write pseudocode to declare the two arrays. [2]
  2. (b) Write an algorithm that inputs a name and uses a linear search to output the learner's mark or "Not found". [6]
  3. (c) Describe how a bubble sort would sort the Marks array into descending order. [4]
Worked solution

(a) DECLARE Names : ARRAY[1:8] OF STRING (1); DECLARE Marks : ARRAY[1:8] OF INTEGER (1).

(b) INPUT Target (1); Found ← FALSE and Index ← 1 (1); loop through the array until found or the end (1); IF Names[Index] = Target THEN (1); Found ← TRUE and output Marks[Index] (1); if not found output "Not found" (1).

(c) Compare each pair of neighbouring marks (1); swap them if the first is smaller than the next (1); repeat passes through the array (1) until a pass makes no swaps (1).

That's the first 3 questions ✨

Start a free 15-day trial to see more of every paper, or subscribe for the full papers and your grade:

✅ Full notes, every topic ✅ All exam questions ✅ Every flashcard deck ✅ Complete mock papers
Start your free trial →

Mock Set 2

Mock Set 2 · Paper 1 (Computer Systems)1 hour 45 minutes · 75 marks · No calculator

Instructions

  • Answer all the questions. The number of marks is shown in brackets at the end of each part.
  • You may not use a calculator. Show your working in calculations.
  • Open the worked solutions only after you have attempted the paper.
1
8 marks
  1. (a) Convert the hexadecimal number 3F to denary. [2]
  2. (b) Convert the binary number 11100110 to hexadecimal. [2]
  3. (c) Convert the denary number 77 to 8-bit binary. [2]
  4. (d) State the range of denary numbers that can be stored in 8 bits using binary with no negative numbers. [1]
  5. (e) State what a right shift of two places does to a binary number. [1]
Worked solution

(a) 3 × 16 + 15 (1) = 63 (1).

(b) 1110 = E and 0110 = 6 (1) so E6 (1).

(c) 64 + 8 + 4 + 1 (1) = 01001101 (1).

(d) 0 to 255 (1).

(e) It divides the number by 4 (ignoring any remainder) (1).

2
9 marks
  1. (a) State how many bits ASCII uses and how many characters it can represent. [2]
  2. (b) Explain why Unicode needs more storage than ASCII. [2]
  3. (c) A text of 2000 characters is stored in 16-bit Unicode. Calculate the size in bytes. [2]
  4. (d) A photograph is 600 × 400 pixels with 8-bit colour. Calculate the file size in kibibytes. [3]
Worked solution

(a) 7 bits (1); 128 characters (1).

(b) Unicode gives a code to many more characters, so each character needs more bits (1) such as 16 or 32 instead of 7 or 8 (1).

(c) 2000 × 16 = 32 000 bits (1); ÷ 8 = 4000 bytes (1).

(d) 600 × 400 = 240 000 pixels × 8 = 1 920 000 bits (1); ÷ 8 = 240 000 bytes (1); ÷ 1024 = 234.4 KiB (1).

3
6 marks
  1. (a) Describe the difference between serial and parallel data transmission. [2]
  2. (b) State why serial transmission is used for long distances. [2]
  3. (c) Name the transmission mode in which data can travel both ways at the same time, and give an example. [2]
Worked solution

(a) Serial sends bits one after another along one wire (1); parallel sends several bits at once along separate wires (1).

(b) Parallel bits can arrive at different times (skewing) (1) and interfere with each other, but serial avoids these problems and is cheaper (1).

(c) Full-duplex (1); a telephone call (1).

That's the first 3 questions ✨

Start a free 15-day trial to see more of every paper, or subscribe for the full papers and your grade:

✅ Full notes, every topic ✅ All exam questions ✅ Every flashcard deck ✅ Complete mock papers
Start your free trial →
Mock Set 2 · Paper 2 (Algorithms, Programming and Logic)1 hour 45 minutes · 75 marks · No calculator

Instructions

  • Answer all the questions. The number of marks is shown in brackets at the end of each part.
  • You may answer programming questions in pseudocode or in a high-level language such as Python.
  • You may not use a calculator. Open the worked solutions only after you have attempted the paper.
1
8 marks

A library program asks a member to enter a PIN of exactly four digits.

  1. (a) Name two validation checks that could be used on the PIN. [2]
  2. (b) Write an algorithm that keeps asking for the PIN until it is between 1000 and 9999. [4]
  3. (c) The PIN is also entered a second time to confirm it. State the name of this check. [1]
  4. (d) Give one reason why the check in (c) is needed even when (a) is used. [1]
Worked solution

(a) Range check and length check (or type check) (2).

(b) REPEAT (1); INPUT Pin (1); an error message if invalid (1); UNTIL Pin >= 1000 AND Pin <= 9999 (1).

(c) Verification (double entry) (1).

(d) Validation only checks that the PIN is sensible, not that it is what the user meant to type (1).

2
8 marks
  1. (a) A flowchart is to be drawn for this algorithm: START, input Number, a decision "Number > 0?", if Yes output "Positive", if No output "Not positive", END. Describe the flowchart symbols needed and how they are joined. [4]
  2. (b) Trace the algorithm below with Number = 5 and complete the table: Count, Result. [3]
Result ← 1
FOR Count ← 1 TO Number
   Result ← Result * Count
NEXT Count
OUTPUT Result
  1. (c) State what the algorithm calculates. [1]
Worked solution

(a) Rounded rectangles for START and END (1); parallelograms for input and output (1); a diamond for the decision with Yes and No exits (1); arrows joining all the symbols in order (1).

(b) Count 1 → Result 1; Count 2 → 2; Count 3 → 6; Count 4 → 24; Count 5 → 120 (3: 1 for the method, 1 for the values to 6, 1 for 120 and the output).

(c) The factorial of Number (5 × 4 × 3 × 2 × 1) (1).

3
12 marks

A program sorts and searches an array Scores of 6 whole numbers: 14, 9, 21, 5, 17, 11.

  1. (a) Show the contents of the array after the first pass of a bubble sort into ascending order. [3]
  2. (b) Show the number of passes needed to finish and state how the program knows to stop. [3]
  3. (c) Write pseudocode to perform a linear search for a value Target in the array and output its position or "Not found". [6]
Worked solution

(a) 14 and 9 swap (9, 14, 21, 5, 17, 11) (1); 21 and 5 swap (9, 14, 5, 21, 17, 11) (1); 21 and 17 swap, then 21 and 11 swap: 9, 14, 5, 17, 11, 21 (1).

(b) Further passes continue until a pass has no swaps (1); the sorted array is 5, 9, 11, 14, 17, 21 (1); a Swapped flag stays FALSE during a pass, so the loop stops (1).

(c) Found ← FALSE and Index ← 1 (1); WHILE Index <= 6 AND Found = FALSE (1); IF Scores[Index] = Target THEN Found ← TRUE (1); ELSE increase Index (1); IF Found THEN output Index (1) ELSE output "Not found" (1).

That's the first 3 questions ✨

Start a free 15-day trial to see more of every paper, or subscribe for the full papers and your grade:

✅ Full notes, every topic ✅ All exam questions ✅ Every flashcard deck ✅ Complete mock papers
Start your free trial →

Mock Set 3

Mock Set 3 · Paper 1 (Computer Systems)1 hour 45 minutes · 75 marks · No calculator

Instructions

  • Answer all the questions. The number of marks is shown in brackets at the end of each part.
  • You may not use a calculator. Show your working in calculations.
  • Open the worked solutions only after you have attempted the paper.
1
8 marks

Binary numbers are used in computers.

  1. (a) Add the two 8-bit binary numbers 01101101 and 00110111. Show your working and give the answer in binary. [3]
  2. (b) Add the 8-bit binary numbers 11001000 and 01100100. State what is meant by overflow and give the 8-bit value that would be stored. [3]
  3. (c) Perform a logical left shift of two places on 00011010. State the effect of this shift on the value of the number. [2]
Worked solution

(a) 01101101 + 00110111 (1 for the method with carries); the result is 10100100 (2). (This is 109 + 55 = 164.)

(b) The sum is 300, which needs 9 bits (1); overflow happens when the result is too large to be stored in the number of bits available (1); the stored value is 00101100 (the leftmost 1 is lost) (1).

(c) 01101000 (1); each place shifted multiplies the value by 2, so the value is multiplied by 4 (26 becomes 104) (1).

2
7 marks

A digital photograph is 800 pixels wide and 600 pixels high. The colour depth is 24 bits.

  1. (a) Calculate the file size in bytes. Show your working. [3]
  2. (b) State two ways of reducing the file size of the image. [2]
  3. (c) Explain why Unicode is needed in addition to ASCII. [2]
Worked solution

(a) 800 × 600 = 480 000 pixels (1); 480 000 × 24 = 11 520 000 bits (1); ÷ 8 = 1 440 000 bytes (1).

(b) Any two: reduce the resolution; reduce the colour depth; use compression (1 each).

(c) ASCII has only 128 (or 256) characters (1); Unicode can represent characters from all languages and many symbols, including Setswana accents and emoji (1).

3
8 marks

Data is checked when it is transmitted.

  1. (a) A seven-bit code 1011001 is sent using even parity. Give the parity bit and state where it is added. [2]
  2. (b) The byte 10110110 is received. The sender used even parity, and the parity bit is included in the byte. State whether an error has been detected and explain your answer. [2]
  3. (c) Describe how automatic repeat request (ARQ) works. [3]
  4. (d) State what a check digit is used to detect. [1]
Worked solution

(a) The number of 1s is four, which is even, so the parity bit is 0 (1); it is added at the start or end of the code to give a byte, such as 01011001 (1).

(b) Yes, an error has been detected (1) because there are five 1s, which is an odd number, so the parity is wrong (1).

(c) The receiver checks the data and sends an acknowledgement if it is correct, or a negative acknowledgement if not (1); the sender waits for a time-out and resends the data if it receives no acknowledgement or a negative one (1); this continues until the data is accepted or a set number of attempts has been made (1).

(d) Errors when a number is entered or copied, for example a mistyped digit (1).

That's the first 3 questions ✨

Start a free 15-day trial to see more of every paper, or subscribe for the full papers and your grade:

✅ Full notes, every topic ✅ All exam questions ✅ Every flashcard deck ✅ Complete mock papers
Start your free trial →
Mock Set 3 · Paper 2 (Algorithms, Programming and Logic)1 hour 45 minutes · 75 marks · No calculator

Instructions

  • Answer all the questions. The number of marks is shown in brackets at the end of each part.
  • You may answer programming questions in pseudocode or in a high-level language such as Python.
  • You may not use a calculator. Open the worked solutions only after you have attempted the paper.
1
8 marks

This algorithm processes numbers typed in by a user.

Total ← 0
Count ← 0
REPEAT
   INPUT Number
   IF Number > 0 THEN
      Total ← Total + Number
      Count ← Count + 1
   ENDIF
UNTIL Number = -1
IF Count > 0 THEN
   OUTPUT Total / Count
ENDIF
  1. (a) Complete a trace table (Number, Total, Count) and state the output for the inputs 6, -2, 4, 10, -1. [4]
  2. (b) State the purpose of the algorithm. [1]
  3. (c) State the name given to the value -1 in this algorithm. [1]
  4. (d) The first number entered is -1. State what happens and why the test Count > 0 is needed. [2]
Worked solution

(a) Number 6: Total 6, Count 1; Number -2: no change; Number 4: Total 10, Count 2; Number 10: Total 20, Count 3; Number -1: no change and the loop ends (3); output 20 / 3 = 6.67 (6.666...) (1).

(b) It finds the average of the positive numbers entered (1).

(c) A sentinel (or rogue or terminating) value (1).

(d) The loop ends at once, Count stays 0 and nothing is output (1); the test prevents a division by zero (1).

2
9 marks

A teacher stores the marks of 8 learners in an array Marks[1:8].

  1. (a) Write pseudocode or code to input the 8 marks, checking that each is between 0 and 100 and asking again if it is not. [4]
  2. (b) Write pseudocode or code to find and output the highest mark and its position in the array. [4]
  3. (c) State one reason why an array is better than eight separate variables. [1]
Worked solution

(a) FOR Index ← 1 TO 8 (1); REPEAT INPUT Marks[Index] (1); UNTIL Marks[Index] >= 0 AND Marks[Index] <= 100 (1) with an error message and NEXT Index (1).

(b) Highest ← Marks[1] and Position ← 1 (1); FOR Index ← 2 TO 8 (1); IF Marks[Index] > Highest THEN Highest ← Marks[Index] and Position ← Index (1); OUTPUT Highest and Position after the loop (1).

(c) The same loop can process every item using an index, which is shorter and easier to change (1).

3
8 marks

A program converts temperatures. The formula is F = C × 9 / 5 + 32.

  1. (a) Write a function ToFahrenheit that takes a Celsius temperature and returns the Fahrenheit temperature. [3]
  2. (b) A list Temps[1:5] holds five Celsius temperatures. Write pseudocode or code that uses the function to output every temperature that is above 86 degrees Fahrenheit. [3]
  3. (c) State one local variable in your function and explain why local variables are good practice. [2]
Worked solution

(a) FUNCTION ToFahrenheit(C) (1); RETURN C * 9 / 5 + 32 (1); ENDFUNCTION (1).

(b) FOR Index ← 1 TO 5 (1); F ← ToFahrenheit(Temps[Index]) (1); IF F > 86 THEN OUTPUT F (1).

(c) For example F or the parameter C (1); they are only used inside the function, so they cannot be changed by mistake elsewhere and the name can be reused (1).

That's the first 3 questions ✨

Start a free 15-day trial to see more of every paper, or subscribe for the full papers and your grade:

✅ Full notes, every topic ✅ All exam questions ✅ Every flashcard deck ✅ Complete mock papers
Start your free trial →