0% found this document useful (0 votes)
29 views518 pages

IGCSE-O Level 2020 To May June 2024

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)
29 views518 pages

IGCSE-O Level 2020 To May June 2024

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/ 518

Name:_________________________________________________

https://www.youtube.com/@sirmushtaq
https://sirmushtaq.com/

2020-2024
Past Papers & Mark Schemes
M.Mushtaq Hussain

WhatsApp 03125275281
1

Cambridge O Level
* 0 6 2 2 1 5 6 1 6 9 *

COMPUTER SCIENCE 2210/12


Paper 1 Theory May/June 2020

1 hour 45 minutes

You must answer on the question paper.

No additional materials are needed.

INSTRUCTIONS
● Answer all questions.
● Use a black or dark blue pen. You may use an HB pencil for any diagrams or graphs.
● Write your name, centre number and candidate number in the boxes at the top of the page.
● Write your answer to each question in the space provided.
● Do not use an erasable pen or correction fluid.
● Do not write on any bar codes.
● Calculators must not be used in this paper.

INFORMATION
● The total mark for this paper is 75.
● The number of marks for each question or part question is shown in brackets [ ].
● No marks will be awarded for using brand names of software packages or hardware.

This document has 12 pages. Blank pages are indicated.

DC (CE/SW) 198767
© UCLES 2020 [Turn over
2
2

1 A Von Neumann model for a computer system has a central processing unit (CPU) that makes
use of registers.

(a) Identify three registers that may be used.

Register 1 .................................................................................................................................

Register 2 .................................................................................................................................

Register 3 .................................................................................................................................
[3]

(b) The CPU is responsible for processing instructions.

One stage of processing instructions is the decode stage.

(i) Identify the two other stages of processing instructions.

Stage 1 ..............................................................................................................................

Stage 2 ..............................................................................................................................
[2]

(ii) Identify the component of the CPU that is responsible for decoding instructions.

..................................................................................................................................... [1]

2 Both an interpreter and a compiler can be used when writing a program in a high-level language.

(a) Explain why a programmer would make use of both an interpreter and a compiler.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]

© UCLES 2020 2210/12/M/J/20


3
3

(b) Give three reasons why a programmer would choose to write a program in a high-level
language, instead of a low-level language.

Reason 1 ..................................................................................................................................

...................................................................................................................................................

Reason 2 ..................................................................................................................................

...................................................................................................................................................

Reason 3 ..................................................................................................................................

...................................................................................................................................................
[3]

3 A company collects and stores data about its customers. The data is stored on a server in the
company’s office.

The data is transmitted to cloud storage to create a back-up.

The data is encrypted using symmetric encryption before it is sent to the cloud storage.

(a) Describe how the data is encrypted.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]

(b) Give three other methods that can be used to secure the data in the office.

Method 1 ...................................................................................................................................

...................................................................................................................................................

Method 2 ...................................................................................................................................

...................................................................................................................................................

Method 3 ...................................................................................................................................

...................................................................................................................................................
[3]
© UCLES 2020 2210/12/M/J/20 [Turn over
4
4

4 (a) Identify the name and draw the single logic gate that can replace the given logic circuits.

(i)
A
X
B

Name of gate: …………………………… Drawing of gate:

[2]

(ii)
A
X
B

Name of gate: …………………………… Drawing of gate:

[2]

(b) Complete the truth table for the given logic statement:

X = (((A OR C) AND (NOT A AND NOT C)) XOR B)

Working space
A B C X

0 0 0

0 0 1

0 1 0

0 1 1

1 0 0

1 0 1

1 1 0

1 1 1
[4]

© UCLES 2020 2210/12/M/J/20


5
5

5 Meena uses a browser to research information for her business.

(a) Give three functions of a browser.

1 ................................................................................................................................................

2 ................................................................................................................................................

3 ................................................................................................................................................
[3]

(b) Meena buys products for her business using the Internet.

The Transport Layer Security (TLS) protocol is used for transferring data when she buys
products.

One layer of the TLS protocol is the handshake layer.

(i) Describe the purpose of the handshake layer.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

(ii) Identify the other layer of the TLS protocol.

..................................................................................................................................... [1]

(iii) Identify another protocol that can be used to transfer data securely.

..................................................................................................................................... [1]

(c) Meena visits a website to buy products for her business.

The browser uses a small file to store the details of the products she views. This allows the
website to display advertisements for other products she may like.

The small file also stores her log-in details.

Give the name of this type of file.

............................................................................................................................................. [1]

© UCLES 2020 2210/12/M/J/20 [Turn over


6
6

6 Six statements are given about touch screen technology.

Tick (3) to show if the statement applies to Capacitive or Resistive touch screen technology.

Capacitive Resistive
Statement
(3) (3)

Needs pressure to be applied to create a circuit

May not register a touch if the user is wearing gloves

More commonly used in smartphones

More responsive to a touch

Needs an electrical field to be changed to register a touch

Cheaper to manufacture

[6]

© UCLES 2020 2210/12/M/J/20


7
7

7 (a) Give the denary value of each of the three 12-bit binary values.

(i) 000000001100

..................................................................................................................................... [1]

(ii) 000011000110

..................................................................................................................................... [1]

(iii) 010011000001

..................................................................................................................................... [1]

Working space

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

(b) 12-bit binary values can also be represented as hexadecimal values.

Give the hexadecimal value of the 12-bit binary value.

000011101001

............................................................................................................................................. [3]

© UCLES 2020 2210/12/M/J/20 [Turn over


8
8

8 Leonard has a new laser printer to print letters for his business.

Leonard connects his printer to his computer using the USB port.

(a) Give three benefits of using the USB port to connect the printer to the computer.

Benefit 1 ...................................................................................................................................

...................................................................................................................................................

Benefit 2 ...................................................................................................................................

...................................................................................................................................................

Benefit 3 ...................................................................................................................................

...................................................................................................................................................
[3]

(b) State two benefits and one drawback of Leonard using a laser printer, instead of an inkjet
printer, to print the letters.

Benefit 1 ...................................................................................................................................

...................................................................................................................................................

Benefit 2 ...................................................................................................................................

...................................................................................................................................................

Drawback ..................................................................................................................................

...................................................................................................................................................
[3]

(c) An interrupt signal is sent from the printer to the computer.

(i) Give two examples of when a printer would generate an interrupt signal.

Example 1 .........................................................................................................................

Example 2 .........................................................................................................................
[2]

(ii) Many devices send interrupt signals.

Identify the software in the computer that will receive and manage all interrupt signals.

..................................................................................................................................... [1]

© UCLES 2020 2210/12/M/J/20


9
9

9 (a) Six statements are given about storage devices.

Tick (3) to show if the statement applies to hard disk drive (HDD) storage or
solid state drive (SSD) storage.

Some statements can apply to both.

HDD SSD
Statement
(3) (3)

It has a limited number of read/write cycles

It uses magnetic properties to store data

It has moving parts

It is non-volatile storage

It can be used as an external storage device to back up data

It uses flash memory to store data

[6]

(b) Optical storage is another type of storage.

Give two examples of optical storage.

Example 1 .................................................................................................................................

Example 2 .................................................................................................................................
[2]

© UCLES 2020 2210/12/M/J/20 [Turn over


10
10

10 Uma is concerned about risks that she may encounter when using the Internet.

Two of the risks she is concerned about are phishing and pharming.

(a) Give one similarity and two differences between phishing and pharming.

Similarity ...................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Difference 1 ..............................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Difference 2 ..............................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[3]

(b) Identify two other risks that Uma could encounter when using the Internet.

Risk 1 ........................................................................................................................................

Risk 2 ........................................................................................................................................
[2]

© UCLES 2020 2210/12/M/J/20


11
11

(c) Uma uses a firewall to secure the data on her computer.

(i) Uma tells her friend that a firewall can only be software-based.

Tick (3) to show whether Uma is Correct or Incorrect.

Correct

Incorrect
[1]

(ii) Describe how the firewall helps to keep Uma’s data secure.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [4]

© UCLES 2020 2210/12/M/J/20


2210/12 Cambridge O Level – Mark Scheme May/June 12
2020
PUBLISHED
Question Answer Marks

1(a) Any three from: 3


− MAR
− MDR // MBR
− PC // IAR // NIR // SCR
− ACC
− CIR // IR
− IAS

1(b)(i) − Fetch 2
− Execute

1(b)(ii) − Control unit 1

Question Answer Marks

2(a) Any four from: 4


− To translate the high-level language into low-level language
− Interpreter used whilst writing the program
− Interpreter used to debug code line by line
− Compiler used when program completed
− Compiler used to create separate executable file (so compiler no longer needed)
− If it runs first time in a compiler there are no syntax errors

2(b) Any three from: 3


− Easier to understand // Don’t know assembly code
− Easier to debug
− Easier to maintain
− Portable
− Knowledge of manipulating memory locations/registers not required
− Can use an IDE
− Greater range of languages

© UCLES 2020 Page 4 of 10


2210/12 Cambridge O Level – Mark Scheme May/June 13
2020
PUBLISHED
Question Answer Marks

3(a) Any four from: 4


− Encryption key is used
− Encryption algorithm is used
− Encryption key / algorithm is applied to plain text
− … to convert it into cypher text
− Same key is used to encrypt and decrypt the text

3(b) Any three from: 3


− Firewall
− Password
− Proxy server
− Physical methods (by example e.g. CCTV, Locks)
− Access rights
− Asymmetric encryption
− Disconnect from network

Question Answer Marks

4(a)(i) − NAND 2

4(a)(ii) − NOR 2

© UCLES 2020 Page 5 of 10


2210/12 Cambridge O Level – Mark Scheme May/June 14
2020
PUBLISHED
Question Answer Marks

4(b) 4
A B C Working space X

0 0 0 0

0 0 1 0

0 1 0 1

0 1 1 1

1 0 0 0

1 0 1 0

1 1 0 1

1 1 1 1
4 marks for 8 correct outputs
3 marks for 6 or 7 correct outputs
2 marks for 4 or 5 correct outputs
1 mark for 2 or 3 correct outputs

Question Answer Marks

5(a) Any three from: 3


− Convert HTML code
− Display web pages
− Check if a website is secure
− Request web pages from a web server
− Send URL/domain name
− Runs active script
− Store history/favourites/bookmarks
− Create tabs

© UCLES 2020 Page 6 of 10


2210/12 Cambridge O Level – Mark Scheme May/June 15
2020
PUBLISHED
Question Answer Marks

5(b)(i) − Carries out authentication of server and client 2


− Handles encryption algorithms / keys

5(b)(ii) − Record layer 1

5(b)(iii) Any one from: 1


− SSL
− HTTPS

5(c) − Cookies 1

Question Answer Marks

6 6
Capacitive Resistive
Statement
() ()

Needs pressure to be applied to create a circuit 

May not register a touch if the user is wearing



gloves

More commonly used in smartphones 

More responsive to a touch 

Needs an electrical field to be changed to



register a touch

Cheaper to manufacture 

One mark per correct tick

© UCLES 2020 Page 7 of 10


2210/12 Cambridge O Level – Mark Scheme May/June 16
2020
PUBLISHED
Question Answer Marks

7(a)(i) − 12 (ignore leading zeros) 1

7(a)(ii) − 198 (ignore leading zeros) 1

7(a)(iii) − 1217 1

7(b) One mark per each correct hex value in correct order 3
− 0E9

Question Answer Marks

8(a) Any three from: 3


− It is a universal standard
− It can’t be inserted the wrong way around
− Supports different transmission speeds
− Automatically detects if correct driver installed

8(b) Two marks for benefits, one mark for drawback 3


Benefits:
− Faster speed of printing
− Can print duplex / on both sides
− Many letters can be printed from one toner cartridge
− Can print in high volumes
Drawback
− Toner cartridge more expensive to buy
− More time to warm-up
− Larger footprint

© UCLES 2020 Page 8 of 10


2210/12 Cambridge O Level – Mark Scheme May/June 17
2020
PUBLISHED
Question Answer Marks

8(c)(i) Any two from: 2


− Paper jam
− Out of paper
− Out of toner/ink
− Buffer full
− Awaiting input
− Print complete
− Printer ready

Award any other valid example

8(c)(ii) Any one from: 1


− Operating system
− Interrupt handler
− Interrupt service routine

Question Answer Marks

9(a) 6
HDD SSD
Statement
() ()

It has a limited number of read/write cycles 

It uses magnetic properties to store data 

It has moving parts 

It is non-volatile storage  

It can be used as an external storage device to back-up data  

It uses flash memory to store data 

© UCLES 2020 Page 9 of 10


2210/12 Cambridge O Level – Mark Scheme May/June 18
2020
PUBLISHED
Question Answer Marks

9(b) Any two from: 2


− CD (drive)
− DVD (drive)
− Blu-ray (drive)

Question Answer Marks

10(a) One mark for similarity, two marks for differences 3


Similarity:
− Both are designed to steal personal data
− They both pose as a real company/person
Differences:
− Pharming uses malicious code installed on hard drive
− Phishing is in form of an email
− Phishing requires use to follow a link / open an attachment

10(b) − Virus 2
− Malware

10(c)(i) − Incorrect 1

10(c)(ii) Any four from: 4


− Can help prevent hacking
− Can monitor incoming and outgoing traffic
− Can set criteria / rules are set for traffic
− Can check whether traffic meets / defies criteria rules
− Can rejects any traffic that does not meet / defies criteria

© UCLES 2020 Page 10 of 10


19

Cambridge O Level
* 9 2 0 1 5 8 2 8 9 0 *

COMPUTER SCIENCE 2210/22


Paper 2 Problem-solving and Programming May/June 2020

1 hour 45 minutes

You must answer on the question paper.

No additional materials are needed.

INSTRUCTIONS
● Answer all questions.
● Do not attempt Tasks 1, 2 and 3 in the copy of the pre-release material on page 2; these are for
information only.
● Use a black or dark blue pen. You may use an HB pencil for any diagrams or graphs.
● Write your name, centre number and candidate number in the boxes at the top of the page.
● Write your answer to each question in the space provided.
● Do not use an erasable pen or correction fluid.
● Do not write on any bar codes.
● Calculators must not be used in this paper.

INFORMATION
● The total mark for this paper is 50.
● The number of marks for each question or part question is shown in brackets [ ].
● No marks will be awarded for using brand names of software packages or hardware.

This document has 16 pages. Blank pages are indicated.

DC (JP) 198772
© UCLES 2020 [Turn over
20
7

Section B

2 Most programming languages include basic data types. Ahmad is describing the basic data types
he has used.

State the data type that Ahmad is describing in each sentence.

Choose the data type from this list of programming terms.

Array Boolean Char Constant Function Integer

Iteration Procedure Real String Variable

A number with a fractional part that can be positive or negative and used in calculations

Data type ..........................................................................................................................................

A whole number that can be positive, negative or zero and used in calculations

Data type ..........................................................................................................................................

A single number, symbol or letter

Data type ..........................................................................................................................................

A sequence of characters

Data type ..........................................................................................................................................

A data type with two values, True or False

Data type ..........................................................................................................................................


[5]

© UCLES 2020 2210/22/M/J/20 [Turn over


21
8

3 (a) An algorithm has been written in pseudocode to input the names and marks of 35 students.
The algorithm stores the names and marks in two arrays Name[ ] and Mark[ ]. The highest
mark awarded is found and the number of students with that mark is counted. Both of these
values are output.



01 HighestMark 100


02 HighestMarkStudents 0
03 FOR Count 1 TO 35
04 OUTPUT "Please enter student name"
05 INPUT Name[Count]
06 OUTPUT "Please enter student mark"
07 INPUT Mark[Counter]
08 IF Mark[Count] = HighestMark


09 THEN
10 HighestMarkStudents HighestMarkStudents – 1
11 ENDIF
12 IF Mark[Count] > HighestMark


13 THEN


14 Mark[Count] HighestMark
15 HighestMarkStudents 1
16 ENDIF
17 NEXT Count
18 OUTPUT "There are ", HighestMarkStudents," with the highest mark of ",
HighestMark

Give line numbers where the four errors are to be found in the pseudocode. Suggest a
correction for each error.

Error 1 line number ...................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................

Error 2 line number ...................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................

Error 3 line number ...................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................

Error 4 line number ...................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................
[4]

© UCLES 2020 2210/22/M/J/20


22
9

(b) Explain how you could extend the algorithm to also find the lowest mark awarded, count the
number of students with that mark, and output both these values.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [6]
© UCLES 2020 2210/22/M/J/20 [Turn over
23
10

4 This flowchart inputs the points won and the points lost when playing a game. The difference
between the points won and lost is calculated and depending on the result the player can: move
up to the next level, stay at the same level, or move down to the previous level. The flowchart
finishes when the input for points won is –1.

START

INPUT
PointsWon, PointsLost

IS
Yes END
PointsWon = –1 ?

No

Difference
PointsWon - PointsLost

OUTPUT IS
Yes
"Well done Difference > =
move up" 1000 ?

No

OUTPUT Yes IS
"Sorry move Difference < 0 ?
down"

No

OUTPUT
"Keep on trying"

© UCLES 2020 2210/22/M/J/20


24
11

(a) Complete a trace table for this set of input data:


5000, 4474, 6055, 2000, 7900, 9800, 3000, 2150, –1, 6700, 7615

PointsWon PointsLost Difference OUTPUT

[3]

(b) The flowchart needs to be changed. When the difference is more than 5000 the output
message is ‘Fantastic leap up two levels’.

Describe the changes that will need to be made to the flowchart.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

© UCLES 2020 2210/22/M/J/20 [Turn over


25
12

5 Arrays are data structures used in programming. Explain what is meant by the terms dimension
and index in an array. Use examples of arrays in your explanations.

Dimension ........................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

Index ................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................
[3]

© UCLES 2020 2210/22/M/J/20


26
13

6 A database table, JUICE, is used to keep a record of cartons of fresh fruit juice available for sale.

Juice code Fruit 1 Fruit 2 Size Volume (ml) Stock level


LMO10 Mango Orange Large 1000 18
MOO05 Orange Orange Medium 500 8
SAM02 Apple Mango Small 200 25
SAA02 Apple Apple Small 200 50
SPP02 Pineapple Pineapple Small 200 10
MMM05 Mango Mango Medium 500 12
LMM10 Mango Mango Large 1000 5
MGG05 Guava Guava Medium 500 5
SMO02 Mango Orange Small 200 7
MOP05 Orange Pineapple Medium 500 12
LAA10 Apple Apple Large 1000 32
SGO02 Guava Orange Small 200 10
LPP10 Pineapple Pineapple Large 1000 3
LOO10 Orange Orange Large 1000 25
SOO02 Orange Orange Small 200 40

(a) Identify a suitable field to use as the primary key. State a reason for your choice.

Field ..........................................................................................................................................

Reason ......................................................................................................................................

...................................................................................................................................................
[2]

(b) Complete the query-by-example grid to display only the stock level and size of all cartons
containing only apple juice.

Field:
Table:
Sort:
Show:
Criteria:
or:
[4]

© UCLES 2020 2210/22/M/J/20


2210/22 Cambridge O Level – Mark Scheme May/June 27
2020
PUBLISHED
Section B

Question Answer Marks

2 Real 5
Integer
Char/String
String
Boolean

Question Answer Marks

3(a) One mark for error and correction 4


Line 1 HighestMark ← 0
Line 7 INPUT Mark[Count]
Line 10 HighestMarkStudents ← HighestMarkStudents + 1
Line 14 HighestMark ← Mark[Count]

3(b) Any six from: 6


Add variable LowestMark …
… Set this to a high value for example 100
Add variable LowestMarkStudents …
… Set this to zero
Check if Mark[Count] = LowestMark …
… True – add 1 to LowestMarkStudents
Check if Mark[Count] < LowestMark …
… True – set LowestMarkStudenta to 1 and set LowestMark to Mark[Count]
Add extra output statement

© UCLES 2020 Page 6 of 8


2210/22 Cambridge O Level – Mark Scheme May/June 28
2020
PUBLISHED
Question Answer Marks

4(a) One mark for correct input (PointsWon and PointsLost) 3


One mark for correct calculations (Difference)
One mark for correct output

PointsWon PointsLost Difference OUTPUT

5000 4474 526 Keep on trying

6055 2000 4055 Well done move up

7900 9800 -1900 Sorry move down

3000 2150 850 Keep on trying

-1 6700

4(b) Any three from: 3


• Add extra decision box …
• … before checking for difference greater than or equal to 1000
// change Is difference >= 1000 to >= 1000 and <= 5000
• Check for difference greater than 5000
• Add extra Output ‘Fantastic leap up two levels’…
• … before flowline returns to input

© UCLES 2020 Page 7 of 8


2210/22 Cambridge O Level – Mark Scheme May/June 29
2020
PUBLISHED
Question Answer Marks

5 One mark for explanation of dimension 3


One mark for explanation of index
One mark for inclusion of an example

The dimension is the number of indexes required to access an element.


The index is the position of the element in an array
For example A[25] is the 25th element of a one-dimensional array.

Question Answer Marks

6(a) One mark for field and one mark for reason 2
Field Juice code
Reason only unique identifier

6(b) 4
Field: Fruit 1 Fruit 2 Size Stock level

Table: JUICE JUICE JUICE JUICE

Sort:

Show:    

Criteria: ="Apple" ="Apple"

or:

One mark for each correct column

© UCLES 2020 Page 8 of 8


30

Cambridge IGCSE™
* 1 8 6 8 6 1 8 8 1 5 *

COMPUTER SCIENCE 0478/12


Paper 1 Theory October/November 2020

1 hour 45 minutes

You must answer on the question paper.

No additional materials are needed.

INSTRUCTIONS
● Answer all questions.
● Use a black or dark blue pen. You may use an HB pencil for any diagrams or graphs.
● Write your name, centre number and candidate number in the boxes at the top of the page.
● Write your answer to each question in the space provided.
● Do not use an erasable pen or correction fluid.
● Do not write on any bar codes.
● Calculators must not be used in this paper.

INFORMATION
● The total mark for this paper is 75.
● The number of marks for each question or part question is shown in brackets [ ].
● No marks will be awarded for using brand names of software packages or hardware.

This document has 12 pages. Blank pages are indicated.

DC (LK) 186556/2
© UCLES 2020 [Turn over
31
2

1 Tina is creating a website for charity events. She uses HTML to create the website.

(a) State what is meant by HTML.

...................................................................................................................................................

............................................................................................................................................. [1]

(b) She uses the hexadecimal colour code #43B7F0 as the background colour for her website.

(i) State whether background colour is an example of structure or presentation, in the


website.

..................................................................................................................................... [1]

(ii) The hexadecimal colour code #43B7F0 is stored in three 8-bit registers.

Give the 8-bit binary values for each part of the hexadecimal code.

43

B7

F0
[6]

(c) Tina uses a microphone to record a welcome message for her website.

(i) State whether the microphone is an input or output device.

..................................................................................................................................... [1]

© UCLES 2020 0478/12/O/N/20


32
3

(ii) She wants to compress the recording to make sure that the file is as small as possible
for the website.

Identify which type of compression she should use and describe how this would compress
the file for the website.

Type of compression .........................................................................................................

Description

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [4]

(iii) Give two benefits of compressing the file for the website.

Benefit 1 ............................................................................................................................

...........................................................................................................................................

Benefit 2 ............................................................................................................................

...........................................................................................................................................
[2]

© UCLES 2020 0478/12/O/N/20 [Turn over


33
4

(d) Tina will use the TLS protocol in her website when selling tickets to people for different charity
events. This makes sure that their personal data is transmitted securely.

(i) Identify the two layers that are present in the TLS protocol.

Layer 1 ..............................................................................................................................

Layer 2 ..............................................................................................................................
[2]

(ii) Explain how data is sent securely using the TLS protocol.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [6]

© UCLES 2020 0478/12/O/N/20


34
5

(e) Tina is concerned about security threats to her web server.

(i) Identify three security threats to her web server that Tina might be concerned about.

1 ........................................................................................................................................

2 ........................................................................................................................................

3 ........................................................................................................................................
[3]

(ii) Tina installs a proxy server to help protect her website from security threats.

Describe how the proxy server will help protect the website.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [4]

2 Four 7-bit binary values are transmitted from one computer to another. A parity bit was added
to each binary value creating 8-bit binary values. All the binary values have been transmitted
correctly.

(a) Tick (✓) to show whether an Even or an Odd parity check has been used for each binary
value.

Even Odd
8-bit binary value
(✓) (✓)

11111111

01100110

01111011

10000000
[4]

© UCLES 2020 0478/12/O/N/20 [Turn over


35
6

(b) The data will also be checked using a checksum.

Describe how a checksum can be used to check that the data has been transmitted correctly.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [5]

3 Alessandro has some important data stored on his computer.

He is concerned about accidental damage to his data.

(a) (i) Identify three ways that the data could be accidentally damaged.

1 ........................................................................................................................................

2 ........................................................................................................................................

3 ........................................................................................................................................
[3]

(ii) State what Alessandro could do to make sure that he can retrieve his data if it is
accidentally damaged.

..................................................................................................................................... [1]

© UCLES 2020 0478/12/O/N/20


36
7

(b) Alessandro uses an SSD to store his data.

Describe what is meant by an SSD and how it operates to store data.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]

(c) Alessandro also uses off-line storage to store his data.

Three examples of off-line storage are Blu-ray, CD and DVD.

Six statements are given about off-line storage.

Tick (✓) to show if each statement applies to Blu-ray, CD, or DVD.

Some statements apply to more than one example of off-line storage.

Blu-ray CD DVD
Statement
(✓) (✓) (✓)

A type of optical storage

Has the largest storage capacity

Can be dual layer

Read using a red laser

Has the smallest storage capacity

Stores data in a spiral track


[6]

© UCLES 2020 0478/12/O/N/20 [Turn over


37
8

4 Consider the logic statement:

X = (((A NAND B) NOR (B AND C)) OR C)

(a) Draw a logic circuit to match the given logic statement.

All logic gates must have a maximum of two inputs. Do not attempt to simplify the logic
statement.

B X

[4]

(b) Complete the truth table for the given logic statement.

A B C Working space X

0 0 0

0 0 1

0 1 0

0 1 1

1 0 0

1 0 1

1 1 0

1 1 1
[4]

© UCLES 2020 0478/12/O/N/20


38
9

5 Tammy is buying a new computer that has an LED display.

(a) Five statements about LED displays are given.

Tick (✓) to show if each statement is True or False.

True False
Statement
(✓) (✓)

It is a flat panel display

It creates images using red, green and blue diodes

It is not very energy efficient and gives off heat

It can be used in mobile devices such as smartphones and tablets

It is a front-lit display
[5]

© UCLES 2020 0478/12/O/N/20 [Turn over


39
10

(b) Tammy connects the computer to her home network. The computer has a MAC address and
an IP address.

A paragraph is given about MAC addresses and IP addresses.

Complete the paragraph using the list of terms given. Not all terms need to be used.

• compiled
• computer
• control
• dynamic
• identify
• packet
• principal
• protocol
• similar
• unique

A MAC address is a media access …………………………………………………….. address.

A network device has a ……………………………………………………… MAC address that

can help ………………………………………………. the device in the network. An IP address

is an Internet ………………………………………… address. An IP address can be static or

…………………………………………… .
[5]

(c) Tammy uses a browser when accessing the Internet.

Describe the role of the browser.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]

© UCLES 2020 0478/12/O/N/20


0478/12 Cambridge IGCSE – Mark Scheme October/November 40
2020
PUBLISHED
Question Answer Marks

1(a) Any one from: 1


− Hypertext Mark-up Language
− Web authoring language // language used to write/create websites/web pages

1(b)(i) − Presentation 1

1(b)(ii) One mark per each nibble: 6

43 0 1 0 0 0 0 1 1

B7 1 0 1 1 0 1 1 1

F0 1 1 1 1 0 0 0 0

1(c)(i) − Input 1

© UCLES 2020 Page 4 of 13


0478/12 Cambridge IGCSE – Mark Scheme October/November 41
2020
PUBLISHED
Question Answer Marks

1(c)(ii) One from: 4


− Lossy (compression)

Any three from:


− A (compression) algorithm is used
− Removes redundant/unnecessary data from the file
− Removes sounds that cannot be heard by the human ear/background noise
− Reduces sample rate
− Reduces sample resolution
− Data is permanently removed // original file cannot be re-instated
− Perceptual music shaping is used

NOTE: If lossless given, marks can be awarded for a correct description of lossless as follow through.

Any three from (lossless):


− A (compression) algorithm is used
− Repeating patterns are identified
− … are replaced with a value
− … and indexed
− No data is permanently removed // original file can be re-instated
− Suitable example of a lossless algorithm

1(c)(iii) Any two from: 2


− Quicker for her to upload
− Quicker for users to download
− Won’t slow website down as much when loading
− Takes up less storage space

1(d)(i) − Handshake (layer) 2


− Record (layer)

© UCLES 2020 Page 5 of 13


0478/12 Cambridge IGCSE – Mark Scheme October/November 42
2020
PUBLISHED
Question Answer Marks

1(d)(ii) Any six from: 6


− Client/browser requests secure connection to server
− Client/browser requests the server to identify itself
− Server provides a digital certificate
− Client/browser validates the certificate
− Client/browser send signal back to server (to begin transmission)
− Session caching can be used
− A session key is generated
− Encryption method is agreed // data is encrypted

1(e)(i) Any three from: 3


− Hacking
− Denial of service (DoS) attack
− Virus
− Malware

NOTE: Three different type of malware can be awarded

1(e)(ii) Any four from: 4


− Acts as a firewall
− Monitor/filters/examines incoming and outgoing traffic
− Rules/criteria for traffic can be set // blacklist/whitelist set
− Blocks any traffic that does not meet criteria …
− … and can send a warning message to the user
− Stop the website failing in a DoS attack // DoS attack hits the proxy server and not the webserver

© UCLES 2020 Page 6 of 13


0478/12 Cambridge IGCSE – Mark Scheme October/November 43
2020
PUBLISHED
Question Answer Marks

2(a) One mark for each correct row: 4

Even Odd
8-bit binary value
() ()

11111111 

01100110 

01111011 

10000000 

2(b) Any five from: 5


− A value is calculated from the data
− The value is calculated using an algorithm // by example
− The value is appended to the data to be transmitted
− Value is recalculated after transmission
− Values are compared
− If the values match the data is correct // if the values do not match the data is incorrect

© UCLES 2020 Page 7 of 13


0478/12 Cambridge IGCSE – Mark Scheme October/November 44
2020
PUBLISHED
Question Answer Marks

3(a)(i) Any three from: 3


− Loss of power/electricity
− Spillage of liquids
− Flood
− Fire
− Human error
− Hardware failure
− Software failure

NOTE: Three different types of human error can be awarded e.g. accidental deletion, not saving data, incorrect shutdown
procedure

3(a)(ii) − Create a backup 1

3(b) Max three from: 4


− Solid state drive
− Non-volatile
− Secondary storage
− Flash memory
− Has no mechanical/moving parts
− Uses transistors
− … and cells that are laid out in a grid
− Uses control gates and floating gates
− Can be NAND/NOR (technology)
− Use EEPROM technology

Max two from:


− Stores data by flashing it onto the chips
− Data stored by controlling the flow of electrons through/using transistors/chips/gates
− The electric current reaches the control gate and flows through to the floating gate to be stored
− When data is stored the transistor is converted from 1 to 0

© UCLES 2020 Page 8 of 13


0478/12 Cambridge IGCSE – Mark Scheme October/November 45
2020
PUBLISHED
Question Answer Marks

3(c) One mark for each correct row: 6

Blu-ray CD DVD
Statement
() () ()

A type of optical storage   

Has the largest storage capacity 

Can be dual layer  

Read using a red laser  

Has the smallest storage capacity 

Stores data in a spiral track   

© UCLES 2020 Page 9 of 13


0478/12 Cambridge IGCSE – Mark Scheme October/November 46
2020
PUBLISHED
Question Answer Marks

4(a) One mark for each correct logic gate with correct input: 4

© UCLES 2020 Page 10 of 13


0478/12 Cambridge IGCSE – Mark Scheme October/November 47
2020
PUBLISHED
Question Answer Marks

4(b) Four marks for 8 correct outputs 4


Three marks for 6/7 correct outputs
Two marks for 4/5 correct outputs
One mark for 2/3 correct outputs

A B C Working space X

0 0 0 0

0 0 1 1

0 1 0 0

0 1 1 1

1 0 0 0

1 0 1 1

1 1 0 1

1 1 1 1

© UCLES 2020 Page 11 of 13


0478/12 Cambridge IGCSE – Mark Scheme October/November 48
2020
PUBLISHED
Question Answer Marks

5(a) One mark for each correct row: 5

True False
Statement
() ()

It is a flat panel display 

It creates images using red, green and blue diodes 

It is not very energy efficient and gives off heat 

It is also used in mobile devices such as smartphones and tablets 

It is a front-lit display 

5(b) One mark for each correct term in the correct place: 5
− Control
− Unique
− Identify
− Protocol
− Dynamic

© UCLES 2020 Page 12 of 13


0478/12 Cambridge IGCSE – Mark Scheme October/November 49
2020
PUBLISHED
Question Answer Marks

5(c) Any four from: 4


− Allows user to view web pages
− Renders HTML
− Allows user to bookmark/favourite web pages
− Provides navigation features
− Allows (multiple) tabs
− Stores cookies
− Records history of pages visited
− Has a homepage
− Runs active script
− Allows files to be downloaded from website/internet
− Sends a request to the IP address/web server (to obtain the contents of a web page)
− Sends URL to DNS
− Manages HTTP/HTTPS protocol

© UCLES 2020 Page 13 of 13


50

Cambridge IGCSE™
* 1 1 2 9 1 3 8 4 5 2 *

COMPUTER SCIENCE 0478/22


Paper 2 Problem-solving and Programming October/November 2020

1 hour 45 minutes

You must answer on the question paper.

No additional materials are needed.

INSTRUCTIONS
● Answer all questions.
● Do not attempt Tasks 1, 2 and 3 in the copy of the pre-release material on page 2; these are for
information only.
● Use a black or dark blue pen. You may use an HB pencil for any diagrams or graphs.
● Write your name, centre number and candidate number in the boxes at the top of the page.
● Write your answer to each question in the space provided.
● Do not use an erasable pen or correction fluid.
● Do not write on any bar codes.
● Calculators must not be used in this paper.

INFORMATION
● The total mark for this paper is 50.
● The number of marks for each question or part question is shown in brackets [ ].
● No marks will be awarded for using brand names of software packages or hardware.

This document has 12 pages. Blank pages are indicated.

DC (ST) 185711/3
© UCLES 2020 [Turn over
51
8

Section B

2 Tick (3) one box in each row to identify if the statement about subroutines is true or false.

true false
Statement
(3) (3)
A subroutine is called from within a program.

A subroutine is not a complete program.

A subroutine is a self-contained piece of code.

A subroutine must return a value to the code from which it was called.
[2]

3 This pseudocode algorithm is used as a validation check.

PRINT "Input a number from 1 to 5000"


REPEAT
INPUT Number
IF Number < 1 OR Number > 5000
THEN
PRINT "Invalid number, please try again"
ENDIF
UNTIL Number >= 1 AND Number <= 5000
PRINT Number, " is within the correct range"

Identify three different types of test data. For each type, give an example of the test data you
would use to test this algorithm and state a reason for your choice of test.

Type of test data 1 ...........................................................................................................................

Test data ...........................................................................................................................................

Reason .............................................................................................................................................

..........................................................................................................................................................

Type of test data 2 ...........................................................................................................................

Test data ...........................................................................................................................................

Reason .............................................................................................................................................

..........................................................................................................................................................

Type of test data 3 ...........................................................................................................................

Test data ...........................................................................................................................................

Reason .............................................................................................................................................

..........................................................................................................................................................
[6]

© UCLES 2020 0478/22/O/N/20


52
9

4 This pseudocode algorithm allows 5000 numbers to be entered and stored in an array called
Number.

FOR Count 1 TO 5000


INPUT Number[Count]
NEXT Count

Extend and re-write the algorithm using pseudocode to also count and output how many of the
numbers stored in the array are greater than 500, using the variable Higher. Only output Higher
once with an appropriate message.

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

.................................................................................................................................................... [6]
© UCLES 2020 0478/22/O/N/20 [Turn over
53
10

5 This pseudocode represents an algorithm.

REPEAT
Flag 0
FOR Count 0 to 3
IF Num[Count] < Num[Count + 1]
THEN
Store Num[Count]
Num[Count] Num[Count + 1]
Num[Count + 1] Store
Flag 1
ENDIF
NEXT Count
UNTIL Flag = 0

(a) The contents of the array at the start of the algorithm are:

Num[0] Num[1] Num[2] Num[3] Num[4]


45 56 30 12 15

Complete the trace table for the algorithm using the data given in the array.

Flag Count Num[0] Num[1] Num[2] Num[3] Num[4] Store


45 56 30 12 15

[5]

(b) Describe the purpose of the algorithm.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]
© UCLES 2020 0478/22/O/N/20
54
11

6 Draw a flowchart symbol to represent each of the following:

Input/Output Decision

[2]

Question 7 starts on Page 12.

Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every
reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the
publisher will be pleased to make amends at the earliest possible opportunity.

To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge
Assessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download
at www.cambridgeinternational.org after the live examination series.

Cambridge Assessment International Education is part of the Cambridge Assessment Group. Cambridge Assessment is the brand name of the University of
Cambridge Local Examinations Syndicate (UCLES), which itself is a department of the University of Cambridge.

© UCLES 2020 0478/22/O/N/20 [Turn over


55
12

7 The table AUDIOPARTS stores the part number, description, cost and quantity in stock of the
items sold by a music shop.

PartNum Description Cost Quantity


A01 Compact Amplifier Case 50.00 15
A02 Deluxe Amplifier Case 75.00 1
A03 Amplifier Standard 79.99 48
A04 Amplifier Midrange 149.99 50
A05 Amplifier Megablaster 299.99 48
S01 Tweeter 59.99 10
S02 Midrange Woofer 99.99 0
S03 Subwoofer 139.99 16
S04 Tower Speaker Basic 159.99 25
S05 Tower Speaker Skyscraper 219.99 9
S06 Centre Speaker 149.99 25
S07 Soundbar 89.99 2
S20 Soundbar 129.99 0
S21 Ceiling Surround Speaker 75.00 15
S22 Ceiling Full Range Speaker 100.00 1
S25 Surround Speaker 100.00 60
T19 Speaker Stands (Pair) 75.00 60

(a) State the number of records in the table AUDIOPARTS

............................................................................................................................................. [1]

(b) Identify the field that is most suitable to be a primary key and give a reason for your choice.

Fieldname .................................................................................................................................

Reason .....................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[2]

(c) Complete the query-by-example grid to show the items where the quantity in stock is fewer
than 10. Show all the fields from the database table in descending order of cost.

Field:

Table:

Sort:

Show:
Criteria:

or:

[4]
© UCLES 2020 0478/22/O/N/20
0478/22 Cambridge IGCSE – Mark Scheme 56
October/November
PUBLISHED 2020

Question Answer Marks

Section B

2 2
true false
Statement
() ()

A subroutine is called from within a program. 

A subroutine is not a complete program. 

A subroutine is a self-contained piece of code. 

A subroutine must return a value to the code from 


which it was called.

Two marks for four correct rows


One mark for any two correct rows

Question Answer Marks

3 One mark for each correct type of test and one mark for each correct 6
accompanying example of test data and reason (max six) e.g.

• Extreme data
• 5000
• to check it is accepted

• Normal data
• 300
• To check it is accepted

• Abnormal data
• 10000
• To check it is rejected

© UCLES 2020 Page 6 of 9


0478/22 Cambridge IGCSE – Mark Scheme 57
October/November
PUBLISHED 2020

Question Answer Marks

4 Any six from: 6


MP1 Initialisation of Higher to 0 before the loop
MP2 Use of IF statement
MP3 Correct condition in IF statement
MP4 Correct counting statement inside loop
MP5 OUTPUT/PRINT statement with correct reference to Higher
MP6 Appropriate message in output
MP7 Correct location of OUTPUT and IF statements

Higher ← 0
FOR Count ← 1 TO 5000
INPUT Number[Count]
IF Number[Count] > 500
THEN
Higher ← Higher + 1
ENDIF
NEXT Count
OUTPUT "There are ", Higher, " values that are greater than
500"

© UCLES 2020 Page 7 of 9


0478/22 Cambridge IGCSE – Mark Scheme 58
October/November
PUBLISHED 2020

Question Answer Marks

5(a) 5
Num Num Num Num Num
Flag Count Store
[0] [1] [2] [3] [4]

45 56 30 12 15

0 0 45

56

1 45

3 12

15

12

0 0

One mark – Flag column


One mark – Count column
One mark – Num[0] and Num[1] columns
One mark – Num[2], Num[3] and Num[4] columns
One mark – Store column

5(b) Any two from: 2


• The algorithm sorts/orders numbers
• … into descending order / from largest to smallest

Question Answer Marks

6 Input/Output Decision 2

One mark for each correct symbol

© UCLES 2020 Page 8 of 9


0478/22 Cambridge IGCSE – Mark Scheme 59
October/November
PUBLISHED 2020

Question Answer Marks

7(a) 17 1

7(b) One mark for correct fieldname and one mark for correct reason 2

PartNum

The data stored in this field is unique for each record

7(c) 4
Field: PartNum Description Cost Quantity

Table: AUDIOPARTS AUDIOPARTS AUDIOPARTS AUDIOPARTS

Sort: Descending

Show:    

Criteria: <10

or:

One mark for correct field and table rows


One mark for sort row
One mark for show row
One mark for correct criteria

© UCLES 2020 Page 9 of 9


60

Cambridge IGCSE™
* 1 8 7 5 9 9 1 1 3 6 *

COMPUTER SCIENCE 0478/12


Paper 1 Theory May/June 2021

1 hour 45 minutes

You must answer on the question paper.

No additional materials are needed.

INSTRUCTIONS
● Answer all questions.
● Use a black or dark blue pen. You may use an HB pencil for any diagrams or graphs.
● Write your name, centre number and candidate number in the boxes at the top of the page.
● Write your answer to each question in the space provided.
● Do not use an erasable pen or correction fluid.
● Do not write on any bar codes.
● Calculators must not be used in this paper.

INFORMATION
● The total mark for this paper is 75.
● The number of marks for each question or part question is shown in brackets [ ].
● No marks will be awarded for using brand names of software packages or hardware.

This document has 12 pages. Any blank pages are indicated.

DC (DH/SG) 202677/4
© UCLES 2021 [Turn over
61
2

1 A denary value can be converted into hexadecimal and binary.

(a) Complete the table to show the hexadecimal and 8-bit binary values of the given denary
values.

Denary Hexadecimal 8-bit binary

49

123

200

[6]

Working space

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

(b) Give two benefits, to users, of converting binary values to hexadecimal.

Benefit 1 ....................................................................................................................................

...................................................................................................................................................

Benefit 2 ....................................................................................................................................

...................................................................................................................................................
[2]

(c) Hexadecimal is used to represent Hypertext Markup Language (HTML) colour codes in
computer science.

Identify three other ways that hexadecimal is used in computer science.

1 ................................................................................................................................................

2 ................................................................................................................................................

3 ................................................................................................................................................
[3]

© UCLES 2021 0478/12/M/J/21


62
3

2 Data storage can be magnetic, solid state or optical.

(a) Six statements are given about data storage.

Tick (3) to show if the statement applies to magnetic, solid state or optical storage. Some
statements may apply to more than one type of storage.

Magnetic Solid state Optical


Statement
(3) (3) (3)
no moving parts are used to store data

pits and lands are used to store data

data is stored on platters

flash memory is used to store data

parts are rotated to store data

data can be stored permanently


[6]

(b) (i) Give one example of magnetic storage.

..................................................................................................................................... [1]

(ii) Give one example of optical storage.

..................................................................................................................................... [1]

(iii) Identify which type of storage would be the most suitable for use in a web server and
justify your choice.

Type of storage ..................................................................................................................

Justification ........................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................
[3]

(c) Describe the operation of USB flash memory and how it stores data.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

© UCLES 2021 0478/12/M/J/21 [Turn over


63
4

3 Consider the logic statement:

X = ((((NOT A AND B) OR C) AND B) NOR (B OR C))

(a) Draw a logic circuit to represent the given logic statement.

Do not attempt to simplify the statement. All logic gates must have a maximum of two inputs.

B X

[6]

© UCLES 2021 0478/12/M/J/21


64
5

(b) Consider the completed truth table for the given logic statement.

Row Working space


A B C X
number
1 0 0 0 1

2 0 0 1 1

3 0 1 0 1

4 0 1 1 0

5 1 0 0 1

6 1 0 1 0

7 1 1 0 1

8 1 1 1 1

There are four errors in the truth table in the output (X) column.

Identify the four incorrect outputs.

Write the row number to identify each incorrect output.

Row .......................

Row .......................

Row .......................

Row .......................
[4]

© UCLES 2021 0478/12/M/J/21 [Turn over


65
6

4 Three types of Internet security risk are virus, spyware and denial of service (DoS) attack.

(a) Six statements are given about Internet security risks.

Tick (3) to show whether the statement applies to virus, spyware or denial of service. Some
statements may apply to more than one Internet security risk.

Denial of
Statement Virus Spyware service
(3) (3) (3)
captures all data entered using a keyboard

can be installed onto a web server

prevents access to a website

is malicious code on a computer

is self-replicating

damages the files on a user’s hard drive


[6]

(b) Identify three other types of Internet security risks.

1 ................................................................................................................................................

2 ................................................................................................................................................

3 ................................................................................................................................................
[3]

(c) Some Internet security risks can maliciously damage data. Data can also be damaged
accidentally.

State three ways that data could be accidentally damaged.

1 ................................................................................................................................................

2 ................................................................................................................................................

3 ................................................................................................................................................
[3]

© UCLES 2021 0478/12/M/J/21


66
7

5 A security light system is used by a factory. The light only comes on when it is dark and when
movement is detected. The light will stay on for 1 minute before switching off.

Sensors and a microprocessor are used to control the security light system.

(a) Identify two sensors that would be used in the security light system.

Sensor 1 ...................................................................................................................................

Sensor 2 ...................................................................................................................................
[2]

(b) Describe how the sensors and the microprocessor control the security light system.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [8]

© UCLES 2021 0478/12/M/J/21 [Turn over


67
8

6 Cookies can be used to store a user’s personal data and online browsing habits.

(a) A cookie could be used to automatically enter a user’s payment details when the user makes
a purchase online.

Describe how cookies can be used to store and automatically enter a user’s payment details.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

(b) Explain why a user may be concerned about their personal data and online browsing habits
being stored in cookies.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]

© UCLES 2021 0478/12/M/J/21


68
9

7 Jolene uses HTML to create a website. She separates the HTML into structure and presentation.

(a) (i) Give one example of HTML structure.

..................................................................................................................................... [1]

(ii) Give two examples of HTML presentation.

1 ........................................................................................................................................

2 ........................................................................................................................................
[2]

(b) Explain why Jolene separates the HTML into structure and presentation.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

8 A keyboard is a type of input device that can be used to enter data into a computer.

Complete the paragraph that describes one method of operation for a keyboard, using the most
appropriate terms from the given list. Not all terms in the list need to be used.

• Binary
• Breaks
• Calculated
• Character
• Circuit
• Current
• Information
• Network
• Press
• Processor
• Signal
• Switch

A keyboard has a key matrix underneath the keys. When a key is pressed, it presses a

............................................. that completes a ............................................. . This allows

............................................. to flow. The location of the key pressed is

............................................. . The location of the key pressed is compared to a

............................................. map to find the ............................................. value for the key that

has been pressed.


[6]

© UCLES 2021 0478/12/M/J/21


0478/12 Cambridge IGCSE – Mark Scheme 692021
May/June
PUBLISHED

Question Answer Marks

1(a) One mark per each correct binary value. 6


One mark per each correct hex value.

Denary Hexadecimal 8-bit binary

49 31 00110001

123 7B 01111011

200 C8 11001000

1(b) Any two from: 2


− Easier/quicker to read/write/understand
− Easier/quicker to identify errors/debug
− Takes up less screen/display space
− Less chance of making an error

1(c) Any three from: 3


− MAC address
− URL
− Assembly language
− Error codes // error messages
− IP addresses
− Locations in memory
− Memory dumps

Question Answer Marks

2(a) One mark per each correct row. 6

Magnetic Solid Optical


Statement () state ()
()

no moving parts are used to store data 

pits and lands are used to store data 

data is stored on platters 

flash memory is used to store data 

parts are rotated to store data  

data can be stored permanently   

2(b)(i) Any one from: 1


− Hard disk drive // HDD
− Magnetic tape

© UCLES 2021 Page 4 of 8


0478/12 Cambridge IGCSE – Mark Scheme 702021
May/June
PUBLISHED

Question Answer Marks

2(b)(ii) Any one from: 1


− CD
− DVD
− Blu-ray disk

2(b)(iii) One for type of storage, two for matching justification from: 3
− Magnetic // HDD
− (Web server) is likely to receive many requests a day
− (Web server) will likely need to store a lot of data and magnetic is high
capacity
− Magnetic is cheaper to buy for storage per unit than solid state
− Magnetic is capable of more of read/write requests over time // has more
longevity // SSD has more limited number of read/write requests (before
it is no longer usable)
− No requirement for it to be portable, so moving parts does not matter

− Solid-state // SSD
− (Web server) is likely to receive many requests a day
− (Web server) will likely need to store a lot of data and solid-state is high
capacity
− Solid-state is more energy efficient
− Solid-state runs cooler so will not overheat
− Solid state has faster read/write speeds to handle volume of traffic

2(c) Any three from: 3


− Data is flashed onto (silicon) chips
− Uses NAND/NOR technology // can use flip-flops
− Uses transistors/control gates/floating gates …
− … to control the flow of electrons
− It is a type of EEPROM technology
− When data is stored the transistor is converted from 1 to 0 / 0 to 1
− Writes (and reads) sequentially

3(a) One mark for each correct logic gate with correct input. 6

© UCLES 2021 Page 5 of 8


0478/12 Cambridge IGCSE – Mark Scheme 712021
May/June
PUBLISHED

Question Answer Marks

3(b) One mark per each correct row. 4


− Row 2
− Row 3
− Row 7
− Row 8

Question Answer Marks

4(a) One mark per each correct row. 6

Virus Spyware Denial of


Statement () () service
()

captures all data entered using a keyboard 

can be installed onto a web server  

prevents access to a website 

is malicious code on a computer  

is self-replicating 

damages the files on a user’s hard drive 

4(b) Any three from: 3


− Phishing
− Pharming
− Hacking // cracking

4(c) Any three from: 3


− Human error
− Power failure/surge
− Hardware failure
− Software failure
− Fire
− Flood

5(a) − Light sensor 2


− Motion sensor // infra-red sensor

© UCLES 2021 Page 6 of 8


0478/12 Cambridge IGCSE – Mark Scheme 722021
May/June
PUBLISHED

Question Answer Marks

5(b) Eight from: 8


− Sensors send data to microprocessor
− Data is converted to digital (using ADC)
− Microprocessor compares data to stored value(s) …
− … if one value or neither values are within range/out of range/match no
action is taken
− … If both values are out of range/in range/match microprocessor sends
signal to switch light on …
− … 1-minute timer is started
− Actuator used to switch on/off light
− When timer reaches 1 minute, microprocessor sends signal to switch
light off
− Whole process is continuous

6(a) Any three from: 3


− Webserver sends (cookie) file to user’s browser
− User’s payment details stored in encrypted text file // data is encrypted to
be stored
− Cookie file is stored by browser/on user’s HDD/SSD
− When user revisits website, webserver requests cookie file // webserver
can access the data stored in the cookie file (to automatically enter
details)
− … and browser sends cookie file back to webserver (to automatically
enter the details)

6(b) Four from: 4


− User does not see what information is stored // might collect data that
user does not know about …
− … so, user may feel their privacy is affected

− A profile could be built about the user …


− … that could expose a user’s identity // lead to identity theft

− Sensitive information stored in cookies could be intercepted in


transmission …
− Other websites could gain access to the cookies stored on a user’s
computer …
− Computer could be hacked to obtain data stored in cookies …
− … so, payment information could be stolen and used by a third party

Question Answer Marks

7(a)(i) Any one from: 1


− Placement of text/image
− Margins
− Line break
− Padding

NOTE: Any relevant example of structure can be awarded

© UCLES 2021 Page 7 of 8


0478/12 Cambridge IGCSE – Mark Scheme 732021
May/June
PUBLISHED

Question Answer Marks

7(a)(ii) Any two from: 2


− Font colour
− Font style
− Font size
− Background colour
− Image size
− Border properties

NOTE: Any relevant example of presentation can be awarded

7(b) Any two from: 2


− Can easily change/edit the style of the webpage
− So, CSS can be used to create a template/style sheet
− Can add new content and apply the same style easily
− Can re-use the presentation/style for other websites

8 One mark for each correct term in the correct order 6


− Switch
− Circuit
− Current
− Calculated
− Character
− Binary

© UCLES 2021 Page 8 of 8


74

Cambridge IGCSE™
* 0 3 3 7 1 8 6 9 5 9 *

COMPUTER SCIENCE 0478/22


Paper 2 Problem-solving and Programming May/June 2021

1 hour 45 minutes

You must answer on the question paper.

No additional materials are needed.

INSTRUCTIONS
● Answer all questions.
● Do not attempt Tasks 1, 2 and 3 in the copy of the pre-release material on page 2; these are for
information only.
● Use a black or dark blue pen. You may use an HB pencil for any diagrams or graphs.
● Write your name, centre number and candidate number in the boxes at the top of the page.
● Write your answer to each question in the space provided.
● Do not use an erasable pen or correction fluid.
● Do not write on any bar codes.
● Calculators must not be used in this paper.

INFORMATION
● The total mark for this paper is 50.
● The number of marks for each question or part question is shown in brackets [ ].
● No marks will be awarded for using brand names of software packages or hardware.

This document has 16 pages. Any blank pages are indicated.

DC (LK) 202758/1
© UCLES 2021 [Turn over
75
8

Section B

2 (a) Write an algorithm in pseudocode to input 500 positive whole numbers. Each number input
must be less than 1000. Find and output the largest number input, the smallest number input
and the range (difference between the largest number and smallest number).

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [6]

© UCLES 2021 0478/22/M/J/21


76
9

(b) Describe how the algorithm could be changed to make testing less time-consuming.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

3 (a) Draw the most appropriate flowchart symbol for each pseudocode statement.

Pseudocode statement Flowchart symbol

IF Number = 20

PRINT Number

Number ← Number + 1

[3]

(b) State the type of each pseudocode statement. For example, X ← X + Y is totalling.
IF Number = 20 ...................................................................................................................

PRINT Number ........................................................................................................................

Number ← Number + 1 ......................................................................................................


[3]

© UCLES 2021 0478/22/M/J/21 [Turn over


77
10

4 This algorithm checks passwords.

• Each password must be 8 or more characters in length; the predefined function Length
returns the number of characters.
• Each password is entered twice, and the two entries must match.
• Either Accept or Reject is output.
• An input of 999 stops the process.

REPEAT
OUTPUT "Please enter password"
INPUT Password
IF Length(Password) >= 8
THEN
INPUT PasswordRepeat
IF Password <> PasswordRepeat
THEN
OUTPUT "Reject"
ELSE
OUTPUT "Accept"
ENDIF
ELSE
OUTPUT "Reject"
ENDIF
UNTIL Password = 999

(a) Complete the trace table for the algorithm using this input data:
Secret, Secret, VerySecret, VerySecret, Pa55word, Pa55word, 999, 888

Password PasswordRepeat OUTPUT

[3]

© UCLES 2021 0478/22/M/J/21


78
11

(b) Explain how the algorithm could be extended to allow three attempts at inputting the matching
password. Any pseudocode statements used in your answer must be fully explained.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................ [4]

5 A one-dimensional array dataArray[1:20] needs each element set to zero.

(a) Write a pseudocode routine that sets each element to zero. Use the most suitable loop
structure.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

(b) Explain why you chose this loop structure.

...................................................................................................................................................

............................................................................................................................................. [1]

© UCLES 2021 0478/22/M/J/21 [Turn over


79
12

6 A database table, PLANT, is used to keep a record of plants sold by a nursery. The table has these
fields:
• NAME – name of plant
• FLOWER – whether the plant flowers (True) or not (False)
• POSITION – shade, partial shade or sun
• SIZE – small, medium or large
• PRICE – price in $
• NUMBERSOLD – how many sold

A query-by-example grid has been completed to display only the price, name and number sold of
small plants that do not flower.

Field: NAME PRICE NUMBERSOLD SIZE FLOWER POSITION

Table: PLANT

Sort:

Show: 3 3 3

Criteria: = "shade"

or:

Identify the errors in the query-by-example grid.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Rewrite the corrected query-by-example grid.

Field:

Table:

Sort:

Show:

Criteria:

or:

[5]

© UCLES 2021 0478/22/M/J/21


0478/22 Cambridge IGCSE – Mark Scheme May/June 80
2021
PUBLISHED
Question Answer Marks

Section B

2(a) Any six from: 6


MP1 Initialisation of large and small variables e.g. Large ← 0 Small ← 1000
MP2 Use of a loop for 500 entries // or 499 if initialisation done on first correct entry
MP3 Input with prompt
MP4 Attempt at checking the range of 1 to 999 for input
MP5 … working range check
MP6 Checking for a whole number
MP7 Selecting largest number
MP8 Selecting smallest number
MP9 Calculating the range
MP10 Outputting the largest, smallest and range with message
Large ← 0
Small ← 1000
FOR Count ← 1 TO 500
REPEAT
OUTPUT "Enter a whole number between 1 and 999"
INPUT Number
UNTIL Number >= 1 AND Number < 1000 AND Number = Number DIV 1
IF Number < Small
THEN
Small ← Number
ENDIF
IF Number > Large
THEN
Large ← Number
ENDIF
NEXT
Range ← Large – Small
OUTPUT "Largest number is ", Large, " Smallest number is ", Small, " Range of numbers is
", Range

© UCLES 2021 Page 9 of 13


0478/22 Cambridge IGCSE – Mark Scheme May/June 81
2021
PUBLISHED
Question Answer Marks

2(b) One mark for action required and one mark for method used 2

Reduce the amount of numbers entered


By decreasing the final value of the loop
or
Remove the need to input values
By using random numbers / a previously populated array

3(a) 3
Pseudocode statement Flowchart symbol

IF Number = 20

PRINT Number

Number ← Number + 1

3(b) IF Number = 20 selection 3


PRINT Number output
Number ← Number + 1 counting

© UCLES 2021 Page 10 of 13


0478/22 Cambridge IGCSE – Mark Scheme May/June 82
2021
PUBLISHED
Question Answer Marks

4(a) One mark for each correct column 3

Password PasswordRepeat OUTPUT

(Please enter password)

Secret Reject

(Please enter password)

Secret Reject

(Please enter password)

VerySecret VerySecret Accept

(Please enter password)

Pa55word Pa55word Accept

(Please enter password)

999 Reject

© UCLES 2021 Page 11 of 13


0478/22 Cambridge IGCSE – Mark Scheme May/June 83
2021
PUBLISHED
Question Answer Marks

4(b) Any four from: 4


• Position: before INPUT PasswordRepeat // at start
• …use a (variable) counter (for number of tries) or flag
• … initialise variable counter or flag

• Position after IF Length(Password) >= 8 THEN or after INPUT PasswordRepeat


• … insert REPEAT/WHILE/(conditional) loop

• Position after OUTPUT "Reject"


• … add one to counter (for number of tries)
• … output a message "Try again"
• … add INPUT PasswordRepeat

• Position after OUTPUT "Accept"


• … reset flag to show password matched

• Position after ENDIF


• … (insert UNTIL/ENDWHILE)to exit the loop after three tries or if the repeated password matches the original

Question Answer Marks

5(a) One mark for: 3


• Use of FOR loop
• Working loop with correct number of Iterations
• Correct assignment
FOR Count ← 1 TO 20
dataArray[Count] ← 0
NEXT (Count)

5(b) (A FOR loop has) a fixed number of repetitions // 1


No need to manage the loop counter //
no need to use another variable for the array index

© UCLES 2021 Page 12 of 13


0478/22 Cambridge IGCSE – Mark Scheme May/June 84
2021
PUBLISHED
Question Answer Marks

6 Any three from: 5


• TABLE row not completed
• POSITION column not required // POSITION criteria not required
• No criteria set in the size column
• No criteria set in the flower column

Field: SIZE PRICE FLOWER NUMBERSOLD NAME

Table: PLANT PLANT PLANT PLANT PLANT

Sort:

Show:     

Criteria: ="small" False

or:

OR

Field: SIZE PRICE FLOWER NUMBERSOLD NAME POSITION

Table: PLANT PLANT PLANT PLANT PLANT PLANT

Sort:

Show:      

Criteria: ="small" = False

or:

One mark for correct rows Field, Table and Show


One mark for correct Criteria row

© UCLES 2021 Page 13 of 13


85

Cambridge IGCSE™
* 9 3 8 8 8 6 9 5 2 8 *

COMPUTER SCIENCE 0478/12


Paper 1 Theory October/November 2021

1 hour 45 minutes

You must answer on the question paper.

No additional materials are needed.

INSTRUCTIONS
● Answer all questions.
● Use a black or dark blue pen. You may use an HB pencil for any diagrams or graphs.
● Write your name, centre number and candidate number in the boxes at the top of the page.
● Write your answer to each question in the space provided.
● Do not use an erasable pen or correction fluid.
● Do not write on any bar codes.
● Calculators must not be used in this paper.

INFORMATION
● The total mark for this paper is 75.
● The number of marks for each question or part question is shown in brackets [ ].
● No marks will be awarded for using brand names of software packages or hardware.

This document has 12 pages. Any blank pages are indicated.

DC (KS/FC) 202713/4
© UCLES 2021 [Turn over
86
2

1 (a) Denary is a number system that is used by programmers.

Tick (✓) one box to show whether denary is a base-2, base-10 or base-16 number system.

Tick
(✓)

Base-2

Base-10

Base-16
[1]

(b) Hexadecimal values can be used to represent denary values.

Convert these four hexadecimal values into denary values.

05 ......................................................

20 ......................................................

1A ......................................................

AB ......................................................
[4]

Working space

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

© UCLES 2021 0478/12/O/N/21


87
3

(c) Hexadecimal values can also be converted to binary values.

Tick (✓) one box to show the correct 8-bit binary value for each hexadecimal value.

(i) Hexadecimal value 25

Tick
(✓)

00011001

00100101

10100001
[1]

(ii) Hexadecimal value 1B

Tick
(✓)

00011011

10110001

00011010
[1]

(d) (i) Give one way that hexadecimal is used in website development.

..................................................................................................................................... [1]

(ii) Give one way that hexadecimal is used in low-level programming.

..................................................................................................................................... [1]

2 A train company wants to install a self-service ticket machine system for its train stations. When
the customer has purchased their tickets, the machine will provide a paper ticket.

(a) One output device that is used in the ticket machine is a display screen.

Identify one other output device that is used in the ticket machine system.

............................................................................................................................................. [1]

(b) The train company does not want users to use a keyboard or a mouse to enter their data,
when buying a ticket. The company is worried that they may be stolen or get too dirty.

Identify one other input device that would be suitable for use in the ticket machine system, to
allow users to enter their data.

............................................................................................................................................. [1]

© UCLES 2021 0478/12/O/N/21 [Turn over


88
4

3 (a) Six statements are given about methods of data transmission.

Tick (✓) to show if each statement applies to serial simplex, parallel simplex, parallel
half-duplex or serial duplex data transmission. Some statements may apply to more than one
data transmission method.

Serial Parallel Parallel Serial


Statement simplex simplex half-duplex duplex
(✓) (✓) (✓) (✓)

bits are transmitted along a single wire

data is transmitted in both directions

it is only suitable for distances less


than 5 metres
bits from the same byte are
transmitted one after the other
data may not arrive in the correct
sequence
data is transmitted in both directions,
but only one direction at a time
[6]

(b) A Universal Serial Bus (USB) connection can be used to transmit data from a mobile device
to a computer.

Give three benefits of using a USB connection for this purpose.

Benefit 1 ...................................................................................................................................

...................................................................................................................................................

Benefit 2 ...................................................................................................................................

...................................................................................................................................................

Benefit 3 ...................................................................................................................................

...................................................................................................................................................
[3]

© UCLES 2021 0478/12/O/N/21


89
5

4 The paragraph explains the operation of different touch screen technologies.

Complete the paragraph using the list of terms. Not all terms in the list need to be used.

• capacitive
• change
• circuit
• conductive
• coordinates
• grid
• heat
• infra-red
• insulating
• light
• manufacture
• pressure
• resistive

In ............................................................................ touch screen technology, an electrostatic field

is present on the surface of the touch screen. The ............................................................................

properties of a user cause a ............................................................................ in the field. The

............................................................................ of the user’s touch can be calculated.

In ............................................................................ touch screen technology, a user pushes the

top layer of the screen and makes it connect with the bottom layer to complete a

............................................................................ .

This type of touch screen is cheaper to ............................................................................ .


[7]

© UCLES 2021 0478/12/O/N/21 [Turn over


90
6

5 Sammi works for a finance company and has a laptop that he uses for his work. He has confidential
data about his customers stored on his laptop.

Sammi does not connect the laptop to any networks.

(a) Sammi is concerned about his customers’ confidential data being viewed by other people in
his office.

One method he uses to prevent others viewing the data is encryption.

Identify three other methods Sammi could use to prevent his customers’ confidential data
being viewed.

1 ................................................................................................................................................

2 ................................................................................................................................................

3 ................................................................................................................................................
[3]

(b) Sammi creates videos for the finance company website that give customers advice about
their finances.

He uses lossy compression to reduce the file size of the videos for the website.

(i) Give three ways that lossy compression can reduce the file size of the videos.

1 ........................................................................................................................................

...........................................................................................................................................

2 ........................................................................................................................................

...........................................................................................................................................

3 ........................................................................................................................................

...........................................................................................................................................
[3]

(ii) Give one drawback of using lossy compression to reduce the file size of the videos.

...........................................................................................................................................

..................................................................................................................................... [1]

© UCLES 2021 0478/12/O/N/21


91
7

(c) Sammi could have used lossless compression to compress the videos for the website.

(i) Give one reason why he would use lossless compression, rather than lossy compression,
for the videos.

...........................................................................................................................................

..................................................................................................................................... [1]

(ii) Give two disadvantages of Sammi using lossless compression, rather than lossy
compression, for the videos.

Disadvantage 1 .................................................................................................................

...........................................................................................................................................

Disadvantage 2 .................................................................................................................

...........................................................................................................................................
[2]

6 A programmer can use translators, such as an interpreter and a compiler, when developing a
computer program.

(a) Give one similarity between a compiler and an interpreter.

...................................................................................................................................................

............................................................................................................................................. [1]

(b) Describe two differences between a compiler and an interpreter.

Difference 1 ..............................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Difference 2 ..............................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[4]

(c) Identify one other type of translator.

............................................................................................................................................. [1]

© UCLES 2021 0478/12/O/N/21 [Turn over


92
8

7 Five statements are given about devices.

Tick (✓) to show if each statement applies to a 3D scanner, barcode reader or a Quick Response
(QR) code reader. Some statements may apply to more than one type of device.

3D Barcode QR code
Statement scanner reader reader
(✓) (✓) (✓)
uses position and alignment markers for orientation
when scanning

scans the shape and appearance of an object

uses reflected light from a laser to convert


a black-and-white pattern into binary
can often be built into an Electronic Point Of Sale
(EPOS) terminal, for example, a supermarket checkout

it is an example of an input device


[5]

8 An electronic game has three square mats that are coloured red, green and blue.

The player will see a colour displayed on a screen and has 1 second to hit the mat that matches
the colour. If the player hits the correct mat, within 1 second, a counter is incremented. When a
player hits an incorrect mat, the game ends.

The game uses sensors and a microprocessor to determine if the player hits the correct mat within
1 second.

Explain how the game uses sensors and a microprocessor to count the number of times a player
hits a correct mat within 1 second.

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

© UCLES 2021 0478/12/O/N/21


93
9

..........................................................................................................................................................

..........................................................................................................................................................

.................................................................................................................................................... [7]

9 Padma opens an application on her computer.

An interrupt is generated to inform the Central Processing Unit (CPU) that the application has
been opened.

(a) Give three other examples of when an interrupt signal could be generated.

1 ................................................................................................................................................

2 ................................................................................................................................................

3 ................................................................................................................................................
[3]

(b) State what would happen if interrupt signals were not used in a computer.

...................................................................................................................................................

............................................................................................................................................. [1]

10 Jermain uses the Secure Socket Layer (SSL) protocol for secure transmission when sending data
using the internet.

(a) Explain how the SSL protocol secures the data for transmission.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

(b) Identify an alternative protocol that could be used for secure transmission of data using the
internet.

............................................................................................................................................. [1]

(c) Give two ways that a user can identify if a website uses secure data transmission.

1 ................................................................................................................................................

...................................................................................................................................................

2 ................................................................................................................................................

...................................................................................................................................................
[2]
© UCLES 2021 0478/12/O/N/21 [Turn over
94
10

11 Consider the following logic statement:

X = (((A AND B) OR (NOT (B OR C))) NAND C)

(a) Draw a logic circuit to represent the given logic statement.

Do not attempt to simplify the logic statement. All logic gates must have a maximum of two
inputs.

B X

[5]

© UCLES 2021 0478/12/O/N/21


95
11

(b) Complete the truth table for the given logic statement.

A B C Working space X

0 0 0

0 0 1

0 1 0

0 1 1

1 0 0

1 0 1

1 1 0

1 1 1
[4]

(c) Identify two logic gates that are not included in the given logic statement.

Logic gate 1 ...............................................................................................................................

Logic gate 2 ..............................................................................................................................


[2]

© UCLES 2021 0478/12/O/N/21


0478/12 Cambridge IGCSE – Mark Scheme October/November 96
2021
PUBLISHED
Question Answer Marks

1(a) − Base-10 1

1(b) − 5 4
− 32
− 26
− 171

1(c)(i) − 00100101 1

1(c)(ii) − 00011011 1

1(d)(i) Any one from: 1


− To represent HTML colour codes
− In error messages

1(d)(ii) Any one from: 1


− Assembly code/language
− Memory address locations
− In error messages
− Memory dump

© UCLES 2021 Page 4 of 12


0478/12 Cambridge IGCSE – Mark Scheme October/November 97
2021
PUBLISHED
Question Answer Marks

2(a) Any one from: 1


− Printer
− Speaker
− Light/LED
− Actuator

2(b) Any one from: 1


− Touchscreen
− Trackpad / touchpad
− Microphone
− QR code reader
− Barcode reader
− Magnetic strip reader
− RFID reader

© UCLES 2021 Page 5 of 12


0478/12 Cambridge IGCSE – Mark Scheme October/November 98
2021
PUBLISHED
Question Answer Marks

3(a) One mark per each correct row. 6

Parallel Parallel Serial


Serial
Statement simplex half-duplex duplex
simplex ()
() () ()

bits are transmitted along a single wire  

data is transmitted in both directions  

it is only suitable for distances less than 5  


metres

Bits from the same byte are transmitted one  


after the other

data may not arrive in the correct sequence  

data is transmitted in both directions, but 


only one direction at a time

3(b) Any three from: 3


− Can charge/power the mobile device (at the same time)
− (Uses serial transmission so) data less likely to be skewed / corrupted
− Universal / industry standard / connection
− Cable can only be plugged in one way // Cannot be inserted incorrectly
− Fast transmission speed
− Backward compatible
− Supports different transmission speeds
− Automatically detects device // Automatically downloads drivers

© UCLES 2021 Page 6 of 12


0478/12 Cambridge IGCSE – Mark Scheme October/November 99
2021
PUBLISHED
Question Answer Marks

4 One mark per each correct term in the correct order. 7


− Capacitive
− Conductive // Capacitive
− Change
− Coordinates
− Resistive
− Circuit
− Manufacture

Question Answer Marks

5(a) Any three from: 3


− Password
− Add a biometric device to the laptop // set biometric password
− Use two-step verification // Use two factor authentication
− Physically lock the laptop away in a secure cupboard // Taking laptop with him at all times

5(b)(i) Any three from: 3


− A compression algorithm is used
− The resolution could be reduced
− Colour depth could be reduced // bits per pixel reduced
− Sounds not heard by human ear could be removed // Perceptual music shaping can be used
− Repeating frames could be removed

5(b)(ii) Any one from: 1


− Quality may be reduced
− Data is lost // original file cannot be reconstructed

5(c)(i) Any one from: 1


− Maintains quality // quality better than lossy
− Original file is retained // Data is not permanently lost
− A significant reduction in file size is not required

© UCLES 2021 Page 7 of 12


0478/12 Cambridge IGCSE – Mark Scheme 100
October/November 2021
PUBLISHED
Question Answer Marks

5(c)(ii) Any two from: 2


− Takes more time to transmit file // Takes more time to upload to web server // Takes more time to download to
customer // Web page will load slower
− Takes up more storage space
− Data usage would be increased
− Uses more bandwidth

Question Answer Marks

6(a) Any one from: 1


− They both translate high-level language into machine code / low-level language
− They both check for errors
− They both report errors

6(b) Four from (Max 2 per translator): 4


− An interpreter translates and executes the code line by line
− … whereas a compiler translates and executes the whole code all in one go

− An interpreter stops translating and reports an error as it finds one


− … whereas a compiler produces an error report at the end of translation

− An interpreter does not produce an executable file


− … but a compiler does produce an executable file

− An interpreter will execute the code until it finds an error


− … whereas a compiler will not execute any code if there are errors present

− An interpreter allows correction of errors in real-time


− … whereas a compiler needs to retranslate the code each time after errors are found and corrected

6(c) − Assembler 1

© UCLES 2021 Page 8 of 12


0478/12 Cambridge IGCSE – Mark Scheme 101
October/November 2021
PUBLISHED
Question Answer Marks

7 One mark per each correct row. 5

3D scanner Barcode QR code


Statement
() reader () reader ()

uses position and alignment markers for orientation when scanning 

scans the shape and appearance of an object 

uses reflected light from a laser to convert a  ()


black-and-white pattern into binary

can often be built into an Electronic Point Of Sale (EPOS) terminal, for  ()
example, a supermarket checkout

it is an example of an input device   

Question Answer Marks

8 Seven from: 7
− Timer is started
− Pressure sensor (within each mat)
− Sensor sends data to microprocessor
− Analogue data is converted to digital (using ADC)
− Microprocessor compares data to stored value(s)
− If data matches / in/out range microprocessor stops timer
− If data matches / in/out range microprocessor checks if data has come from correct colour mat sensor
− If data matches / in/out range microprocessor checks to see if timer is stopped at less than 1 second
− If data matches / in/out range microprocessor increments counter if timer is less than 1 second and colour/mat is
correct
− If correct colour/mat is hit, timer is reset and the whole process is repeated
− If data has not come from the correct colour mat sensor the game ends

© UCLES 2021 Page 9 of 12


0478/12 Cambridge IGCSE – Mark Scheme 102
October/November 2021
PUBLISHED
Question Answer Marks

9(a) Any three from: e.g. 3


− A suitable description of any error that might occur
− A peripheral is connected/disconnected
− A key on a keyboard is pressed
− A mouse button click
− A phone/video call is received
− A buffer requires more data
− A printer has a paper jam
− A printer runs out of paper
− A printer runs out of ink
− When switching from one application to another

NOTE: If three suitable different errors are described, this can be awarded three marks.

9(b) Any one from: 1


− The computer would only start a new task when it had finished processing the current task // by example
− Computer will not be able to multitask
− Errors may not be dealt with
− Computer would become impossible to use

Question Answer Marks

10(a) − Enables an encrypted link (between the browser and the web server) // It encrypts the data 2
− … based on the authentication of an (SSL) certificate // and will only send it if the certificate is authentic

10(b) − Transport Layer Security // TLS 1

10(c) Any two from: 2


− URL begins with HTTPS
− Padlock symbol is locked
− Check the certificate is valid

© UCLES 2021 Page 10 of 12


0478/12 Cambridge IGCSE – Mark Scheme 103
October/November 2021
PUBLISHED
Question Answer Marks

11(a) One mark per each correct logic gate with correct input(s) 5

B X

© UCLES 2021 Page 11 of 12


0478/12 Cambridge IGCSE – Mark Scheme 104
October/November 2021
PUBLISHED
Question Answer Marks

11(b) 4 marks for 8 correct outputs 4


3 marks for 6/7 correct outputs
2 marks for 4/5 correct outputs
1 mark for 2/3 correct outputs

A B C Working space X

0 0 0 1

0 0 1 1

0 1 0 1

0 1 1 1

1 0 0 1

1 0 1 1

1 1 0 1

1 1 1 0

11(c) − NOR 2
− XOR / EOR

© UCLES 2021 Page 12 of 12


105

Cambridge IGCSE™
* 8 1 3 0 5 0 5 1 1 4 *

COMPUTER SCIENCE 0478/22


Paper 2 Problem-solving and Programming October/November 2021

1 hour 45 minutes

You must answer on the question paper.

No additional materials are needed.

INSTRUCTIONS
● Answer all questions.
● Do not attempt Tasks 1, 2 and 3 in the copy of the pre-release material on page 2; these are for
information only.
● Use a black or dark blue pen. You may use an HB pencil for any diagrams or graphs.
● Write your name, centre number and candidate number in the boxes at the top of the page.
● Write your answer to each question in the space provided.
● Do not use an erasable pen or correction fluid.
● Do not write on any bar codes.
● Calculators must not be used in this paper.

INFORMATION
● The total mark for this paper is 50.
● The number of marks for each question or part question is shown in brackets [ ].
● No marks will be awarded for using brand names of software packages or hardware.

This document has 12 pages.

DC (LK/FC) 202711/3
© UCLES 2021 [Turn over
106
7

Section B

2 Tick (3) one box in each row to identify if the statement is about validation, verification or neither.

Validation Verification Neither


Statement
(3) (3) (3)
a check where data is re-entered to make sure no
errors have been introduced during data entry
an automatic check to make sure the data entered
has the correct number of characters

a check to make sure the data entered is sensible

a check to make sure the data entered is correct

[3]

3 A program checks that the data entered is between 1 and 100 inclusive.

Identify one piece of normal, extreme and erroneous test data for this program, and give a reason
for each.

Normal test data ...............................................................................................................................

Reason .............................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

Extreme test data .............................................................................................................................

Reason .............................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

Erroneous test data ..........................................................................................................................

Reason .............................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................
[6]

© UCLES 2021 0478/22/O/N/21 [Turn over


107
8

4 The pseudocode algorithm should work as a calculator and output the result.

1 Continue 1
2 WHILE Continue = 0
3 OUTPUT "Enter 1 for +, 2 for -, 3 for * or 4 for /"
4 INPUT Operator
5 OUTPUT "Enter the first value"
6 INPUT Value1
7 OUTPUT "Enter the second value"
8 OUTPUT Value2
9 IF Operator
10 1: Answer Value1 + Value2
11 2: Answer Value1 - Value2
12 3: Answer Value1 * Value2
13 4: Answer Value1 / Value2
14 ENDCASE
15 OUTPUT "The answer is ", Value1
16 OUTPUT "Do you wish to enter more values (Yes or No)?"
17 INPUT MoreValues
18 IF MoreValues = "No"
19 THEN
20 Continue 1
21 ENDIF
22 UNTIL Continue = 0

(a) Find the five errors in the pseudocode and suggest a correction for each error.

Error 1 .......................................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................

Error 2 .......................................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................

Error 3 .......................................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................

Error 4 .......................................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................

Error 5 .......................................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................
[5]
© UCLES 2021 0478/22/O/N/21
108
9

(b) The algorithm needs changing to allow only the numbers 1, 2, 3, or 4 to be entered for the
input variable Operator.

Write the pseudocode to perform this task and state where in the algorithm it would be
located.

Pseudocode ..............................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Location in algorithm ................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[5]

© UCLES 2021 0478/22/O/N/21 [Turn over


109
10

5 The flowchart represents an algorithm.

The algorithm will terminate if –1 is entered at the List input.

START

List1 ←0
List2 ←0
INPUT
List

Yes IS
List = –1 ?

No

INPUT
Value

IS
List = 1 ?
Yes
List1 ← List1 + Value
No

IS
List = 2 ?
Yes
List2 ← List2 + Value
OUTPUT
"List 1 = ", List1
No

OUTPUT OUTPUT
"List 2 = ", List2 "Input Error"

IS Yes
List1 > List2 ?

No
OUTPUT
"List 1 is greatest"

OUTPUT
"List 2 is greatest"

END

© UCLES 2021 0478/22/O/N/21


110
11

Complete the trace table for the algorithm using this input data:

2, 77, 2, 16, 1, 35, 2, –7, 5, 18, 1, 11, 1, 12, 2, 20, –1, 18

List Value List1 List2 OUTPUT

[5]

© UCLES 2021 0478/22/O/N/21 [Turn over


111
12

6 A pet supplier uses the database table, STOCK, to keep records of its products for pets.

The fields are:

Field name Description


ProductID code to identify the product
ProductName name of product
ProductDescription information about the product
Animal type of animal the product is for, e.g. cat, bird, horse
ProductType type of product, e.g. food, toy, medicine
InStock whether the product is in stock or not

(a) (i) Identify the field that could have a Boolean data type.

..................................................................................................................................... [1]

(ii) Identify the field that should be used as the primary key.

..................................................................................................................................... [1]

(b) Complete the query-by-example grid to output the products intended for a cat that are in
stock. Display only the primary key and the name of the products. The output should be
sorted by the primary key.

Field:

Table:

Sort:

Show:

Criteria:

or:

[4]

Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every
reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the
publisher will be pleased to make amends at the earliest possible opportunity.

To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge
Assessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download
at www.cambridgeinternational.org after the live examination series.

Cambridge Assessment International Education is part of the Cambridge Assessment Group. Cambridge Assessment is the brand name of the University of
Cambridge Local Examinations Syndicate (UCLES), which itself is a department of the University of Cambridge.

© UCLES 2021 0478/22/O/N/21


0478/22 Cambridge IGCSE – Mark Scheme 112
October/November 2021
PUBLISHED
Question Answer Marks

Section B

2 One mark for two correct rows 3


Two marks for three correct rows
Three marks for four correct rows.

Statement Validation Verification Neither


() () ()

a check where data is re-entered to make sure no errors have 


been introduced during data entry

an automatic check to make sure the data entered has the correct 
number of characters

a check to make sure the data entered is sensible 

a check to make sure the data entered is correct 

Question Answer Marks

3 One mark per bullet point 6

Normal test data


• Test data e.g. 50 (allow any number between 1 and 100 inclusive)
• Reason Data that is within range and should be accepted

Extreme test data


• Test data 100 / 1
• Reason Data at the maximum / minimum end of the range and should be accepted

Erroneous test data


• Test data e.g. 300 (allow anything that isn’t between 1 and 100 inclusive, including other data types)
• Reason Data outside the range that should be rejected

© UCLES 2021 Page 6 of 13


0478/22 Cambridge IGCSE – Mark Scheme 113
October/November 2021
PUBLISHED
Question Answer Marks

4(a) One mark for error identified and suggested correction (Max three) 5

Line 8 OUTPUT Value2 – should be INPUT Value2


Line 9 IF Operator – should be CASE OF Operator
Line 15 OUTPUT "The answer is ", Value1 – should be Answer

The loop may be corrected using a number of alternative methods:

One mark for error identified and suggested correction (Max two)

Method 1
Line 1 Continue ← 1 should be Continue ← 0
Line 22 UNTIL Continue = 0 should be ENDWHILE // Line 2 WHILE Continue = 0 should be REPEAT and Line
22 UNTIL Continue = 0 should be Until Continue = 1

OR

Method 2
Line 2 WHILE Continue = 0 should be REPEAT
Line 20 Continue ← 1 should be Continue ← 0 // Line 1 Continue ← 1 should be Continue ← 0 and Line
22 UNTIL Continue = 0 should be Until Continue = 1

OR

Method 3
Line 2 WHILE Continue = 0 should be WHILE Continue = 1
Line 20 Continue ← 1 should be Continue ← 0 and Line 22 UNTIL Continue = 0 should be ENDWHILE

© UCLES 2021 Page 7 of 13


0478/22 Cambridge IGCSE – Mark Scheme 114
October/November 2021
PUBLISHED
Question Answer Marks

4(a) Corrected algorithm example 1


1 Continue ← 0
2 WHILE Continue = 0 (DO)
3 OUTPUT "Enter 1 for +, 2 for -, 3 for * or 4 for /"
4 INPUT Operator
5 OUTPUT "Enter the first value"
6 INPUT Value1
7 OUTPUT "Enter the second value"
8 INPUT Value2
9 CASE OF Operator
10 1: Answer ← Value1 + Value2
11 2: Answer ← Value1 - Value2
12 3: Answer ← Value1 * Value2
13 4: Answer ← Value1 / Value2
14 ENDCASE
15 OUTPUT "The answer is ", Answer
16 OUTPUT "Do you wish to enter more values (Yes or No)?"
17 INPUT MoreValues
18 IF MoreValues = "No"
19 THEN
20 Continue ← 1
21 ENDIF
22 ENDWHILE

© UCLES 2021 Page 8 of 13


0478/22 Cambridge IGCSE – Mark Scheme 115
October/November 2021
PUBLISHED
Question Answer Marks

4(a) Corrected algorithm example 2


1 Continue ← 1
2 REPEAT
3 OUTPUT "Enter 1 for +, 2 for -, 3 for * or 4 for /"
4 INPUT Operator
5 OUTPUT "Enter the first value"
6 INPUT Value1
7 OUTPUT "Enter the second value"
8 INPUT Value2
9 CASE OF Operator
10 1: Answer ← Value1 + Value2
11 2: Answer ← Value1 - Value2
12 3: Answer ← Value1 * Value2
13 4: Answer ← Value1 / Value2
14 ENDCASE
15 OUTPUT "The answer is ", Answer
16 OUTPUT "Do you wish to enter more values (Yes or No)?"
17 INPUT MoreValues
18 IF MoreValues = "No"
19 THEN
20 Continue ← 0
21 ENDIF
22 UNTIL Continue = 0

© UCLES 2021 Page 9 of 13


0478/22 Cambridge IGCSE – Mark Scheme 116
October/November 2021
PUBLISHED
Question Answer Marks

4(b) One mark per bullet 5


MP1 Appropriate loop (begin and end) / otherwise selection
MP2 Testing both ends of condition
MP3 Suitable message
MP4 Input/re-input

WHILE Operator < 1 OR Operator > 4 (DO)


OUTPUT "Enter 1, 2, 3 or 4"
INPUT Operator
ENDWHILE

Alternative answer
REPEAT
IF Operator < 1 OR Operator > 4
THEN
OUTPUT "Enter 1, 2, 3 or 4"
INPUT Operator
ENDIF
UNTIL Operator >= 1 AND Operator <= 4

One mark

After line 4 / between lines 2 and 5

© UCLES 2021 Page 10 of 13


0478/22 Cambridge IGCSE – Mark Scheme 117
October/November 2021
PUBLISHED
Question Answer Marks

5 One mark for each correct column 5

List Value List1 List2 OUTPUT

0 0

77 77

16 93

35 35

-7 86

© UCLES 2021 Page 11 of 13


0478/22 Cambridge IGCSE – Mark Scheme 118
October/November 2021
PUBLISHED
Question Answer Marks

5 List Value List1 List2 OUTPUT

18 Input Error

11 46

12 58

20 106

-1 List 1 = 58

List 2 = 106

List 2 is greatest

© UCLES 2021 Page 12 of 13


0478/22 Cambridge IGCSE – Mark Scheme 119
October/November 2021
PUBLISHED
Question Answer Marks

6(a)(i) InStock 1

6(a)(ii) ProductID 1

6(b) One mark for correct fieldnames 4


One mark for correct table names and show fields
One mark for correct sort
One mark for correct search criteria in all columns

Field: ProductID ProductName Animal InStock

Table: STOCK STOCK STOCK STOCK

Sort: Ascending

Show:     

Criteria: =“cat” =Yes

or:

© UCLES 2021 Page 13 of 13


120

Cambridge IGCSE™
* 4 9 1 4 2 9 0 2 3 5 *

COMPUTER SCIENCE 0478/12


Paper 1 Theory May/June 2022

1 hour 45 minutes

You must answer on the question paper.

No additional materials are needed.

INSTRUCTIONS
● Answer all questions.
● Use a black or dark blue pen. You may use an HB pencil for any diagrams or graphs.
● Write your name, centre number and candidate number in the boxes at the top of the page.
● Write your answer to each question in the space provided.
● Do not use an erasable pen or correction fluid.
● Do not write on any bar codes.
● Calculators must not be used in this paper.

INFORMATION
● The total mark for this paper is 75.
● The number of marks for each question or part question is shown in brackets [ ].
● No marks will be awarded for using brand names of software packages or hardware.

This document has 12 pages.

DC (RW) 303775/2
© UCLES 2022 [Turn over
121
2

1 (a) Denary values are converted to binary values to be processed by a computer.

Draw one line from each denary value to the correctly converted 8‑bit binary value.

Denary 8-bit binary

00100001

41
10100110

00101001

174

10000110

10101110
86

01010110

[3]

Working space

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

(b) Binary values can also be converted to denary values.

Give the correct denary value for the 12‑bit binary value 000101010111
Show all your working.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Denary value ..........................................................


[2]

© UCLES 2022 0478/12/M/J/22


122
3

2 Hexadecimal is used for Hypertext Markup Language (HTML) colour codes.

An HTML colour code is:


#2F15D6
Each pair of digits is stored as binary in an 8‑bit register.

(a) Give the 8‑bit binary value that would be stored for each pair of hexadecimal digits.

2F

15

D6

[6]

Working space

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

(b) HTML colour codes and Media Access Control (MAC) addresses are two examples of where
hexadecimal is used in Computer Science.

Give two other examples of where hexadecimal can be used in Computer Science.

Example 1 .................................................................................................................................

Example 2 .................................................................................................................................
[2]

© UCLES 2022 0478/12/M/J/22 [Turn over


123
4

(c) Websites can be created using HTML structure and presentation.

State what is meant by HTML structure and presentation.

Give an example of each in your answer.

Structure ...................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Presentation .............................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[4]

(d) Explain why presentation is often separated from structure when creating a web page.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

© UCLES 2022 0478/12/M/J/22


124
5

3 Joelle is a student who uses the Internet.

(a) The table contains five terms or definitions that relate to the Internet.

Complete the table by writing each missing term or definition.

Term Definition

........................................................................................

browser ........................................................................................

........................................................................................

this is the company that provides a user with a


...................................................
connection to the Internet

this is a protocol that is used to send data for web


...................................................
pages across the Internet

........................................................................................

Uniform Resource Locator (URL) ........................................................................................

........................................................................................

........................................................................................

cookie ........................................................................................

........................................................................................

[5]

© UCLES 2022 0478/12/M/J/22 [Turn over


125
6

(b) Joelle uses a firewall to keep her data safe when she uses the Internet.

Tick (3) to show which statement about firewalls is true.

Tick (3)

Firewalls can only be hardware‑based

Firewalls can only be software‑based

Firewalls can be hardware‑based or software‑based


[1]

(c) Joelle’s parent also uses the firewall to limit the websites that Joelle can access.

Explain how the firewall is used to limit the websites that Joelle can access.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]

© UCLES 2022 0478/12/M/J/22


126
7

4 Jason is a programmer who writes computer programs in a high‑level language.

(a) Describe what is meant by a high‑level language.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

(b) Jason wants to distribute a computer program he has written. He is considering distributing it
to users as freeware or free software.

(i) Explain one drawback to a user if the program is distributed as freeware.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

(ii) Explain one benefit to a user if the program is distributed as free software.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

© UCLES 2022 0478/12/M/J/22 [Turn over


127
8

5 Consider the following logic statement:

X = ((A OR B) AND (NOT (B XOR C)) AND C)

(a) Draw a logic circuit to represent the given logic statement.

Do not attempt to simplify the logic statement. All logic gates must have a maximum of two
inputs.

B X

[5]

© UCLES 2022 0478/12/M/J/22


128
9

(b) Complete the truth table for the given logic statement.

Working space
A B C X

0 0 0

0 0 1

0 1 0

0 1 1

1 0 0

1 0 1

1 1 0

1 1 1
[4]

6 Millions of emails are sent between users on a daily basis.

(a) Identify two online security attacks that can be carried out using email.

Describe how email is used to enable the attack.

Online security attack 1 ............................................................................................................

Description ................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Online security attack 2 ............................................................................................................

Description ................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[6]

© UCLES 2022 0478/12/M/J/22 [Turn over


129
10

(b) Online security attacks can maliciously damage data.

One security method to keep data safe from online attacks is a firewall.

Identify two other security methods that keep data safe from online attacks.

Security method 1 .....................................................................................................................

Security method 2 .....................................................................................................................


[2]

(c) Data can also be damaged accidentally.

One example of how data can be damaged accidentally is by shutting down a computer
before saving data. To prevent this from happening, a user should make sure they have
saved all data before shutting down a computer.

Complete the table by giving three other examples of how data can be damaged accidentally.

Give a method of prevention for each example.

Example Method of prevention

...................................................................... ......................................................................

...................................................................... ......................................................................

...................................................................... ......................................................................

......................................................................

...................................................................... ......................................................................

...................................................................... ......................................................................

...................................................................... ......................................................................

......................................................................

...................................................................... ......................................................................

...................................................................... ......................................................................

...................................................................... ......................................................................

......................................................................

[6]

© UCLES 2022 0478/12/M/J/22


130
11

7 Cassie stores data for her business every day. She stores the data using optical data storage.

(a) Identify three examples of optical data storage.

Example 1 .................................................................................................................................

Example 2 .................................................................................................................................

Example 3 .................................................................................................................................
[3]

(b) Six statements are given about the operation of three different types of storage.

Tick (3) to show which statements apply to each type of storage. Some statements may
apply to more than one type of storage.

Type of storage
Magnetic Optical Solid state
Statement
(3) (3) (3)

this storage has no moving parts

this storage uses a laser to read and write data

this storage uses a read/write head

this storage burns pits onto a reflective surface

this storage uses NAND and NOR technology

this storage stores data in tracks and sectors

[6]

© UCLES 2022 0478/12/M/J/22 [Turn over


131
12

8 Sam develops a software application. He distributes a version of the software as shareware.

(a) Describe what is meant by shareware.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]

(b) Identify three ethical issues that may need to be considered when developing and distributing
software.

Ethical issue 1 ..........................................................................................................................

Ethical issue 2 ..........................................................................................................................

Ethical issue 3 ..........................................................................................................................


[3]

Permission to reproduce items where third‑party owned material protected by copyright is included has been sought and cleared where possible. Every
reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the
publisher will be pleased to make amends at the earliest possible opportunity.

To avoid the issue of disclosure of answer‑related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge
Assessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download
at www.cambridgeinternational.org after the live examination series.

Cambridge Assessment International Education is part of Cambridge Assessment. Cambridge Assessment is the brand name of the University of Cambridge
Local Examinations Syndicate (UCLES), which is a department of the University of Cambridge.

© UCLES 2022 0478/12/M/J/22


0478/12 Cambridge IGCSE – Mark Scheme 132
May/June 2022
PUBLISHED
Question Answer Marks

1(a) One mark for each correct line 3

Denary 8-bit binary

00100001

41 10100110

00101001

174

10000110

86 10101110

01010110

1(b) One mark for correct working, one mark for correct answer 2

Working e.g.
 256  64  16  4  2  1

Answer:
 343

© UCLES 2022 Page 4 of 13


0478/12 Cambridge IGCSE – Mark Scheme 133
May/June 2022
PUBLISHED
Question Answer Marks

2(a) Two marks each correct conversion (one mark for the first four bits, one mark for the second four bits) 6

0 0 1 0 1 1 1 1
2F

0 0 0 1 0 1 0 1
15

1 1 0 1 0 1 1 0
D6

2(b) Any two from: 2


 IP address
 Error messages/codes
 Assembly language // low-level language
 URL // web address
 Memory dumps
 Locations in memory

2(c) One mark for a description, one mark for a correct example 4

Structure
 Layout of the web page
 e.g. Where text is placed

Presentation
 Formatting of the web page
 e.g. the colour of the font

© UCLES 2022 Page 5 of 13


0478/12 Cambridge IGCSE – Mark Scheme 134
May/June 2022
PUBLISHED
Question Answer Marks

2(d) Two from: 2

 The formatting of the page can be changed/edited without needing to alter the structure
 … so, they can make regular updates without needing to check the structure

 The formatting document can be used again for a different website …


 If further content and web pages are added to the website, the necessary formatting can be easily applied …
 … so, this can save time when developing/updating a website
 Allows use of CSS to standardise formatting
 … so, CSS only needs to be created once (to be applied to each webpage)

© UCLES 2022 Page 6 of 13


0478/12 Cambridge IGCSE – Mark Scheme 135
May/June 2022
PUBLISHED
Question Answer Marks

3(a) One mark for the correct term or definition 5

Term Definition

browser Software/application that allows users to view web


pages / render HTML

Internet Service this is the company that provides a user with a


provider // ISP connection to the Internet

HTTP // HTTPS this is a protocol that is used to send data for web
pages across the Internet

Uniform Resource a text-based version of a web address


Locator (URL)

cookie a text file (stored by web browser) that contains data


about a user’s browsing habits/details/preferences

3(b)  Hardware or software based 1

3(c) Four from: 4

 (The parent can) set criteria for the websites she is allowed to visit
 … such as a whitelist/blacklist of websites
 The firewall will examine the data/traffic incoming and outgoing from her computer
 If data is sent from a website that is not allowed, it will be blocked

© UCLES 2022 Page 7 of 13


0478/12 Cambridge IGCSE – Mark Scheme 136
May/June 2022
PUBLISHED
Question Answer Marks

4(a) Any three from: 3

 It uses English-like statements


 It needs to be converted to machine code (to be processed by a computer)
 … using a translator
 It is portable
 One line of code can perform multiple commands

4(b)(i) Two from: 2

 The user is not allowed to access the source code …


 … so, they cannot tailor the software to their needs
 … so, they cannot fix any bugs in it
 The software is still covered by copyright
 The user must get the owner’s permission to do anything beyond using it

4(b)(ii) Two from: 2

 The user can access the source code …


 … so, they can tailor the software to their needs
 … so, they can fix any bugs in it
 … so, the source code could be studied for educational purposes
 The user can redistribute the software/program …
 … but this must be done under the same terms as the original software

© UCLES 2022 Page 8 of 13


0478/12 Cambridge IGCSE – Mark Scheme 137
May/June 2022
PUBLISHED
Question Answer Marks

5(a) One mark for each correct logic gate with correct input(s) 5

5(b) Four marks for 8 correct outputs 4


Three marks for 6/7 correct outputs
Two marks for 4/5 correct outputs
One mark for 2/3 correct outputs

A B C Working space X

0 0 0 0

0 0 1 0

0 1 0 0

0 1 1 1

1 0 0 0

1 0 1 0

1 1 0 0

1 1 1 1

© UCLES 2022 Page 9 of 13


0478/12 Cambridge IGCSE – Mark Scheme 138
May/June 2022
PUBLISHED
Question Answer Marks

6(a) One mark for identifying the attack, two marks for the description 6

 Phishing
 Email is sent to user to encourage them to click link
 … that takes user to fake website

Pharming
 Email is sent to user to encourage them to click link/download attachment
 … that triggers download of malicious code that will redirect user to fake website

Virus/malware
 Email is sent to user to encourage them to click link/download attachment
 … that triggers download of virus/malware

Denial of service // DoS


 A very large number of emails are sent to a server/network at the same time
 … crashing the server/network

6(b) Any two from: 2

 Encryption
 Password
 Two-step / Two-factor authentication/verification
 Biometric device
 Anti-malware // Anti-virus
 Proxy-server

© UCLES 2022 Page 10 of 13


0478/12 Cambridge IGCSE – Mark Scheme 139
May/June 2022
PUBLISHED
Question Answer Marks

6(c) One mark for identifying an issue, one mark for suggesting a suitable prevention 6

 Power surge/loss (damages hardware)


 Use a UPS

 Water can be spilled on the device


 Don’t have water near the device
 Keep device in a waterproof box when not is use

 Fire can destroy device


 Use electrics safety
 Keep device in a fireproof box when not is use

 Data is accidentally deleted


 Add verification method for data deletion
 Set access levels for data to limit who can delete the data

 Incorrect use of storage device


 Making sure device is ejected before removing

 Physical damage to hardware // hardware failure


 Correct care and maintenance of hardware

 Software failure
 Making sure it is always up to date // enable automatic updates

© UCLES 2022 Page 11 of 13


0478/12 Cambridge IGCSE – Mark Scheme 140
May/June 2022
PUBLISHED
Question Answer Marks

7(a) Three from: 3

 CD
 DVD
 Blu-ray

7(b) One mark for each correct row 6

Type of storage

Statement Magnetic Optical Solid


() () state
()

this storage has no moving parts 

this storage uses a laser to read and write data 

this storage uses a read/write head  

this storage burns pits onto a reflective surface 

this storage uses NAND and NOR technology 

this storage stores data in tracks and sectors  ()

© UCLES 2022 Page 12 of 13


0478/12 Cambridge IGCSE – Mark Scheme 141
May/June 2022
PUBLISHED
Question Answer Marks

8(a) Any four from: 4

 Trial version of software


 … for a limited time / number of uses
 … with limited features
 … free of charge
 If full version is required need to pay fee / sign up // When trial over user is asked to pay / sign up
 Protected by copyright
 Type of software licence

8(b) Any three from: 3

e.g.
 Copyright
 Plagiarism
 Production/distribution of malware
 Intellectual property theft
 Privacy of data
 Age appropriation
 Offensive materials
 Environmental impact of distribution media e.g. CDs
 Accessibility of software
 Security of software
 Following guidelines of professional bodies e.g. ACM/IEEE/BCS

© UCLES 2022 Page 13 of 13


142

Cambridge IGCSE™
* 6 5 6 8 1 1 8 8 5 0 *

COMPUTER SCIENCE 0478/22


Paper 2 Problem-solving and Programming May/June 2022

1 hour 45 minutes

You must answer on the question paper.

No additional materials are needed.

INSTRUCTIONS
● Answer all questions.
● Do not attempt Tasks 1, 2 and 3 in the copy of the pre-release material on page 2; these are for
information only.
● Use a black or dark blue pen. You may use an HB pencil for any diagrams or graphs.
● Write your name, centre number and candidate number in the boxes at the top of the page.
● Write your answer to each question in the space provided.
● Do not use an erasable pen or correction fluid.
● Do not write on any bar codes.
● Calculators must not be used in this paper.

INFORMATION
● The total mark for this paper is 50.
● The number of marks for each question or part question is shown in brackets [ ].
● No marks will be awarded for using brand names of software packages or hardware.

This document has 12 pages.

DC (PQ) 303914/4
© UCLES 2022 [Turn over
143
8

Section B

2 An algorithm allows a user to input their password and checks that there are at least eight
characters in the password. Then, the user is asked to re-input the password to check that both
inputs are the same. The user is allowed three attempts at inputting a password of the correct
length and a matching pair of passwords. The pre-defined function LEN(X) returns the number of
characters in the string, X

01 Attempt 0 ←
02 REPEAT
03 PassCheck TRUE ←
04 OUTPUT "Please enter your password "
05 INPUT Password
06 IF LEN(Password) < 8
07 THEN
08 PassCheck TRUE ←
09 ELSE
10 OUTPUT "Please re-enter your password "
11 INPUT Password2
12 IF Password <> Password
13 THEN
14 PassCheck FALSE ←
15 ENDIF
16 ENDIF
17 Attempt ←
Attempt + 1
18 UNTIL PassCheck OR Attempt <> 3
19 IF PassCheck
20 THEN
21 OUTPUT "Password success"
22 ELSE
23 OUTPUT "Password fail"
24 ENDIF

(a) Identify the three errors in the pseudocode and suggest a correction to remove each error.

Error 1 .......................................................................................................................................

Correction .................................................................................................................................

Error 2 .......................................................................................................................................

Correction .................................................................................................................................

Error 3 .......................................................................................................................................

Correction .................................................................................................................................
[3]

© UCLES 2022 0478/22/M/J/22


144
9

(b) The algorithm includes two types of check on the data input.
Identify and describe each type of check.

Type of check 1 ........................................................................................................................

Description ................................................................................................................................

...................................................................................................................................................

Type of check 2 ........................................................................................................................

Description ................................................................................................................................

...................................................................................................................................................
[4]

(c) Give two sets of test data for this algorithm and a reason for choosing each set.

Each set of test data and its reason must be different.

Set 1 .........................................................................................................................................

Reason .....................................................................................................................................

...................................................................................................................................................

Set 2 .........................................................................................................................................

Reason .....................................................................................................................................

...................................................................................................................................................
[4]

3 (a) Describe a one-dimensional array. Include an example of an array declaration.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

(b) Explain how indexing could be used to search for a value stored in a one-dimensional array.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

© UCLES 2022 0478/22/M/J/22 [Turn over


145
10

4 This algorithm checks the temperature of hot food being served to customers.
Error

START

Counter 0
Hot 0
Cold 0
Serve 0

INPUT Temp

Is Temp Yes Error


= –1? ((Hot + Cold) / Counter) * 100

No

Is Temp Yes OUTPUT


Hot Hot + 1
> 86? "Too Hot"

Counter No
Counter + 1 OUTPUT
Error
Is Temp Yes
Cold Cold + 1
< 63?
No
OUTPUT
Serve Serve + 1 "Too Cold"
END

© UCLES 2022 0478/22/M/J/22


146
11

(a) Complete the trace table for the algorithm using this input data:

75, 78, 84, 87, 91, 80, 75, 70, 65, 62, –1, 20

Counter Hot Cold Serve Temp Error OUTPUT

[7]

(b) State how the final output from the algorithm could be improved.

...................................................................................................................................................

............................................................................................................................................. [1]

(c) Identify the process in the algorithm that is not required.

...................................................................................................................................................

............................................................................................................................................. [1]

© UCLES 2022 0478/22/M/J/22 [Turn over


147
12

5 A database table, NURSE, is used to keep a record of disposable items worn by veterinary nurses.

This is part of the table:

ItemNumber Description SingleUse Uses StockLevel ReorderLevel

DIG1 Glove (pair) Y 1 500 800

DIA1 Apron Y 1 700 800

DIM5 Hair net Y 1 650 500

DIA2 Apron N 5 25 100

DIS4 Suit N 3 70 50

DIV9 Shoe cover (pair) Y 1 400 250

(a) Complete this query-by-example grid to display only the item number and the description of
single use items, where the stock level is below the reorder level.

Field:

Table:

Sort:

Show:

Criteria:

or:
[4]

(b) Give a reason why the field SingleUse is not required in the table NURSE.

...................................................................................................................................................

............................................................................................................................................. [1]

Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every
reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the
publisher will be pleased to make amends at the earliest possible opportunity.

To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge
Assessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download
at www.cambridgeinternational.org after the live examination series.

Cambridge Assessment International Education is part of Cambridge Assessment. Cambridge Assessment is the brand name of the University of Cambridge
Local Examinations Syndicate (UCLES), which is a department of the University of Cambridge.

© UCLES 2022 0478/22/M/J/22


0478/22 Cambridge IGCSE – Mark Scheme 148
May/June 2022
PUBLISHED
Question Answer Marks

Section B

2(a) One mark per mark point, max three 3


 line 8 / PassCheck  TRUE
correction PassCheck  FALSE
 line 12 / IF Password <> Password
correction IF Password2 <> Password // IF Password <> Password2
 line 18 / UNTIL PassCheck OR Attempt <> 3
correction UNTIL PassCheck OR Attempt = 3 / UNTIL PassCheck OR Attempt >= 3

2(b) One mark check, one mark matching description, max four 4
Check: validation // length check
Description length check // checks number of characters in password
Check: verification // double entry
Description double entry // comparison that two inputs are the same

2(c) One mark per set, one mark matching reason, max four 4
Set 1 – any appropriate example e.g. “small”
Reason must follow through from the password given e.g. abnormal data will be rejected
Set 2 – any different appropriate example e.g. “password” and “password”
Reason must be different and follow through from the password given e.g. normal data will be accepted

Question Answer Marks

3(a) One mark per mark point, max two 3


 a list / one column of items
 … of the same data type
 … stored under a single identifier
 … with a single index to identify each element

One mark for an example of a declaration


 example e.g. DECLARE MyArray[1:10] OF INTEGER

© UCLES 2022 Page 9 of 12


0478/22 Cambridge IGCSE – Mark Scheme 149
May/June 2022
PUBLISHED
Question Answer Marks

3(b) One mark per mark point, max two 2


 using a counter to index the array
 so that the same code can be repeatedly used to check every element // every element can be checked in a loop

Question Answer Marks

4(a) One mark for each correct column 7


Counter Hot Cold Serve Temp Error OUTPUT

0 0 0 0

1 1 75

2 2 78

3 3 84

4 1 87 Too Hot

5 2 91 Too Hot

6 4 80

7 5 75

8 6 70

9 7 65

10 1 62 Too Cold

-1 30 30

© UCLES 2022 Page 10 of 12


0478/22 Cambridge IGCSE – Mark Scheme 150
May/June 2022
PUBLISHED
Question Answer Marks

4(b)  include a message to explain the value output / e. g. “The percentage of meals not served” // 1
outputting Hot, Cold and Serve

4(c)  updating the Serve variable // Serve  Serve + 1 1

© UCLES 2022 Page 11 of 12


0478/22 Cambridge IGCSE – Mark Scheme 151
May/June 2022
PUBLISHED
Question Answer Marks

5(a) One mark per mark point, max four 4


 correct rows Field and Table
 correct row Show
 correct Criteria for SingleUse or/and Uses
 correct Criteria for StockLevel less than ReorderLevel

Field: ItemNumber Description SingleUse StockLevel

Table: NURSE NURSE NURSE NURSE

Sort:

Show:    

Criteria: True <[ReorderLevel]

or:

Or
Field: ItemNumber Description Uses StockLevel

Table: NURSE NURSE NURSE NURSE

Sort:

Show:    

Criteria: =1 <[ReorderLevel]

or:

5(b) the field Uses already shows this information // duplication of data // redundant data 1

© UCLES 2022 Page 12 of 12


152

Cambridge IGCSE™
* 6 1 0 4 1 1 8 3 2 6 *

COMPUTER SCIENCE 0478/12


Paper 1 Theory October/November 2022

1 hour 45 minutes

You must answer on the question paper.

No additional materials are needed.

INSTRUCTIONS
● Answer all questions.
● Use a black or dark blue pen. You may use an HB pencil for any diagrams or graphs.
● Write your name, centre number and candidate number in the boxes at the top of the page.
● Write your answer to each question in the space provided.
● Do not use an erasable pen or correction fluid.
● Do not write on any bar codes.
● Calculators must not be used in this paper.

INFORMATION
● The total mark for this paper is 75.
● The number of marks for each question or part question is shown in brackets [ ].
● No marks will be awarded for using brand names of software packages or hardware.

This document has 12 pages.

DC (MB) 303733/3
© UCLES 2022 [Turn over
153
2

1 A bus station has a ticket machine.

A customer can use the ticket machine to select and pay for their ticket.

One input device built into the ticket machine is a touch screen.

(a) Identify two other input devices that could be built into the ticket machine.

Input device 1 ...........................................................................................................................

Input device 2 ...........................................................................................................................


[2]

(b) The ticket machine has a help icon that a user can touch to contact customer support.

The ticket machine has an output device that allows the user to hear the customer support
person.

Identify an output device that would be used for this purpose.

............................................................................................................................................. [1]

(c) The touch screen for the ticket machine uses resistive technology.

(i) Describe how resistive touch screen technology operates to recognise a user’s touch.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [4]

© UCLES 2022 0478/12/O/N/22


154
3

(ii) Give two benefits of using resistive touch screen technology for the ticket machine.

Benefit 1 ............................................................................................................................

...........................................................................................................................................

Benefit 2 ............................................................................................................................

...........................................................................................................................................
[2]

(iii) Give two drawbacks of using resistive touch screen technology for the ticket machine.

Drawback 1 .......................................................................................................................

...........................................................................................................................................

Drawback 2 .......................................................................................................................

...........................................................................................................................................
[2]

(iv) Identify one other touch screen technology that could have been used.

..................................................................................................................................... [1]

(d) The computer in the ticket machine uses the stored program concept.

Describe the stored program concept.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

© UCLES 2022 0478/12/O/N/22 [Turn over


155
4

(e) The computer in the ticket machine has an operating system.

One function of the operating system is to provide an interface for the user.

State three other functions of the operating system.

Function 1 .................................................................................................................................

Function 2 .................................................................................................................................

Function 3 .................................................................................................................................
[3]

(f) The computer uses 12-bit binary registers to store data whilst it is being processed.

Customers are given a denary ticket number.

(i) Give the 12-bit binary value that is stored in the register for each denary ticket number.

100 ....................................................................................................................................

235 ....................................................................................................................................

301 ....................................................................................................................................

Working space

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................
[3]

© UCLES 2022 0478/12/O/N/22


156
5

(ii) Show the denary ticket number that would be given to the customer for each 12-bit binary
value.

000000010110 ...................................................................................................................

000001110111 ...................................................................................................................

001101011001 ...................................................................................................................

Working space

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................
[3]

(iii) Binary values can also be represented as hexadecimal values.

Show the hexadecimal value that represents each of the two 12-bit binary values.

000010010101 ..................................................................................................................

101011010001 ...................................................................................................................

Working space

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................
[4]

© UCLES 2022 0478/12/O/N/22 [Turn over


157
6

2 An automated water tap system uses a sensor and a microprocessor to operate. Water flows
from the tap when a person’s hands are placed underneath the tap. Water stops flowing when the
person’s hands are removed from underneath the tap.

(a) Explain how the water tap system uses a sensor and a microprocessor to operate.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [6]

(b) Three descriptions are shown of different systems.

Identify the most suitable sensor that could be used in each system.

Description of system Sensor

it checks the air is dry enough in a garage that spray paints cars

it automatically switches on the headlights on a car when it is dark

it checks that the soil in a greenhouse has the correct level of acidity

[3]

© UCLES 2022 0478/12/O/N/22


158
7

3 Five statements are shown about Random Access Memory (RAM), an internal
Solid State Drive (SSD) and a USB flash memory drive.

Tick (✓) to show which statements apply to each component. Some statements may apply to
more than one component.

Component
Internal USB flash
RAM
Statement SSD memory drive
(✓)
(✓) (✓)

it is a type of primary storage

it is volatile

it uses NAND and NOR technology

it does not have any moving parts

it is not directly connected to the


central processing unit (CPU)
[5]

4 Doris has data stored on her computer.

She accidentally loses some data by deleting a file.

State two methods she could use to help prevent accidental loss of data in this way.

Describe how each method would help prevent accidental loss of the data.

Method 1 ..........................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

Method 2 ..........................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................
[4]

© UCLES 2022 0478/12/O/N/22 [Turn over


159
8

5 8 bytes of data are transmitted from one computer to another. Each byte of data has a parity bit.

The data is also sent with a parity byte. Each bit in the parity byte allows a check to be performed
on each column of bits.

A parity check is performed on the data and an error is found in one bit. The table shows the data
that was received.

Parity
Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7 Bit 8
bit

Byte 1 0 1 0 1 0 0 1 1

Byte 2 1 0 0 1 1 1 1 1

Byte 3 1 1 1 1 1 1 0 0

Byte 4 1 1 0 1 0 1 0 1

Byte 5 1 0 0 0 1 1 1 0

Byte 6 1 1 1 0 1 0 1 1

Byte 7 1 1 0 0 1 1 0 0

Byte 8 1 1 1 1 0 0 1 1

Parity
1 0 1 1 0 1 1 1
byte

Identify which bit has an error by giving the Byte number and Bit number.

Explain how you found the error.

Byte number ..............................

Bit number .................................

Explanation ......................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................
[4]

© UCLES 2022 0478/12/O/N/22


160
9

6 Jian has a website that uses the Secure Socket Layer (SSL) protocol to make sure that data is
kept secure during transmission.

(a) Give two ways that a user could check that a website uses the SSL protocol.

1 ................................................................................................................................................

...................................................................................................................................................

2 ................................................................................................................................................

...................................................................................................................................................
[2]

(b) State the name of the updated version of the SSL protocol.

............................................................................................................................................. [1]

(c) Jian’s system for his website has a proxy server.

Explain why Jian uses a proxy server as part of the system for his website.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]

© UCLES 2022 0478/12/O/N/22 [Turn over


161
10

(d) Jian sells products using his website. He wants to create a secure login system for user
accounts.

He is worried that a user’s login details may be gathered by malware when they are logging
into their account.

(i) State the type of malware that could be used to gather a user’s login details.

..................................................................................................................................... [1]

(ii) Give three methods that could be used to help prevent a user’s login details being
gathered by malware, when they are logging into their account.

Describe how each method can help prevent this happening.

Method 1 ...........................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

Method 2 ...........................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

Method 3 ...........................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................
[6]

© UCLES 2022 0478/12/O/N/22


162
11

(e) The paragraph describes how the web pages are obtained and displayed for the user.

Complete the paragraph using the list of terms. Not all terms in the list need to be used.

• browser
• Hypertext Markup Language (HTML)
• Internet Protocol (IP) address
• Internet Service Provider (ISP)
• Media Access Control (MAC) address
• presentation
• protocols
• structure
• Uniform Resource Locator (URL)
• web pages
• web server

The browser sends the ....................................................................................... to the

Domain Name Server (DNS) that looks up the corresponding

..................................................................................... . This is returned to the browser, which

then sends a request to the ...................................................................................... where the

.......................................................................................... are stored. The website is written in

.......................................................................................... that is rendered by the

.......................................................................................... .
[6]

7 NAND, OR and XOR are three types of logic gate.

(a) Four statements are shown about the logic gates.

Tick (✓) to show which statements apply to each logic gate. Some statements may apply to
more than one logic gate.

NAND OR XOR
Statement
(✓) (✓) (✓)

if both inputs are 1, the output is 1

if both inputs are different from each other, the output is 1

if both inputs are 0, the output is 0

if both inputs are the same as each other, the output is always 0

[4]

© UCLES 2022 0478/12/O/N/22 [Turn over


163
12

(b) NAND, OR, XOR, NOR and NOT are all examples of logic gates.

State the name of one other logic gate and complete its truth table.

Logic gate .................................................... Truth table:

A B Output

0 0

0 1

1 0

1 1
[2]

Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every
reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the
publisher will be pleased to make amends at the earliest possible opportunity.

To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge
Assessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download
at www.cambridgeinternational.org after the live examination series.

Cambridge Assessment International Education is part of Cambridge Assessment. Cambridge Assessment is the brand name of the University of Cambridge
Local Examinations Syndicate (UCLES), which is a department of the University of Cambridge.

© UCLES 2022 0478/12/O/N/22


164

Question Answer Marks

1(a) Any two from: 2

• Keyboard
• Trackpad
• Trackball
• Microphone
• Keypad
• Sensor
• Button
• Barcode/QR scanner/reader
• Webcam/digital camera

1(b) Any one from: 1

• Speaker
• Headphones

1(c)(i) Any four from: 4

• The screen is made up of (two) layers/multiple layers


• The user pushes the top layer into the bottom layer // The user pushes the layers together
• The layers create a circuit (when pushed together)
• causing electricity to flow
• allowing the co-ordinates/location of the users touch to be calculated

1(c)(ii) Any two from: 2

• Cheap to manufacture/buy
• Can still be used whilst wearing gloves
• Waterproof // Can be used in bad weather
• Does not easily shatter
• Low power consumption
• (Can) support multitouch
165

Question Answer Marks

1(c)(iii) Any two from: 2

• Does not (normally) support multitouch


• Screen visibility can be poor in sunlight
• Longevity issues
• (Normally) lower resolution
• Not very sensitive to touch // Lower response time (than capacitive)
• Prone to scratches

1(c)(iv) Any one from: 1

• Capacitive
• Infrared

1(d) Any two from: 2

• Data and instructions are stored in the same memory


• and can only be fetched one at a time

1(e) Any three from: 3

• Multitasking
• Multiprogramming
• Input and output control
• Running software
• Memory management
• Processor management
• File management
• Handling interrupts
• Providing security
• Managing user accounts
• Batch / real-time processing
166

Question Answer Marks

1(f)(i) • 000001100100 3
• 000011101011
• 000100101101

1(f)(ii) • 22 3
• 119
• 857

1(f)(iii) One mark for two correct characters in the correct place, two marks for three 4

• 095
• AD1
167

Question Answer Marks

2(a) Six from: 6

• Motion/proximity/infra-red sensor is used


• Sensor sends data to microprocessor
• Data is converted from analogue to digital (using ADC)
• Data is compared to stored/set value(s)
• If data is inside range/outside range/greater than/less than, signal is sent to turn water tap on
• If data is outside range /inside range/less than/greater than, tap remains off / signal is sent to turn water tap off
• Actuator is used to turn the tap off/on
• Whole process is continuous

2(b) One mark for each correct sensor 3

Description of system Sensor

it checks the air is dry enough in a garage that spray paints Moisture/humidity
cars

it automatically switches on the headlights on a car when it is Light


dark

it checks that the soil in a greenhouse has the correct level of pH


acidity
168

Question Answer Marks

3 One mark for each correct row 5


Component

Statement RAM Internal USB flash


(✓) SSD memory drive
(✓) (✓)

it is a type of primary storage ✓

it is volatile ✓

it uses NAND and NOR technology ✓ ✓

it does not have any moving parts ✓ ✓ ✓

it is not directly connected to the ✓ ✓


Central Processing Unit (CPU)
169

Question Answer Marks

4 One mark for the method, one mark for a corresponding description 4

• Create a back-up
• this means the data can be restored/recovered
• Add verification
• to get the user to confirm they want to delete the data
• Set access rights
• so that she cannot delete any files
170

Question Answer Marks

5 One mark each for the correct byte and bit 4

• Byte 4
• Bit 5

Any two from:

• Counted all the 1s


• An even parity has been used
• Odd number of ones in that row (byte 4) and column (bit 5)
171

Question Answer Marks

6(a) Any two from: 2

• Check if web address starts with HTTPS


• Check if there is a locked padlock
• Check the digital certificate for the website

6(b) • Transport layer security // TLS 1

6(c) Any four from: 4

• To act as intermediary between browser and web server


• to filter/examine/monitor traffic to the web server
• to help stop malicious traffic to the web server
• To cache frequently viewed web pages
• to allow faster response time for requests
• to reduce the number of requests the server needs to process
• To help prevent DoS
• stopping the webserver being overloaded with requests
• by redirecting away from server // by stopping DoS attack reaching server
• To act as a firewall

6(d)(i) • Spyware 1
172

Question Answer Marks

6(d)(ii) One mark for a correct method, one mark for a corresponding description 6

• Drop down boxes


• this means that the keypresses cannot be recorded
• Onscreen/virtual keyboard
• this means that the keypresses cannot be recorded
• Biometrics // by example
• this means that the keypresses cannot be recorded
• no password entered to be gathered
• Anti-malware // anti-spyware
• this will scan for/remove any malware that could be recording keypresses
• Random/select values requested from password
• this means that full password cannot be obtained (in a single login)
• Firewall
• to prevent the download of any malware that could gather keypresses

6(e) One mark for each correct term in the correct order 6

• URL
• IP address
• Web server
• Web pages
• HTML
• Browser
173

Question Answer Marks

7(a) One mark for each correct row 4

NAND OR XOR
Statement
(✓) (✓) (✓)

if both inputs are 1, the output is 1 ✓

if both inputs are different from each other, the output is 1 ✓ ✓ ✓

if both inputs are 0, the output is 0 ✓ ✓

if both inputs are the same as each other, the output is always 0 ✓

7(b) One mark for a correct logic gate, one mark for a corresponding truth table 2

• AND
A B Output

0 0 0

0 1 0

1 0 0

1 1 1
174

Cambridge IGCSE™
* 6 4 3 7 4 4 2 5 4 7 *

COMPUTER SCIENCE 0478/22


Paper 2 Problem-solving and Programming October/November 2022

1 hour 45 minutes

You must answer on the question paper.

No additional materials are needed.

INSTRUCTIONS
● Answer all questions.
● Do not attempt Tasks 1, 2 and 3 in the copy of the pre-release material on page 2; these are for
information only.
● Use a black or dark blue pen. You may use an HB pencil for any diagrams or graphs.
● Write your name, centre number and candidate number in the boxes at the top of the page.
● Write your answer to each question in the space provided.
● Do not use an erasable pen or correction fluid.
● Do not write on any bar codes.
● Calculators must not be used in this paper.

INFORMATION
● The total mark for this paper is 50.
● The number of marks for each question or part question is shown in brackets [ ].
● No marks will be awarded for using brand names of software packages or hardware.

This document has 16 pages. Any blank pages are indicated.

DC (CJ/CB) 303988/3
© UCLES 2022 [Turn over
175
7

Section B

2 Draw a line to connect each programming concept to the most appropriate description.

Programming concept Description

carrying out an action multiple times within a loop


structure

counting

adding together the numbers in a list of numbers


repetition

tracking the number of iterations a program has


selection performed in a loop

sequence
branching off to take a course of action depending
on the answer to a question

totalling

a set of statements to be executed in order

[4]

3 Describe the use of verification on input of data when entering a list of items in stock into a
database. Explain why verification is necessary.

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

.................................................................................................................................................... [3]

4 Describe one type of test data that must be used to test if a program accepts valid input data.

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

.................................................................................................................................................... [2]

© UCLES 2022 0478/22/O/N/22 [Turn over


176
8

5 This pseudocode should allow 500 marks to be entered into the algorithm. If the mark is 80 or
greater it is stored in an array for higher marks. If the mark is less than 80, but greater than or
equal to 50 it is stored in an array for middle marks. The remaining marks are stored in an array
for lower marks. The results from the algorithm are displayed at the end.

01 HighList 0
02 MidList 0
03 LowList 0
04 MarksEntry 0
05 REPEAT
06 INPUT Mark
07 IF Mark >= 80
08 THEN
09 Higher[HighList] MarksEntry
10 HighList HighList + 1
11 ELSE
12 IF Mark >= 50
13 THEN
14 Middle[MidList] Mark
15 MidList MidList
16 ELSE
17 Lower[HighList] Mark
18 LowList LowList + 1
19 ENDIF
20 ENDIF
21 MarksEntry MarksEntry + 1
22 NEXT MarksEntry = 500
23 OUTPUT "You entered ", HighList, " higher marks"
24 OUTPUT "You entered ", MidList, " middle marks"
25 OUTPUT "You entered ", LowList, " lower marks"

(a) Identify the four errors in the pseudocode and suggest a correction for each error.

Error 1 .......................................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................

Error 2 .......................................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................

Error 3 .......................................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................

Error 4 .......................................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................
[4]
© UCLES 2022 0478/22/O/N/22
177
9

(b) The corrected algorithm needs to be changed so that any number of marks may be entered
and the algorithm runs until the user tells it to stop.

Write the new pseudocode statements that would be needed to achieve this and state where
in the algorithm they would be placed.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]

© UCLES 2022 0478/22/O/N/22 [Turn over


178
10

6 This flowchart represents an algorithm to divide three-digit numbers into hundreds, tens and units.

The pre-defined function DIV gives the value of the result of integer division, for example
Y = 9 DIV 4 gives the value Y = 2

The pre-defined function MOD gives the value of the remainder of integer division, for example
R = 9 MOD 4 gives the value R = 1

START

Counter 0

Counter Counter + 1

Yes IS
Counter > 7?

No

INPUT
Number

IS Yes
Number < 100?

No

IS Yes
Number > 999?

No

Hundreds Number DIV 100

Temp Number MOD 100

Tens Temp DIV 10

Units Number MOD 10


STOP

OUTPUT "Hundreds: ",


Hundreds, " Tens: ",
Tens, " Units: ", Units

© UCLES 2022 0478/22/O/N/22


179
11

Complete the trace table for the algorithm using this input data:

97, 876, 4320, 606, 9875, 42, 124

Counter Number Hundreds Temp Tens Units OUTPUT

[5]

© UCLES 2022 0478/22/O/N/22 [Turn over


180
12

7 A school uses a database table, ASSESS, to keep a record of the internal assessments and the
number of candidates for each of the subjects in its curriculum.

SubjectCode SubjectName Exams Practicals Candidates


COMP Computer Science 2 1 200
INFO Information Technology 1 2 200
MATH Mathematics 3 0 350
PHYS Physics 2 1 120
CHEM Chemistry 2 1 120
BIOL Biology 2 1 200
GEOG Geography 2 0 200
HIST History 2 0 250
GEOL Geology 2 0 80
PHED Physical Education 1 2 350
FREN French 2 2 120
ENGL English 2 2 350

This database only allows the data types:


• text
• number
• currency
• Boolean.

(a) (i) State the most appropriate data type for the fields SubjectCode and Exams.

SubjectCode ......................................................................................................................

Exams ...............................................................................................................................
[1]
(ii) State one reason why the Candidates field could not be of the Boolean data type.

...........................................................................................................................................

..................................................................................................................................... [1]

© UCLES 2022 0478/22/O/N/22


181
13

(b) Show the output given by the query-by-example grid.

Field: SubjectName Practicals Candidates

Table: ASSESS ASSESS ASSESS

Sort: Ascending

Show: 3 3

Criteria: <1

or:

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

(c) Complete the query-by-example grid to output the subjects with fewer than 150 candidates.
Display only the SubjectCode, SubjectName and Candidates fields in order of the number of
candidates from largest to smallest.

Field:

Table:

Sort:

Show:

Criteria:

or:
[3]

© UCLES 2022 0478/22/O/N/22


182

Question Answer Marks

Section B

2 One mark for each correct line, max four 4

Programming concept Description

carrying out an action multiple times within a


loop structure
counting

adding together the numbers in a list of


repetition numbers

selection tracking the number of iterations a program


has performed in a loop

sequence branching off to take a course of action


depending on the answer to a question

totalling
a set of statements to be executed in order
183

Question Answer Marks

3 One mark per mark point, max three 3

MP1 verification is used to make sure the items in stock do not change from the original when they are input //
verification is used to make sure the items in stock do not change from what was intended to be input //
verification is used to make sure the items are accurately copied
MP2 enter each item in stock twice / double entry // visual check
MP3 matching description of the type of check stated in MP2

Example answers
Double entry [1] enter data twice and only accept identical values [1]
Visual check [1] look at the data that has been entered and confirm it matches [1]

Question Answer Marks

4 One mark per mark point, max two 2

• type of test data …


• … description of test data

Example answers
Normal data (1) data that would be accepted by the program (1)

Boundary / extreme data (1) data that is on the acceptable limits (1)
184

Question Answer Marks

5(a) One mark per mark point, max four 4

• Line 09 / Higher[HighList]  MarksEntry


should be Higher[HighList]  Mark

• Line 15 / MidList  MidList


should be MidList  MidList + 1

• Line 17 / Lower[HighList]  Mark


should be Lower[LowList]  Mark

• Line 22 / NEXT MarksEntry = 500


should be UNTIL MarksEntry = 500

Corrected algorithm
01 HighList  0
02 MidList  0
03 LowList  0
04 MarksEntry  0
05 REPEAT
06 INPUT Mark
07 IF Mark >= 80
08 THEN
09 Higher[HighList]  Mark
10 HighList  HighList + 1
11 ELSE
12 IF Mark >= 50
13 THEN
14 Middle[MidList]  Mark
15 MidList  MidList + 1
185

Question Answer Marks

5(a) 16 ELSE
17 Lower[LowList]  Mark
18 LowList  LowList + 1
19 ENDIF
20 ENDIF
21 MarksEntry  MarksEntry + 1
22 UNTIL MarksEntry = 500
23 OUTPUT "You entered ", HighList, " higher marks"
24 OUTPUT "You entered ", MidList, " middle marks"
25 OUTPUT "You entered ", LowList, " lower marks"
186

Question Answer Marks

5(b) One mark per mark point, max four 4

MP1 Set up a condition to end the input


MP2 The correct placement of the condition
MP3 Set up the test
MP4 The correct placement of the test
MP5 Removal of MarksEntry counter from the original algorithm

Example answers

Testing at the end of the algorithm


OUTPUT "Do you want to enter another mark?"
INPUT AnotherMark
UNTIL AnotherMark = "No"
should replace line 22 at end of loop
The MarksEntry counter can be removed // Lines 4 and 21 are not required / can be removed

Testing at the beginning of the algorithm


AnotherMark = "Yes"
WHILE AnotherMark = "Yes" DO
should replace line 05 at the start of the loop
OUTPUT "Do you want to enter another mark?"
INPUT AnotherMark
ENDWHILE
should replace line 22 at end of loop
The MarksEntry counter can be removed // Lines 4 and 21 are not required / can be removed

Terminal condition
OUTPUT "Enter -1 to end the program"
should be placed before the loop and / or before the input in 06
IF MARK <> -1 THEN
should be placed between lines 06 and 07
The MarksEntry counter can be removed // Lines 4 and 21 are not required / can be removed
UNTIL Mark = -1 should be placed at line 22
187

Question Answer Marks

6 One mark per mark point, max five 5

MP1 correct Counter and Number columns


MP2 correct Hundreds column
MP3 correct Temp and Tens columns
MP4 correct Units column
MP5 correct OUTPUT column

Counter Number Hundreds Temp Tens Units OUTPUT

1 97

2 876 8 76 7 6 Hundreds: 8 Tens: 7


Units: 6

3 4320

4 606 6 6 0 6 Hundreds: 6 Tens: 0


Units: 6

5 9875

6 42

7 124 1 24 2 4 Hundreds: 1 Tens: 2


Units: 4

8
188

Question Answer Marks

7(a)(i) SubjectCode Text 1


Exams Number

Data types must match those given in the question.

7(a)(ii) The Boolean data type can only have one of two values // the Candidates field has more than two possible values. 1

7(b) One mark per mark point, max three 3


• correct data
• correct layout
• correct order

Expected answer
Geography 200
Geology 80
History 250
Mathematics 350

7(c) One mark per mark point, max three 3


• correct fieldnames and table names
• correct sort and show rows
• correct search criteria

Field: SubjectCode SubjectName Candidates

Table: ASSESS ASSESS ASSESS

Sort: Descending

Show:     

Criteria: <150

or:
189

Cambridge IGCSE™
*0123456789*

COMPUTER SCIENCE 0478/01


Paper 1 Computer Systems For examination from 2023

SPECIMEN PAPER 1 hour 45 minutes

You must answer on the question paper.

No additional materials are needed.

INSTRUCTIONS
● Answer all questions.
● Use a black or dark blue pen. You may use an HB pencil for any diagrams or graphs.
● Write your name, centre number and candidate number in the boxes at the top of the page.
● Write your answer to each question in the space provided.
● Do not use an erasable pen or correction fluid.
● Do not write on any bar codes.
● Calculators must not be used in this paper.

INFORMATION
● The total mark for this paper is 75.
● The number of marks for each question or part question is shown in brackets [ ].
● No marks will be awarded for using brand names of software packages or hardware.

This document has 12 pages. Any blank pages are indicated.

© UCLES 2020 [Turn over


190
2

1 A school network has several computers.

Each computer in the network has a media access control (MAC) address.

Hexadecimal is used for MAC addresses.

Part of a MAC address is given.

97–5C–E1

Each pair of digits is stored as binary in an 8-bit register.

(a) Complete the binary register for these two pairs of digits.

97

5C
[4]

(b) Describe what is meant by a MAC address.

....................................................................................................................................................

....................................................................................................................................................

....................................................................................................................................................

....................................................................................................................................................

....................................................................................................................................................

....................................................................................................................................................

....................................................................................................................................................

.............................................................................................................................................. [4]

(c) Give two other uses of hexadecimal in computer science.

1 .................................................................................................................................................

2 ............................................................................................................................................ [2]

© UCLES 2020 0478/01/SP/23


191
3

(d) Another value is stored as binary in a register.

0 1 0 1 0 0 1 0

(i) A logical left shift of two places is performed on the binary value.

Complete the binary register to show its contents after this logical left shift.

[1]

(ii) State one effect this logical shift has on the binary value.

............................................................................................................................................

....................................................................................................................................... [1]

(e) Negative denary numbers can also be represented as binary using two’s complement.

Complete the binary register for the denary value −54.

You must show all your working.

Working space............................................................................................................................

....................................................................................................................................................

....................................................................................................................................................

....................................................................................................................................................

Register:
[2]

© UCLES 2020 0478/01/SP/23 [Turn over


192
4

2 A company has a website that is stored on a web server.

(a) The website data is broken down into packets to be transmitted to a user.

Describe the structure of a data packet.

....................................................................................................................................................

....................................................................................................................................................

....................................................................................................................................................

....................................................................................................................................................

....................................................................................................................................................

....................................................................................................................................................

....................................................................................................................................................

............................................................................................................................................... [4]

(b) The website hosts videos that users can stream. The company uploads new videos to the
website.

(i) The videos are compressed before they are uploaded to the website.

Tick () one box to show which statement is a benefit of compressing the videos.

A Data is encrypted.

B Duration of each video will be reduced.

C Less storage space on the web server is required.

D More bandwidth is required when viewing the videos.


[1]

(ii) Give two methods of compression that could be used to compress the videos.

1 .........................................................................................................................................

2 .................................................................................................................................... [2]

© UCLES 2020 0478/01/SP/23


193
5

(iii) The company uses parallel half-duplex data transmission to transmit the data for the
new videos to the web server.

Explain why parallel half-duplex data transmission is the most appropriate method.

............................................................................................................................................

............................................................................................................................................

............................................................................................................................................

............................................................................................................................................

............................................................................................................................................

............................................................................................................................................

............................................................................................................................................

....................................................................................................................................... [4]

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

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

............................................................................................................................................

............................................................................................................................................

............................................................................................................................................

............................................................................................................................................

............................................................................................................................................

............................................................................................................................................

............................................................................................................................................

....................................................................................................................................... [4]

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

....................................................................................................................................... [1]

© UCLES 2020 0478/01/SP/23 [Turn over


194
6

3 (a) A web server has an internet protocol (IP) address.

(i) Give three characteristics of an IP address.

1 .........................................................................................................................................

2 .........................................................................................................................................

3 .................................................................................................................................... [3]

(ii) Identify the network component that uses the IP address to send data only to its correct
destination.

....................................................................................................................................... [1]

(b) The website has a uniform resource locator (URL).

An example of a URL is given.

https://www.cambridgeassessment.org.uk/index.html

Complete the table to identify the name of each section of the URL.

URL section Name


https
cambridgeassessment.org.uk
/index.html
[3]

© UCLES 2020 0478/01/SP/23


195
7

4 A computer has a Von Neumann architechure.

(a) Circle three components that are part of the central processing unit (CPU) in this computer.

accumulator (ACC) hard disk drive (HDD) memory address register (MAR)

program counter (PC) random access memory (RAM)

read only memory (ROM) sensor sold state drive (SSD)


[3]

(b) Describe the purpose of the control unit (CU) within this computer.

....................................................................................................................................................

....................................................................................................................................................

....................................................................................................................................................

............................................................................................................................................... [2]

(c) The computer has a single core CPU.

(i) State one purpose of a core in a CPU.

............................................................................................................................................

....................................................................................................................................... [1]

(ii) The computer is upgraded to a dual core CPU.

Explain how the upgrade can affect the performance of the computer.

............................................................................................................................................

............................................................................................................................................

............................................................................................................................................

....................................................................................................................................... [2]

© UCLES 2020 0478/01/SP/23 [Turn over


196
8

(d) The computer uses a bootstrap.

Tick () one box to show the part of a computer of which the bootstrap is an example.

A application software

B firmware

C hard disk drive

D MAC address
[1]

5 A programmer uses a high-level language to create a computer program.

(a) (i) Identify two advantages to the programmer of using a high-level language instead of a
low-level language.

1 .........................................................................................................................................

2 .................................................................................................................................... [2]

(ii) Suggest one disadvantage to the programmer of using a high-level language instead of
a low-level language.

....................................................................................................................................... [1]

(b) The programmer uses an integrated development environment (IDE) when creating the
computer program.

State what is meant by an IDE.

....................................................................................................................................................

............................................................................................................................................... [1]

© UCLES 2020 0478/01/SP/23


197
9

6 Robots are used in a factory to build cars.

(a) One characteristic of a robot is its mechanical structure.

State two other characteristics of a robot.

1 .................................................................................................................................................

2 ............................................................................................................................................ [2]

(b) Suggest two advantages of using robots, instead of humans, to build cars in the factory.

1 .................................................................................................................................................

2 ........................................................................................................................................... [2]

7 The Unicode character set is used to represent text that is typed into a computer.

(a) Describe what is meant by a character set.

....................................................................................................................................................

....................................................................................................................................................

....................................................................................................................................................

............................................................................................................................................... [2]

(b) One disadvantage of using the Unicode character set, instead of the ASCII character set, is
that the text stored takes up more storage space.

Give one reason why it takes up more storage space.

....................................................................................................................................................

............................................................................................................................................... [1]

© UCLES 2020 0478/01/SP/23 [Turn over


198
10

8 (a) Draw a diagram to represent how virtual memory is created and used.

[4]

(b) A student is using software to create 3D models. This process often requires the use of
virtual memory.

Explain why virtual memory is needed for this process.

....................................................................................................................................................

....................................................................................................................................................

....................................................................................................................................................

....................................................................................................................................................

....................................................................................................................................................

............................................................................................................................................... [3]

© UCLES 2020 0478/01/SP/23


199
11

9 Complete the sentences about symmetric encryption.

Use the terms from the list.

Some of the terms in the list will not be used. You should only use a term once.

algorithm cipher copied delete key plain

private public standard stolen understood unreadable

The data before encryption is known as .................................................. text.

To scramble the data, an encryption .................................................., which is a type

of .................................................., is used.

The data after encryption is known as .................................................. text.

Encryption prevents the data from being .................................................. by a hacker. [5]

10 An art gallery uses secure socket layer (SSL) to provide a secure connection when selling art on
its website.

Describe the process of SSL and explain how it provides a secure connection.

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...................................................................................................................................................... [6]

© UCLES 2020 0478/01/SP/23


0478/01 Cambridge IGCSE – Mark Scheme For examination
SPECIMEN from200
2023

Question Answer Marks


1(a) One mark per each correct four bits. 4

97 1 0 0 1 0 1 1 1

5C 0 1 0 1 1 1 0 0

1(b) Any four from: 4


• used to identify a device
• it is a unique (address)
• it is a static address // it does not change
• it is set by the manufacturer
• the first part is the manufacturer ID / number / identifies the manufacturer
• the second part is the serial number / ID.
1(c) Any two from: 2
• colour codes // colour in HTML/CSS
• error messages
• locations in memory
• memory dump // debugging
• IP(v6) address
• ASCII // Unicode
• assembly language
• URL.
1(d)(i) 1
0 1 0 0 1 0 0 0

1(d)(ii) The value becomes incorrect because the left most bits are lost. 1
1(e) One mark for method, e.g. conversion to binary then flipping and adding 1. 2
One mark for correct answer.

1 1 0 0 1 0 1 0

© UCLES 2020 Page 4 of 10


0478/01 Cambridge IGCSE – Mark Scheme For examination
SPECIMEN from201
2023

Question Answer Marks


2(a) Any four from: 4
• it has a header
• … that contains the destination address
• … that contains the packet number
• … that contains the originator’s address
• it has a payload
• it has a trailer.
2(b)(i) C 1
2(b)(ii) • lossy 2
• lossless
2(b)(iii) Any four from: 4
• parallel would allow fastest transmission
• … of the large amount of data
• data can be uploaded and downloaded …
• … but this does not have to be at the same time
• data is not required to travel a long distance
• … therefore skewing is not a problem.
2(c)(i) Any four from: 4
• multiple computers are used as bots
• designed to deny people access to a website
• a large number / numerous requests are sent (to a server) …
• … all at the same time
• the server is unable to respond / struggles to respond to all the requests
• the server fails / times out as a result.
2(c)(ii) firewall OR proxy server 1

© UCLES 2020 Page 5 of 10


0478/01 Cambridge IGCSE – Mark Scheme For examination
SPECIMEN from202
2023

Question Answer Marks


3(a)(i) Any three from: 3
• consists of values between 0–255 / 0–FFF
• values are separated by full stops / colons
• it is a unique address
• can be static or dynamic
• can be public or private
• can be IPv4 / have four groups of digits
• can be IPv6 / have eight groups of digits
• in IPv6 :: can replace groups of zeros.
3(a)(ii) router 1
3(b) One mark for each correct row. 3

URL section Name


https protocol
cambridgeassessment.org.uk domain name
/index.html web page/file name

Question Answer Marks


4(a) One mark for each correctly circled component: 3
• accumulator (ACC)
• program counter (PC)
• memory address register (MAR)
4(b) Any two from: 2
• It sends control signals
• … that manage the transfer of data and instructions within the CPU
• It decodes an instruction
• … using an instruction set
4(c)(i) Any one from: 1
• to process an instruction
• to carry out a fetch-execute cycle.

© UCLES 2020 Page 6 of 10


0478/01 Cambridge IGCSE – Mark Scheme For examination
SPECIMEN from203
2023

Question Answer Marks


4(c)(ii) • It can now process two instructions simultaneously (where suitable) 2
• … increasing the performance.
4(d) B 1

Question Answer Marks


5(a)(i) Any two from: 2
• it is easier / quicker to read/write/understand
• it is easier / quicker to debug
• code is portable.
5(a)(ii) Any one from: 1
• not able to directly manipulate the hardware
• may need to wait for translation before running
• program may be less efficient.
5(b) Software that provides useful functions for a programmer writing a computer program. 1

Question Answer Marks


6(a) • It has electrical components. 2
• It is programmable.
6(b) Any two from: 2
• more efficient than a human
• more accurate than a human
• can lift larger and heavier equipment than a human
• can replace humans working in a dangerous environment
• reduces running costs, such as wages and overheads
• can produce consistent results/output
• can work 24 hours a day // do not need to take breaks.

Question Answer Marks


7(a) • All the characters and symbols that can be represented by a computer system. 2
• Each character and symbol is assigned a unique value.
7(b) Each character is encoded using more bits. 1
© UCLES 2020 Page 7 of 10
0478/01 Cambridge IGCSE – Mark Scheme For examination
SPECIMEN from204
2023

Question Answer Marks


8(a) One mark for each part of the diagram: 4

The diagram shows:


• a hard drive
• the hard drive portioned in some way to create virtual memory
• RAM
• an indication of pages transferred between the RAM and the virtual memory.

For example:

Hard drive
RAM Transfer of pages Virtual
memory

8(b) • to extend the RAM capacity 3


• … to stop the 3D modelling software from freezing/crashing when the physical RAM is full
• to allow the computer to process the large amount of data required for 3D modelling.

Question Answer Marks


9 One mark for each correct term in the correct place. 5

plain
algorithm/key
key/algorithm
cipher
understood

© UCLES 2020 Page 8 of 10


0478/01 Cambridge IGCSE – Mark Scheme For examination
SPECIMEN from205
2023

Question Answer Marks


10 Six from: 6
• SSL is a (security) protocol.
• It encrypts any data that is sent.
• It uses/sends digital certificates …
• … which are sent to the (buyer’s/user’s) browser // requested by the (buyer’s/user’s) browser
• … that contains the gallery’s public key
• … that can be used to authenticate the gallery.
• Once the certificate is authenticated, the transaction will begin.

© UCLES 2020 Page 9 of 10


206

Cambridge IGCSE™
*0123456789*

COMPUTER SCIENCE 0478/02


Paper 2 Algorithms, Programming and Logic For examination from 2023

SPECIMEN PAPER 1 hour 45 minutes

You must answer on the question paper.

No additional materials are needed.

INSTRUCTIONS
● Answer all questions.
● Use a black or dark blue pen. You may use an HB pencil for any diagrams or graphs.
● Write your name, centre number and candidate number in the boxes at the top of the page.
● Write your answer to each question in the space provided.
● Do not use an erasable pen or correction fluid.
● Do not write on any bar codes.
● Calculators must not be used in this paper.

INFORMATION
● The total mark for this paper is 75.
● The number of marks for each question or part question is shown in brackets [ ].
● No marks will be awarded for using brand names of software packages or hardware.

This document has 16 pages. Any blank pages are indicated.

© UCLES 2020 [Turn over


207
2

1 Four pseudocode descriptions and five pseudocode statements are shown.

(a) Draw a line to link each pseudocode description to the most appropriate pseudocode
statement.

Some pseudocode statements will not be used.

Pseudocode description Pseudocode statement

FOR…TO…NEXT

a loop that will always iterate at


least once

IF…THEN…ELSE…ENDIF

a conditional statement to deal


with many possible outcomes

WHILE…DO…ENDWHILE

a loop that will always iterate a set


number of times

CASE…OF…OTHERWISE…ENDCASE

a conditional statement with


different outcomes for true and false

REPEAT…UNTIL

[4]

(b) Using a single loop, write an algorithm in pseudocode to output 50 names that have been
stored in the array, Name[]

....................................................................................................................................................

....................................................................................................................................................

....................................................................................................................................................

....................................................................................................................................................

....................................................................................................................................................

................................................................................................................................................[3]

© UCLES 2020 0478/02/SP/23


208
3

2 Describe the purpose of validation and verification checks during data entry.

Include an example for each.

Validation check.................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

Verification check...............................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................
[4]

© UCLES 2020 0478/02/SP/23 [Turn over


209
4

3 Tick () one box to show the named section of a program that performs a specific task.

A file

B function

C parameter

D process
[1]

4 A satellite navigation system is an example of a computer system that is made up of sub-systems.

Part of a satellite navigation system:


• allows the user to enter details for a new destination or select a previously saved destination
• displays directions in the form of a visual map or as a list.

Draw a structure diagram for this part of the satellite navigation system.

[4]

© UCLES 2020 0478/02/SP/23


210
5

5 An algorithm has been written in pseudocode to input some numbers. It only outputs any numbers
that are greater than or equal to 100. The number 999 is not output and stops the algorithm.

INPUT Number
WHILE Numbers <> 999 DO
IF Number > 100
THEN
OUTPUT Number
ENDIF
ENDWHILE
OUTPUT Number

(a) Identify the four errors in the pseudocode and suggest corrections.

Error 1 ........................................................................................................................................

Correction ..................................................................................................................................

....................................................................................................................................................

Error 2 ........................................................................................................................................

Correction ..................................................................................................................................

....................................................................................................................................................

Error 3 ........................................................................................................................................

Correction ..................................................................................................................................

....................................................................................................................................................

Error 4 ........................................................................................................................................

Correction ..................................................................................................................................

....................................................................................................................................................
[4]

(b) Write a pseudocode statement to change the corrected algorithm to output all numbers
between 100 and 200 inclusive.

You do not need to rewrite the whole algorithm

....................................................................................................................................................

....................................................................................................................................................

....................................................................................................................................................

............................................................................................................................................... [2]

© UCLES 2020 0478/02/SP/23 [Turn over


211
6

6 Consider this logic expression.

X = ( A AND B ) OR ( B AND NOT C )

(a) Draw a logic circuit for this logic expression.

Each logic gate must have a maximum of two inputs.

Do not simplify this logic expression.

B X

[4]

(b) Complete the truth table from the given logic expression.

Working space
A B C X

0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
[4]

© UCLES 2020 0478/02/SP/23


212
8

7 This flowchart represents an algorithm.

START

Flag  0
Count  1

IS Name[Count] Yes
> Name[Count + 1]? Temp  Name[Count]

No Name[Count]  Name[Count + 1]

Name[Count + 1]  Temp

Flag  1

Count  Count + 1

No IS Count
=4?

Yes

No IS Flag
=0?

Yes

STOP

© UCLES 2020 0478/02/SP/23


213
9

(a) The array Name[1:4] used in the flowchart contains the following data:

Name[1] Name[2] Name[3] Name[4]


Jabbar Ahmad Farhan Tanveer

Complete the trace table using the data given in the array.

Flag Count Name[1] Name[2] Name[3] Name[4] Temp

Jabbar Ahmad Farhan Tanveer

[5]

(b) Describe what the algorithm represented by the flowchart is doing.

....................................................................................................................................................

....................................................................................................................................................

....................................................................................................................................................

............................................................................................................................................... [2]

© UCLES 2020 0478/02/SP/23 [Turn over


214
10

8 A programmer has written an algorithm to check that prices are less than $10.00

These values are used as test data:

10.00 9.99 ten

State why each value was chosen as test data.

10.00 .................................................................................................................................................

...........................................................................................................................................................

9.99 ...................................................................................................................................................

...........................................................................................................................................................

ten .....................................................................................................................................................

...........................................................................................................................................................
[3]

9 Explain why a program might need to store data in a file.

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...................................................................................................................................................... [3]

10 A function is declared using pseudocode.

FUNCTION ConvertToCm(Inches: REAL) RETURNS REAL


RETURN Inches * 2.4
ENDFUNCTION

Tick () one box which accurately describes the use of the variable Inches

A answer

B call

C parameter

D response
[1]
© UCLES 2020 0478/02/SP/23
215
11

11 A database table, 2018MOV, is used to keep a record of movie details.

CatNo Title Genre1 Genre2 Blu-ray DVD Streaming


18m01 Power Rangers Adventure Fantasy Yes No Yes
18m02 Baywatch Comedy Drama Yes No Yes
18m03 Table 19 Comedy Drama Yes Yes No
18m04 Wonder Woman Action Fantasy Yes No Yes
18m05 Justice League Action Fantasy Yes Yes Yes
18m06 Twilight Thriller Action Yes Yes No
18m07 Ant Man Action Fantasy No Yes No
18m08 Venice Beach Action History No Yes No
18m12 Fast Five Action Thriller No Yes No
18m15 King Kong Adventure Fantasy No Yes No
18m16 Transformers: The Last Knight Action Sci-Fi Yes Yes Yes
18m17 The Dark Tower Fantasy Sci-Fi Yes Yes No
18m19 Beauty and the Beast Fantasy Romance Yes Yes Yes
18m21 The Mummy Action Fantasy No No Yes
18m22 Star Wars: Episode VIII Sci-Fi Action Yes No Yes
18m23 Guardians of the Galaxy Action Sci-Fi Yes Yes Yes
18m26 Thor Action Sci-Fi No Yes Yes
18m27 Twilight Fantasy Sci-Fi No No Yes
18m30 Beneath Action Fantasy Yes No No
18m31 Despicable Me Animation Action Yes Yes No

(a) State the number of records in the database table.

............................................................................................................................................... [1]

(b) (i) Give the name of the field that would be used for the primary key.

....................................................................................................................................... [1]

(ii) State the reason for choosing this field for the primary key.

............................................................................................................................................

....................................................................................................................................... [1]

© UCLES 2020 0478/02/SP/23 [Turn over


216
12

(c) Complete the table to identify the most appropriate data type for each field based on the data
shown in the database table, 2018MOV.

Field Data type

CatNo

Title

Genre1

Streaming

[2]

(d) Complete the structured query language (SQL) to return the category number and title for all
Comedy movies.

SELECT CatNo, Title

.................................................. 2018MOV

WHERE Genre1 = ..................................................;


[2]

© UCLES 2020 0478/02/SP/23


217
13

12 The variables X, Y and Z are used to store data in a program:

• X stores a string
• Y stores a position in the string (e.g. 2)
• Z stores the number of characters in the string.

(a) Write pseudocode statements to declare the variables X, Y and Z.

....................................................................................................................................................

....................................................................................................................................................

....................................................................................................................................................

....................................................................................................................................................

....................................................................................................................................................

............................................................................................................................................... [3]

(b) The function Length(X) finds the length of a string X.

The function SubString(X,Y,Z) finds a substring of X starting at position Y and Z


characters long. The first character in X is in position 1.

Write pseudocode statements to:


• store the string "Programming is fun" in X
• find the length of the string and output it
• extract the word fun from the string and output it.

....................................................................................................................................................

....................................................................................................................................................

....................................................................................................................................................

....................................................................................................................................................

....................................................................................................................................................

....................................................................................................................................................

....................................................................................................................................................

....................................................................................................................................................

....................................................................................................................................................

....................................................................................................................................................

....................................................................................................................................................

............................................................................................................................................... [6]

© UCLES 2020 0478/02/SP/23 [Turn over


218
14

13 The 1D array StudentName[] contains the names of students in a class. The 2D array
StudentMark[] contains the mark for each subject, for each student. The position of
each student’s data in the two arrays is the same, for example, the student in position 10 in
StudentName[] and StudentMark[] is the same.

The variable ClassSize contains the number of students in the class. The variable SubjectNo
contains the number of subjects studied. All students study the same number of subjects.

The arrays and variables have already been set up and the data stored.

Students are awarded a grade based on their average mark.

Average mark Grade awarded


greater than or equal to 70 distinction
greater than or equal to 55 and less than 70 merit
greater than or equal to 40 and less than 55 pass
less than 40 fail

Write a program that meets the following requirements:


• calculates the combined total mark for each student for all their subjects
• calculates the average mark for each student for all their subjects, rounded to the nearest
whole number
• outputs for each student:
– name
– combined total mark
– average mark
– grade awarded
• calculates, stores and outputs the number of distinctions, merits, passes and fails for the
whole class.

You must use pseudocode or program code and add comments to explain how your code works.

You do not need to initialise the data in the array.

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

© UCLES 2020 0478/02/SP/23


219
15

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................

...........................................................................................................................................................
© UCLES 2020 0478/02/SP/23 [Turn over
0478/02 Cambridge IGCSE – Mark Scheme For examination
SPECIMEN from220
2023

Question Answer Marks


1(a) One mark for each correct line. 4

Pseudocode description Pseudocode statement

FOR…TO…NEXT

a loop that will always iterate at


least once

IF…THEN…ELSE…ENDIF

a conditional statement to deal


with many possible outcomes

WHILE…DO…ENDWHILE

a loop that will always iterate a set


number of times

CASE…OF…OTHERWISE…ENDCASE

a conditional statement with


different outcomes for true and false

REPEAT…UNTIL

© UCLES 2020 Page 4 of 16


0478/02 Cambridge IGCSE – Mark Scheme For examination
SPECIMEN from221
2023

Question Answer Marks


1(b) • appropriate loop controls 3
• read from array
• output from array (the last two points can be in one statement, see example)

Note: reading and the output MUST be within the same loop.

For example:
Count ← 0
WHILE Count < 50 DO
OUTPUT Name[Count]
Count ← Count + 1
ENDWHILE

Question Answer Marks


2 Validation check 4

One mark for description:


• To test if the data entered is possible / reasonable / sensible.
• A range check tests that data entered fits within specified values.

One mark for example:


• Allow any correct validation check as an example (range, length, type, presence, format, etc.).

Verification check

One mark for description:


• To test if the data input is the same as the data that was intended to be input.
• A double entry check expects each item of data to be entered twice and compares both entries to check they are the
same.

One mark for example:


Allow any correct verification check as an example (visual, double entry, etc.).

© UCLES 2020 Page 5 of 16


0478/02 Cambridge IGCSE – Mark Scheme For examination
SPECIMEN from222
2023

Question Answer Marks


3 B 1

Question Answer Marks


4 One mark for a hierarchical structure. 4
One mark for suitable names for the sub-systems.
One mark for identifiable inputs.
One mark for identifiable outputs.

For example:

Satellite navigation system

Input destination Output directions

New destination Saved destination Map List

Question Answer Marks


5(a) One mark for each error identified and correction: 4
• Numbers should be Number
• IF Number > 100 should be IF Number >= 100
• INPUT Number is missing from inside the loop, insert INPUT Number after the ENDIF statement.
• The final OUTPUT Number is not needed, remove it.
5(b) One mark for both ends of the range and correct inequality symbols. 2
One mark for the AND // nested IFs.
The test should be IF Number >= 100 AND Number <= 200

© UCLES 2020 Page 6 of 16


0478/02 Cambridge IGCSE – Mark Scheme For examination
SPECIMEN from223
2023

Question Answer Marks


6(a) One mark for each correct gate, with the correct input(s) as shown. 4

B X

6(b) 4
A B C X
0 0 0 0
0 0 1 0
0 1 0 1
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 1
1 1 1 1

Four marks for eight correct outputs.


Three marks for six or seven correct outputs.
Two marks for four or five correct outputs.
One mark for two or three correct outputs.

© UCLES 2020 Page 7 of 16


0478/02 Cambridge IGCSE – Mark Scheme For examination
SPECIMEN from224
2023

Question Answer Marks


7(a) Flag Count Name[1] Name[2] Name[3] Name[4] Temp 5

Jamal Amir Eve Tara


0 1 Amir Jamal Eve Tara Jamal
1 2 Amir Eve Jamal Tara Jamal
1 3 Amir Eve Jamal Tara Jamal
1 4 Amir Eve Jamal Tara Jamal
0 1 Amir Eve Jamal Tara Jamal
0 2 Amir Eve Jamal Tara Jamal
0 3 Amir Eve Jamal Tara Jamal
0 4 Amir Eve Jamal Tara Jamal

One mark for Flag column.


One mark for Count column.
One mark for Temp column.
Two marks for all correct Name columns or one mark for two or three correct Name columns.

Note: Repeated values do not need to be written unless a value is rewritten.


7(b) • bubble sort / sorting the names 2
• ascending order / A to Z / lowest to highest / alphabetical order

Question Answer Marks


8 One mark for each. 3

10.00 boundary / abnormal data // the price should be rejected // value is out of range
9.99 boundary / extreme / normal data // the price should be accepted // value is within normal range
ten abnormal data // input should be rejected // value is wrong type

© UCLES 2020 Page 8 of 16


0478/02 Cambridge IGCSE – Mark Scheme For examination
SPECIMEN from225
2023

Question Answer Marks


9 Any three from: 3
• data is not lost when the computer is switched off // data is stored permanently
• data can be used by more than one program or reused when a program is run again
• data can be backed up or archived
• data can be transported from one place / system to another.

Question Answer Marks


10 C 1

Question Answer Marks


11(a) 20 1
11(b)(i) CatNo 1
11(b)(ii) it is a unique identifier 1
11(c) Two marks for four correct answers. 2
One mark for two or three correct answers.

Field Data type


CatNo Text
Title Text
Genre1 Text
Streaming Boolean / Text

11(d) FROM 2
"Comedy"

© UCLES 2020 Page 9 of 16


0478/02 Cambridge IGCSE – Mark Scheme For examination
SPECIMEN from226
2023

Question Answer Marks


12(a) One mark for each correct line. 3

DECLARE X : STRING
DECLARE Y : INTEGER
DECLARE Z : INTEGER
12(b) One mark for storing string in X. 6
One mark for calling the function length.
One mark for using the correct parameter X.
One mark for using the substring function.
One mark for correct parameters.
One mark for outputting length and substring return values.
For example:
X ← "Programming is fun"
OUTPUT Length(X)
Y ← 16
Z ← 3
OUTPUT SubString(X,Y,Z)

© UCLES 2020 Page 10 of 16


0478/02 Cambridge IGCSE – Mark Scheme For examination
SPECIMEN from227
2023

Question Answer Marks


13 Read the whole answer, award a mark from both of the following tables and add up the total. 15

Marks are available for:


• AO2 (maximum 9 marks)
• AO3 (maximum 6 marks).

The techniques and the data structures required are listed below. The requirements may be met using a suitable built-in
function from the programming language used (e.g. Python, VB.NET or Java).

Techniques required:
R1 Calculate total mark for each student (iteration and totalling).
R2 Calculate average mark for each student rounded to the nearest whole number.
R3 Selection of grade for each student (selection).
R4 Output for each student name, total mark, average mark, grade awarded (output with appropriate messages).
R5 Calculate, store and output the number of distinctions, merits, passes and fails for the whole class (iteration,
counting and output with appropriate messages).

Data structures required:


The names underlined must be used as provided in the scenario.

Arrays or lists StudentName, StudentMark,


(TotalMark and AverageMark may be seen but no requirement to store)

Variables ClassSize, SubjectNo, SubjectCounter, StudentCounter


DistinctionNo, MeritNo, PassNo, FailNo could be an array or list

Constants Distinction, Merit, Pass could be variables

© UCLES 2020 Page 11 of 16


0478/02 Cambridge IGCSE – Mark Scheme For examination
SPECIMEN from228
2023

Question Answer Marks


13 Example 15 mark answer in pseudocode.

// meaningful identifier names and appropriate data structures (variables, constants and the
// given arrays) to store all the data required
DECLARE TotalMark : ARRAY[1:50] OF INTEGER
DECLARE AverageMark : ARRAY[1:50] OF INTEGER
DECLARE SubjectCounter : INTEGER
DECLARE StudentCounter : INTEGER
DECLARE DistinctionNo : INTEGER
DECLARE MeritNo : INTEGER
DECLARE PassNo : INTEGER
DECLARE FailNo : INTEGER

CONSTANT Distinction = 70
CONSTANT Merit = 55
CONSTANT Pass = 40

// initialisation processes for this scenario, initialising the running totals used for
// grades and combined totals
DistinctionNo ← 0
MeritNo ← 0
PassNo ← 0
FailNo ← 0

FOR StudentCounter ← 1 to ClassSize


TotalMark[StudentCounter] ← 0
NEXT StudentCounter

// programming techniques of iteration, selection, totalling, counting and output are used

© UCLES 2020 Page 12 of 16


0478/02 Cambridge IGCSE – Mark Scheme For examination
SPECIMEN from229
2023

Question Answer Marks


13 FOR StudentCounter ← 1 to ClassSize
FOR SubjectCounter ← 1 to SubjectNo
TotalMark[StudentCounter] ← TotalMark[StudentCounter] + StudentMark[StudentCounter,
SubjectCounter]
NEXT SubjectCounter
AverageMark[StudentCounter] ← INT((TotalMark[StudentCounter] / SubjectNo) + 0.5)
OUTPUT "Name ", StudentName[StudentCounter]
OUTPUT "Combined total mark ", TotalMark[StudentCounter]
OUTPUT "Average mark ", AverageMark[StudentCounter]
IF AverageMark[StudentCounter] >= Distinction
THEN
DistinctionNo ← DistinctionNo + 1
OUTPUT "Grade Distinction"
ELSE
IF AverageMark[StudentCounter] >= Merit
THEN
MeritNo ← MeritNo + 1
OUTPUT "Grade Merit"
ELSE
IF AverageMark[StudentCounter] >= Pass
THEN
PassNo ← PassNo + 1
OUTPUT "Grade Pass"
ELSE
FailNo ← FailNo + 1
OUTPUT "Grade Fail"
ENDIF
ENDIF
ENDIF
NEXT StudentCounter

OUTPUT "Number of Distinctions ", DistinctionNo


OUTPUT "Number of Merits ", MeritNo
OUTPUT "Number of Passes ", PassNo
OUTPUT "Number of Fails ", FailNo

© UCLES 2020 Page 13 of 16


0478/12 Cambridge IGCSE – Mark Scheme 230
May/June 2023
PUBLISHED
Question Answer Marks

3(a) Any three from: 3


 A character set is used
 … such as Unicode/ASCII
 Each character has a unique binary value

3(b)(i)  It reduces the file size 1

3(b)(ii) Any four from: 4


 A compression algorithm is used
 … such as RLE/run length encoding
 Repeating words/characters/phrases are identified // Patterns are identified
 … and indexed
 … with number of occurrences
 … with their position

3(b)(iii) Any two from: 2


e.g.
 To save storage space
 To make it quicker to transmit
 To make it small enough to attach to an email
 To reduce the bandwidth needed to transmit

Question Answer Marks

4(a)(i) Two from: 2


 Data is sent one bit at a time
 A single wire is used

4(a)(ii) Any two from: 2


 Data won’t be skewed
 Less chance of interference/crosstalk/corruption/error
 Transmission speed is adequate

4(a)(iii)  The data may be transmitted quicker 1

© UCLES 2023 Page 5 of 10


0478/12 Cambridge IGCSE – Mark Scheme 231
May/June 2023
PUBLISHED
Question Answer Marks

4(b)(i)  Router 1

4(b)(ii) Any two from: 2


 A collection of servers
 … that store data in a remote location // that allows data to be accessed remotely
 … that are (normally) accessed using an internet connection

4(b)(iii) Any one from: 1


e.g.
 May be less secure // by example
 May lose access to them if internet connection lost/not available
 Reliant on a third party maintaining the hardware // by example
 Could incur an extra/ongoing fee/cost

Question Answer Marks

5(a)  C 1

5(b)(i) Any three from: 3


 It translates the (high-level language) to low-level language/object code/machine code
 It translates all the code before it is executed
 It creates an executable file

5(b)(ii) Any two from: 2


 It creates an error report after trying to compile
 … displaying all errors in the code
 … that require correction before execution can take place

© UCLES 2023 Page 6 of 10


0478/12 Cambridge IGCSE – Mark Scheme 232
May/June 2023
PUBLISHED
Question Answer Marks

5(c) Any three from: 3


e.g.
 Code editors
 Run-time environment
 Built-in interpreter
 Error diagnostics
 Auto-completion
 Auto-correction
 Prettyprint

Question Answer Marks

6(a) One mark for each correct term. 6


 Text
 Web browser // web server
 Web server // web browser
 Session
 Session
 Persistent

6(b) Any three from: 3


e.g.
 Saving personal details
 Storing login details
 Tracking user preferences
 Holding items in an online shopping cart

© UCLES 2023 Page 7 of 10


0478/12 Cambridge IGCSE – Mark Scheme 233
May/June 2023
PUBLISHED
Question Answer Marks

7(a) One mark for each part of the diagram (MAX six). 6
The diagram demonstrates:
 Malware downloaded to several computers
 … turning it into a bot/zombie
 … creating a network of bots/zombies
 Third party/hacker initiating the attack
 Bots send requests to a web server at the same time
 The web server fails due to the requests
 Legitimate requests cannot reach the web server

Initiates attack Third party

BOT

Botnet Web
Requests
server
BOT BOT

web server fails due


to too many requests
X
Malware downloaded
to computers turning Cannot connect
them into bots to web server

Computer

© UCLES 2023 Page 8 of 10


0478/12 Cambridge IGCSE – Mark Scheme 234
May/June 2023
PUBLISHED
Question Answer Marks

7(b) Any two from: 2


e.g.
 Revenge
 To affect a company’s reputation
 Entertainment value
 To demand a ransom to stop it
 To test a system’s resilience

7(c) Any two from: 2


 Proxy server
 Firewall
 Users scanning their computers with anti-malware

Question Answer Marks

8(a)  C 1

8(b) Four marks from: 4

Any FOUR from:


 It is denary based
 … with numbers between 0 and 255
 It is 32 bits
 4 sets/groups of numbers
 … separated by dots

Any TWO from:


 It is a unique address
 It can be static or dynamic
 It can be public or private
 It contains the network prefix
 … and the host number

© UCLES 2023 Page 9 of 10


0478/12 Cambridge IGCSE – Mark Scheme 235
May/June 2023
PUBLISHED
Question Answer Marks

9(a) Three from: 3


 Rule base
 Knowledge base
 Interface

9(b) Any two from: 2


 It makes decisions
 … by applying the rules/logic to the facts/knowledge …
 … to provide a result/diagnosis

Question Answer Marks

10(a) Two from: 4


 System software provides services that the computer requires
 … whereas application software provides services that the user requires

One from (system software):


 Utility software // by example e.g. defragmentation software, antivirus, firewall
 Operating system

One from (application software):


 Any suitable example of an application e.g. word processor, web browser, video-editing software

10(b)  Secondary storage // HDD // SSD 1

© UCLES 2023 Page 10 of 10


0478/22 Cambridge IGCSE – Mark Scheme 236
May/June 2023
PUBLISHED
Question Answer Marks

1 A 1

Question Answer Marks

2 One mark for each correct line 4

Logic gate Standard symbol

AND

OR

NAND

NOT

Question Answer Marks

3 One mark for each correct answer 3


 structure diagram / chart
 flowchart
 pseudocode

© UCLES 2023 Page 4 of 16


0478/22 Cambridge IGCSE – Mark Scheme 237
May/June 2023
PUBLISHED
Question Answer Marks

4(a) One mark for each point (max three). 3


 range check with acceptable values is (greater than) zero and less than 1000
 presence check to ensure the program will not continue until a value has been entered
 type/character check to ensure that a number is entered
 length check to ensure there are no more than 3 digits entered

4(b)(i) To verify the data / for verification / as a verification check // to make sure that no changes are made to the data on entry 1

4(b)(ii) One mark for each point (max three). 3


 use of iteration
 use of two inputs
 to check that the two inputs are the same / different
 use of the given variable Measurement

For example
REPEAT
OUTPUT "Please enter measurement "
INPUT Measurement
OUTPUT "Please re-enter measurement "
INPUT MeasurementCheck
UNTIL Measurement = MeasurementCheck

Question Answer Marks

5 Due to an issue with Question 5, the question has been removed from the question paper.

© UCLES 2023 Page 5 of 16


0478/22 Cambridge IGCSE – Mark Scheme 238
May/June 2023
PUBLISHED
Question Answer Marks

6 One mark for each feature and one mark for corresponding example (max six) 6
 ensuring that all identifiers have meaningful names …
 … example using Total to store a running total
 using comments to explain how the program works …
 … example // all values are zeroed before the next calculation
 using procedures and functions for the tasks within a program …
 … example CalculateInterest(Deposit, Rate)

Question Answer Marks

7(a)  07 3
 04/12 or 16/18
 02/20

7(b) One mark for each error identified and correction 3


 Line 07 Total  Total + Number * Counter
should be Total  Total + Number[Counter] * Counter
 Line 08 IF Number[Counter] = 0
should be IF Number[Counter] = -1 // should be IF Number[Counter] < 0
 Line 16 FOR Counter  0 TO 5
should be FOR Counter  1 TO 5

© UCLES 2023 Page 6 of 16


0478/22 Cambridge IGCSE – Mark Scheme 239
May/June 2023
PUBLISHED
Question Answer Marks

7(c) One mark for place in algorithm (max one) 4


 around lines 05 and 06
 line 07
 (immediately) after the input of the number

Three marks pseudocode


One mark for each point (max three)
 Use of REPEAT … UNTIL // any working loop structure
 check for >0 // >=0
 check for <10 // >9
 check for whole number
 check for -1
 check for length of digit <> 1

Example
REPEAT
OUTPUT "Enter a digit "
INPUT Number[Counter]
UNTIL Number[Counter] = Round(Number[Counter],0) AND ((Number[Counter] = -1) OR
(Number[Counter] > 0 AND Number[Counter] < 10))

© UCLES 2023 Page 7 of 16


0478/22 Cambridge IGCSE – Mark Scheme 240
May/June 2023
PUBLISHED
Question Answer Marks

8 4 marks for 8 correct outputs 4


3 marks for 6/7 correct outputs
2 marks for 4/5 correct outputs
1 mark for 2/3 correct outputs

A B C X

0 0 0 0

0 0 1 0

0 1 0 0

0 1 1 0

1 0 0 0

1 0 1 1

1 1 0 0

1 1 1 0

© UCLES 2023 Page 8 of 16


0478/22 Cambridge IGCSE – Mark Scheme 241
May/June 2023
PUBLISHED
Question Answer Marks

9(a) One mark for each column F, C and T 5


Two marks for columns X[1] to X[5] all entries correct or
One mark for columns X[1] to X[5] with one error

F C X[1] X[2] X[3] X[4] X[5] T

10 1 5 7 11

0 1 10

1 2 1 10 10

1 3 5 10 10

1 4 7 10

0 1

9(b) One mark for each point 2


 (bubble) sort data in array
 in ascending order

© UCLES 2023 Page 9 of 16


0478/22 Cambridge IGCSE – Mark Scheme 242
May/June 2023
PUBLISHED
Question Answer Marks

10(a) SongNumber 1

10(b) One mark for every two correct data types 2

Field Data Type

SongNumber Text/Alphanumeric

Title Text/Alphanumeric

Recorded Date/time

Minutes Real

10(c) One mark for each point 3


 to find the total number of minutes of music
 to find the total number of songs
 available for the genre rock

Question Answer Marks

11(a) One mark for any two correct lines 2

DECLARE P : STRING
P  "The world"
DECLARE Q : CHAR
Q  'W'

© UCLES 2023 Page 10 of 16


0478/22 Cambridge IGCSE – Mark Scheme 243
May/June 2023
PUBLISHED
Question Answer Marks

11(b) One mark for each point (max four) 4


 converting P to upper case
 finding the length of P
 using a loop to check for position of Q
 using the string operation substring
 storing the loop counter in Position if the value is found

For example:
P  UCASE(P)
Counter  1
Position  0
REPEAT
IF SUBSTRING(P, Counter, 1) = Q
THEN
Position  Counter
ENDIF
Counter  Counter + 1
UNTIL Position <> 0 OR Counter = LENGTH(P)

11(c) 5 1

© UCLES 2023 Page 11 of 16


0478/22 Cambridge IGCSE – Mark Scheme 244
May/June 2023
PUBLISHED
Question Answer Marks

12 Read the whole answer: 15


Check if each requirement listed below has been met. Requirements may be met using a suitable built-in function from the
programming language used (Python, VB.NET or Java)
Mark SEEN on script if requirement met, cross if no attempt seen, NE if partially met (see marked scripts).
Use the tables for A02 and A03 below to award a mark in a suitable band using a best fit approach
Then add up the total.
Marks are available for:
 AO2 (maximum 9 marks)
 AO3 (maximum 6 marks)

Data Structures required names shown underlined must be used as given in the scenario
Arrays or lists Account, AccDetails
Variable Size, AccountNumber

Requirements (techniques)
R1 Check account number and password (iteration and validation, selection, input, output)
R2 Display menu and make a selection (output, input and selection)
R3 Perform actions selected (use of arrays and procedures with parameters)

Example 15 mark answer in pseudocode


// Procedures to be called
PROCEDURE CheckDetails(AccID : INTEGER)
DECLARE Name, Password : STRING // local variables
Valid  FALSE
IF AccID <0 OR AccID > Size
THEN
OUTPUT "Invalid Account Number"
ELSE
OUTPUT "Please Enter Name "
INPUT Name
OUTPUT "Please Enter Password "
INPUT Password
IF Name <> Account[AccID,1] OR Password <> Account[AccID,2]
THEN
OUTPUT "Invalid name or password"
ELSE

© UCLES 2023 Page 12 of 16


0478/22 Cambridge IGCSE – Mark Scheme 245
May/June 2023
PUBLISHED
Question Answer Marks

12 Valid  True
ENDIF
ENDIF
ENDPROCEDURE

PROCEDURE Balance(AccID : INTEGER)


OUTPUT "Your balance is ", AccDetails[AccID,1]
ENDPROCEDURE

PROCEDURE WithDrawal(AccID : INTEGER)


DECLARE Amount : REAL // local variable
REPEAT
OUTPUT "Please enter amount to withdraw "
INPUT Amount
IF Amount > AccDetails[AccID,3]
THEN
OUTPUT "Amount greater than withdrawal limit"
ENDIF
IF Amount > AccDetails[AccID,2] + AccDetails[AccID,1]
THEN
OUTPUT "Amount greater than cash available"
ENDIF
IF Amount <= AccDetails[AccID,3] AND Amount < AccDetails[AccID,2] +
AccDetails[AccID,1]
THEN
AccDetails[AccID,1]  AccDetails[AccID,1] - Amount
ENDIF
UNTIL Amount<= AccDetails[AccID,3] AND Amount > AccDetails[AccID,2] +
AccDetails[AccID,1] AND Amount > 0
ENDPROCEDURE

PROCEDURE Deposit(AccID : INTEGER)


DECLARE Amount : REAL // local variable
REPEAT
OUTPUT "Please enter a positive amount to deposit "
INPUT Amount
UNTIL Amount >0
AccDetails[AccID,1]  AccDetails[AccID,1] + Amount

© UCLES 2023 Page 13 of 16


0478/22 Cambridge IGCSE – Mark Scheme 246
May/June 2023
PUBLISHED
Question Answer Marks

12 ENDPROCEDURE

// Declarations of global variables for information – not required in candidate responses


DECLARE AccountNumber, Choice : INTEGER
DECLARE Valid, Exit : BOOLEAN

OUTPUT "Please enter your account number "


INPUT AccountNumber
CheckDetails(AccountNumber)

IF Valid
THEN
REPEAT
OUTPUT "Menu"
OUTPUT "1. display balance"
OUTPUT "2. withdraw money"
OUTPUT "3. deposit money"
OUTPUT "4. exit"
OUTPUT "please choose 1, 2, 3 or 4"
INPUT Choice
CASE OF Choice
1 : Balance(AccountNumber)
2 : Withdrawal(AccountNumber)
3 : Deposit(AccountNumber)
4 : Exit  TRUE
OTHERWISE OUTPUT "Invalid choice"
ENDCASE
UNTIL Choice = 4
ELSE
OUTPUT "Invalid account number "
ENDIF

© UCLES 2023 Page 14 of 16


0478/22 Cambridge IGCSE – Mark Scheme 247
May/June 2023
PUBLISHED
Marking Instructions in italics

AO2: Apply knowledge and understanding of the principles and concepts of computer science to a given context, including the
analysis and design of computational or programming problems

0 1–3 4–6 7–9

At least one programming technique Some programming techniques used The range of programming techniques
has been used. are appropriate to the problem. used is appropriate to the problem.

Any use of selection, iteration, More than one technique seen applied All criteria stated for the scenario have
counting, totalling, input and output. to the scenario, check the list of been covered by the use of
techniques needed. appropriate programming techniques,
No creditable check the list of techniques needed.
response.
Some data has been stored but not Some of the data structures chosen The data structures chosen are
appropriately. are appropriate and store some of the appropriate and store all the data
data required. required.
Any use of variables or arrays or other
language dependent data structures More than one data structure used to The data structures used store all the
e.g. Python lists. store data required by the scenario. data required by the scenario.

© UCLES 2023 Page 15 of 16


0478/22 Cambridge IGCSE – Mark Scheme 248
May/June 2023
PUBLISHED
Marking Instructions in italics

AO3: Provide solutions to problems by:


 evaluating computer systems
 making reasoned judgements
 presenting conclusions

0 1–2 3–4 5–6

Program seen without relevant Program seen with some relevant The program has been fully
comments. comment(s). commented.

Some identifier names used are The majority of identifiers used are Suitable identifiers with names
appropriate. appropriately named. meaningful to their purpose have been
used throughout.
Some of the data structures used have Most of the data structures used have
meaningful names. meaningful names. All of the data structures used have
meaningful names.

The solution is illogical. The solution contains parts that may The program is in a logical order.
be illogical.
No creditable The solution is inaccurate in many The solution contains parts that are The solution is accurate.
response. places. inaccurate.
Solution logically performs all the tasks
Solution contains few lines of code Solution contains lines of code with given in the scenario. Ignore minor
with errors that attempt to perform a some errors that logically perform syntax errors.
task given in the scenario. tasks given in the scenario. Ignore
minor syntax errors.

The solution attempts at least one of The solution meets most of the The solution meets all the
the requirements. requirements. requirements given in the question.

Solution contains lines of code that Solution contains lines of code that Solution performs all the tasks given in
attempt at least one task given in the perform most tasks given in the the scenario.
scenario. scenario.

© UCLES 2023 Page 16 of 16


249

Cambridge IGCSE™
* 8 4 5 6 7 7 9 7 4 9 *

COMPUTER SCIENCE 0478/11


Paper 1 Computer Systems May/June 2023

1 hour 45 minutes

You must answer on the question paper.

No additional materials are needed.

INSTRUCTIONS
● Answer all questions.
● Use a black or dark blue pen. You may use an HB pencil for any diagrams or graphs.
● Write your name, centre number and candidate number in the boxes at the top of the page.
● Write your answer to each question in the space provided.
● Do not use an erasable pen or correction fluid.
● Do not write on any bar codes.
● Calculators must not be used in this paper.

INFORMATION
● The total mark for this paper is 75.
● The number of marks for each question or part question is shown in brackets [ ].
● No marks will be awarded for using brand names of software packages or hardware.

This document has 12 pages. Any blank pages are indicated.

DC (EF) 313965/2
© UCLES 2023 [Turn over
250
2

1 Binary is a number system used by computers.

(a) Tick (3) one box to show which statement about the binary number system is correct.

A It is a base 1 system

B It is a base 2 system

C It is a base 10 system

D It is a base 16 system
[1]

(b) Denary numbers are converted to binary numbers to be processed by a computer.

Convert these three denary numbers to 8‑bit binary numbers.

50 ..............................................................................................................................................

102 ............................................................................................................................................

221 ............................................................................................................................................
[3]

Working space

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

© UCLES 2023 0478/11/M/J/23


251
3

(c) Binary numbers are stored in registers.

Negative denary numbers can be represented as binary using two’s complement.

Complete the binary register for the denary number –78

You must show all your working.

Working space ..........................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Register:

[2]

(d) Two 8‑bit binary numbers are given.

Add the two 8‑bit binary numbers using binary addition.

Give your answer in binary. Show all your working.

00110011
+01100001

[3]

(e) Two binary numbers are added by a computer and an overflow error occurs.

Explain why the overflow error occurred.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

© UCLES 2023 0478/11/M/J/23 [Turn over


252
4

2 A student has a sound file that is too large to be stored on their external secondary storage device.
The student compresses the sound file to make the file size smaller.

The compression method used reduces the sample rate and the sample resolution of the sound
file.

(a) State what is meant by the sample rate and sample resolution.

Sample rate ..............................................................................................................................

...................................................................................................................................................

Sample resolution .....................................................................................................................

...................................................................................................................................................
[2]

(b) Identify which type of compression has been used to compress the sound file.

...................................................................................................................................................

............................................................................................................................................. [1]

(c) The student sends the sound file to a friend. The file is transmitted across a network that uses
packet switching.

(i) Identify two pieces of data that would be included in the header of each packet.

1 ........................................................................................................................................

2 ........................................................................................................................................
[2]

(ii) Explain how the file is transmitted using packet switching.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [5]

© UCLES 2023 0478/11/M/J/23


253
5

3 Secondary storage devices are used to store data in a computer.

(a) Circle three components that are secondary storage devices.

central processing unit (CPU) compact disk (CD)

hard disk drive (HDD) random access memory (RAM) read only memory (ROM)

register sensor solid‑state drive (SSD)

[3]

(b) Tick (3) one box to show which statement about secondary storage is correct.

A It is directly accessed by the CPU.

B It is magnetic storage only.

C It is used to permanently store software and data files.

D It is volatile.
[1]

4 Complete the statements about different types of software.

Use the terms from the list.

Some of the terms in the list will not be used. You should only use a term once.

application assembly language bootloader central processing unit (CPU)

firmware hardware operating output system user

........................................................................ software provides the services that the computer

requires; an example is utility software.

........................................................................ software is run on the operating system.

The ........................................................................ system is run on the firmware, which is run on

the ........................................................................ .
[4]

© UCLES 2023 0478/11/M/J/23 [Turn over


254
6

5 A farm has an automated drinking system for its animals. The drinking system has a water bowl
that contains the water. When the water bowl is empty, it is automatically refilled.

The system uses a sensor and a microprocessor.

(a) Identify the most appropriate sensor for this system.

............................................................................................................................................. [1]

(b) Describe how the sensor and the microprocessor are used to automatically refill the water
bowl.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [6]

© UCLES 2023 0478/11/M/J/23


255
7

6 A user wants to connect their computer to a network.

(a) (i) Identify the component in the computer that is needed to access a network.

..................................................................................................................................... [1]

(ii) Identify the type of address that is allocated to the component by the manufacturer,
which is used to uniquely identify the device.

..................................................................................................................................... [1]

(b) A dynamic internet protocol (IP) address is allocated to the computer when it is connected to
the network.

(i) Identify the device on the network that can connect multiple devices and automatically
assign them an IP address.

..................................................................................................................................... [1]

(ii) Describe what is meant by a dynamic IP address.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [3]

7 A programmer uses a low‑level language to write a computer program for a vending machine.

(a) Describe what is meant by a low‑level language.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

(b) Give two reasons why the programmer would choose to write the computer program in a
low‑level language instead of a high‑level language.

1 ................................................................................................................................................

...................................................................................................................................................

2 ................................................................................................................................................

...................................................................................................................................................
[2]
© UCLES 2023 0478/11/M/J/23 [Turn over
256
8

8 A manager at a company is concerned about a brute‑force attack on its employee user accounts.

(a) Describe how a brute‑force attack can be used to gain access to the employee user accounts.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

(b) One possible aim for carrying out a brute‑force attack is to install malware onto the company
network.

(i) State two other aims for carrying out a brute‑force attack to gain access to the employee
user accounts.

1 ........................................................................................................................................

...........................................................................................................................................

2 ........................................................................................................................................

...........................................................................................................................................
[2]

(ii) Identify three types of malware that could be installed.

1 ........................................................................................................................................

2 ........................................................................................................................................

3 ........................................................................................................................................
[3]

(c) Give two security solutions that could be used to help prevent a brute‑force attack being
successful.

1 ................................................................................................................................................

...................................................................................................................................................

2 ................................................................................................................................................

...................................................................................................................................................
[2]

© UCLES 2023 0478/11/M/J/23


257
9

9 A company uses robots in its factory to manufacture large pieces of furniture.

(a) One characteristic of a robot is that it is programmable.

State two other characteristics of a robot.

1 ................................................................................................................................................

...................................................................................................................................................

2 ................................................................................................................................................

...................................................................................................................................................
[2]

(b) Give two advantages to company employees of using robots to manufacture large pieces of
furniture.

1 ................................................................................................................................................

...................................................................................................................................................

2 ................................................................................................................................................

...................................................................................................................................................
[2]

(c) Give one disadvantage to the company’s owners of using robots to manufacture large pieces
of furniture.

...................................................................................................................................................

............................................................................................................................................. [1]

© UCLES 2023 0478/11/M/J/23 [Turn over


258
10

10 A student uses the internet for their schoolwork to research what is meant by pharming.

(a) State the aim of pharming.

...................................................................................................................................................

............................................................................................................................................. [1]

(b) Draw and annotate a diagram to represent the process of pharming.

[4]

(c) The student uses a web browser to access data on the internet.

Explain the purpose of the web browser.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

© UCLES 2023 0478/11/M/J/23


259
11

(d) Storing cookies is one function of the web browser.

Give three other functions of the web browser.

1 ................................................................................................................................................

...................................................................................................................................................

2 ................................................................................................................................................

...................................................................................................................................................

3 ................................................................................................................................................

...................................................................................................................................................
[3]

(e) A student visits a website that uses session cookies, instead of persistent cookies.

Explain the difference between session cookies and persistent cookies.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]

© UCLES 2023 0478/11/M/J/23


0478/11 Cambridge IGCSE – Mark Scheme 260
May/June 2023
PUBLISHED
GENERIC MARKING PRINCIPLE 5:

Marks should be awarded using the full range of marks defined in the mark scheme for the question (however; the use of the full mark range may
be limited according to the quality of the candidate responses seen).

GENERIC MARKING PRINCIPLE 6:

Marks awarded are based solely on the requirements as defined in the mark scheme. Marks should not be awarded with grade thresholds or
grade descriptors in mind.

Mark scheme abbreviations

/ separates alternative words / phrases within a marking point


// separates alternative answers within a marking point
underline actual word given must be used by candidate (grammatical variants accepted)
max indicates the maximum number of marks that can be awarded
() the word / phrase in brackets is not required, but sets the context

Note: No marks are awarded for using brand names of software packages or hardware.

© UCLES 2023 Page 3 of 10


0478/11 Cambridge IGCSE – Mark Scheme 261
May/June 2023
PUBLISHED
Question Answer Marks

1(a)  B 1

1(b) One mark per each correct conversion 3

 00110010
 01100110
 11011101

1(c) One mark for full method of working e.g. conversion to binary then flipping and adding 1 2
One mark for correct answer

 10110010

1(d) One marks per each correct nibble 3


One mark for correct working in binary (showing 4 correct carries)

1 1 11
0 0 1 1 0 0 1 1
0 1 1 0 0 0 0 1

10 0 1 0100

1(e) Two from: 2


 The result of the calculation is greater than 255 // The value generated is larger than can be stored in the register
 The result of the calculation would require more than 8 bits to be represented // A register has a predetermined
number of bits and there are too many bits for it

© UCLES 2023 Page 4 of 10


0478/11 Cambridge IGCSE – Mark Scheme 262
May/June 2023
PUBLISHED
Question Answer Marks

2(a) One mark for each correct definition: 2


 The sample rate is the number of samples taken in a second/per time unit
 The sample resolution is the number of bits per sample

2(b)  Lossy compression 1

2(c)(i) Any two from: 2


e.g.
 Destination/receivers (IP) address
 Packet number
 Originator’s/senders (IP) address

2(c)(ii) Any five from: 5


 Data is broken/split/divided into packets
 Each packet (could) take a different route
 A router controls the route/path a packet takes
 … selecting the shortest/fastest available route/path
 Packets may arrive out of order
 Once the last packet has arrived, packets are reordered
 If a packet is missing/corrupted, it is requested again

Question Answer Marks

3(a) One mark for each correctly circled storage device: 3


 Compact disk (CD)
 Solid-state drive (SSD)
 Hard disk drive (HDD)

3(b)  C 1

© UCLES 2023 Page 5 of 10


0478/11 Cambridge IGCSE – Mark Scheme 263
May/June 2023
PUBLISHED
Question Answer Marks

4 One mark for each correct term in the correct place: 4


 System
 Application
 Operating
 Hardware

Question Answer Marks

5(a) Any one from: 1


 Level
 Pressure
 Moisture

5(b) Any Six from: 6


 Sensor continually sends digitised data to microprocessor
 Microprocessor compares data to stored value(s)
 If value is outside range / matches microprocessor sends signal to release water to refill water bowl
 … bowl filled by set amount // bowl filled for certain time
 Actuator used to release water
 Whole process repeats until turned off/stopped

Question Answer Marks

6(a)(i)  Network interface card/controller // NIC // WNIC 1

6(a)(ii)  Media access control/MAC address // MAC 1

6(b)(i)  Router 1

6(b)(ii) Three from: 3


 It can be used to uniquely identify a device (on a network)
 It can change …
 … each time the device is connected to the network

© UCLES 2023 Page 6 of 10


0478/11 Cambridge IGCSE – Mark Scheme 264
May/June 2023
PUBLISHED
Question Answer Marks

7(a) Any two from: 2


 Close to the language processed by computers
 May use mnemonics
 An example is assembly language/machine code

7(b) Any two from: 2


 Can directly manipulate the hardware
 No requirement for the program to be portable
 Program will be more memory efficient
 No requirement for a compiler/interpreter
 Quicker to execute
 Can use specialised hardware

Question Answer Marks

8(a) Three from: 3


 Trial and error to guess a password
 Combinations are repeatedly entered …
 … until correct password is found
 Can be carried out manually or automatically by software

8(b)(i) Any two from: 2


e.g.
 Steal/view/access data
 Delete data
 Change data
 Lock account // Encrypt data
 Damage reputation of a business

© UCLES 2023 Page 7 of 10


0478/11 Cambridge IGCSE – Mark Scheme 265
May/June 2023
PUBLISHED
Question Answer Marks

8(b)(ii) Any three from: 3


e.g.
 Virus
 Worm
 Trojan horse
 Spyware
 Adware
 Ransomware

8(c) Any two from: 2


 Two-step verification//Two-factor authentication//by example
 Biometrics
 Firewall // Proxy-server
 Strong/complex password // by example
 Setting a limit for login attempts
 Drop-down boxes
 Request for partial entry of password

Question Answer Marks

9(a) Any two from: 2


 It has a mechanical structure/framework
 It has electrical components // by example

9(b) Any two from: 2


e.g.
 Employees don’t need to lift heavy furniture
 Employees can be protected from dangerous tasks
 Employees can utilise their skills in other tasks
 Employees don’t need to perform repetitive/mundane tasks

© UCLES 2023 Page 8 of 10


0478/11 Cambridge IGCSE – Mark Scheme 266
May/June 2023
PUBLISHED
Question Answer Marks

9(c) Any one from: 1


e.g.
 Expensive to install/purchase/setup
 High ongoing costs/maintenance costs
 May deskill the workforce
 If they malfunction, production may stop

Question Answer Marks

10(a)  To obtain personal data/details // by example 1

10(b) One mark for each correct part of the diagram. 4


Diagram shows:
 User clicks/opens attachment/link that triggers download
 Malicious software downloaded onto user's computer
 User enters website address
 User is redirected to fake website

e.g.
User types in
web address
User
Real
computer
website
malware

Fake
Request website
gets
User clicks link that redirected
downloads malware
to computer

© UCLES 2023 Page 9 of 10


0478/11 Cambridge IGCSE – Mark Scheme 267
May/June 2023
PUBLISHED
Question Answer Marks

10(c) Two from: 2


Displays web pages
… by rendering HTML

10(d) Any three from: 3


e.g.
 Storing bookmarks/favourites
 Recording user history
 Allowing use of multiple tabs
 Providing navigation tools // by example
 Providing an address bar
 Managing protocols // by example // checking digital certificate
 Send URL to DNS
 Sends a request to the IP address/web server (to obtain the contents of a webpage)
 Runs active script/JavaScript/client-side script
 Allows files to be downloaded from website/internet

10(e) Any four from: 4


 Session cookies are stored in memory/RAM
 … whereas persistent cookies are stored on the hard drive/secondary storage
 When the browser is closed a session cookie is lost
 … whereas a persistent cookie is not lost
 … until deleted by the user/they expire

© UCLES 2023 Page 10 of 10


268

Cambridge IGCSE™
* 8 1 0 7 6 2 2 0 5 5 *

COMPUTER SCIENCE 0478/12


Paper 1 Computer Systems May/June 2023

1 hour 45 minutes

You must answer on the question paper.

No additional materials are needed.

INSTRUCTIONS
● Answer all questions.
● Use a black or dark blue pen. You may use an HB pencil for any diagrams or graphs.
● Write your name, centre number and candidate number in the boxes at the top of the page.
● Write your answer to each question in the space provided.
● Do not use an erasable pen or correction fluid.
● Do not write on any bar codes.
● Calculators must not be used in this paper.

INFORMATION
● The total mark for this paper is 75.
● The number of marks for each question or part question is shown in brackets [ ].
● No marks will be awarded for using brand names of software packages or hardware.

This document has 12 pages. Any blank pages are indicated.

DC (EF) 313966/2
© UCLES 2023 [Turn over
269
2

1 Output devices are used to output data from a computer.

Circle three devices that are output devices.

actuator digital versatile disk (DVD) keyboard

microphone mouse printer scanner

sensor solid‑state drive (SSD) speaker


[3]

2 Binary numbers can be converted to hexadecimal.

(a) Convert the two binary numbers to hexadecimal.

10010011 ..................................................................................................................................

00001101 ..................................................................................................................................
[4]

Working space

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

(b) A value is stored as a binary number in a register.

0 1 1 1 1 0 1 0

A logical right shift of three places is performed on the binary number.

(i) Complete the binary register to show its contents after this logical right shift.

[1]

(ii) State one effect this logical shift has on the binary number.

...........................................................................................................................................

..................................................................................................................................... [1]

© UCLES 2023 0478/12/M/J/23


270
3

(c) Give two reasons why a programmer may use hexadecimal to represent binary numbers.

1 ................................................................................................................................................

...................................................................................................................................................

2 ................................................................................................................................................

...................................................................................................................................................
[2]

(d) Denary numbers can also be converted to hexadecimal.

Convert the denary number to hexadecimal.

301 ...................................................................................................................................... [2]

Working space

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

© UCLES 2023 0478/12/M/J/23 [Turn over


271
4

3 When keys are pressed on a keyboard, the text is converted to binary to be processed by the
computer.

(a) Describe how the text is converted to binary to be processed by the computer.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

(b) Text that is input into a computer can be stored in a text file.

A text file can be compressed using lossless compression.

(i) State what effect this has on the file size.

...........................................................................................................................................

..................................................................................................................................... [1]

(ii) Describe how lossless compression compresses the text file.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [4]

(iii) Give two reasons why the text file may have been compressed.

1 ........................................................................................................................................

...........................................................................................................................................

2 ........................................................................................................................................

...........................................................................................................................................
[2]

© UCLES 2023 0478/12/M/J/23


272
5

4 A student uses a mobile phone to take photographs for a school project.

The student needs to transmit the photographs to their computer. They could use serial data
transmission or parallel data transmission to transmit the photographs.

(a) (i) Describe how the photographs would be transmitted using serial data transmission.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

(ii) Give two benefits of transmitting the photographs using serial data transmission.

1 ........................................................................................................................................

...........................................................................................................................................

2 ........................................................................................................................................

...........................................................................................................................................
[2]

(iii) State one benefit of the student using parallel data transmission instead of serial data
transmission.

...........................................................................................................................................

..................................................................................................................................... [1]

(b) The photographs are also transmitted across a network to cloud storage. A device on the
network forwards the data towards its correct destination.

(i) State the name of this device.

..................................................................................................................................... [1]

(ii) Describe what is meant by cloud storage.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

(iii) Give one disadvantage of storing the photographs in cloud storage instead of storing
them locally.

...........................................................................................................................................

..................................................................................................................................... [1]
© UCLES 2023 0478/12/M/J/23 [Turn over
273
6

5 A programmer writes a computer program using a high‑level language.

(a) Tick (3) one box to show which statement is correct about writing computer programs in a
high‑level language.

A Mnemonics are used to create instructions.

B The computer program is harder to debug than a low‑level language program.

C The computer program is machine independent.

D The hardware of the computer can be directly manipulated.


[1]

(b) The programmer uses a compiler to translate the computer program.

(i) Describe how the compiler translates the computer program.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [3]

(ii) Describe how the compiler reports errors.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

(c) The programmer uses an integrated development environment (IDE) to create the computer
program.

One function of the IDE is that it has the built‑in compiler.

Give three other common functions of an IDE.

1 ................................................................................................................................................

2 ................................................................................................................................................

3 ................................................................................................................................................
[3]

© UCLES 2023 0478/12/M/J/23


274
7

6 (a) Complete the statements about cookies.

Use the terms from the list.

Some of the terms in the list will not be used. Some terms may be used more than once.

compression executable hypertext markup language (HTML)

hypertext transfer protocol (HTTP) image internet protocol (IP) address

persistent session sound text

uniform resource locater (URL) web browser web server

Cookies are small ........................................................... files that are sent between a

........................................................... and a ........................................................... .

........................................................... cookies are stored in memory and not in the user’s

secondary storage.

When the web browser is closed a ........................................................... cookie is lost,

whereas a ........................................................... cookie is not lost.


[6]

(b) Give three functions of a cookie.

1 ................................................................................................................................................

2 ................................................................................................................................................

3 ................................................................................................................................................
[3]

© UCLES 2023 0478/12/M/J/23 [Turn over


275
8

7 A distributed denial of service attack (DDoS) is a cyber security threat.

(a) Draw and annotate a diagram to represent the process of a DDoS.

[6]

© UCLES 2023 0478/12/M/J/23


276
9

(b) State two aims of carrying out a DDoS attack.

1 ................................................................................................................................................

...................................................................................................................................................

2 ................................................................................................................................................

...................................................................................................................................................
[2]

(c) Give two security solutions that can be used to help prevent a DDoS attack being successful.

1 ................................................................................................................................................

...................................................................................................................................................

2 ................................................................................................................................................

...................................................................................................................................................
[2]

8 A computer is connected to a network and assigned an IPv4 address.

(a) Tick (3) one box to show which device would assign the IPv4 address to the computer.

A Domain name server (DNS)

B Network interface card (NIC)

C Router

D Web server
[1]

(b) Describe the characteristics of an IPv4 address.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]

© UCLES 2023 0478/12/M/J/23 [Turn over


277
10

9 One component of an expert system is the inference engine.

(a) Identify the three other components in an expert system.

1 ................................................................................................................................................

2 ................................................................................................................................................

3 ................................................................................................................................................
[3]

(b) Describe the role of the inference engine in an expert system.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

© UCLES 2023 0478/12/M/J/23


278
11

10 A user has both system software and application software installed on their computer.

(a) Describe the difference between system software and application software.

Give an example of each software in your answer.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]

(b) State which component in the computer would store both types of software when the power is
turned off.

............................................................................................................................................. [1]

© UCLES 2023 0478/12/M/J/23


0478/12 Cambridge IGCSE – Mark Scheme 279
May/June 2023
PUBLISHED
GENERIC MARKING PRINCIPLE 5:

Marks should be awarded using the full range of marks defined in the mark scheme for the question (however; the use of the full mark range may
be limited according to the quality of the candidate responses seen).

GENERIC MARKING PRINCIPLE 6:

Marks awarded are based solely on the requirements as defined in the mark scheme. Marks should not be awarded with grade thresholds or
grade descriptors in mind.

Mark scheme abbreviations

/ separates alternative words / phrases within a marking point


// separates alternative answers within a marking point
underline actual word given must be used by candidate (grammatical variants accepted)
max indicates the maximum number of marks that can be awarded
() the word / phrase in brackets is not required, but sets the context

Note: No marks are awarded for using brand names of software packages or hardware.

© UCLES 2023 Page 3 of 10


0478/12 Cambridge IGCSE – Mark Scheme 280
May/June 2023
PUBLISHED
Question Answer Marks

1 One mark for each correct device: 3


 Actuator
 Printer
 Speaker

Question Answer Marks

2(a) One mark per each correct character in the correct order: 4
 9
 3

 0
 D

2(b)(i)  00001111 1

2(b)(ii) Any one from: 1


 The value becomes incorrect/inaccurate as the right most bits are lost
 It is divided by 8

2(c) Any two from: 2


 Easier/quicker to understand/read/write
 Easier/quicker to debug
 Less likely to make a mistake
 Shorter representation // Takes up less screen space

2(d) One mark for two correct characters, two marks for three correct characters in the correct order: 2
 1
 2
 D

© UCLES 2023 Page 4 of 10


0478/12 Cambridge IGCSE – Mark Scheme 281
May/June 2023
PUBLISHED
Question Answer Marks

3(a) Any three from: 3


 A character set is used
 … such as Unicode/ASCII
 Each character has a unique binary value

3(b)(i)  It reduces the file size 1

3(b)(ii) Any four from: 4


 A compression algorithm is used
 … such as RLE/run length encoding
 Repeating words/characters/phrases are identified // Patterns are identified
 … and indexed
 … with number of occurrences
 … with their position

3(b)(iii) Any two from: 2


e.g.
 To save storage space
 To make it quicker to transmit
 To make it small enough to attach to an email
 To reduce the bandwidth needed to transmit

Question Answer Marks

4(a)(i) Two from: 2


 Data is sent one bit at a time
 A single wire is used

4(a)(ii) Any two from: 2


 Data won’t be skewed
 Less chance of interference/crosstalk/corruption/error
 Transmission speed is adequate

4(a)(iii)  The data may be transmitted quicker 1

© UCLES 2023 Page 5 of 10


0478/12 Cambridge IGCSE – Mark Scheme 282
May/June 2023
PUBLISHED
Question Answer Marks

4(b)(i)  Router 1

4(b)(ii) Any two from: 2


 A collection of servers
 … that store data in a remote location // that allows data to be accessed remotely
 … that are (normally) accessed using an internet connection

4(b)(iii) Any one from: 1


e.g.
 May be less secure // by example
 May lose access to them if internet connection lost/not available
 Reliant on a third party maintaining the hardware // by example
 Could incur an extra/ongoing fee/cost

Question Answer Marks

5(a)  C 1

5(b)(i) Any three from: 3


 It translates the (high-level language) to low-level language/object code/machine code
 It translates all the code before it is executed
 It creates an executable file

5(b)(ii) Any two from: 2


 It creates an error report after trying to compile
 … displaying all errors in the code
 … that require correction before execution can take place

© UCLES 2023 Page 6 of 10


0478/12 Cambridge IGCSE – Mark Scheme 283
May/June 2023
PUBLISHED
Question Answer Marks

5(c) Any three from: 3


e.g.
 Code editors
 Run-time environment
 Built-in interpreter
 Error diagnostics
 Auto-completion
 Auto-correction
 Prettyprint

Question Answer Marks

6(a) One mark for each correct term. 6


 Text
 Web browser // web server
 Web server // web browser
 Session
 Session
 Persistent

6(b) Any three from: 3


e.g.
 Saving personal details
 Storing login details
 Tracking user preferences
 Holding items in an online shopping cart

© UCLES 2023 Page 7 of 10


0478/12 Cambridge IGCSE – Mark Scheme 284
May/June 2023
PUBLISHED
Question Answer Marks

7(a) One mark for each part of the diagram (MAX six). 6
The diagram demonstrates:
 Malware downloaded to several computers
 … turning it into a bot/zombie
 … creating a network of bots/zombies
 Third party/hacker initiating the attack
 Bots send requests to a web server at the same time
 The web server fails due to the requests
 Legitimate requests cannot reach the web server

Initiates attack Third party

BOT

Botnet Web
Requests
server
BOT BOT

web server fails due


to too many requests
X
Malware downloaded
to computers turning Cannot connect
them into bots to web server

Computer

© UCLES 2023 Page 8 of 10


0478/12 Cambridge IGCSE – Mark Scheme 285
May/June 2023
PUBLISHED
Question Answer Marks

7(b) Any two from: 2


e.g.
 Revenge
 To affect a company’s reputation
 Entertainment value
 To demand a ransom to stop it
 To test a system’s resilience

7(c) Any two from: 2


 Proxy server
 Firewall
 Users scanning their computers with anti-malware

Question Answer Marks

8(a)  C 1

8(b) Four marks from: 4

Any FOUR from:


 It is denary based
 … with numbers between 0 and 255
 It is 32 bits
 4 sets/groups of numbers
 … separated by dots

Any TWO from:


 It is a unique address
 It can be static or dynamic
 It can be public or private
 It contains the network prefix
 … and the host number

© UCLES 2023 Page 9 of 10


0478/12 Cambridge IGCSE – Mark Scheme 286
May/June 2023
PUBLISHED
Question Answer Marks

9(a) Three from: 3


 Rule base
 Knowledge base
 Interface

9(b) Any two from: 2


 It makes decisions
 … by applying the rules/logic to the facts/knowledge …
 … to provide a result/diagnosis

Question Answer Marks

10(a) Two from: 4


 System software provides services that the computer requires
 … whereas application software provides services that the user requires

One from (system software):


 Utility software // by example e.g. defragmentation software, antivirus, firewall
 Operating system

One from (application software):


 Any suitable example of an application e.g. word processor, web browser, video-editing software

10(b)  Secondary storage // HDD // SSD 1

© UCLES 2023 Page 10 of 10


287

Cambridge IGCSE™
* 4 6 2 4 3 2 5 5 3 0 *

COMPUTER SCIENCE 0478/13


Paper 1 Computer Systems May/June 2023

1 hour 45 minutes

You must answer on the question paper.

No additional materials are needed.

INSTRUCTIONS
● Answer all questions.
● Use a black or dark blue pen. You may use an HB pencil for any diagrams or graphs.
● Write your name, centre number and candidate number in the boxes at the top of the page.
● Write your answer to each question in the space provided.
● Do not use an erasable pen or correction fluid.
● Do not write on any bar codes.
● Calculators must not be used in this paper.

INFORMATION
● The total mark for this paper is 75.
● The number of marks for each question or part question is shown in brackets [ ].
● No marks will be awarded for using brand names of software packages or hardware.

This document has 12 pages.

DC (CJ) 313967/3
© UCLES 2023 [Turn over
288
2

1 Computers store data as binary. The binary number 10101110 is stored.

(a) Convert the binary number to denary.

............................................................................................................................................. [1]

Working space

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

(b) Convert the binary number to hexadecimal.

............................................................................................................................................. [2]

Working space

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

(c) A logical left shift of three places is performed on the binary number.

(i) Give the 8-bit binary number that would be stored after this logical left shift.

..................................................................................................................................... [1]

(ii) Tick (3) one box to show which statement is true about the impact the logical left binary
shift would have on the binary number.

A The least significant bits are lost.

B The most significant bits are lost.

C The number has been divided by six.

D The number stays the same.


[1]

© UCLES 2023 0478/13/M/J/23


289
3

(d) Add the two 8-bit binary numbers 11101110 and 00110001 using binary addition.

Give your answer in binary. Show all your working.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]

(e) The denary number 301 needs to be stored.

Calculate the least number of bits that can be used to store the denary number 301.

............................................................................................................................................. [1]

Working space

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

(f) The hexadecimal number A4D needs to be stored.

Calculate the least number of bits that can be used to store the hexadecimal number A4D.

............................................................................................................................................. [1]

Working space

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

© UCLES 2023 0478/13/M/J/23 [Turn over


290
4

2 A library has a self-checkout system that allows customers to register books that they want to
borrow.

The self-checkout system has a central processing unit (CPU).

The CPU has two cores.

(a) State the purpose of a core in the CPU.

...................................................................................................................................................

............................................................................................................................................. [1]

(b) The CPU is replaced with one that has four cores.

Explain the effect this has on the performance of the self-checkout system.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

(c) The CPU contains registers and buses.

(i) Describe the role of a register in the CPU.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

(ii) Identify one bus that can be found in the CPU and explain its purpose in the
fetch–decode–execute cycle.

Bus ....................................................................................................................................

Purpose .............................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................
[3]

© UCLES 2023 0478/13/M/J/23


291
5

(d) The self-checkout system allows the user to input their library membership number.

Give two appropriate input devices that would allow the user to do this.

1 ................................................................................................................................................

2 ................................................................................................................................................
[2]

(e) The self-checkout system uses a monitor to display information about the book.

Users who are blind also need to use the self-checkout system.

Give an appropriate output device that would allow a blind user to be given this information.

............................................................................................................................................. [1]

(f) The self-checkout system uses two types of primary storage.

Circle two types of primary storage that would be used in the system.

compact disk (CD) digital versatile disk (DVD)

hard disk drive (HDD) random access memory (RAM)

read only memory (ROM) universal serial bus (USB) flash memory drive
[2]

(g) The self-checkout system is linked to a stock control system that is updated every time a
book is borrowed from the library.

A microprocessor is used in the stock control system to update the stock.

Explain the role of the microprocessor in this system and how it is used to update the stock
when a book is borrowed.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

© UCLES 2023 0478/13/M/J/23 [Turn over


292
6

3 Five network terms or definitions are given in the table.

Complete the table by giving the missing term or definition.

Term Definition

.............................................................................................

.............................................................................................
router
.............................................................................................

.............................................................................................

This address is assigned by the network and used to


identify a device on a network.
.............................................................

.............................................................................................

.............................................................................................
network interface card (NIC)
.............................................................................................

.............................................................................................

This address is assigned by the manufacturer and is used


to uniquely identify the device.
.............................................................

This can be hardware or software based and filters traffic


coming into and out of a network.
.............................................................
[5]

© UCLES 2023 0478/13/M/J/23


293
7

4 A programmer writes a computer program in a high-level language.

(a) Tick (3) one box to show which statement is a benefit of writing a program in a high-level
language, instead of a low-level language.

A The program can directly manipulate the hardware.

B The program is machine independent.

C The program is more memory efficient.

D The program is quicker to execute.


[1]

(b) Translators are used to translate the high-level language so that it can be processed by the
computer.

(i) State what the high-level language is translated into.

..................................................................................................................................... [1]

(ii) One translator converts and executes the code line by line.

Identify which type of translator would do this.

..................................................................................................................................... [1]

(iii) One translator creates an error report displaying all the errors in the code before it can
be executed.

Identify which type of translator would do this.

..................................................................................................................................... [1]

(iv) One translator creates an executable file.

Identify which type of translator would do this.

..................................................................................................................................... [1]

© UCLES 2023 0478/13/M/J/23 [Turn over


294
8

5 Complete and annotate the diagram to demonstrate how packet switching is used to transmit data
across a network, including the use of routers, from Device A to Device B.

Device A Device B

[4]

6 A student is writing a help guide about how to recognise and avoid the cyber-security threat of
pharming.

(a) Give three appropriate solutions he could include.

1 ................................................................................................................................................

...................................................................................................................................................

2 ................................................................................................................................................

...................................................................................................................................................

3 ................................................................................................................................................

...................................................................................................................................................
[3]

© UCLES 2023 0478/13/M/J/23


295
9

(b) The student also wants to include information in the help guide about the use of social
engineering as a cyber-security threat.

Describe what is meant by social engineering.

Include one example of social engineering in your answer.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

(c) The student includes information about the security solution of access levels.

Describe what is meant by access levels.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

7 The rule base and the inference engine are two components of an expert system.

(a) Identify the other two components of an expert system.

1 ................................................................................................................................................

2 ................................................................................................................................................
[2]

(b) Describe the role of the rule base in an expert system.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

© UCLES 2023 0478/13/M/J/23 [Turn over


296
10

8 Complete the statements about a distributed denial of service (DDoS) attack.

Use the terms from the list.

Some of the terms in the list will not be used. You should only use a term once.

anti-virus bot botnet hacker

internet malware secondary storage

spyware web browser web server website

The attacker encourages people to download ...................................................................... onto

their computer. This will turn each computer into a ...................................................................... ,

creating a network called a ...................................................................... .

When the attacker wants the DDoS to take place, repeated requests are simultaneously sent from

the computers to a ...................................................................... . This causes it to crash, meaning

that users can no longer access the ...................................................................... that is stored on

this hardware.
[5]

9 A device can be given an internet protocol (IP) address. This can be an IPv4 or IPv6.

(a) Give one similarity between IPv4 and IPv6.

...................................................................................................................................................

............................................................................................................................................. [1]

(b) Describe two differences between IPv4 and IPv6.

1 ................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

2 ................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[4]

© UCLES 2023 0478/13/M/J/23


297
11

(c) A web page is requested using an IP address.

(i) Identify the system that stores a database of uniform resource locators (URLs) and their
corresponding IP addresses.

..................................................................................................................................... [1]

(ii) Identify the software that sends a request to the IP address to obtain the web page data.

..................................................................................................................................... [1]

10 A computer has pages A, B and C that are stored in RAM. Page D needs to be sent to the RAM
but the RAM is full.

Page B is not needed immediately.

Explain how virtual memory can be used in this scenario.

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

.................................................................................................................................................... [4]

© UCLES 2023 0478/13/M/J/23 [Turn over


298
12

11 Software is installed on a computer to manage files, memory and multitasking.

(a) State the name of the software that can do these tasks.

............................................................................................................................................. [1]

(b) Give one task that the software allows the user to do to manage files.

............................................................................................................................................. [1]

(c) Describe what is meant by managing memory.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

(d) A signal is sent within the computer to allow multitasking to occur.

State the name of this type of signal.

............................................................................................................................................. [1]

Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every
reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the
publisher will be pleased to make amends at the earliest possible opportunity.

To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge
Assessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download
at www.cambridgeinternational.org after the live examination series.

Cambridge Assessment International Education is part of Cambridge Assessment. Cambridge Assessment is the brand name of the University of Cambridge
Local Examinations Syndicate (UCLES), which is a department of the University of Cambridge.

© UCLES 2023 0478/13/M/J/23


299

Cambridge IGCSE™

COMPUTER SCIENCE 0478/13


Paper 1 Computer Systems May/June 2023
MARK SCHEME
Maximum Mark: 75

Published

This mark scheme is published as an aid to teachers and candidates, to indicate the requirements of the
examination. It shows the basis on which Examiners were instructed to award marks. It does not indicate the
details of the discussions that took place at an Examiners’ meeting before marking began, which would have
considered the acceptability of alternative answers.

Mark schemes should be read in conjunction with the question paper and the Principal Examiner Report for
Teachers.

Cambridge International will not enter into discussions about these mark schemes.

Cambridge International is publishing the mark schemes for the May/June 2023 series for most
Cambridge IGCSE, Cambridge International A and AS Level and Cambridge Pre-U components, and some
Cambridge O Level components.

This document consists of 10 printed pages.

© UCLES 2023 [Turn over


0478/13 Cambridge IGCSE – Mark Scheme 300
May/June 2023
PUBLISHED
Generic Marking Principles

These general marking principles must be applied by all examiners when marking candidate answers. They should be applied alongside the
specific content of the mark scheme or generic level descriptors for a question. Each question paper and mark scheme will also comply with these
marking principles.

GENERIC MARKING PRINCIPLE 1:

Marks must be awarded in line with:

 the specific content of the mark scheme or the generic level descriptors for the question
 the specific skills defined in the mark scheme or in the generic level descriptors for the question
 the standard of response required by a candidate as exemplified by the standardisation scripts.

GENERIC MARKING PRINCIPLE 2:

Marks awarded are always whole marks (not half marks, or other fractions).

GENERIC MARKING PRINCIPLE 3:

Marks must be awarded positively:

 marks are awarded for correct/valid answers, as defined in the mark scheme. However, credit is given for valid answers which go beyond
the scope of the syllabus and mark scheme, referring to your Team Leader as appropriate
 marks are awarded when candidates clearly demonstrate what they know and can do
 marks are not deducted for errors
 marks are not deducted for omissions
 answers should only be judged on the quality of spelling, punctuation and grammar when these features are specifically assessed by the
question as indicated by the mark scheme. The meaning, however, should be unambiguous.

GENERIC MARKING PRINCIPLE 4:

Rules must be applied consistently, e.g. in situations where candidates have not followed instructions or in the application of generic level
descriptors.

© UCLES 2023 Page 2 of 10


0478/13 Cambridge IGCSE – Mark Scheme 301
May/June 2023
PUBLISHED
GENERIC MARKING PRINCIPLE 5:

Marks should be awarded using the full range of marks defined in the mark scheme for the question (however; the use of the full mark range may
be limited according to the quality of the candidate responses seen).

GENERIC MARKING PRINCIPLE 6:

Marks awarded are based solely on the requirements as defined in the mark scheme. Marks should not be awarded with grade thresholds or
grade descriptors in mind.

Mark scheme abbreviations

/ separates alternative words / phrases within a marking point


// separates alternative answers within a marking point
underline actual word given must be used by candidate (grammatical variants accepted)
max indicates the maximum number of marks that can be awarded
() the word / phrase in brackets is not required, but sets the context

Note: No marks are awarded for using brand names of software packages or hardware.

© UCLES 2023 Page 3 of 10


0478/13 Cambridge IGCSE – Mark Scheme 302
May/June 2023
PUBLISHED
Question Answer Marks

1(a)  174 1

1(b)  A 2
 E

1(c)(i)  01110000 1

1(c)(ii)  B 1

1(d) One mark for each correct nibble 4


One mark for correct carries (or other correct working method)
One mark for identification of overflow error

11
 1 0001 1111

1(e) 1
 9

1(f) 1
 12

Question Answer Marks

2(a) Any one from: 1


 To perform a fetch-decode-execute cycle
 To process / execute an instruction

2(b) Two from: 2


 It may increase the performance
 … because more instructions can be processed simultaneously

2(c)(i) Two from: 2


 To store / holds data / address / instruction
 … temporarily

© UCLES 2023 Page 4 of 10


0478/13 Cambridge IGCSE – Mark Scheme 303
May/June 2023
PUBLISHED
Question Answer Marks

2(c)(ii) One mark for correct name of bus. Two marks for matching description. 3

Address bus
Transmit / carries addresses …
… between components in the CPU

Data bus Transmit / carries data …


… between components in the CPU

Control bus
Transmits control signals …
… from the control unit to other components in the CPU

2(d) Any two from: 2


e.g.
 Keyboard // Keypad
 Mouse
 Touchscreen
 Digital camera
 QR code scanner
 Barcode scanner
 2D scanner
 Microphone

2(e)  Any one from: 1


 Speakers
 Headphones

2(f)  random access memory (RAM) 2


 read only memory (ROM)

© UCLES 2023 Page 5 of 10


0478/13 Cambridge IGCSE – Mark Scheme 304
May/June 2023
PUBLISHED
Question Answer Marks

2(g) Any three from: 3


 Receives data from the self-checkout system
 Compares the book data received to stored book data
 … that is a database of stock
 If the book is found it decrements the book stock by 1
 If the book is not found an error message is displayed

Question Answer Marks

3 One mark for each correct missing term or definition: 5

Term Definition

router a device that forwards packets to their correct destinations in a network

IP address this address is assigned by the network and used to identify a device on a network

network interface card (NIC) this is a component in a device that enables it to connect to a network

MAC address this address is assigned by the manufacturer and is used to uniquely identify the device

firewall // proxy-server this can be hardware or software based and filters traffic coming into and out of a network

© UCLES 2023 Page 6 of 10


0478/13 Cambridge IGCSE – Mark Scheme 305
May/June 2023
PUBLISHED
Question Answer Marks

4(a)  B 1

4(b)(i)  Machine code // low-level language // object code 1

4(b)(ii)  Interpreter 1

4(b)(iii)  Compiler 1

4(b)(iv)  Compiler 1

Question Answer Marks

5 The diagram demonstrates (one mark for each): 4

 Packets sent through several routers


 … taking different routes from device A to device B
 Packets arrive out of order
 Packets being reordered when all arrived at device B

Question Answer Marks

6(a) Any three from: 3


e.g.
 Checking the spelling and tone of the email/website
 Checking the URL attached to a link
 Scanning a download with anti-malware
 Only downloading data / software from trusted sources
 Never providing personal details online
 Install a firewall to check if the website is valid

© UCLES 2023 Page 7 of 10


0478/13 Cambridge IGCSE – Mark Scheme 306
May/June 2023
PUBLISHED
Question Answer Marks

6(b) Two marks for description, one mark for example: 3

 Manipulating / deceiving / tricking people …


 … to obtain data // to force them to make an error

 Any suitable example of social engineering

6(c) Any three from: 3


 Providing users with different permission for the data
 Limiting access to reading data limiting the data that can be viewed
 Limiting access to editing data // limiting the data that can be deleted / changed
 Normally linked to a username

Question Answer Marks

7(a)  Interface 2
 Knowledge base

7(b) Any two from: 2


 Stores the rules for the system
 … for the inference engine to use
 Used to link the facts in the knowledge base

Question Answer Marks

8 One mark for each correct term in the correct order: 5

 Malware
 Bot
 Botnet
 Web server
 Website

© UCLES 2023 Page 8 of 10


0478/13 Cambridge IGCSE – Mark Scheme 307
May/June 2023
PUBLISHED
Question Answer Marks

9(a) Any one from: 1

 They can both be used to identify a device (on a network)


 They can both be static / dynamic
 They are both unique (to a device on a network)
 They can both be assigned by a router
 They can both be public/private

9(b) Four from: 4

 IPv4 is usually written as denary


 … IPv6 usually written as hexadecimal

 IPv4 is separated using dots


 … Pv6 is separated using colons

 IPv4 is 32-bit
 … IPv6 is 128-bit

 IPv4 is 4 groups of digits


 … IPv6 is 8 groups of digits

 IPv4 digits are between 0 and 255


 … IPv6 digits are between 0000 and FFFF

 IPv4 all 0s are displayed


 … IPv6 can use double colons to replace repeated groups of 0000

 IPv4 has fewer available unique addresses


 ... IPv6 has more available unique addresses

9(c)(i)  Domain name server // DNS 1

9(c)(ii)  Web browser 1

© UCLES 2023 Page 9 of 10


0478/13 Cambridge IGCSE – Mark Scheme 308
May/June 2023
PUBLISHED
Question Answer Marks

10 Any four from: 4


 The secondary storage / hard drive can be partitioned to create the virtual memory
 … and page B sent to the virtual memory …
 … which makes space for page D in RAM
 … Once page A / C / D / another page is not required / has been processed
 … page B can be sent from the virtual memory back to RAM when it is required

Question Answer Marks

11(a)  Operating system 1

11(b) Any one from: 1


 Create a file
 Copy a file
 Open a file
 Close a file
 Move a file
 Delete a file
 Rename a file
 Save a file
 Sort files

11(c) Any two from: 2


e.g.
 Keeping track of the status of each memory location
 Managing the movement of data to and from RAM
 Checks that processes have enough memory located to them
 Makes sure that two processes don’t try to access the same memory location
 Manage the transfer of pages between virtual memory and RAM
 Allows multitasking

11(d)  Interrupt 1

© UCLES 2023 Page 10 of 10


309

Cambridge IGCSE™
* 4 7 9 7 8 7 7 8 2 9 *

COMPUTER SCIENCE 0478/22


Paper 2 Algorithms, Programming and Logic May/June 2023

1 hour 45 minutes

You must answer on the question paper.

No additional materials are needed.

INSTRUCTIONS
● Answer all questions.
● Use a black or dark blue pen. You may use an HB pencil for any diagrams or graphs.
● Write your name, centre number and candidate number in the boxes at the top of the page.
● Write your answer to each question in the space provided.
● Do not use an erasable pen or correction fluid.
● Do not write on any bar codes.
● Calculators must not be used in this paper.

INFORMATION
● The total mark for this paper is 75.
● The number of marks for each question or part question is shown in brackets [ ].
● No marks will be awarded for using brand names of software packages or hardware.

This document has 16 pages. Any blank pages are indicated.

DC (RW/SW) 313988/5
© UCLES 2023 [Turn over
310
2

1 Tick (✓) one box to identify the first stage of the program development life cycle.

A Analysis

B Coding

C Design

D Testing
[1]

2 Four logic gates and five standard symbols for logic gates are shown.

Draw one line to link each logic gate to its standard symbol. Not all standard symbols will be used.

Logic gate Standard symbol

AND

OR

NAND

NOT

[4]

3 Identify three different ways that the design of a solution to a problem can be presented.

1 .......................................................................................................................................................

..........................................................................................................................................................

2 .......................................................................................................................................................

..........................................................................................................................................................

3 .......................................................................................................................................................

..........................................................................................................................................................
[3]

© UCLES 2023 0478/22/M/J/23


311
3

4 A program needs to make sure the value input for a measurement meets the following rules:
• the value is a positive number
• a value is always input
• the value is less than 1000.

(a) Describe the validation checks that the programmer would need to use.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

(b) The program needs editing to include a double entry check for the value input.

(i) State why this check needs to be included.

...........................................................................................................................................

..................................................................................................................................... [1]

(ii) The input value needs to be stored in the variable Measurement


Write pseudocode to perform the double entry check until a successful input is made.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [3]

© UCLES 2023 0478/22/M/J/23 [Turn over


312
4

5 Circle five file-handling operations.

calculate close count create input open

output print read sort search

test total write


[5]

6 State three different features of a high-level programming language that a programmer could use
to make sure that their program will be easier to understand by another programmer.
Give an example for each feature.

Feature 1 ..........................................................................................................................................

..........................................................................................................................................................

Example ...........................................................................................................................................

..........................................................................................................................................................

Feature 2 ..........................................................................................................................................

..........................................................................................................................................................

Example ...........................................................................................................................................

..........................................................................................................................................................

Feature 3 ..........................................................................................................................................

..........................................................................................................................................................

Example ...........................................................................................................................................

..........................................................................................................................................................
[6]

© UCLES 2023 0478/22/M/J/23


313
6

7 An algorithm has been written in pseudocode to calculate a check digit for a four-digit number.
The algorithm then outputs the five-digit number including the check digit.
The algorithm stops when –1 is input as the fourth digit.

01 Flag FALSE
02 REPEAT
03 Total 0
04 FOR Counter 1 TO 4
05 OUTPUT "Enter a digit ", Counter
06 INPUT Number[Counter]
07 Total Total + Number * Counter
08 IF Number[Counter] = 0
09 THEN
10 Flag TRUE
11 ENDIF
12 NEXT Counter
13 IF NOT Flag
14 THEN
15 Number[5] MOD(Total, 10)
16 FOR Counter 0 TO 5
17 OUTPUT Number[Counter]
18 NEXT
19 ENDIF
20 UNTIL Flag

(a) Give the line number(s) for the statements showing:

Totalling ....................................................................................................................................

Count-controlled loop ...............................................................................................................

Post-condition loop ...................................................................................................................


[3]

(b) Identify the three errors in the pseudocode and suggest a correction for each error.

Error 1 .......................................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................

Error 2 .......................................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................

Error 3 .......................................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................
[3]

© UCLES 2023 0478/22/M/J/23


314
7

(c) The algorithm does not check that each input is a single digit.
Identify the place in the algorithm where this check should occur.
Write pseudocode for this check.
Your pseudocode must make sure that the input is a single digit and checks for –1

Place in algorithm .....................................................................................................................

Pseudocode ..............................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[4]

8 Consider this logic expression.

X = (A OR B) AND (NOT B AND C)

Complete the truth table for this logic expression.

Working space
A B C X

0 0 0

0 0 1

0 1 0

0 1 1

1 0 0

1 0 1

1 1 0

1 1 1

[4]

© UCLES 2023 0478/22/M/J/23 [Turn over


315
8

9 This flowchart represents an algorithm.

START

F 0
C 1

IS X[C] < No
T X[C]
X[C + 1]?

Yes
X[C] X[C + 1]

X[C + 1] T

F 1

C C + 1

No
IS C = 5?

Yes

No
IS F = 0?

Yes

STOP

© UCLES 2023 0478/22/M/J/23


316
9

(a) The array X[1:5] used in the flowchart contains this data:

X[1] X[2] X[3] X[4] X[5]

10 1 5 7 11

Complete the trace table by using the data given in the array.

F C X[1] X[2] X[3] X[4] X[5] T

10 1 5 7 11

[5]

(b) Describe what the algorithm represented by the flowchart is doing.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

© UCLES 2023 0478/22/M/J/23 [Turn over


317
10

10 A music streaming service has a new database table named Songs to store details of songs
available for streaming. The table contains the fields:
• SongNumber – the catalogue number, for example AG123
• Title – the title of the song
• Author – the name of the song writer(s)
• Singer – the name of the singer(s)
• Genre – the type of music, for example rock
• Minutes – the length of the song in minutes, for example 3.75
• Recorded – the date the song was recorded.

(a) Identify the field that will be the most appropriate primary key for this table.

............................................................................................................................................. [1]

(b) Complete the table to identify the most appropriate data type for the fields in Songs

Field Data type

SongNumber

Title

Recorded

Minutes

[2]

(c) Explain the purpose of the structured query language (SQL) statements.

SUM (Minutes) FROM Songs WHERE Genre = "rock";

COUNT (Title) FROM Songs WHERE Genre = "rock";

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

© UCLES 2023 0478/22/M/J/23


318
11

11 The variables P and Q are used to store data in a program. P stores a string. Q stores a character.

(a) Write pseudocode statements to declare the variables P and Q, store "The world" in P and
store 'W' in Q

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

(b) Write a pseudocode algorithm to:


• convert P to upper case
• find the position of Q in the string P (the first character in this string is in position 1)
• store the position of Q in the variable Position

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]

(c) Give the value of Position after the algorithm has been executed with the data in
question 11(a).

...................................................................................................................................................

............................................................................................................................................. [1]

© UCLES 2023 0478/22/M/J/23 [Turn over


319
12

12 A two-dimensional (2D) array Account[] contains account holders’ names and passwords for a
banking program.

A 2D array AccDetails[] has three columns containing the following details:


• column one stores the balance – the amount of money in the account, for example 250.00
• column two stores the overdraft limit – the maximum total amount an account holder can
borrow from the bank after the account balance reaches 0.00, for example 100.00
• column three stores the withdrawal limit – the amount of money that can be withdrawn at one
time, for example 200.00

The amount of money in a bank account can be negative (overdrawn) but not by more than the
overdraft limit.
For example, an account with an overdraft limit of 100.00 must have a balance that is greater than
or equal to –100.00

Suitable error messages must be displayed if a withdrawal cannot take place, for example if the
overdraft limit or the size of withdrawal is exceeded.

The bank account ID gives the index of each account holder’s data held in the two arrays.
For example, account ID 20’s details would be held in:
Account[20,1] and Account[20,2]
AccDetails[20,1] AccDetails[20,2] and AccDetails[20,3]

The variable Size contains the number of accounts.

The arrays and variable Size have already been set up and the data stored.

Write a program that meets the following requirements:


• checks the account ID exists and the name and password entered by the account holder
match the name and password stored in Account[] before any action can take place
• displays a menu showing the four actions available for the account holder to choose from:
1. display balance
2. withdraw money
3. deposit money
4. exit
• allows an action to be chosen and completed. Each action is completed by a procedure
with a parameter of the account ID.

You must use pseudocode or program code and add comments to explain how your code works.
All inputs and outputs must contain suitable messages.

You only need to declare any local arrays and local variables that you use.

You do not need to declare and initialise the data in the global arrays Account[] and
AccDetails[] and the variable Size

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................
© UCLES 2023 0478/22/M/J/23
320
13

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................
© UCLES 2023 0478/22/M/J/23 [Turn over
321
14

..........................................................................................................................................................

.........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

.................................................................................................................................................. [15]
© UCLES 2023 0478/22/M/J/23
0478/22 Cambridge IGCSE – Mark Scheme 322
May/June 2023
PUBLISHED
Question Answer Marks

1 A 1

Question Answer Marks

2 One mark for each correct line 4

Logic gate Standard symbol

AND

OR

NAND

NOT

Question Answer Marks

3 One mark for each correct answer 3


 structure diagram / chart
 flowchart
 pseudocode

© UCLES 2023 Page 4 of 16


0478/22 Cambridge IGCSE – Mark Scheme 323
May/June 2023
PUBLISHED
Question Answer Marks

4(a) One mark for each point (max three). 3


 range check with acceptable values is (greater than) zero and less than 1000
 presence check to ensure the program will not continue until a value has been entered
 type/character check to ensure that a number is entered
 length check to ensure there are no more than 3 digits entered

4(b)(i) To verify the data / for verification / as a verification check // to make sure that no changes are made to the data on entry 1

4(b)(ii) One mark for each point (max three). 3


 use of iteration
 use of two inputs
 to check that the two inputs are the same / different
 use of the given variable Measurement

For example
REPEAT
OUTPUT "Please enter measurement "
INPUT Measurement
OUTPUT "Please re-enter measurement "
INPUT MeasurementCheck
UNTIL Measurement = MeasurementCheck

Question Answer Marks

5 Due to an issue with Question 5, the question has been removed from the question paper.

© UCLES 2023 Page 5 of 16


0478/22 Cambridge IGCSE – Mark Scheme 324
May/June 2023
PUBLISHED
Question Answer Marks

6 One mark for each feature and one mark for corresponding example (max six) 6
 ensuring that all identifiers have meaningful names …
 … example using Total to store a running total
 using comments to explain how the program works …
 … example // all values are zeroed before the next calculation
 using procedures and functions for the tasks within a program …
 … example CalculateInterest(Deposit, Rate)

Question Answer Marks

7(a)  07 3
 04/12 or 16/18
 02/20

7(b) One mark for each error identified and correction 3


 Line 07 Total  Total + Number * Counter
should be Total  Total + Number[Counter] * Counter
 Line 08 IF Number[Counter] = 0
should be IF Number[Counter] = -1 // should be IF Number[Counter] < 0
 Line 16 FOR Counter  0 TO 5
should be FOR Counter  1 TO 5

© UCLES 2023 Page 6 of 16


0478/22 Cambridge IGCSE – Mark Scheme 325
May/June 2023
PUBLISHED
Question Answer Marks

7(c) One mark for place in algorithm (max one) 4


 around lines 05 and 06
 line 07
 (immediately) after the input of the number

Three marks pseudocode


One mark for each point (max three)
 Use of REPEAT … UNTIL // any working loop structure
 check for >0 // >=0
 check for <10 // >9
 check for whole number
 check for -1
 check for length of digit <> 1

Example
REPEAT
OUTPUT "Enter a digit "
INPUT Number[Counter]
UNTIL Number[Counter] = Round(Number[Counter],0) AND ((Number[Counter] = -1) OR
(Number[Counter] > 0 AND Number[Counter] < 10))

© UCLES 2023 Page 7 of 16


0478/22 Cambridge IGCSE – Mark Scheme 326
May/June 2023
PUBLISHED
Question Answer Marks

8 4 marks for 8 correct outputs 4


3 marks for 6/7 correct outputs
2 marks for 4/5 correct outputs
1 mark for 2/3 correct outputs

A B C X

0 0 0 0

0 0 1 0

0 1 0 0

0 1 1 0

1 0 0 0

1 0 1 1

1 1 0 0

1 1 1 0

© UCLES 2023 Page 8 of 16


0478/22 Cambridge IGCSE – Mark Scheme 327
May/June 2023
PUBLISHED
Question Answer Marks

9(a) One mark for each column F, C and T 5


Two marks for columns X[1] to X[5] all entries correct or
One mark for columns X[1] to X[5] with one error

F C X[1] X[2] X[3] X[4] X[5] T

10 1 5 7 11

0 1 10

1 2 1 10 10

1 3 5 10 10

1 4 7 10

0 1

9(b) One mark for each point 2


 (bubble) sort data in array
 in ascending order

© UCLES 2023 Page 9 of 16


0478/22 Cambridge IGCSE – Mark Scheme 328
May/June 2023
PUBLISHED
Question Answer Marks

10(a) SongNumber 1

10(b) One mark for every two correct data types 2

Field Data Type

SongNumber Text/Alphanumeric

Title Text/Alphanumeric

Recorded Date/time

Minutes Real

10(c) One mark for each point 3


 to find the total number of minutes of music
 to find the total number of songs
 available for the genre rock

Question Answer Marks

11(a) One mark for any two correct lines 2

DECLARE P : STRING
P  "The world"
DECLARE Q : CHAR
Q  'W'

© UCLES 2023 Page 10 of 16


0478/22 Cambridge IGCSE – Mark Scheme 329
May/June 2023
PUBLISHED
Question Answer Marks

11(b) One mark for each point (max four) 4


 converting P to upper case
 finding the length of P
 using a loop to check for position of Q
 using the string operation substring
 storing the loop counter in Position if the value is found

For example:
P  UCASE(P)
Counter  1
Position  0
REPEAT
IF SUBSTRING(P, Counter, 1) = Q
THEN
Position  Counter
ENDIF
Counter  Counter + 1
UNTIL Position <> 0 OR Counter = LENGTH(P)

11(c) 5 1

© UCLES 2023 Page 11 of 16


0478/22 Cambridge IGCSE – Mark Scheme 330
May/June 2023
PUBLISHED
Question Answer Marks

12 Read the whole answer: 15


Check if each requirement listed below has been met. Requirements may be met using a suitable built-in function from the
programming language used (Python, VB.NET or Java)
Mark SEEN on script if requirement met, cross if no attempt seen, NE if partially met (see marked scripts).
Use the tables for A02 and A03 below to award a mark in a suitable band using a best fit approach
Then add up the total.
Marks are available for:
 AO2 (maximum 9 marks)
 AO3 (maximum 6 marks)

Data Structures required names shown underlined must be used as given in the scenario
Arrays or lists Account, AccDetails
Variable Size, AccountNumber

Requirements (techniques)
R1 Check account number and password (iteration and validation, selection, input, output)
R2 Display menu and make a selection (output, input and selection)
R3 Perform actions selected (use of arrays and procedures with parameters)

Example 15 mark answer in pseudocode


// Procedures to be called
PROCEDURE CheckDetails(AccID : INTEGER)
DECLARE Name, Password : STRING // local variables
Valid  FALSE
IF AccID <0 OR AccID > Size
THEN
OUTPUT "Invalid Account Number"
ELSE
OUTPUT "Please Enter Name "
INPUT Name
OUTPUT "Please Enter Password "
INPUT Password
IF Name <> Account[AccID,1] OR Password <> Account[AccID,2]
THEN
OUTPUT "Invalid name or password"
ELSE

© UCLES 2023 Page 12 of 16


0478/22 Cambridge IGCSE – Mark Scheme 331
May/June 2023
PUBLISHED
Question Answer Marks

12 Valid  True
ENDIF
ENDIF
ENDPROCEDURE

PROCEDURE Balance(AccID : INTEGER)


OUTPUT "Your balance is ", AccDetails[AccID,1]
ENDPROCEDURE

PROCEDURE WithDrawal(AccID : INTEGER)


DECLARE Amount : REAL // local variable
REPEAT
OUTPUT "Please enter amount to withdraw "
INPUT Amount
IF Amount > AccDetails[AccID,3]
THEN
OUTPUT "Amount greater than withdrawal limit"
ENDIF
IF Amount > AccDetails[AccID,2] + AccDetails[AccID,1]
THEN
OUTPUT "Amount greater than cash available"
ENDIF
IF Amount <= AccDetails[AccID,3] AND Amount < AccDetails[AccID,2] +
AccDetails[AccID,1]
THEN
AccDetails[AccID,1]  AccDetails[AccID,1] - Amount
ENDIF
UNTIL Amount<= AccDetails[AccID,3] AND Amount > AccDetails[AccID,2] +
AccDetails[AccID,1] AND Amount > 0
ENDPROCEDURE

PROCEDURE Deposit(AccID : INTEGER)


DECLARE Amount : REAL // local variable
REPEAT
OUTPUT "Please enter a positive amount to deposit "
INPUT Amount
UNTIL Amount >0
AccDetails[AccID,1]  AccDetails[AccID,1] + Amount

© UCLES 2023 Page 13 of 16


0478/22 Cambridge IGCSE – Mark Scheme 332
May/June 2023
PUBLISHED
Question Answer Marks

12 ENDPROCEDURE

// Declarations of global variables for information – not required in candidate responses


DECLARE AccountNumber, Choice : INTEGER
DECLARE Valid, Exit : BOOLEAN

OUTPUT "Please enter your account number "


INPUT AccountNumber
CheckDetails(AccountNumber)

IF Valid
THEN
REPEAT
OUTPUT "Menu"
OUTPUT "1. display balance"
OUTPUT "2. withdraw money"
OUTPUT "3. deposit money"
OUTPUT "4. exit"
OUTPUT "please choose 1, 2, 3 or 4"
INPUT Choice
CASE OF Choice
1 : Balance(AccountNumber)
2 : Withdrawal(AccountNumber)
3 : Deposit(AccountNumber)
4 : Exit  TRUE
OTHERWISE OUTPUT "Invalid choice"
ENDCASE
UNTIL Choice = 4
ELSE
OUTPUT "Invalid account number "
ENDIF

© UCLES 2023 Page 14 of 16


333

Cambridge IGCSE™
* 1 8 6 2 2 6 2 8 5 3 *

COMPUTER SCIENCE 0478/12


Paper 1 Computer Systems February/March 2023

1 hour 45 minutes

You must answer on the question paper.

No additional materials are needed.

INSTRUCTIONS
● Answer all questions.
● Use a black or dark blue pen. You may use an HB pencil for any diagrams or graphs.
● Write your name, centre number and candidate number in the boxes at the top of the page.
● Write your answer to each question in the space provided.
● Do not use an erasable pen or correction fluid.
● Do not write on any bar codes.
● Calculators must not be used in this paper.

INFORMATION
● The total mark for this paper is 75.
● The number of marks for each question or part question is shown in brackets [ ].
● No marks will be awarded for using brand names of software packages or hardware.

This document has 16 pages. Any blank pages are indicated.

DC (EF) 313505/3
© UCLES 2023 [Turn over
334
2

1 Computers can be infected with malware. Spyware is one example of malware.

(a) Tick (✓) one box to show a correct definition of spyware.

A Software that activates a webcam and transmits the video to a third party
that outputs it live on a website.

B Software that detects when a password is being entered and then emails
the password to a third party.

C Software that records all data entered into a computer, analyses this data
to find email addresses and passwords, then posts these to a website.

D Software that records all key presses and transmits these to a third party.

[1]

(b) Complete the table by identifying and describing two other examples of malware.

Malware Description

...........................................................................................................

...........................................................................................................
......................................
1 ...........................................................................................................
......................................
...........................................................................................................

...........................................................................................................

...........................................................................................................

...........................................................................................................
......................................
2 ...........................................................................................................
......................................
...........................................................................................................

...........................................................................................................

[6]

© UCLES 2023 0478/12/F/M/23


335
3

(c) Proxy‑servers and firewalls have some similar functions.

Identify two similarities and one difference between proxy‑servers and firewalls.

Similarity 1 ................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Similarity 2 ................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Difference .................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[3]

© UCLES 2023 0478/12/F/M/23 [Turn over


336
4

2 A programmer has designed a three‑dimensional (3D) interactive computer game. They are going
to develop a program for the game. The program needs to run efficiently, but it must also be
developed as soon as possible.

(a) Tick (✓) one box to identify whether the programmer should use a high‑level language or a
low‑level language to develop the program.

Explain the reasons for your choice.

High‑level language

Low‑level language

Reasons for your choice ...........................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]

(b) If the programmer chooses a high‑level language, they can use a compiler or an interpreter to
translate the high‑level language into a low‑level language.

Describe the operation of a compiler and of an interpreter.

Compiler ...................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Interpreter .................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[4]

© UCLES 2023 0478/12/F/M/23


337
5

3 A new computer comes with primary and secondary storage.

(a) Data storage is measured using binary denominations.

Complete each conversion.

8 bytes = .............................. nibbles

512 kibibytes (KiB) = .............................. mebibytes (MiB)

4 gibibytes (GiB) = .............................. mebibytes (MiB)

1 exbibyte (EiB) = .............................. pebibytes (PiB)


[4]
Working space

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

(b) Random access memory (RAM) is an example of primary storage.

Give three examples of data that is commonly stored in RAM.

1 ................................................................................................................................................

2 ................................................................................................................................................

3 ................................................................................................................................................
[3]

(c) Describe the purpose of secondary storage.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

© UCLES 2023 0478/12/F/M/23 [Turn over


338
6

4 A wildlife photographer stores their digital images on a computer.

(a) Complete the table by defining each term about images.

Image term Definition

...................................................................................................................

pixel ...................................................................................................................

...................................................................................................................

...................................................................................................................

resolution ...................................................................................................................

...................................................................................................................

[2]

(b) One of the images has a resolution of 1000 × 1000 and a colour depth of 2 bytes.

Calculate the file size of the image. Give your answer in bytes.

Show your working.

Working space ..........................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

File size ...................................... bytes


[2]

© UCLES 2023 0478/12/F/M/23


339
7

(c) The photographer decides to purchase a solid‑state storage device to back up their images.

Complete the description of solid‑state storage.

Use the terms from the list.

Some of the terms in the list will not be used. You should only use a term once.

binary denary electrons grid neutrons

non‑volatile RAM star transistors virtual volatile

Solid‑state storage is ........................................................... . This means that the data is not

lost when the power is turned off.

Solid‑state storage is made of ........................................................... that are laid out in a

........................................................... .

Gates are used to control the flow of the ........................................................... through the

transistors. This changes the data in the transistors from 1 to 0, or from 0 to 1.


[4]

(d) The photographer compresses an image file before it is emailed.

Give one reason why a file is compressed.

...................................................................................................................................................

............................................................................................................................................. [1]

© UCLES 2023 0478/12/F/M/23 [Turn over


340
8

5 A website allows users to purchase items.

Computer A sends a request for the homepage to the website’s server.

(a) The request is sent using packet switching.

The structure of a packet of data has three elements. One element is the packet header.

(i) Identify two items of data contained in a packet header.

1 ........................................................................................................................................

2 ........................................................................................................................................
[2]

(ii) Identify the two other elements of a packet.

1 ........................................................................................................................................

2 ........................................................................................................................................
[2]

© UCLES 2023 0478/12/F/M/23


341
9

(b) Computer A needs to be directly connected to a router that is located in a different room.

(i) Tick (✓) one box to identify whether serial data transmission or parallel data transmission
is more suitable for this connection.

Explain the reasons for your choice.

Serial data transmission

Parallel data transmission

Reasons for your choice ...................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [3]

(ii) The connection will also use full‑duplex data transmission.

Define full‑duplex data transmission.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

© UCLES 2023 0478/12/F/M/23 [Turn over


342
10

(c) The data transmission will use parity checks.

(i) The bytes need to be sent using an even parity byte check.

Complete the parity bit for each byte.

Parity
bit

Byte A 1 1 0 0 0 1 1

Byte B 0 0 0 0 0 0 0

[2]

(ii) A parity block check can be used instead of a parity byte check.

Explain how a parity block check might detect an error in transmission that would not be
detected by a parity byte check.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

© UCLES 2023 0478/12/F/M/23


343
11

(iii) The data was sent using an even parity block check. One of the bits has been transmitted
incorrectly.

Parity
Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7
bit

Byte 0 1 1 1 0 1 0 0 0

Byte 1 0 0 1 0 0 1 0 0

Byte 2 1 0 1 1 0 0 0 1

Byte 3 1 1 0 0 1 1 1 1

Byte 4 1 0 1 0 0 0 1 0

Byte 5 0 0 0 0 0 0 0 0

Byte 6 0 1 1 1 1 0 0 0

Parity
0 1 1 0 1 0 1 0
byte

Identify the bit number and the byte number of the incorrect bit.

Bit number ......................................

Byte number ......................................


[2]

© UCLES 2023 0478/12/F/M/23 [Turn over


344
12

(d) The website allows the user to set up an account to log on and purchase items. The website
is accessed and displayed using a web browser.

(i) Two functions of the web browser are to render hypertext markup language (HTML) to
display web pages and to store cookies.

Identify two other functions of a web browser.

1 ........................................................................................................................................

2 ........................................................................................................................................
[2]

(ii) Identify two ways that cookies can be used to enhance the user’s experience of this
website.

1 ........................................................................................................................................

...........................................................................................................................................

2 ........................................................................................................................................

...........................................................................................................................................
[2]

© UCLES 2023 0478/12/F/M/23


345
13

6 A company is involved in robotics.

One of its robots is designed to make a specific movement depending on a binary value.

(a) The table gives some of the movements for the robot.

Complete the table by writing the missing binary, denary or hexadecimal value for each
movement.

Movement Binary Denary Hexadecimal

forward 1 step 00011111 31

back 1 step 140 8C

turn right 01011010 5A

turn left 120 78

[4]

Working space

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

(b) Describe what is meant by robotics.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

© UCLES 2023 0478/12/F/M/23 [Turn over


346
14

(c) The robot has a sensor and a microprocessor.

The robot will move forward continuously until it detects an object that is less than or equal to
10 cm in front of it.

If an object is less than or equal to 10 cm in front of it, the robot turns 90 degrees right. It then
tries to move forward again.

Explain how the sensor and the microprocessor are used to automate this robot.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [7]

© UCLES 2023 0478/12/F/M/23


347
15

(d) The robot needs to find its way through different puzzles. Each puzzle has a series of paths
that the robot needs to follow to find its way to the end of the puzzle. The puzzle contains
dead ends and obstacles, so the robot needs to decide which way to go.

The robot’s program will use artificial intelligence (AI).

(i) Describe the characteristics of AI.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [3]

(ii) Explain how the program will use AI.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [4]

© UCLES 2023 0478/12/F/M/23


348

Question Answer Marks

1(a) D 1

1(b) One mark for identification. E.g. One mark per bullet for description to max 6
two each.

Virus
• Software/code that replicates
• …when the user runs it // with an active host
• Deletes/damages/corrupts data/files // takes up storage/memory space

Worm
• Software/code that replicates itself on a network
• …without user input // without active host
• Takes-up bandwidth
• Deletes/damages/corrupts data/files // takes up storage/memory space
• Opens back doors to computers over the network
• Used to deposit other malware on networked computers

Trojan horse
• Software/code that is hidden within other software // Software that is
disguised as authentic software
• …when downloaded/installed the other malware/by example it
contains is installed

Adware
• Software/code that generates/displays (unwanted) adverts on a user's
computer
• Some may contain spyware/other malware
• Some when clicked may link to viruses
• Reduces device performance // reduces internet speed
• Redirects internet searches/user to fake websites

Ransomware
• Software/code that stops a user accessing/using their computer/data
• …by encrypting the data/files/computer
• A fee has to be paid to decrypt the data // A fee has to be paid to
'release' the computer/device/data
349

Question Answer Marks

1(c) One mark for each similarity to max two. One mark for difference (both 3
sides needed unless clearly and accurately implied).

Similarities e.g.
• Check incoming and outgoing signals // filter traffic
• Store whitelist/blacklist
• Block incoming/outgoing signals
• Both block unauthorised access
• Keep a log of traffic
• Both can be hardware or software (or both)

Differences e.g.
• Proxy can hide user's IP address, firewall does not hide the user's IP
address
• Proxy intention is to divert attack from server, firewall is to stop
unauthorised access
• Proxy protects a server, firewall protects individual computer
• Proxy examines/processes requests for a website but a firewall does
not (checks type of signal) // Proxy processes client-side requests
whereas firewall filters packets
• Proxy transmits website data to the user, but a firewall does not (it
allows valid signals)
• Proxy allows faster access to a web page using cache, but a firewall
does not (allow faster access or have cache)
• Proxy can hide internal network from internet, but a firewall cannot
350

Question Answer Marks

2(a) No mark for choice. 4


Any four from matching choice.

High-level
• Easier for programmer to read/write/understand/edit
• … therefore, the programmer is less likely to make mistakes // can write
in shorter timeframe
• Easier to debug // Easier to find/correct errors
• …so, the programmer can find and correct errors in less time
• Game will be machine independent // Game will be portable (between
hardware)
• …the game can be used on any computer without a need for
understanding of the hardware / compilation for that hardware
• Programmer can focus on the problem instead of the manipulation of
memory/hardware

Low-level
• More memory/RAM efficient
• … 3D graphics will have high memory consumption anyway
• Allows direct manipulation of memory
• … allows for more efficient control/response time
• Allows for use of specialised hardware

2(b) Two from for each compiler and interpreter. 4

Compiler
• Checks all code before executing any code
• Produces error report with all errors found for the whole code (before
translating/running any of the code)
• Produces executable file

Interpreter
• Checks/translates one line of code and then executes it before moving
on to the next line
• Stops when an error is found
• … when corrected the program can be run from the same position //
allows error correction in real time
351

Question Answer Marks

3(a) One mark each: 4


8 bytes = 16 nibbles
512 KiB = 0.5 MiB
4 GiB = 4096 MiB
1 EiB = 1024 PiB

3(b) Any three from: 3


• Currently running data
• Currently running (application) software
• Currently running instructions
• Currently running parts of OS
• Currently running utility software

3(c) Any two from: 2


• For non-volatile/permanent/long-term storage of files/data
• To store data that is not currently required by the CPU
• To store data to transfer it to another computer

Question Answer Marks

4(a) One mark each: 2

Pixel:
• One square/circle of one colour // the smallest component of the
image

Resolution:
• The number of pixels per set area/cm/inch // the number of pixels wide
by the number of pixels high // number of pixels in an image

4(b) One mark for answer: 2


• 2 000 000 bytes

One mark for working from:


• 1000  1000 (= 1 000 000)
• 1 000 000 * 2 (= 2 000 000)

4(c) One mark for each term: 4

Solid-state storage is non-volatile. This means that the data is not lost
when the power is turned off.
Solid-state storage is made of transistors that are laid out in a grid.
Gates are used to control the flow of the electrons through the transistors.
This changes the data in the transistors from 1 to 0, or from 0 to 1.

4(d) Any one from: 1


• Reduce the file size
• Increase transmission speed // Reduce transmission time
• Reduce storage space required
• Less bandwidth required for transmission
352

Question Answer Marks

5(a)(i) Any two from: 2


e.g.
• Destination IP/address
• Packet number
• Originators IP/address
• Error detection method

5(a)(ii) One mark each: 2


• Payload
• Trailer

5(b)(i) No mark for choice. 3


Three from for justification that matches choice.

Serial
• Data arrives in order sent // does not need reordering
• Less likely to experience interference
• … less likely to have errors
• Can transmit over a longer distance (i.e. another room)
• Still fast transmission…
• …sufficient for this purpose

Parallel
• Faster transmission speed than serial
• … faster response to requests
• Very long connection not needed
• …next room is (likely) within distance for parallel
• … unlikely to error/arrive out of sequence/skew

5(b)(ii) One mark each: 2


• Data goes in both directions…
• …at the same time

5(c)(i) One mark each: 2

0 1 1 0 0 0 1 1

0 0 0 0 0 0 0 0

5(c)(ii) One mark each: 2


• In parity check, interchange of bits will not be detected // Parity check
cannot detect even number of changes // Parity check cannot detect
error if parity stays correct …
• …the (possible) position of all changes will be highlighted // will identify
the horizontal and vertical position of all differences/changes

5(c)(iii) One mark each: 2


• Bit 6
• Byte 4
353

Question Answer Marks

5(d)(i) Any two from: 2


e.g.
• Storing bookmarks/favourites
• Storing history
• Allow multiple tabs/web pages to be open
• Allow movement back and forth between web pages // provides
navigation tools
• Allows the user to enter a URL/IP into the address bar
• Manages HTTP/HTTPS protocol
• Search cache for IP // Request IP from DNS // Send URL to DNS
• Sends a request to the IP address/web server (to obtain the contents
of a web page)
• Runs active script/JavaScript/client-side script
• Allows files to be downloaded from website/internet

5(d)(ii) Any two from: 2


e.g.
• Storing preferences // so the user does not have to select their
preferences each time they visit the site
• Storing account details // so the user does not have to remember/enter
their username and password each time they visit the site
• Storing recent purchases // to allow the user to quickly re-order more
items
• Storing the pages visited/items selected // to display relevant adverts
• Storing shopping basket // so when the user leaves the site the items
are still in their basket

Question Answer Marks

6(a) One mark each 4

Movement Binary Denary Hexadecimal

forward 1 step 00011111 31 1F

back 1 step 10001100 140 8C

turn right 01011010 90 5A

turn left (0)1111000 120 78

6(b) Any two from: 2


• The design of robots (to perform tasks/operations/functions)
• The construction of robots (to perform tasks/operations/functions)
• The operation of robots (to perform tasks/operations/functions)
354

Question Answer Marks

6(c) Seven from: 7


• Uses an infra-red/proximity sensor
• Sensor continuously sends the digitised value/reading/distance to the
microprocessor
• Microprocessor compares the data/signal to the stored value of 10(cm)
• If the data/signal is greater than the stored value/10 …
• …a signal is sent to make the robot move forward
• If the data/signal is less than or equal to the stored value/10 …
• …a signal is sent to make robot turn
• An actuator is used to make the robot turn/move forward
• The whole process repeats continuously until turned off/stopped

6(d)(i) Any three from: 3


e.g.
• Collects data
• Stores rules for using the data
• The ability to reason
• The ability to learn // uses machine learning
• … by adapting what it does
• … for example, from mistakes to not make them again // result from
previous decisions impacts future
• … by changing its own rules
• …by changing its own data
• …by being trained
• Makes one or more predictions (to make a decision)
• Find/analyse patterns

6(d)(ii) Four from: 4


e.g.
• Use machine learning algorithms
• Collects data about where it has been
• Collect data about obstacles/problems
• Store successful actions
• Stores unsuccessful actions
• Identify/store patterns
• … to make sure it does not repeat the same incorrect route
• … so, it knows how to react to obstacles next time
• …so, it knows what is most likely to work next time
355

Cambridge IGCSE™
* 2 8 3 1 0 1 3 0 1 6 *

COMPUTER SCIENCE 0478/22


Paper 2 Algorithms, Programming and Logic February/March 2023

1 hour 45 minutes

You must answer on the question paper.

No additional materials are needed.

INSTRUCTIONS
● Answer all questions.
● Use a black or dark blue pen. You may use an HB pencil for any diagrams or graphs.
● Write your name, centre number and candidate number in the boxes at the top of the page.
● Write your answer to each question in the space provided.
● Do not use an erasable pen or correction fluid.
● Do not write on any bar codes.
● Calculators must not be used in this paper.

INFORMATION
● The total mark for this paper is 75.
● The number of marks for each question or part question is shown in brackets [ ].
● No marks will be awarded for using brand names of software packages or hardware.

This document has 16 pages. Any blank pages are indicated.

DC (LK/SG) 334324/4
© UCLES 2023 [Turn over
356
2

1 Tick (3) one box to show which word accurately describes the scope of a variable declared in a
procedure.

A Function

B Global

C Local

D Subroutine
[1]

2 (a) Four descriptions and five pseudocode statements are shown.

Draw one line to link each description to its most appropriate pseudocode statement.
Not all pseudocode statements will be used.

Description Pseudocode statement

a statement to count FOR Count 1 TO 10

Value Value + NewValue


a statement to total

WHILE Value > 10 DO

a statement to start a
pre-condition loop Value Value + 1

a statement to start a REPEAT


post-condition loop

[4]

© UCLES 2023 0478/22/F/M/23


357
3

(b) Write an algorithm in pseudocode, using a single loop, to output the average of 50 numbers
that have been stored in the array Number[]

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [5]

3 Describe the purpose of test data. Include an example of a type of test data in your answer.

Description .......................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

Example ...........................................................................................................................................

..........................................................................................................................................................
[3]

© UCLES 2023 0478/22/F/M/23 [Turn over


358
4

4 Describe how variables and constants are used in programming.

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

.................................................................................................................................................... [3]

5 A food ordering system is an example of a computer system that is made up of sub-systems.

The food ordering system:


• allows the user to enter the details of the food they want to order and to pay for the order
• displays food available as pictures or as a list.

Complete the structure diagram for the given parts of the food ordering system.

Food ordering system

[4]

© UCLES 2023 0478/22/F/M/23


359
5

6 The energy efficiency of an electrical appliance is the percentage of useful energy out compared with
the total energy in.

An algorithm has been written in pseudocode to calculate the energy efficiency of an appliance.
Values for total energy in and useful energy out are input. The efficiency is calculated and output
as a percentage.
The entry of the number –1 for either value stops the algorithm.

01 REPEAT
02 OUTPUT "Enter total energy in "
03 INPUT TotalEnergyIn
04 OUTPUT "Enter useful energy out "
05 OUTPUT UsefulEnergyOut
06 IF TotalEnergyIn <> -1 AND UsefulEnergy <> -1
07 THEN
08 Efficiency (UsefulEnergyOut / TotalEnergyIn) * 100
09 OUTPUT "Efficiency is ", Efficiency, "%"
10 ENDIF
11 UNTIL TotalEnergyIn <> -1 OR UsefulEnergyOut <> -1

(a) Identify the three errors in the pseudocode and suggest corrections.

Error 1 .......................................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................

Error 2 .......................................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................

Error 3 .......................................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................
[3]

(b) Write pseudocode to check for an efficiency of 92% or over for this appliance and to output
“A-rated” if the efficiency is 92% or over.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

© UCLES 2023 0478/22/F/M/23 [Turn over


360
6

7 Consider this logic expression.

X = (A OR NOT B) AND (B AND NOT C)

(a) Draw a logic circuit for this logic expression. Each logic gate must have a maximum of two
inputs. Do not simplify this logic expression.

B X

[5]

(b) Complete the truth table from the given logic expression.

Working space
A B C X

0 0 0

0 0 1

0 1 0

0 1 1

1 0 0

1 0 1

1 1 0

1 1 1

[4]

© UCLES 2023 0478/22/F/M/23


361
8

8 This flowchart represents an algorithm to find the average value of a number of sales.

START

NumberSales 0
Total 0

INPUT
SaleValue

IS Yes
SaleValue Average Total / NumberSales
= 0?

No OUTPUT
"Average sale
NumberSales NumberSales + 1 value ", Average

Total Total + SaleValue STOP

(a) Complete the trace table using this data:


5.50, 3.40, 6.25, 3.85, –11.00, 0

NumberSales Total SaleValue Average OUTPUT

[4]

© UCLES 2023 0478/22/F/M/23


362
9

(b) Identify the error in the algorithm and describe how to correct it.

Error ..........................................................................................................................................

...................................................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[3]

© UCLES 2023 0478/22/F/M/23 [Turn over


363
10

A shop that sells books has set up a new database table called BookList to store book details.
Part of this table is given.

CatNo Title Fiction Author PaperBack Price StockLevel


BK01 The Princes’ Story Yes B Penn Yes 4.50 500
BK02 The Princesses’ Story Yes B Penn Yes 4.50 350
BK03 Computer Science No Way Yu Yes 19.99 20
BK04 The Modern World No P Patel No 25.00 5
BK05 The Ancient World Yes P Patel No 25.00 5
BK06 Computer Science No R Dale Yes 27.35 8
BK07 The Princes’ Story Yes B Penn No 12.50 3
BK08 The Princesses’ Story Yes B Penn No 12.50 0
BK12 Famous Five Yes E Bly Yes 2.75 45
BK15 Secret Seven Yes E Bly Yes 2.75 25
BK16 The Last Knight Yes P Mann Yes 5.99 7
BK17 The Dark Tower Yes P Mann Yes 5.99 5
BK19 The Final Chase Yes P Mann Yes 5.99 5
BK21 Maths Today Part 1 No B Ward Yes 6.75 25
BK22 Maths Today Part 2 No B Ward Yes 6.75 15
BK23 Maths Today Part 3 No B Ward Yes 6.75 10
BK26 Maths Today Workbook No B Ward Yes 6.75 30
BK27 Knitting for Beginners No A Smith Yes 6.99 3
BK30 Woodwork for Beginners No A Smith Yes 6.99 4
BK31 Networking for Beginners No A Smith Yes 6.99 0

(a) State the number of records in this part of the database table.

............................................................................................................................................. [1]

(b) (i) Give the name of the field that would be used for the primary key.

..................................................................................................................................... [1]

(ii) State the reason for choosing this field for the primary key.

...........................................................................................................................................

..................................................................................................................................... [1]

© UCLES 2023 0478/22/F/M/23


364
11

(c) Complete the table to identify the most appropriate data type for each field based on the data
shown in the table BookList

Field Data type

CatNo

Title

Fiction

Price

[2]

(d) Write the output from this structured query language (SQL) statement.

SELECT CatNo, Title, Author

FROM BookList

WHERE StockLevel = 0;

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

(e) Complete this SQL statement to display all the titles by the author B Penn.

SELECT .....................................................................................................................................

FROM .........................................................................................................................................

WHERE .....................................................................................................................................;
[2]

© UCLES 2023 0478/22/F/M/23 [Turn over


365
12

10 The variables X, Y and Z are used in a program: X stores a whole number, Y stores a decimal
number and Z stores a flag that can be set to TRUE or FALSE

(a) Write pseudocode statements to declare the variables X, Y and Z

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

(b) The function Same(A,B) returns TRUE if the value of A is the same as the value of B when B
is rounded to the nearest whole number and FALSE otherwise.

Write pseudocode statements to:


• define the function
• call the function with X and Y and store the return value in Z

Function definition ....................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Function call .............................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[6]

(c) State the difference between defining and calling a function.

...................................................................................................................................................

............................................................................................................................................. [1]

© UCLES 2023 0478/22/F/M/23


366
14

11 The one-dimensional (1D) array TeamName[] contains the names of teams in a sports league.
The two-dimensional (2D) array TeamPoints[] contains the points awarded for each match.
The position of each team’s data in the two arrays is the same. For example, the team stored at
index 10 in TeamName[] and TeamPoints[] is the same.

The variable LeagueSize contains the number of teams in the league. The variable MatchNo
contains the number of matches played. All teams have played the same number of matches.

The arrays and variables have already been set up and the data stored.

Each match can be played at home or away. Points are recorded for the match results of each
team with the following values:
• 3 – away win
• 2 – home win
• 1 – drawn match
• 0 – lost match.

Write a program that meets the following requirements:


• calculates the total points for all matches played for each team
• counts the total number of away wins, home wins, drawn matches and lost matches for each
team
• outputs for each team:
– name
– total points
– total number of away wins, home wins, drawn matches and lost matches
• finds and outputs the name of the team with the highest total points
• finds and outputs the name of the team with the lowest total points.

You must use pseudocode or program code and add comments to explain how your code works.

You do not need to declare any arrays, variables or constants; you may assume that this has
already been done.

All inputs and outputs must contain suitable messages.

You do not need to initialise the data in the arrays TeamName[] and TeamPoints[] or the
variables LeagueSize and MatchNo

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

© UCLES 2023 0478/22/F/M/23


367
15

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................
© UCLES 2023 0478/22/F/M/23 [Turn over
368
16

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

.................................................................................................................................................. [15]

Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every
reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the
publisher will be pleased to make amends at the earliest possible opportunity.

To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge
Assessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download
at www.cambridgeinternational.org after the live examination series.

Cambridge Assessment International Education is part of Cambridge Assessment. Cambridge Assessment is the brand name of the University of Cambridge
Local Examinations Syndicate (UCLES), which is a department of the University of Cambridge.

© UCLES 2023 0478/22/F/M/23


369

Question Answer Marks

1 C 1

Question Answer Marks

2(a) One mark for each single correct line from a description to statement 4

Description Pseudocode statement


a statement to count
FOR Count  1 TO 10

a statement to total Value  Value + NewValue

WHILE Value > 10 DO


a statement to start a
pre-condition loop
Value  Value + 1

a statement to start a
post-condition loop REPEAT
370

Question Answer Marks

2(b) One mark for each point: 5


• Initialisation of total to zero before loop
• appropriate loop controls
• totalling statement inside the loop, must use array Number[] with an index
• calculation of average outside loop
• output of average outside loop

Example: Total  0
FOR Count  1 TO 50
Total  Total + Number[Count]
NEXT Count
Average  Total / 50
OUTPUT "The average is ", Average

Question Answer Marks

3 One mark for each point max two. 3


• check that the program works as expected
• check for logic/runtime errors
• check that the program rejects any invalid data that is input
• check that the program only accepts reasonable data

One mark for example


Normal // erroneous // abnormal // extreme // boundary
371

Question Answer Marks

4 One mark for each point max three. 3


• variables / constants are used to store items of data
• the data stored in variables / constants are accessed by an identifier // named data stores
• the value of a variable may change during the execution of a program
• the value of a constant will remain the same during the execution of a program

Question Answer Marks

5 One mark for a suitable hierarchical structure 4


One mark for suitable names for the sub systems for user input and display options
One mark for sub systems for user inputs, (choice of display,) food order and payment
One mark for sub systems for display output types, pictures and list
372

Question Answer Marks

6(a) One mark for each error identified and correction 3


• Line 05 OUTPUT UsefulEnergyOut should be INPUT UsefulEnergyOut
• Line 06 IF TotalEnergyIn <> -1 AND UsefulEnergy <> -1 should be:
IF TotalEnergyIn <> -1 AND UsefulEnergyOut <> -1
• Line 11 UNTIL TotalEnergyIn <> -1 OR UsefulEnergyOut <> -1 should be:
UNTIL TotalEnergyIn = -1 OR UsefulEnergyOut = -1

6(b) One mark for checking for >= 92 2


One mark for outputting "A-rated" only if the condition is met
For example
IF Efficiency >= 92
THEN
OUTPUT "A-rated"
ENDIF

Question Answer Marks

7(a) One mark for each correct gate, with the correct inputs as shown. 5
373

Question Answer Marks

7(b) 4
A B C X

0 0 0 0

0 0 1 0

0 1 0 0

0 1 1 0

1 0 0 0

1 0 1 0

1 1 0 1

1 1 1 0

4 marks for 8 correct outputs


3 marks for 6/7 correct outputs
2 marks for 4/5 correct outputs
1 mark for 2/3 correct outputs
374

Question Answer Marks

8(a) 4
NumberSales Total SaleValue Average OUTPUT

0 0

1 5.50 5.50

2 8.90 3.40

3 15.15 6.25

4 19.00 3.85

5 8.00 -11.00

0 1.6 Average sale value 1.6

One mark for each column NumberSales, Total, SaleValue


One mark for columns Average and OUTPUT

8(b) Error – one mark for identification of error 3


for example including negative numbers / not differentiation between negative and positive values
Correction
One mark for correct placement and one mark for appropriate action
For example – after the input box insert a decision box to reject negative numbers
375

Question Answer Marks

9(a) 20 1

9(b)(i) CatNo 1

9(b)(ii) It is a unique identifier // no repeated values 1

9(c) Two marks for 4 correct data types or one mark for 2 or 3 correct data types 2
Field Data type

CatNo Text/Alphanumeric

Title Text/alphanumeric

Fiction Boolean

Price Real

9(d) One mark for each correct row 2


BK08 The Princesses’ Story B Penn
BK31 Networking for Beginners A Smith

9(e) One mark if two correct or two marks if completely correct 2


Title
BookList
Author = "B Penn" // Author = 'B Penn' // Author Like "B Penn"
376

Question Answer Marks

10(a) One mark for each correct line 3


DECLARE X : INTEGER
DECLARE Y : REAL
DECLARE Z : BOOLEAN

10(b) One mark for using FUNCTION and ENDFUNCTION and RETURNS BOOLEAN 6
One mark for naming the function Same
One mark for defining the two parameters correctly
One mark for comparing the two parameters using ROUND
One mark for correctly returning TRUE and FALSE
One mark for correct function call

Example definition:
FUNCTION Same(A : INTEGER, B : REAL) RETURNS BOOLEAN
IF A = ROUND(B,0)
THEN
RETURN TRUE
ELSE
RETURN FALSE
ENDIF
ENDFUNCTION

Example call:
Z  Same(X,Y)

10(c) A function is defined once and called many times or 1


Define – setting up the function and call is using a function
377

Question Answer Marks

11 Read and understand the question before starting to mark any scripts. Read the whole answer before marking a script: 15
Check if each requirement listed below has been met.
Requirements may be met using a suitable built-in function from the programming language used (Python, VB.NET or
Java)
On script if requirement met add seen, NE if partial attempt, cross if no attempt (see marked scripts).

Use the tables for A02 and A03 below to award a mark in a suitable band using a best fit approach, then add up the total.
Marks are available for: to
• AO2 (maximum 9 marks)
• AO3 (maximum 6 marks)

Data Structures required with names as given in the scenario


Arrays or lists TeamName, TeamPoints
Variables LeagueSize, MatchNo

Requirements (techniques)
R1 calculates total points for all matches played by each team (nested iteration, totalling)
R2 counts and outputs, with the team’s name, for each team
the total number of away wins, home wins, drawn matches and lost matches
(nested iteration, counting, output)
R3 finds and outputs
the name of the team with the highest number of points and the name of the team with the lowest number of points.
(output, selection)
378

Question Answer Marks

11 Example 15-mark answer in pseudocode:


// meaningful identifier names and appropriate data structures to store the data required
DECLARE TeamCounter : INTEGER
DECLARE MatchCounter : INTEGER
FOR TeamCounter  1 to LeagueSize // zero totals for each club’s results
TotalPoints[TeamCounter]  0
NEXT TeamCounter

FOR TeamCounter  1 TO LeagueSize


AwayWinNo  0 // zero totals for each club’s result details
HomeWinNo  0
DrawNo  0
LostNo  0
FOR MatchCounter  1 TO MatchNo
TotalPoints[TeamCounter]  TotalPoints[TeamCounter] +
TeamPoints[TeamCounter, MatchCounter]
CASE OF TeamPoints[TeamCounter, MatchCounter]
3 : AwayWinNo  AwayWinNo + 1
2 : HomeWinNo  HomeWinNo + 1
1 : DrawNo  DrawNo + 1
0 : LostNo  LostNo + 1
ENDCASE
NEXT MatchCounter

OUTPUT "Team ", TeamName[TeamCounter] // Output details of a team’s results


OUTPUT "Total points ", TotalResult[TeamCounter]
OUTPUT "Away wins ", AwayWinNo
OUTPUT "Home wins ", HomeWinNo
OUTPUT "Draws ", DrawNo
OUTPUT "Losses ", LostNo
379

Question Answer Marks

11 // Check for highest and lowest results


IF TeamCounter = 1
THEN
HighestResult  TotalPoints[TeamCounter]
LowestResult  TotalPoints[TeamCounter]
ENDIF

IF TotalPoints[TeamCounter] > HighestResult


THEN
HighestResult  TotalPoints[TeamCounter]
TopTeam  TeamCounter
ENDIF
IF TotalPoints[TeamCounter] < LowestResult
THEN
LowestResult  TotalPoints[TeamCounter]
BottomTeam  TeamCounter
ENDIF

NEXT TeamCounter

// output names of the teams with the highest and lowest number of points
OUTPUT "Top Team ", TeamName[TopTeam]
OUTPUT "Bottom Team ", TeamName[BottomTeam]
380

Cambridge IGCSE™
* 9 1 5 0 6 4 5 6 9 9 *

COMPUTER SCIENCE 0478/12


Paper 1 Computer Systems October/November 2023

1 hour 45 minutes

You must answer on the question paper.

No additional materials are needed.

INSTRUCTIONS
● Answer all questions.
● Use a black or dark blue pen. You may use an HB pencil for any diagrams or graphs.
● Write your name, centre number and candidate number in the boxes at the top of the page.
● Write your answer to each question in the space provided.
● Do not use an erasable pen or correction fluid.
● Do not write on any bar codes.
● Calculators must not be used in this paper.

INFORMATION
● The total mark for this paper is 75.
● The number of marks for each question or part question is shown in brackets [ ].
● No marks will be awarded for using brand names of software packages or hardware.

This document has 12 pages.

DC (LK) 314033/2
© UCLES 2023 [Turn over
381
2

1 Malware can be used to corrupt data stored on a computer.

(a) Tick (3) one box to show which cyber security threat is not a type of malware.

A Phishing

B Ransomware

C Virus

D Worm
[1]

(b) Identify one other example of malware than those given in part 1(a).

............................................................................................................................................. [1]

(c) Identify the type of software that is used to find and remove malware from a computer.

............................................................................................................................................. [1]

2 A register stores the binary number:

1 1 1 0 0 0 1 1

(a) Give the denary number for the binary number stored in the register.

............................................................................................................................................. [1]

Working space

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

(b) Give the hexadecimal number for the binary number stored in the register.

............................................................................................................................................. [2]

Working space

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

© UCLES 2023 0478/12/O/N/23


382
3

(c) A logical left shift of two places is performed on the binary number stored in the register.

Complete the binary register to show its contents after this logical left shift.

[1]

(d) The negative denary number −99 needs to be stored in the register.

Complete the register to show the binary number that would be stored, using two’s
complement. Show all your working.

Working space ..........................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Register:
[2]

(e) The number 01001100 is added to 11100011

Add the two 8-bit binary numbers, using binary addition.

Give your answer in binary. Show all your working.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]

© UCLES 2023 0478/12/O/N/23 [Turn over


383
4

3 A user’s computer has a central processing unit (CPU) that has a clock speed of 2 GHz.

She wants to change it to a CPU that has a clock speed of 3 GHz.

(a) (i) State what is meant by clock speed.

...........................................................................................................................................

..................................................................................................................................... [1]

(ii) Explain the effect this change will have on the performance of the CPU.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

(b) The CPU contains a memory address register (MAR).

Describe the role of the MAR in the fetch–decode–execute cycle.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

(c) The CPU has a list of all the machine code commands it can process.

State the name of this list of commands.

............................................................................................................................................. [1]

4 A washing machine is an example of an embedded system.

(a) Give two characteristics of an embedded system.

1 ................................................................................................................................................

...................................................................................................................................................

2 ................................................................................................................................................

...................................................................................................................................................
[2]

© UCLES 2023 0478/12/O/N/23


384
5

(b) Circle three other examples of an embedded system.

freezer laptop

personal computer (PC) security light system smartphone

vending machine web server


[3]

5 A band is recording their new song. They need to consider the sample rate and sample resolution
of their recording.

(a) Give one benefit of using a higher sample rate to record the song.

...................................................................................................................................................

............................................................................................................................................. [1]

(b) Give one drawback of using a higher sample rate to record the song.

...................................................................................................................................................

............................................................................................................................................. [1]

(c) Describe what is meant by sample resolution.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

(d) The band wants to compress the sound file, but they do not want any data to be permanently
removed.

Identify the compression method that should be used.

............................................................................................................................................. [1]

© UCLES 2023 0478/12/O/N/23 [Turn over


385
6

6 The table contains descriptions about data transmission methods.

Complete the table by identifying which data transmission methods are described.

Data transmission method Description

Data is transmitted down a single wire, one bit at a time,


............................................................ in one direction only.

Data is transmitted down multiple wires, multiple bits at a


............................................................ time, in both directions, but only one direction at a time.

Data is transmitted down a single wire, one bit at a time,


............................................................ in both directions at the same time.

Data is transmitted down multiple wires, multiple bits at


............................................................ a time, in one direction only.

[4]

7 A train station has a ticket inspector who checks each customer’s ticket before they are allowed to
get on the train.

The train station wants a system that will allow the tickets to be automatically checked.

(a) Identify two suitable input devices that can be used to automatically read the tickets.

1 ................................................................................................................................................

2 ................................................................................................................................................
[2]

© UCLES 2023 0478/12/O/N/23


386
7

(b) The train driver pushes a button to close the train door when all passengers have boarded
the train. The train door will only close when there are no passengers in the doorway.

The system to check there are no passengers in the doorway uses a sensor and a
microprocessor.

Explain how the sensor and the microprocessor are used to check whether the train door can
be closed.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [6]

© UCLES 2023 0478/12/O/N/23 [Turn over


387
8

8 (a) Draw and annotate a diagram that demonstrates the cyber security threat of data interception.

[4]

(b) Identify one security solution that will help keep data safe from data interception and state
why it will help keep the data safe.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]
© UCLES 2023 0478/12/O/N/23
388
9

9 The table contains terms and descriptions about the internet.

Complete the table with the missing terms and descriptions.

Term Description

.................................................. the collective name for all the web pages available

a small text file, stored by the web browser, that can store
..................................................
a user’s personal data

...........................................................................................

uniform resource locator (URL) ...........................................................................................

...........................................................................................

...........................................................................................

web server ...........................................................................................

...........................................................................................

the language used to create a website. Example tags are


..................................................
<head> and <body>

.................................................. a protocol that is used to request and send web pages

[6]

© UCLES 2023 0478/12/O/N/23 [Turn over


389
10

10 A business has a system that is described as having artificial intelligence (AI).

(a) State one of the main characteristics of an AI system.

...................................................................................................................................................

............................................................................................................................................. [1]

(b) An AI system is an expert system.

Explain how an expert system operates.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [6]

11 A manufacturing company uses an automated system in its manufacturing process.

(a) The automated system uses a flow sensor.

Identify what a flow sensor measures.

...................................................................................................................................................

............................................................................................................................................. [1]

© UCLES 2023 0478/12/O/N/23


390
11

(b) Explain one advantage to employees of using an automated system in manufacturing.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

(c) Explain one disadvantage to the company owner of using an automated system in
manufacturing.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

12 Digital currency can be used to pay for products and services.

Digital currencies are often tracked using digital ledgers.

(a) Give two other features of digital currency.

1 ................................................................................................................................................

...................................................................................................................................................

2 ................................................................................................................................................

...................................................................................................................................................
[2]

(b) Identify the process that uses a digital ledger to track the use of digital currency.

............................................................................................................................................. [1]

© UCLES 2023 0478/12/O/N/23 [Turn over


391
12

13 Storage and memory are important components of a computer system.

(a) Primary storage is one type of storage in a computer system.

(i) Tick (3) one box to show which is an example of primary storage.

A compact disk (CD)

B hard disk drive (HDD)

C random access memory (RAM)

D solid-state drive (SSD)


[1]

(ii) Give one characteristic of primary storage.

..................................................................................................................................... [1]

(b) Virtual memory can be created in a computer system.

Complete the description about virtual memory.

Use the terms from the list.

Some of the terms in the list will not be used. Some terms may be used more than once.

binary hard disk drive (HDD) hexadecimal operating system

pages random access memory (RAM) read only memory (ROM)

sectors software tracks virtual memory

Virtual memory is used when the ...................................................................... is full. It is

created by partitioning the ...................................................................... . Data is divided into

...................................................................... that can be sent from

...................................................................... to the

...................................................................... to be temporarily stored until they are required.


[5]

Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every
reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the
publisher will be pleased to make amends at the earliest possible opportunity.

To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge
Assessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download
at www.cambridgeinternational.org after the live examination series.

Cambridge Assessment International Education is part of Cambridge Assessment. Cambridge Assessment is the brand name of the University of Cambridge
Local Examinations Syndicate (UCLES), which is a department of the University of Cambridge.

© UCLES 2023 0478/12/O/N/23


392

Question Answer Marks

1(a) − A 1

1(b) Any one from: 1


− Spyware // Keylogger
− Adware
− Trojan horse

1(c) − Anti-malware 1

Question Answer Marks

2(a) − 227 1

2(b) One mark for each correct character in the correct order: 2
− E3

2(c) 1
1 0 0 0 1 1 0 0

2(d) One mark for suitable working method e.g. flip and add 1 2
One mark for correct answer

− 10011101

2(e) One mark for each correct nibble (max 2) 4


One mark for correct working e.g. correct carry
One mark for showing overflow bit

1
1 1 1 0 0 0 1 1
+ 0 1 0 0 1 1 0 0
1 0 0 1 0 1 1 1 1

Question Answer Marks

3(a)(i) − The maximum number of FDE cycles/instructions a CPU can 1


perform/process/execute in a second

3(a)(ii) − Increases/improves the performance // Tasks can be performed 2


quicker/faster
− … because more FDE cycles/instructions can be processed in a second

3(b) − Stores addresses … 2


− … of next instruction/data to be fetched // where data is to be written to

3(c) − Instruction set 1


393

Question Answer Marks

4(a) Any two from: 2


− Performs a single/limited/dedicated function/task
− It has a microprocessor
− It has dedicated hardware
− Uses firmware
− It is normally built into a larger device/system
− User normally cannot reprogram
− It does not require much power
− It is cheap to manufacture
− Works automatically // works without human intervention
− It is small (in size)
− It is a real-time system

4(b) One mark for each correct system: 3


− security light system
− freezer
− vending machine

Question Answer Marks

5(a) Any one from: 1


− The recording of the song is more accurate/closer to original

5(b) Any one from: 1


− The file size will be increased
− The file will require more storage space

5(c) Any two from: 2


− The number of bits that are used per sample
− … that provides the variation in amplitude that can be stored for each
sample // defines the number of different amplitudes that can be recorded
− … that determines how quiet/loud the sounds are that can be recorded
− Example e.g. 16-bit

5(d) − Lossless 1
394

Question Answer Marks

6 One mark for each correct data transmission method: 4

Data transmission method Description

Data is transmitted down a single


serial simplex wire, one bit at a time, in one
direction only.

Data is transmitted down multiple


wires, multiple bits at a time, in both
parallel half-duplex
directions, but only one direction at
a time.

Data is transmitted down a single


serial full-duplex wire, one bit at a time, in both
directions at the same time.

Data is transmitted down multiple


parallel simplex wires, multiple bits at a time, in one
direction only.

Question Answer Marks

7(a) Any two from e.g. 2


− Barcode scanner
− QR code scanner
− Digital camera

7(b) Any six from: 6


− Proximity/infrared/pressure sensor used
− Sensor continually sends digitised data to microprocessor // When
driver pushes button, sensor sends digitised data to the microprocessor
− Microprocessor compares data to stored value(s)
− If in range/out of range/matches, microprocessor sends signal to close
the door
− Actuator used to close door
− If not in range/out of range/does not match door will not close //
If not in range/out of range/does not match actuator not activated/signal
not sent as passenger in door //
If not in range/out of range/does not match a timer is set to check again //
If not in range/out of range/does not match a signal is sent to alert the
driver/output a message
− This process repeats until the door can close
395

Question Answer Marks

8(a) The diagram demonstrates (One mark for each part of the diagram): 4
− Data is being sent from one device to another
− The data is being examined during transmission
− Packet sniffer is used
− Intercepted data is reported to a third-party during transmission …
− … and analysed for anything useful
− Connection hacked to spoof destination address
e.g.

8(b) − Encryption … 2
− … if the data is intercepted it will be meaningless (because they do not
have the decryption key)
396

Question Answer Marks

9 6
Term Description

the collective name for all the


world wide web
web pages available

a small text file, stored by the


cookie web browser, that can store a
user’s personal data

the text-based address for a


website // It is made up of the
uniform resource locator (URL)
protocol, domain name and
filename/folder name

Stores web pages // receives


web server requests from clients and returns
requested web page

the language used to create a


hypertext markup language //
website. Example tags are
HTML
<head> and <body>

hypertext transfer protocol // a protocol that is used to request


HTTP and send web pages

Question Answer Marks

10(a) Any one from: 1


− The ability to learn/adapt // machine learning abilities
− The collection of data and the rules for using that data
− The ability to reason // has problem solving abilities // makes predictions
− Simulates intelligent/human behaviour
− Analyses patterns

10(b) Any six from: 6


− It has an interface …
− … used to input data/view output

− It has a knowledge base


− It has a rule base
− It has an inference engine

− Applies the rule base to/and the knowledge base to provide


output/diagnosis/result/solution/decision
− Decides what to ask next based on the data input
397

Question Answer Marks

11(a) − Amount of liquid/gas/steam flowing/moving through an environment 1

11(b) Two from (for benefit and matching description) 2


e.g.:
− Increases safety
− …meaning that workers do not need to go into dangerous areas to collect
data/make checks/do dangerous tasks

− Can increase jobs/skills


− …as employees are needed to learn/maintain the equipment

− No need to do repetitive tasks


− … so, they can use their time on other/more skilled tasks

11(c) Two from (for drawback and matching description) 2


e.g.:
− High set-up/installation costs
− … it would mean the company need to find a lot of money up front to pay
for the equipment // employees will need training

− Utility/maintenance/repair costs
− … increase in bills such as electricity // skilled employees will be required
to maintain the system // equipment will break/need updating

− Deskilling of the workforce


− … may mean that workers will no longer have the skills for some of the
manufacturing jobs, should the equipment break

Question Answer Marks

12(a) Any two from: 2


− Only exists electronically
− Can be a decentralised system
− Can be a centralised system
− Usually encrypted

12(b) − Blockchain 1
398

Question Answer Marks

13(a)(i) − C 1

13(a)(ii) Any one from: 1


− Directly accessed by the CPU
− Has both volatile and non-volatile storage

13(b) One mark for each correct term in the correct order: 5
− Random access memory (RAM)
− Hard disk drive (HDD)
− Pages
− Random access memory (RAM)
− Virtual memory // Hard disk drive (HDD)
399

Cambridge IGCSE™
* 3 4 3 5 3 7 0 0 4 3 *

COMPUTER SCIENCE 0478/22


Paper 2 Algorithms, Programming and Logic October/November 2023

1 hour 45 minutes

You must answer on the question paper.

No additional materials are needed.

INSTRUCTIONS
● Answer all questions.
● Use a black or dark blue pen. You may use an HB pencil for any diagrams or graphs.
● Write your name, centre number and candidate number in the boxes at the top of the page.
● Write your answer to each question in the space provided.
● Do not use an erasable pen or correction fluid.
● Do not write on any bar codes.
● Calculators must not be used in this paper.

INFORMATION
● The total mark for this paper is 75.
● The number of marks for each question or part question is shown in brackets [ ].
● No marks will be awarded for using brand names of software packages or hardware.

This document has 16 pages. Any blank pages are indicated.

DC (RW/SG) 314039/4
© UCLES 2023 [Turn over
400
2

1 Tick (✓) one box to complete the sentence.

Verification is used to make sure that a value entered

A has not changed during input.

B is an integer.

C is correct.

D is not a string.
[1]

2 A type of validation check is a length check. Another type of validation check is used to make sure
that any date entered is in the dd/mm/yyyy style:
dd means day, mm means month and yyyy means year.

(a) State the type of validation check used.

............................................................................................................................................. [1]

(b) Give one example of normal test data and one example of abnormal test data you should
use to make sure the check in part (a) is working properly.

State a reason for each of your choices of test data.

Normal ......................................................................................................................................

Reason .....................................................................................................................................

...................................................................................................................................................

Abnormal ..................................................................................................................................

Reason .....................................................................................................................................

...................................................................................................................................................
[4]

(c) Describe how a length check could be used with the date entered.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

© UCLES 2023 0478/22/O/N/23


401
3

3 Four pseudocode statements and five pseudocode uses are shown.

(a) Draw one line to link each pseudocode statement to the most appropriate pseudocode use.

Not all pseudocode uses will be required.

Pseudocode statement Pseudocode use

CALL Colour(NewColour) counting

finding an average
Value (A1 + A2 + A3) / 3

totalling

Loop1 Loop1 + 1
using a conditional statement

IF Count > 7 THEN X1 0 using a procedure


[4]

(b) A one‑dimensional (1D) array called Temperatures[] has 25 elements beginning at


index 1. It holds values that range between –20 and 100 inclusive.

Write a pseudocode algorithm using a single loop to find the lowest value in this array and
output the result only once.

You do not need to declare or populate this array.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]
© UCLES 2023 0478/22/O/N/23 [Turn over
402
4

4 An algorithm has been written in pseudocode to allow the names of 50 cities and their countries to
be entered and stored in a two‑dimensional (2D) array. The contents of the array are then output.

01 DECLARE City ARRAY[1:50, 1:2] OF BOOLEAN


02 DECLARE Count : INTEGER
03 DECLARE Out : INTEGER
04 Count 1
05 IF
06 OUTPUT "Enter the name of the city"
07 INPUT City[Count, 2]
08 OUTPUT "Enter the name of the country"
09 INPUT City[Count, 2]
10 Count Count + 1
11 UNTIL Count = 50
12 FOR Out 1 TO 1
13 OUTPUT "The city ", City[Out, 1], " is in ", City[Out, 2]
14 NEXT Out

(a) Identify the four errors in the pseudocode and suggest corrections.

Error 1 .......................................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................

Error 2 .......................................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................

Error 3 .......................................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................

Error 4 .......................................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................
[4]

© UCLES 2023 0478/22/O/N/23


403
5

(b) Describe the changes you should make to the corrected algorithm to allow the name of a
country to be input and to display only the stored cities from that country.

You do not need to rewrite the algorithm.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [5]

5 Explain how variables and constants should be used when creating and running a program.

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

.................................................................................................................................................... [3]

© UCLES 2023 0478/22/O/N/23 [Turn over


404
6

6 The flowchart represents an algorithm that performs a process on groups of values that are input.
The algorithm will fail if the first value of any group is 0.

An input of –1 will terminate the algorithm.

START

Total 0
OUTPUT
"Average is ",
Average
Count 0

INPUT OUTPUT
Value "Total is ",
Total

IS Yes
Value = Average Total / Count
0 ?

No

IS Yes
Value = STOP
–1 ?

No

Total Total + Value

Count Count + 1

© UCLES 2023 0478/22/O/N/23


405
7

(a) Complete the trace table for the input data:

25, 35, 3, 0, 57, 20, 25, 18, 0, –1, 307, 40, 0

Value Average Total Count OUTPUT

[5]

(b) Describe the purpose of the algorithm.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

© UCLES 2023 0478/22/O/N/23 [Turn over


406
8

7 The string operation SUBSTRING(Quote, Start, Number) returns a string from Quote
beginning at position Start that is Number characters long. The first character in Quote is in
position 1.

Write pseudocode statements to:


• store the string "Learning Never Exhausts The Mind" in Quote
• extract and display the words "The Mind" from the string
• output the original string in lower case.

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

.................................................................................................................................................... [5]

8 Explain why a programmer would use procedures and parameters when writing a program.

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

.................................................................................................................................................... [4]

© UCLES 2023 0478/22/O/N/23


407
9

9 Consider the logic expression:

Z = (A NAND B) OR NOT (B XOR C)

(a) Draw a logic circuit for this logic expression.

Each logic gate must have a maximum of two inputs.

Do not simplify this logic expression.

B Z

[4]

(b) Complete the truth table from the given logic expression.

Working space
A B C Z

0 0 0

0 0 1

0 1 0

0 1 1

1 0 0

1 0 1

1 1 0

1 1 1
[4]

© UCLES 2023 0478/22/O/N/23 [Turn over


408
10

10 A database table called Horses stores details about the horses kept at a horse sanctuary.

Code Breed BreedOrigin Gender Age Arrived


H002 Arabian Saudi Arabia M 5 28/09/2022
H004 Percheron France M 5 30/10/2022
H010 Friesian Netherlands M 6 15/11/2022
H011 Fjord Norway F 4 17/11/2022
H012 Clydesdale Scotland M 10 18/11/2022
H015 Arabian Saudi Arabia F 5 15/12/2022
H016 Arabian Saudi Arabia F 5 15/12/2022
H017 Clydesdale Scotland F 4 16/01/2023
H019 Percheron France M 3 16/01/2023
H025 Percheron France M 7 16/01/2023
H026 Clydesdale Scotland F 9 20/01/2023
H030 Clydesdale Scotland M 12 20/01/2023
H032 Fjord Norway M 3 24/03/2023
H033 Arabian Saudi Arabia F 15 27/04/2023
H034 Clydesdale Scotland F 4 14/06/2023
H035 Fjord Norway M 7 15/06/2023
H036 Friesian Netherlands F 15 20/07/2023
H037 Friesian Netherlands M 12 20/07/2023

(a) State the number of records in this database table.

............................................................................................................................................. [1]

(b) Give the name of the field that is most suitable to be the primary key.

State the reason for this choice.

Field ..........................................................................................................................................

Reason .....................................................................................................................................

...................................................................................................................................................
[2]

© UCLES 2023 0478/22/O/N/23


409
11

(c) The database only allows the data types:


• Boolean
• character
• date/time
• integer
• real
• text.

Complete the table to show the most appropriate data type for each field.
Each data type must be different.

Field Data type


Breed

Gender

Age

Arrived
[2]

(d) Complete the structured query language (SQL) to return the code and breed of all the horses
whose breed originated in Scotland.

......................................... Code, Breed,

FROM .........................................

WHERE ......................................... = "Scotland";


[3]

© UCLES 2023 0478/22/O/N/23 [Turn over


410
12

11 A wood flooring company stores the names of up to 100 customers in a one‑dimensional (1D) array
Customers[]. A two‑dimensional (2D) array Quotations[] stores details of each customer’s
quotation:
• length of room (one decimal place)
• width of room (one decimal place)
• area of wood required (rounded up to next whole number)
• choice of wood index (whole number)
• price of wood required in dollars (two decimal places).

The floor measurements (room length and room width) are taken in metres. All floors are rectangles
and room measurements must be between 1.5 and 10.0 inclusive.

The index of any customer’s data is the same in both arrays. For example, a customer named in
index 4 of Customers[] corresponds to the data in index 4 of Quotations[]

The wood choices available are:

Index Wood type Price per square metre ($)


1 Laminate 29.99
2 Pine 39.99
3 Oak 54.99

The data are stored in two 1D arrays named WoodType[] and Price[]. The index of the wood
type and price in their arrays share the same index number.

Write a program that meets the following requirements:


• input a new customer’s name, room length and room width
• check that each measurement is valid
• output an error message and require the measurement to be re‑entered until it is valid
• calculate the area of the room by multiplying together the length of the room and the width of
the room
• input the choice of wood and find its price per square metre
• calculate the price of the wood needed
• store all data in the relevant array
• output the customer’s quotation to include: the name of the customer, the choice of wood and
the calculated price of the wood required
• continue to accept the next customer.

You must use pseudocode or program code and add comments to explain how your code works.
You do not need to declare any arrays or variables; you may assume that this has already been
done.

You will need to initialise WoodType[] and Price[]

All inputs and outputs must contain suitable messages.

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................
© UCLES 2023 0478/22/O/N/23
411
13

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................
© UCLES 2023 0478/22/O/N/23 [Turn over
412
14

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

.................................................................................................................................................. [15]

© UCLES 2023 0478/22/O/N/23


413

Question Answer Marks

1 A 1

Question Answer Marks

2(a) Format check 1

2(b) One mark for each appropriate test data, max two 4
One mark for each correct accompanying reason, max two

For example:

Normal – 30/12/1960 …
Reason – … (the date is written in the correct format and) should be
accepted.

Abnormal – 30/Dec/1960 …
Reason – … (the month is not written in the correct format and) should be
rejected.

2(c) One mark per mark point, max two 2


MP1 check that there are 10 characters in total
MP2 if the date is too long/short it will be rejected

Question Answer Marks

3(a) One mark for each correct line. 4


414

Question Answer Marks

3(b) One mark per mark point, max four 4


MP1 initialise a variable to store the lowest number set to a high value (at
least 100) / first value in the array
MP2 loop structure to iterate 25 times
MP3 use of IF to check if the array element is less than the current lowest
value
MP4 …if it is, set this to the lowest value
MP5 output the result (with an appropriate message) after the loop

Example answer:
Min  100
FOR Count  1 TO 25
IF Temperatures[Count] < Min
THEN
Min  Temperatures[Count]
ENDIF
NEXT Count
OUTPUT "The lowest temperature is ", Min

Question Answer Marks

4(a) One mark per mark point, max four 4

MP1 Line 01 / DECLARE City ARRAY[1:50, 1:2] OF BOOLEAN


should be DECLARE City : ARRAY[1:50, 1:2] OF STRING
Line 05 / IF should be REPEAT
MP2 Line 07 / INPUT City[Count, 2]should be INPUT
City[Count, 1]
MP3 Line 11 / UNTIL Count = 50 // Line 04 / Count  1 AND Line
10 / Count  Count + 1 should be UNTIL Count = 51 /
UNTIL Count > 50 // Line 04 / Count  0 AND move Line 10
to beginning of loop / Line 06
MP4 Line 12 / FOR Out  1 TO 1 should be FOR Out  1 TO 50

Correct algorithm:
01 DECLARE City : ARRAY[1:50, 1:2] OF STRING
02 DECLARE Count : INTEGER
03 DECLARE Out : INTEGER
04 Count  1
05 REPEAT
06 OUTPUT "Enter the name of the city"
07 INPUT City[Count, 1]
08 OUTPUT "Enter the name of the country"
09 INPUT City[Count, 2]
10 Count  Count + 1
11 UNTIL Count > 50
12 FOR Out  1 TO 50
13 OUTPUT "The city ", City[Out, 1], " is in ",
City[Out, 2]
14 NEXT Out
415

Question Answer Marks

4(b) One mark per mark point, max five 5


MP1 add an input (and prompt to ask) for the country to be searched
MP2 …between lines 11 and 12
MP3 …using a new variable for the input
MP4 Add an IF statement to check if the current Country array element
matches the country being searched
MP5 …between lines 12 and 13
MP6 …if it does, allow the output in line 13 // the output in line 13 should
be after a THEN
MP7 If it does not, check the next element.

Question Answer Marks

5 One mark per mark point, max three 3


MP1 variables and constants should have meaningful identifiers
MP2 …so that programmers/future programmers are able to understand
their purpose
MP3 they are both used for data storage
MP4 constants store values that never change during the execution of a
program // by example
MP5 variables contain values that have been calculated within the
program / can change during the execution of the program // by
example
416

Question Answer Marks

6(a) One mark per correct column, max five 5

Value Average Total Count OUTPUT

0 0

25 25 1

35 60 2

3 63 3

0 21 Total is 63

Average is 21

0 0

57 57 1

20 77 2

25 102 3

18 120 4

0 30 Total is 120

Average is 30

0 0

−1

6(b) One mark per mark point, max two 2


MP1 to add together / find the average of a batch of numbers
MP2 the total and average are output (when the batch is complete/when
0 is entered)
MP3 when 0 is entered a new batch is started.
417

Question Answer Marks

7 One mark per mark point, max five 5


MP1 storing string in Quote
MP2 correct assignment for Start // sending correct start value
MP3 correct assignment for Number // sending correct number of
characters
MP4 use of SUBSTRING function with first parameter as Quote, or
equivalent, plus two other parameters
MP5 correct use of LCASE function
MP6 two correct outputs

For example:
Quote  "Learning Never Exhausts The Mind"
Start  25
Number  8
OUTPUT SUBSTRING(Quote, Start, Number)
OUTPUT LCASE(Quote)

Question Answer Marks

8 One mark per mark point, max four 4

Procedures, max three


MP1 to enable the programmer to write a collection of programming
statements under a single identifier
MP2 to allow modular programs to be created // to allow procedures to be
re-used within the program or in other programs
MP3 to make program creation faster because procedures can be re-used
// to enable different programmers to work on different procedures in
the same project
MP4 to make programs shorter (than using the repeated code) / using less
duplication of code // to make programs easier to maintain due to
being shorter.

Parameters, max three


MP5 to pass values from the main program to a procedure / function
MP6 …so that they can be used in the procedure / function
MP7 allow the procedure / function to be re-used with different data.
418

Question Answer Marks

9(a) One mark for each correct gate, with the correct input(s) as shown. 4

9(b) Four marks for eight correct outputs. 4


Three marks for six or seven correct outputs.
Two marks for four or five correct outputs.
One mark for two or three correct outputs

A B C Z

0 0 0 1

0 0 1 1

0 1 0 1

0 1 1 1

1 0 0 1

1 0 1 1

1 1 0 0

1 1 1 1
419

Question Answer Marks

10(a) 18 1

10(b) One mark for the correct field name 2


One mark for the correct reason

For example:
Code …
…Each entry in this field is a unique identifier

10(c) Two marks for four correct answers. 2


One mark for two or three correct answers.

Field Data type

Breed text

Gender Boolean

Age integer

Arrived date/time

10(d) One mark for each correct answer 3

SELECT
Horses
BreedOrigin

Correct SQL:

SELECT Code, Breed


FROM Horses
WHERE BreedOrigin = "Scotland";
420

Question Answer Marks

11 Requirements may be met using a suitable built-in function from the 15


programming language used (Python, VB.NET or Java)

Tables for AO2 and AO3 are used to award a mark in a suitable band using a
best fit approach.

Marks are available for:


• AO2 (maximum 9 marks)
• AO3 (maximum 6 marks)

Data Structures required with names as given in the scenario


The names underlined must be used as they are provided in the scenario:

Arrays or lists WoodType[], Price[], Customers[], Quotations[]

Requirements (techniques)
R1 Input and store customer name, room length and width, with validation of
input for room dimensions, including error message and repeated input
(Input with prompts, range check and iteration).
R2 Initialise wood arrays. Calculate room area, select and store wood
required. Determine cost of wood type and calculate price of wood to
purchase. Round and store all data to relevant array (array initialisation,
rounding, data retrieval from array, calculation and storage of results).
R3 Output full details: name of customer, choice of wood and quotation price
with appropriate messages. Program continues for next customer (Output
with messages, iteration of whole program).
421

Question Answer Marks

11 Example 15-mark answer in pseudocode

// declarations not required in the answer


// initial population of WoodType[] and Price[] arrays
// input and loops are also acceptable
WoodType[1]  "Laminate"
WoodType[2]  "Pine"
WoodType[3]  "Oak"
Price[1]  29.99
Price[2]  39.99
Price[3]  54.99
// initialises starting customer in sales arrays
CurrentCustomer  1
// to allow program to continue to next customer
Cont  TRUE
WHILE Cont DO
// input customer name
OUTPUT "Input the customer’s name "
INPUT Customers[CurrentCustomer]
// input of room dimensions with validation
OUTPUT "What is the length of your room? "
INPUT RoomLength
// validate RoomLength
WHILE RoomLength < 1.5 OR RoomLength > 10.0
OUTPUT "The measurement must be in the range 1.5
to 10.0 inclusive, please try again "
INPUT RoomLength
ENDWHILE
OUTPUT "What is the width of your room? "
INPUT RoomWidth
// validate RoomWidth

WHILE RoomWidth < 1.5 OR RoomWidth > 10.0


OUTPUT "The measurement must be in the range 1.5
to 10.0 inclusive, please try again "
INPUT RoomWidth
ENDWHILE
RoomArea  ROUND(RoomLength, 1) * ROUND(RoomWidth,
1)
RoomArea  ROUND (RoomArea + 0.5, 0)
// show the wood available and prices
OUTPUT "the wood choices available are:"
OUTPUT "Number Wood Type Price($)"
FOR Count  1 TO 3
OUTPUT Count, " ", WoodType[Count], " ",
422

Question Answer Marks

11 Price[Count]
Next Count
// input wood choice
OUTPUT "Input a number from 1 to 3 "
INPUT WoodChoice
// validate wood choice
WHILE WoodChoice < 1 OR WoodChoice > 3
OUTPUT "Your input is out of range, please try
again "
INPUT WoodChoice
ENDWHILE
// to calculate the total cost of the wood
WoodCost  RoomArea * Price[WoodChoice]
// to store the relevant data in Quotations[]
Quotations[CurrentCustomer, 1]  RoomLength
Quotations[CurrentCustomer, 2]  RoomWidth
Quotations[CurrentCustomer, 3]  RoomArea
Quotations[CurrentCustomer, 4]  WoodChoice
Quotations[CurrentCustomer, 5]  WoodCost

// final output of quotation


OUTPUT "Customer name: ", Customers[CurrentCustomer]
OUTPUT "The wood you have chosen is: ",
WoodType[WoodChoice]
OUTPUT "Your total price is: ",
Quotations[CurrentCustomer,5]
// ready for next customer
CurrentCustomer  CurrentCustomer + 1
// resets CurrentCustomer to beginning of array when
array
// limit reached
IF CurrentCustomer > 100
THEN
CurrentCustomer  1
ENDIF
ENDWHILE
423

Cambridge IGCSE™
* 5 0 1 5 4 0 7 3 5 7 *

COMPUTER SCIENCE 0478/12


Paper 1 Computer Systems February/March 2024

1 hour 45 minutes

You must answer on the question paper.

No additional materials are needed.

INSTRUCTIONS
● Answer all questions.
● Use a black or dark blue pen. You may use an HB pencil for any diagrams or graphs.
● Write your name, centre number and candidate number in the boxes at the top of the page.
● Write your answer to each question in the space provided.
● Do not use an erasable pen or correction fluid.
● Do not write on any bar codes.
● Calculators must not be used in this paper.

INFORMATION
● The total mark for this paper is 75.
● The number of marks for each question or part question is shown in brackets [ ].
● No marks will be awarded for using brand names of software packages or hardware.

This document has 16 pages. Any blank pages are indicated.

DC (DE) 327909/3
© UCLES 2024 [Turn over
424
2

1 Computers represent different types of data in binary.

(a) Tick (✓) one box to show the reason why computers use binary to represent data.

A Computers only allow 1s and 0s to be entered.

B Computers are made of switches and gates that can only be on or off.

C Binary does not need to be converted into other forms of data to be displayed.

D Both computers and humans can quickly process binary data.


[1]

(b) One form of data is characters.

The American standard code for information interchange (ASCII) denary number for the
character ‘N’ is 78.

(i) Tick (✓) one box to identify the ASCII denary number for the character ‘Q’.

A 81

B 80

C 79

D 77
[1]

(ii) Give the binary number for the ASCII denary number for ‘N’.

..................................................................................................................................... [1]

Working space

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

(iii) Explain how the word ‘RED’ is represented using a character set.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]
© UCLES 2024 0478/12/F/M/24
425
3

(c) Sound can be represented as binary.

(i) Explain why recording sound with a higher sampling resolution creates a more accurate
recording.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

(ii) Give one other way that the accuracy of a sound recording can be improved.

...........................................................................................................................................

..................................................................................................................................... [1]

© UCLES 2024 0478/12/F/M/24 [Turn over


426
4

2 A computer has a central processing unit (CPU).

The CPU includes the registers:


• Program counter (PC)
• Memory address register (MAR)
• Memory data register (MDR)
• Accumulator (ACC)
• Current instruction register (CIR).

(a) The table contains five statements about the role of registers in the fetch–decode–execute
cycle of a CPU.

Letter Statement
A PC stores the address of the next instruction to be accessed
B MAR stores the instructions of the program that is running
C MDR stores the data passed to it from the PC
D ACC stores the result of each calculation
E CIR stores the instruction currently being executed

Two of the statements are not correct.

Identify the letter of each incorrect statement.

Suggest a corrected statement for each.

Incorrect statement 1 .........................................

Corrected statement .................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Incorrect statement 2 .........................................

Corrected statement .................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[4]

(b) The computer has a single core 3.5 GHz processor and an 8 kB cache.

(i) State what is meant by a 3.5 GHz processor.

...........................................................................................................................................

..................................................................................................................................... [1]

© UCLES 2024 0478/12/F/M/24


427
5

(ii) The CPU is changed to a dual-core 3.5 GHz processor.

Explain how the number of cores affects the performance of a CPU.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

(iii) The amount of cache is increased to 64 kB.

Explain how the amount of cache affects the performance of a computer.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

(c) The computer has both primary and secondary storage.

(i) Random access memory (RAM) is one example of primary storage.

Describe what is meant by RAM.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

(ii) Read only memory (ROM) is another example of primary storage. ROM often stores the
start-up instructions for a computer.

Identify one other item of data that is commonly stored in ROM.

...........................................................................................................................................

..................................................................................................................................... [1]

(iii) Some computers make use of virtual memory.

State the purpose of virtual memory.

...........................................................................................................................................

..................................................................................................................................... [1]

© UCLES 2024 0478/12/F/M/24 [Turn over


428
6

3 A computer has an operating system (OS).

(a) Complete the table by writing each missing OS function name and description.

Function name Description

……………………………………………………………………………

……………………………………………………………………………
managing memory
……………………………………………………………………………

……………………………………………………………………………

……………………................…
allows application software to run on the computer
……………………................…

……………………………………………………………………………

……………………………………………………………………………
managing peripherals
……………………………………………………………………………

……………………………………………………………………………

[3]

(b) The OS handles interrupts.

(i) State the purpose of an interrupt.

...........................................................................................................................................

..................................................................................................................................... [1]

(ii) Identify one input device and one example of an interrupt that it can generate.

Input device .......................................................................................................................

Interrupt .............................................................................................................................
[1]

© UCLES 2024 0478/12/F/M/24


429
7

(iii) A processor is currently executing a program. The processor receives an interrupt.

Explain how the processor manages the current program and the interrupt.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [5]

© UCLES 2024 0478/12/F/M/24 [Turn over


430
8

4 A student enters a uniform resource locator (URL) into their web browser.

Draw and annotate a diagram to show the process from the user entering the URL to the web
browser displaying the web page.

[5]

© UCLES 2024 0478/12/F/M/24


431
9

5 Complete the description of digital currencies using the terms provided.

blockchains changed datachains decentralised

deleted encryption passport physical address

physically records time-stamp traced

transaction-chains virtually

A digital currency does not exist ........................................................... , it can only be accessed

electronically.

Some digital currencies have digital ledgers called ........................................................... .

These are decentralised databases where each transaction is stored as a new set of data with

a ........................................................... and is linked to the previous set of data. This means that

transactions cannot be altered, only new transactions added, which allows the location of the data

to be ........................................................... .
[4]

© UCLES 2024 0478/12/F/M/24 [Turn over


432
10

6 A self-driving tractor sows seeds and harvests crops for a farmer. The self-driving tractor moves
automatically through the field, turning at each end and stopping when it has finished.

(a) One reason the self-driving tractor is a robot is because it has a mechanical structure that
includes wheels, an engine, and a framework.

Give one other reason why the self-driving tractor is an example of a robot.

...................................................................................................................................................

............................................................................................................................................. [1]

(b) If a person is detected within 3 metres whilst the tractor is moving, the self-driving tractor
must stop.

(i) Explain how an infra-red sensor, microprocessor and actuator can be used to stop the
self-driving tractor if a person is detected within 3 metres.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [5]

(ii) Identify one other sensor that the self-driving tractor might use and how it will use the
sensor.

Sensor ...............................................................................................................................

Use ....................................................................................................................................

...........................................................................................................................................
[2]

© UCLES 2024 0478/12/F/M/24


433
11

(c) Explain the drawbacks of a farmer using a self-driving tractor to sow seeds and harvest crops.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

(d) The self-driving tractor has an in-built expert system that the farmer can use to solve any
errors with the tractor.

Identify three components of an expert system.

1 ................................................................................................................................................

2 ................................................................................................................................................

3 ................................................................................................................................................
[3]

(e) At the end of each day the self-driving tractor transmits the data it has collected to the farmer’s
computer in their house.

The transmission uses an echo check.

(i) Describe the role of the self-driving tractor and the farmer’s computer in the echo check.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [3]

© UCLES 2024 0478/12/F/M/24 [Turn over


434
12

(ii) Another method of error checking is a parity block check.

The table shows 7 bytes that are transmitted using odd parity. The parity bit has been
completed for each byte.

Complete the parity byte for the data.

parity
bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1
bit

byte 1 1 1 0 0 1 1 1 0

byte 2 1 0 0 0 0 1 1 0

byte 3 0 1 0 0 0 0 0 0

byte 4 0 1 0 0 1 1 1 1

byte 5 1 0 0 0 0 0 0 0

byte 6 0 1 1 1 1 1 1 1

byte 7 1 1 0 0 1 1 0 1

parity
byte
[3]

© UCLES 2024 0478/12/F/M/24


435
13

7 Data is transmitted using the internet.

(a) The data is encrypted before transmission.

(i) State the purpose of encrypting data.

...........................................................................................................................................

..................................................................................................................................... [1]

(ii) Describe the differences between symmetric and asymmetric encryption.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [4]

(b) The data is transmitted using packet switching.

(i) Identify two items of data contained in a packet header.

1 ........................................................................................................................................

2 ........................................................................................................................................
[2]

(ii) Give the purpose of a router in the packet-switching process.

...........................................................................................................................................

..................................................................................................................................... [1]

© UCLES 2024 0478/12/F/M/24 [Turn over


436
14

8 (a) Hexadecimal can be used to represent binary numbers.

(i) Convert the denary number 236 into hexadecimal.

...........................................................................................................................................

..................................................................................................................................... [1]

Working space

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

(ii) Give one benefit of using hexadecimal instead of binary to represent data.

...........................................................................................................................................

..................................................................................................................................... [1]

(b) Two’s complement can be used to represent positive and negative binary integers.

(i) Convert the two’s complement integer 10110111 into denary.

Show all your working.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

(ii) Convert the denary number 45 into an 8-bit two’s complement integer.

...........................................................................................................................................

..................................................................................................................................... [1]

Working space

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

© UCLES 2024 0478/12/F/M/24


437
15

(c) Logical shifts are performed on binary integers.

State the mathematical effect of a right shift of four places on a positive binary integer.

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

© UCLES 2024 0478/12/F/M/24


438

Mark scheme abbreviations

/ separates alternative words / phrases within a marking point


// separates alternative answers within a marking point
underline actual word given must be used by candidate (grammatical variants accepted)
max indicates the maximum number of marks that can be awarded
( ) the word / phrase in brackets is not required, but sets the context

Note: No marks are awarded for using brand names of software packages or hardware.

Question Answer Marks

1(a) B 1

1(b)(i) A 1

1(b)(ii) 01001110 1

1(b)(iii) • Unique binary/denary number given/stored for each character 2


• The code for R is stored, then the code for E then D in sequence

1(c)(i) Any two from: 2


• More bits allocated to each amplitude
• Amplitudes can be more precise
• A wider range of amplitudes can be recorded

1(c)(ii) Increase the sample rate 1


439

Question Answer Marks

2(a) One mark for letter and One mark for matching correction. 4
• Statement B …
• …MAR stores addresses and not instructions

• Statement C …
• …Data is from bus not PC //
Data is from address in MAR not PC

2(b)(i) It can run 3.5 billion FE cycles each second // it can execute 3.5 billion instructions each second 1

2(b)(ii) Any two from: 2


• More cores increases/improves the performance
• More cores mean more FDE cycles/instructions are executed each second
• …because each core runs an FE cycle/instruction simultaneously

2(b)(iii) Any two from: 2


• More cache improves performance
• …because more cache means the processor can access more frequently used data/instructions faster
• …instead of having to access the data from the slower-access RAM

2(c)(i) Any two from: 2


• Volatile storage
• Stores data for the processor to access directly/quickly // directly accessed by the CPU
• Stores currently running data/instructions

2(c)(ii) Any one from: 1


e.g.
• BIOS // bootstrap/loader
• Firmware
• Parts of OS

2(c)(iii) Any one from: 1


e.g.
• To run programs when there is insufficient RAM to run them
• To allow RAM to store more data when required
440

Question Answer Marks

3(a) One mark each: 3

Function name Description

Examples:
managing memory • allocates memory to processes
• prevents two processes accessing the same memory

platform for running


allows application software to run on the computer
applications

Examples:
• allocates data to buffers
managing peripherals
• transmits data to hardware
• receives data from hardware

3(b)(i) To indicate that something requires the attention of the processor/OS/CPU 1

3(b)(ii) One mark for input device and matching interrupt: 1


e.g.
• Keyboard
Key pressed
• Mouse
Mouse moved//button clicked
441

Question Answer Marks

3(b)(iii) Any five from: 5


• Interrupt is given priority
• …and placed in interrupt queue
• Processor finishes current FE cycle for program
• Processor checks interrupt priority queue // processor checks for higher priority interrupt than program/process
• If lower priority processor runs next FDE cycle for program/process // if lower priority processor continues with
program/process
• (if higher priority) processor stores current process/registers on stack
• Checks source of interrupt
• … and calls the appropriate ISR
• ISR handles/resolves interrupt
• If there is another higher priority interrupt (than process) then repeat
• … (otherwise) processor retrieves content of stack/registers/previous process (to continue with process from program)
442

Question Answer Marks

4 Any five marks for each part of diagram: 5


• URL from computer/browser to DNS
• DNS storing table/database of URL and IPs // DNS finding IP for URL
• DNS sending IP to computer / browser
• DNS sending to higher DNS if not found
• Web browser/computer sending request to IP of web server
• Web server processing request
• Web page data sent from server to computer / web browser

1. URL
DNS
Student's
computer 3. IP URLs IP
…..co.uk 250.256..
…..co.uk 058.51..

4. request to IP 2. Find IP for URL


6. HTML
web page

Web server

5. Process request
443

Question Answer Marks

5 One mark for each term in correct place: 4


• physically
• blockchains
• time-stamp
• traced

A digital currency does not exist physically, it can only be accessed electronically.

Some digital currencies have digital ledgers called a blockchains. These are decentralised databases where each
transaction is stored as a new set of data with a time-stamp and is linked to the previous set of data. This means that
transactions cannot be altered, only new transactions added, which allows the location of the data to be traced.

Question Answer Marks

6(a) Any one from: 1


• It has electrical components // by example
• It is programmable

6(b)(i) Any five from: 5


• Sensor continuously sends the digitised value / reading / distance to the microprocessor
• Microprocessor compares the data / signal to the stored data of a person and distance of 3m
• If the data / signal is less than (or equal to) a person and within 3m
• …a signal is sent to actuator to make the tractor stop / apply the brakes
• If the data/signal is greater than 3m no action is taken
• If stopped and data/signal is not a person and/or more than 3m a signal is sent to actuator to make the tractor start
• The whole process repeats until turned off
444

Question Answer Marks

6(b)(ii) One mark for sensor and One mark for matching use: 2
e.g.
• Accelerometer …
• …to adjust for uneven ground // to detect if the tractor crashes

• Proximity …
• …to detect if near the end of the field // to detect other obstacles

• Light …
• … to identify when to turn the headlights on

6(c) Any three from: 3


e.g.
• Set-up cost may be high
• Maintenance cost may be high
• … needs skilled workers/expert to fix
• Farmer may need reskilling in how to use it …
• ... which could be costly
• Leads to deskilling of farmers/workers
• Farmer may need fewer employees
• … leading to unemployment
• Can malfunction
• … and not recognise a person and fails to stop
• Changing function can be expensive

6(d) Any three from 3


• Knowledge base
• Rule base
• Inference engine
• Interface
445

Question Answer Marks

6(e)(i) Any three from: 3


• The same data is transmitted back (from computer to tractor)
• Tractor compares both sets of data
• … if they are identical there is no error // reverse
• Tractor sends confirmation of accuracy if the same // Tractor resends the data if they are different // Tractor transmits
error if they are different

6(e)(ii) One mark for two correct 3


Two marks for five correct
Three marks for all eight correct

parity
bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1
bit

byte 1 1 1 0 0 1 1 1 0

byte 2 1 0 0 0 0 1 1 0

byte 3 0 1 0 0 0 0 0 0

byte 4 0 1 0 0 1 1 1 1

byte 5 1 0 0 0 0 0 0 0

byte 6 0 1 1 1 1 1 1 1

byte 7 1 1 0 0 1 1 0 1

parity
byte 1 0 0 0 1 0 1 0
446

Question Answer Marks

7(a)(i) If the data is intercepted, it cannot be understood 1

7(a)(ii) Four from: 4


• Symmetric has a shared key…
• … to encrypt and decrypt
• Both the sender and receiver know the key

• Asymmetric has different keys // a public key and a private key


• …public to encrypt the data and private to decrypt
• …anyone can know the public key but only those intended know the private key

7(b)(i) Any two from: 2


e.g.
• Destination address/IP
• Sender address/IP
• Packet number

7(b)(ii) Any one from: 1


• Control the route the packet takes
• Send each packet towards its destination
• Choose more efficient route

Question Answer Marks

8(a)(i) EC 1

8(a)(ii) Any one from: 1


• Easier for humans to read/remember
• Shorter for humans to enter
• Less likely for humans to make mistakes
• Easier for humans to spot errors/debug
• Takes up less space onscreen
447

Question Answer Marks

8(b)(i) One mark for working, one mark for answer 2


• e.g. showing flip and add 1
10110111 = 01001001
• –73

8(b)(ii) 00101101 1

8(c) One mark each 2


• Divide
• ...by 16 / 24
448

Cambridge IGCSE™
* 8 4 7 2 5 2 9 9 3 1 *

COMPUTER SCIENCE 0478/22


Paper 2 Algorithms, Programming and Logic February/March 2024

1 hour 45 minutes

You must answer on the question paper.

No additional materials are needed.

INSTRUCTIONS
● Answer all questions.
● Use a black or dark blue pen. You may use an HB pencil for any diagrams or graphs.
● Write your name, centre number and candidate number in the boxes at the top of the page.
● Write your answer to each question in the space provided.
● Do not use an erasable pen or correction fluid.
● Do not write on any bar codes.
● Calculators must not be used in this paper.

INFORMATION
● The total mark for this paper is 75.
● The number of marks for each question or part question is shown in brackets [ ].
● No marks will be awarded for using brand names of software packages or hardware.

This document has 16 pages. Any blank pages are indicated.

DC (DE/JG) 327910/4
© UCLES 2024 [Turn over
449
2

1 Tick (✓) one box to show which task is part of the analysis stage of the program life cycle.

A coding

B decomposition

C design

D testing
[1]

2 (a) Four test data types and five descriptions are shown.

Draw one line to link each test data type to its most appropriate description.

Test data type Description

abnormal a value that is accepted

a value that is the highest or lowest value to be accepted and


the corresponding lowest or highest value to be rejected
boundary

a value that is the highest or lowest value to be rejected

extreme
a value that is rejected

a value that is the highest or lowest value to


normal be accepted
[4]

(b) An algorithm has been written to test if an integer that is input is in the range 5 to 10 inclusive.
Identify an example of suitable test data for each test data type.

Abnormal ..................................................................................................................................

...................................................................................................................................................

Boundary ..................................................................................................................................

...................................................................................................................................................

Extreme ....................................................................................................................................

...................................................................................................................................................

Normal ......................................................................................................................................

...................................................................................................................................................
[4]

© UCLES 2024 0478/22/F/M/24


450
3

3 A linear search and a bubble sort are standard methods of solution.


Fifty numbers are already stored in the array Values[1:50]

(a) Write an algorithm in pseudocode to input a number, MyNumber, and use a linear search to
test if that number is stored in the array. If the number is found in the array, the position in the
array is output. If the number is not found in the array, “Not found” is output.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]

© UCLES 2024 0478/22/F/M/24 [Turn over


451
4

(b) Write an algorithm in pseudocode to sort the array Values[1:50] into ascending order
using a bubble sort.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]

4 Identify three data types used in programming.

1 .......................................................................................................................................................

2 .......................................................................................................................................................

3 .......................................................................................................................................................
[3]

© UCLES 2024 0478/22/F/M/24


452
6

5 An algorithm has been written in pseudocode to calculate the profit when an item is sold. Values
for cost price and selling price are input, the profit is calculated (selling price – cost price) and
output. The input of zero for either value stops the algorithm.

01 REPEAT
02 OUTPUT "Enter cost price "
03 INPUT Cost
04 OUTPUT "Enter selling price "
05 OUTPUT Sell
06 IF Cost <> 0 OR Sell <> 0
07 THEN
08 Profit Sell - Cost ←
09 OUTPUT "Profit is ", Profit
10 NEXT
11 UNTIL Cost = 0 OR Sell = 0

(a) Identify the line numbers of three errors in the pseudocode and suggest corrections.

Error 1 line number ...................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................

Error 2 line number ...................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................

Error 3 line number ...................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................
[3]

© UCLES 2024 0478/22/F/M/24


453
7

(b) This algorithm needs to be improved with a range check.

(i) Write pseudocode to reject the input of values less than zero for variables Cost and
Sell

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [3]

(ii) Describe two other validation checks that should be included in this algorithm.

Check 1 .............................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

Check 2 .............................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................
[4]

© UCLES 2024 0478/22/F/M/24 [Turn over


454
8

6 Describe two types of iteration that a programmer can use whilst writing a program.

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

.................................................................................................................................................... [4]

© UCLES 2024 0478/22/F/M/24


455
9

7 Consider the logic expression:

X = (A XOR B) AND (NOT B AND C)

(a) Draw a logic circuit for this logic expression. Each logic gate must have a maximum of two
inputs. Do not simplify this logic expression.

B X

[4]

(b) Complete the truth table from the given logic expression.

Working space
A B C X

0 0 0

0 0 1

0 1 0

0 1 1

1 0 0

1 0 1

1 1 0

1 1 1

[4]

© UCLES 2024 0478/22/F/M/24 [Turn over


456
10

8 This flowchart represents an algorithm to find the average size of groups of visitors to an attraction.

START

NumberGroups 0
Total 0

INPUT
GroupSize

IS Yes
GroupSize Average DIV(Total, NumberGroups)
= 0?

No OUTPUT
"Average group
NumberGroups NumberGroups + 1 size ", Average

Total Total + GroupSize STOP

Complete the trace table using this data:

7, 10, 2, 8, 3, 9, 0, 6

NumberGroups Total GroupSize Average OUTPUT

[4]

© UCLES 2024 0478/22/F/M/24


457
11

9 A storage unit rental company wants to set up a new database table for the storage units that can
be rented.

The table is called StorageUnits and needs to store these details:

• SizeMetres – size in square metres


• Position – first, second or third floor
• Hoist – whether there is a hoist available for the transfer of items
• PriceMonth – the price in dollars for a month’s rental
• StorageID – the code to identify each storage unit, for example S123

(a) (i) Give the name of the field that would be used for the primary key.

..................................................................................................................................... [1]

(ii) State the reason for choosing this field for the primary key.

...........................................................................................................................................

..................................................................................................................................... [1]

(b) Complete the table to identify the most appropriate data type for these fields in the table
StorageUnits

Field Data type


SizeMetres
Position
Hoist
StorageID
[2]

(c) Complete this structured query language (SQL) statement to display only the storage code,
price and size in square metres of all the storage units where there is a hoist available.

SELECT ....................................................................................................................................

FROM ........................................................................................................................................

WHERE ................................................................................................................................... ;
[4]

© UCLES 2024 0478/22/F/M/24 [Turn over


458
12

10 A programmer has written a program that will be maintained by another programmer.


Explain how the program can be written to make sure it can be easily maintained by the other
programmer.

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

.................................................................................................................................................... [6]

© UCLES 2024 0478/22/F/M/24


459
14

11 Students in a class are recording the amount of time in minutes spent in front of a screen for each
day of the week.

The one-dimensional (1D) array StudentName[] contains the names of the students in the class.

The two-dimensional (2D) array ScreenTime[] is used to input the number of minutes on each
day spent in front of a screen.

The position of each student’s data in the two arrays is the same. For example, the student stored
at index 10 in StudentName[] and ScreenTime[] is the same.

The variable ClassSize contains the number of students in the class.

Write a program that meets these requirements:


• allows all the students to enter their daily minutes of screen times for the past week
• calculates the total number of minutes of screen time for each student in the week
• counts, for each student, the number of days with more than 300 minutes of screen time
• calculates the average weekly minutes of screen time for the whole class
• finds the student with the lowest weekly minutes of screen time
• outputs for each student:
– name
– total week’s screen time in hours and minutes
– number of days with more than 300 minutes of screen time
• outputs the average weekly minutes of screen time for the whole class
• outputs the name of the student with the lowest weekly screen time.

You must use pseudocode or program code and add comments to explain how your code works.
All inputs and outputs must contain suitable messages.

Assume that the array StudentName[] and the variable ClassSize already contain the
required data.

You do not need to declare any arrays or variables; you may assume that this has already been
done.

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................
© UCLES 2024 0478/22/F/M/24
460
15

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................
© UCLES 2024 0478/22/F/M/24 [Turn over
461
16

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

................................................................................................................................................... [15]

Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every
reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the
publisher will be pleased to make amends at the earliest possible opportunity.

To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge
Assessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download
at www.cambridgeinternational.org after the live examination series.

Cambridge Assessment International Education is part of Cambridge Assessment. Cambridge Assessment is the brand name of the University of Cambridge
Local Examinations Syndicate (UCLES), which is a department of the University of Cambridge.

© UCLES 2024 0478/22/F/M/24


462

Question Answer Marks

1 B 1

Question Answer Marks

2(a) One mark for each correct line from the test data type the description 4

Test data type Description

a value that is accepted


abnormal

a value that is the highest or lowest value to be accepted and


the corresponding lowest or highest value to be rejected
boundary

a value that is the highest or lowest value to be rejected

extreme
a value that is rejected

normal
a value that is the highest or lowest value to be accepted

2(b) One mark for each point: 4


• Abnormal for example 31
• Boundary 4, 5 // 10, 11
• Extreme 5 // 10
• Normal for example 6
463

Question Answer Marks

3(a) One mark for each point max four. 4


• input value, outside loop
• correct use of loop
• checking value input against contents of array …
• ... appropriate action
• correct outputs

Example:

INPUT MyNumber
Location  0
FOR Index  1 TO 50
IF Values[Index] = MyNumber
THEN
Location  Index
ENDIF
NEXT Index
IF Location = 0
THEN
OUTPUT "Not found"
ELSE
OUTPUT Location
ENDIF
464

Question Answer Marks

3(b) One mark for each point max four. 4


• use of inner and outer loop
• correct use of loops
• checking adjacent values in array …
• ... swap if required
• correct stopping condition

Last  50
Repeat
Swap  FALSE
FOR Index  1 TO Last - 1
IF Values[Index] > Values[Index + 1]
THEN
Temp  Values[Index]
Values[Index]  Values[Index + 1]
Values[Index + 1]  Temp
Swap  TRUE
ENDIF
NEXT
Last  Last - 1
UNTIL NOT Swap or Last = 1

Question Answer Marks

4 One mark for each point max three. 3


• Integer
• real
• char
• string
• Boolean
465

Question Answer Marks

5(a) One mark for each error identified and correction 3


• Line 05 OUTPUT should be INPUT
• Line 06 OR should be AND
• Line 10 NEXT should be ENDIF

5(b)(i) One mark for checking for < 0 or >= 0 3


One mark for checking of both inputs
One mark for correct repetition of both inputs e.g. use of REPEAT WHILE or using existing loop, in separate loops or both
in a single loop

Example:

REPEAT
OUTPUT "Enter cost price "
INPUT Cost
UNTIL Cost >= 0
REPEAT
OUTPUT "Enter selling price "
INPUT Sell
UNTIL Sell >= 0

or

OUTPUT "Enter cost price "


INPUT Cost
WHILE Cost < 0
OUTPUT "Enter cost price "
INPUT Cost
ENDWHILE
OUTPUT "Enter selling price "
INPUT Sell
WHILE Sell < 0
OUTPUT "Enter selling price "
INPUT Sell
ENDWHILE
466

Question Answer Marks

5(b)(ii) One mark for identifying validation check and one mark for accompanying description max four 4
• presence check (1) to check that values have been input (1)
• type check (1) to check for numerical values (1)

Question Answer Marks

6 One mark for identifying a type of iteration, one mark for accompanying description max four 4
• count controlled (1) number of iterations is pre-determined (1)
• pre-condition (1) checks condition at start of loop // loop may not iterate (1)
• post-condition (1) checks condition at end of loop // loop always iterates at least once (1)

Question Answer Marks

7(a) One mark for each correct gate, with the correct input(s) as shown. 4
467

Question Answer Marks

7(b) 4
A B C X

0 0 0 0

0 0 1 0

0 1 0 0

0 1 1 0

1 0 0 0

1 0 1 1

1 1 0 0

1 1 1 0

4 marks for 8 correct outputs


3 marks for 6/7 correct outputs
2 marks for 4/5 correct outputs
1 mark for 2/3 correct outputs
468

Question Answer Marks

8 One mark for each column Total, Average and OUTPUT 4


One mark for columns NumberGroups and GroupSize

NumberGroups Total GroupSize Average OUTPUT

0 0

1 7 7

2 17 10

3 19 2

4 27 8

5 30 3

6 39 9

0 6 Average group size 6

Question Answer Marks

9(a)(i) StorageID 1

9(a)(ii) It is a unique identifier 1


469

Question Answer Marks

9(b) One mark for every two correct data types 2

Field Data type

SizeMetres Real/Integer

Position Char/Integer/Text/Alphanumeric

Hoist Boolean/Text/Alphanumeric

StorageID Text/Alphanumeric

9(c) One mark if two correct or two marks if completely correct 4


SELECT StorageID, PriceMonth, SizeMetres

One mark each point max two


FROM StorageUnits
WHERE Hoist = TRUE;
470

Question Answer Marks

10 One mark for each technique 6


One mark for a matching description
max six
• use comments …
• … to explain the purpose of each section of code
• …for example, logic / syntax

• use meaningful identifier names to …


• … clearly identify the purpose
• … of variables, constants, arrays, procedures etc
• … by example

• use procedures and functions …


• … to avoid repeated code
• … simplify logic

• use indentation and white space …


• … to make the program readable
471

Question Answer Marks

11 Check if each requirement listed below has been met. Requirements may be met using a suitable built-in function from the 15
programming language used (Python, VB.NET or Java).

On the script, add seen if the requirement has been met, NE if a partial attempt, or a cross if no attempt .

Use the tables for AO2 and AO3 below to award a mark in a suitable band using a best fit approach, then add up the total.
Marks are available for:
• AO2 (maximum 9 marks)
• AO3 (maximum 6 marks)

Data structures required with names as given in the scenario:


Arrays or lists StudentName, ScreenTime
Variable ClassSize could be constant

Requirements (techniques)
R1 allows a student to enter their weekly screen time and calculates the total number of minutes of screen time for each
student in the week (input, iteration and totalling)
R2 counts the number of days with more than 300 minutes screen time each day and calculates the average week’s
screen time for the whole class (selection, counting, iteration, calculating average)
R3 finds the student with the lowest weekly minutes. Outputs for each student: name, total week’s screen time in hours
and minutes, number of days with more than 300 minutes screen time, outputs the average weeks screen time for the
whole class and the name of the student with the lowest number of minutes (finding minimum value, output)
472

Question Answer Marks

11 Example 15-mark answer in pseudocode

WeekLength  5
LowestMinutes  1000
ClassTotal 0
FOR StudentCounter  1 to ClassSize // loop for each student
Total  0
DaysOver300  0
FOR DayCounter  1 to WeekLength // loop for each day
REPEAT
OUTPUT "Please enter number of minutes for day ", DayCounter
INPUT Minutes
UNTIL Minutes >= 0
ScreenTime[StudentCounter, DayCounter]  Minutes
Total  Total + Minutes
IF Minutes > 300
THEN
DaysOver300  DaysOver300 + 1
ENDIF
IF Minutes < LowestMinutes
THEN
LowestMinutes  Minutes
LowestIndex  StudentCounter
ENDIF
NEXT DayCounter
OUTPUT StudentName[StudentCounter]
OUTPUT "Screen time ", DIV(Total, 60), " hours ", MOD(Total, 60), " minutes "
OUTPUT "Days with more than 300 minutes screen time ", DaysOver300
ClassTotal  ClassTotal + Total
NEXT StudentCounter

OUTPUT "Average weekly screen time for class ", ClassTotal / ClassSize, " minutes "
OUTPUT "Lowest weekly time ", StudentNames[LowestIndex]
* 0019654976301 * 473

,  ,

Cambridge IGCSE™

¬Wz> 3mG{M¡=ži†VW
¬–™a=¤IzUr†sT€a_‚
¥ eU5Ue5E•U•e¥ •uU
* 8 4 8 6 8 9 2 6 8 8 *

COMPUTER SCIENCE 0478/12


Paper 1 Computer Systems May/June 2024

1 hour 45 minutes

You must answer on the question paper.

No additional materials are needed.

INSTRUCTIONS
● Answer all questions.
● Use a black or dark blue pen. You may use an HB pencil for any diagrams or graphs.
● Write your name, centre number and candidate number in the boxes at the top of the page.
● Write your answer to each question in the space provided.
● Do not use an erasable pen or correction fluid.
● Do not write on any bar codes.
● Calculators must not be used in this paper.

INFORMATION
● The total mark for this paper is 75.
● The number of marks for each question or part question is shown in brackets [ ].
● No marks will be awarded for using brand names of software packages or hardware.

This document has 12 pages. Any blank pages are indicated.

DC (KS) 329152/4
© UCLES 2024 [Turn over
* 0019654976302 * 474

DO NOT WRITE IN THIS MARGIN


2
,  ,

1 Data can be measured in bits.

(a) Give the name of the data storage measurement that is equal to 8 bits.

............................................................................................................................................. [1]

(b) State how many bits there are in a kibibyte (KiB).

............................................................................................................................................. [1]

(c) Give the name of the data storage measurement that is equal to 1024 gibibytes (GiB).

DO NOT WRITE IN THIS MARGIN


............................................................................................................................................. [1]

(d) A 16-bit colour image has a resolution of 512 pixels wide by 512 pixels high.

Calculate the file size of the image in kibibytes (KiB). Show all your working.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

DO NOT WRITE IN THIS MARGIN


...................................................................................................................................................

...................................................................................................................................................

Answer ......................................................... KiB


[3]

2 Data can be transmitted from one device to another.

(a) Tick (3) one box to show which of the terms is not a method for transmitting data.

DO NOT WRITE IN THIS MARGIN


A serial

B simplex

C parallel

D parity
[1]

(b) Data is broken down into smaller units to be transmitted from one device to another.
DO NOT WRITE IN THIS MARGIN

Give the name of the unit that data is broken down into.

............................................................................................................................................. [1]

ĬÕú¾Ġ³íÇûÍġ½ĞìĈØĎ×
© UCLES 2024 ĬĖěâÀĨ½ĐÞÿôĐĬößęçĂ
ĥÕµÕõµĥÕõÕąÕååĥÕÕÕ
0478/12/M/J/24
* 0019654976303 * 475
DO NOT WRITE IN THIS MARGIN

3
,  ,

(c) Data is often encrypted when it is transmitted from one device to another.

(i) Explain how data is encrypted using symmetric encryption.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................
DO NOT WRITE IN THIS MARGIN

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [4]

(ii) Give the purpose of encryption.

...........................................................................................................................................
DO NOT WRITE IN THIS MARGIN

..................................................................................................................................... [1]
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN

Ĭ×ú¾Ġ³íÇûÍġ½ĞìĆØĎ×
© UCLES 2024 ĬĖĜáÈĢÁĠÛùýÙ°þûę×Ă
ĥÕÅĕµÕąµĥåÕÕåÅąĕÅÕ
0478/12/M/J/24 [Turn over
* 0019654976304 * 476

DO NOT WRITE IN THIS MARGIN


4
,  ,

3 Binary is a base 2 number system.

(a) Give the name of the number system that is base 16.

............................................................................................................................................. [1]

(b) Three denary numbers are entered into a computer. The computer converts the numbers and
stores them as binary.

(i) Give the binary number that would be stored for each of the denary numbers.

DO NOT WRITE IN THIS MARGIN


10 ......................................................................................................................................

50 ......................................................................................................................................

201 ....................................................................................................................................
[3]

Working space

...........................................................................................................................................

...........................................................................................................................................

DO NOT WRITE IN THIS MARGIN


...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

(ii) Explain why the data is converted to binary by the computer.

...........................................................................................................................................

...........................................................................................................................................

DO NOT WRITE IN THIS MARGIN


...........................................................................................................................................

..................................................................................................................................... [2]

(c) The two binary integers 00110000 and 01100110 are added together.

Add the binary integers using binary addition and show your answer in binary. Show all your
working.

...................................................................................................................................................

...................................................................................................................................................
DO NOT WRITE IN THIS MARGIN

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

ĬÕú¾Ġ³íÇûÍġ½ĞêĈØĐ×
© UCLES 2024 ĬĖĜäÈĬ³ĩà÷ĆÒĎâÙĉßĂ
ĥĥĕĕõÕąĕąąåÕĥÅåĕÕÕ
0478/12/M/J/24
* 0019654976305 * 477
DO NOT WRITE IN THIS MARGIN

5
,  ,

(d) The denary integer –32 is stored as a two’s complement integer.

Calculate the two’s complement integer that would be stored.

Show all your working.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
DO NOT WRITE IN THIS MARGIN

...................................................................................................................................................

............................................................................................................................................. [2]

4 A student uses both system software and application software on their computer.

(a) Give one example of system software.

............................................................................................................................................. [1]
DO NOT WRITE IN THIS MARGIN

(b) Give two examples of application software.

1 ................................................................................................................................................

2 ................................................................................................................................................
[2]

(c) Describe the difference between system software and application software.

...................................................................................................................................................

...................................................................................................................................................
DO NOT WRITE IN THIS MARGIN

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]
DO NOT WRITE IN THIS MARGIN

Ĭ×ú¾Ġ³íÇûÍġ½ĞêĆØĐ×
© UCLES 2024 ĬĖěãÀЯęÙāûėÊÚýĉÏĂ
ĥĥĥÕµµĥõĕõõÕĥåÅÕÅÕ
0478/12/M/J/24 [Turn over
* 0019654976306 * 478

DO NOT WRITE IN THIS MARGIN


6
,  ,

5 Instructions are processed by a central processing unit (CPU) in a computer.

(a) Complete the paragraph about fetching an instruction into the CPU to be processed.

Use the terms from the list.

Some of the terms in the list will not be used. You should only use a term once.

address arithmetic logic unit (ALU) binary control unit (CU)

DO NOT WRITE IN THIS MARGIN


current instruction register (CIR) data denary driver

fetch interrupt memory address register (MAR)

memory data register (MDR) random access memory (RAM)

read only memory (ROM) secondary storage signal

The program counter contains the ………………………………………………………

DO NOT WRITE IN THIS MARGIN


of the next instruction to be processed; this is then sent to the

……………………………………………………… using the address bus. The address is then

sent to the ……………………………………………………… .

Once the address is received, the instruction stored at the location is

sent to the ………………………………………………………, using the

……………………………………………………… bus. The instruction is then

sent to the ……………………………………………………… that is built into the

DO NOT WRITE IN THIS MARGIN


……………………………………………………… .
[7]

(b) The CPU uses an instruction set to decode the instruction.

State what is meant by an instruction set.

...................................................................................................................................................

............................................................................................................................................. [1]
DO NOT WRITE IN THIS MARGIN

ĬÙú¾Ġ³íÇûÍġ½ĞëĆÕĎ×
© UCLES 2024 ĬĖĜãÃĨ×ēÑĆĊĞêâĠáßĂ
ĥµÅÕµĕĥÕÕĕÕÕååĥĕĕÕ
0478/12/M/J/24
* 0019654976407 * 479
DO NOT WRITE IN THIS MARGIN

7
,  ,

6 The table contains statements about error detection methods.

Complete the table by giving the correct error detection method for each statement.

error detection method statement

…………………………………………… An odd or even process can be used.

A value is calculated from the data, using an


…………………………………………… algorithm. This happens before and after the data
DO NOT WRITE IN THIS MARGIN

is transmitted.

A copy of the data is sent back to the sender by


……………………………………………
the receiver.

…………………………………………… Acknowledgement and timeout are used.

A value is appended to data that has been


…………………………………………… calculated using the data. This value is checked
on data entry.
[5]
DO NOT WRITE IN THIS MARGIN

7 A computer has both a media access control (MAC) address and an internet protocol (IP) address.

(a) Tick (3) one box to show which of the statements is correct about the MAC address.

A It is assigned by the manufacturer.

B It is assigned by a router.

C It can be static or dynamic.


DO NOT WRITE IN THIS MARGIN

D It is made up of three different parts.


[1]

(b) An IP address can have an IPv4 or IPv6 format.

(i) Give an example of an IP address that has an IPv4 format.

..................................................................................................................................... [1]

(ii) Give two characteristics of the IPv6 format.

1 ........................................................................................................................................
DO NOT WRITE IN THIS MARGIN

...........................................................................................................................................

2 ........................................................................................................................................

...........................................................................................................................................
[2]
ĬÛù¿Ġ³íÇûÍġ½ĞìĆÕĎ×
© UCLES 2024 ĬĖĜáÀīèõâćöÙđĢĠđ×Ă
ĥąĥĕµµÅµµĕõÕĥĥĥÕåÕ
0478/12/M/J/24 [Turn over
* 0019654976408 * 480

DO NOT WRITE IN THIS MARGIN


8
,   ,

8 A company has a website that is suffering a distributed denial of service (DDoS) attack.

(a) Draw and annotate a diagram to show the process of the DDoS.

DO NOT WRITE IN THIS MARGIN


DO NOT WRITE IN THIS MARGIN
[5]

(b) Identify a solution that can be used to help prevent the DDoS attack being successful.

............................................................................................................................................. [1]

DO NOT WRITE IN THIS MARGIN


DO NOT WRITE IN THIS MARGIN

ĬÙù¿Ġ³íÇûÍġ½ĞêĈÕĐ×
© UCLES 2024 ĬĖĜäÀġÖôÕĉíÒ³¾¾āßĂ
ĥµµĕõµÅĕÕµąÕåĥÅÕµÕ
0478/12/M/J/24
* 0019654976409 * 481
DO NOT WRITE IN THIS MARGIN

9
,   ,

9 A company uses both solid-state and optical secondary storage.

(a) Explain why a computer needs secondary storage.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]
DO NOT WRITE IN THIS MARGIN

(b) Describe three differences between solid-state and optical storage.

1 ................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

2 ................................................................................................................................................
DO NOT WRITE IN THIS MARGIN

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

3 ................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
DO NOT WRITE IN THIS MARGIN

...................................................................................................................................................
[6]
DO NOT WRITE IN THIS MARGIN

ĬÛù¿Ġ³íÇûÍġ½ĞêĆÕĐ×
© UCLES 2024 ĬĖěãÈħÚĄäïĄėħ¶ĚāÏĂ
ĥµÅÕµÕåõÅÅÕÕåąåĕåÕ
0478/12/M/J/24 [Turn over
* 0019654976410 * 482

DO NOT WRITE IN THIS MARGIN


10
,  ,

10 A garage uses an expert system to help diagnose any problems with cars that need repair.

(a) The expert system is an example of artificial intelligence (AI).

Describe what is meant by AI.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

DO NOT WRITE IN THIS MARGIN


............................................................................................................................................. [2]

(b) A car has a problem with its braking system, so it is brought into the garage.

Explain how the expert system operates and how it is used to help diagnose the problem.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

DO NOT WRITE IN THIS MARGIN


...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

DO NOT WRITE IN THIS MARGIN


............................................................................................................................................. [5]

DO NOT WRITE IN THIS MARGIN

ĬÙù¿Ġ³íÇûÍġ½ĞëĈ×Ď×
© UCLES 2024 ĬĖęäÅģÎĦÛĂöüÏÀê¹×Ă
ĥĥÕÕõµĥĕõąąĕåÅÅÕąÕ
0478/12/M/J/24
* 0019654976411 * 483
DO NOT WRITE IN THIS MARGIN

11
,  ,

11 A company has a website. Users use the internet and the world wide web to access the website.

(a) Describe the difference between the internet and the world wide web.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]
DO NOT WRITE IN THIS MARGIN

(b) The website has a uniform resource locator (URL). The URL has three different parts.

Identify the three different parts that are included in the URL.

1 ................................................................................................................................................

2 ................................................................................................................................................

3 ................................................................................................................................................
[3]
DO NOT WRITE IN THIS MARGIN

(c) One function of a web browser is to provide an address bar for a user to enter a URL.

Give three other functions of a web browser.

1 ................................................................................................................................................

2 ................................................................................................................................................

3 ................................................................................................................................................
[3]
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN

ĬÛù¿Ġ³íÇûÍġ½ĞëĆ×Ď×
© UCLES 2024 ĬĖĚã½ĥÒĖÞøċ­ċ¸î¹çĂ
ĥĥåĕµÕąõĥõÕĕåååĕĕÕ
0478/12/M/J/24
0478/12 Cambridge IGCSE – Mark Scheme 484
May/June 2024
PUBLISHED
Question Answer Marks

1(a) (1) byte 1

1(b) 8192 1

1(c) (1) Tebibyte // TiB 1

1(d) One mark for each correct stage of working (max 2): 3
 512  512
 262 144 * 2 // multiplied by 16 and divided by 8
 524 288/1024

One mark for the correct answer:

512 (KiB)

Question Answer Marks

2(a) D 1

2(b) Packet 1

2(c)(i) Data is encrypted and decrypted using the same key (1 mark) 4
Any three from:
 Plain text is encrypted into cipher text // cipher text is decrypted into plain text
 Data is encrypted using an algorithm …
 … that uses a key
 The key can be generated using an algorithm
 The key is transmitted to the receiver

2(c)(ii) Any one from: 1


 To help keep the data secure
 To make the data meaningless

© Cambridge University Press & Assessment 2024 Page 4 of 12


0478/12 Cambridge IGCSE – Mark Scheme 485
May/June 2024
PUBLISHED
Question Answer Marks

3(a) Hexadecimal 1

3(b)(i) 1010 3
110010
11001001

3(b)(ii) Two from: 2


 Computers use logic gates/switches …
 … that only process the values 1 and 0 // that only have two states

3(c) One mark for evidence of working, for example 2 carries 3


One mark for each correct nibble (Max 2)

1 1
0 0 1 1 0 0 0 0
0 1 1 0 0 1 1 0
1 0 0 1 0 1 1 0

3(d) One marking for evidence of working 2


For example, flip and add

One mark for correct binary


11100000

4(a) Any one from: 1


 Operating system
 Utility software // by example

© Cambridge University Press & Assessment 2024 Page 5 of 12


0478/12 Cambridge IGCSE – Mark Scheme 486
May/June 2024
PUBLISHED
Question Answer Marks

4(b) Any two from.: 2


Example:
 Word processor
 Spreadsheet
 Database
 Web browser
 Image/photo-editor
 Video-editor
 Email client
 Game
 Social media app

4(c) Any two from: 2


 System software manages/maintains the hardware/software
 Applications software allows the user to perform tasks

© Cambridge University Press & Assessment 2024 Page 6 of 12


0478/12 Cambridge IGCSE – Mark Scheme 487
May/June 2024
PUBLISHED
Question Answer Marks

5(a) One mark for each correct term in the correct place: 7
 address
 memory address register // MAR
 random access memory // RAM
 memory data register // MDR
 data
 current instruction register // CIR
 control unit // CU

5(b) A list of (machine code) commands that can be processed by the CPU 1

Question Answer Marks

6 One mark for each correct method. 5

error detection method statement

parity (check/bit/byte/block) An odd or even process can be used.

checksum A value is calculated from the data using an


algorithm. This happens before and after the
data is transmitted.

echo check A copy of the data is sent back to the sender by


the receiver.

automatic repeat query/request // ARQ Acknowledgement and timeout are used.

check digit A value is appended to data that has been


calculated using the data. This value is checked
on data entry.

© Cambridge University Press & Assessment 2024 Page 7 of 12


0478/12 Cambridge IGCSE – Mark Scheme 488
May/June 2024
PUBLISHED
Question Answer Marks

7(a) A 1

7(b)(i) An IP address that has numerical values separated by dots that follows the format with a max value of 255 in any xxx 1

xxx.xxx.xxx.xxx

Example: 10.245.3.99

7(b)(ii) Any two from: 2


 128-bit // 16 bytes
 Hexadecimal
 Separated by colons
 Characters in groups of 4
 Has 8 groups of characters
 Double colons can be used for sets of (consecutive) zeros (only once)

© Cambridge University Press & Assessment 2024 Page 8 of 12


0478/12 Cambridge IGCSE – Mark Scheme 489
May/June 2024
PUBLISHED
Question Answer Marks

8(a) One mark for each part of the diagram that shows: 5
 A perpetrator/third party sending malware // user downloads/installs malware
 Each computer is turned into a bot…
 … to create a botnet
 Third party initiates the attack
 All the bots send a request at once to a web server
 … crashing the webserver

Example:
Botnet
bot

bot
third web
party Requests server

bot
Third party
sends
Web server
malware.
bot cannot handle
all the requests
and crashes.

Malware turns
computers
into bots.

8(b) Proxy server 1

© Cambridge University Press & Assessment 2024 Page 9 of 12


0478/12 Cambridge IGCSE – Mark Scheme 490
May/June 2024
PUBLISHED
Question Answer Marks

9(a) Any two from: 2


 To store data/files permanently
 … otherwise, data/programs would need to be downloaded/entered/installed every time the computer was used
 To allow software to be installed on the computer
 For the creation of virtual memory

9(b) Any six from (Max 3 for one type only): 6


 Solid-state has no moving parts
 … optical does have moving parts

 Solid-state is faster to access data


 … optical is slower to access data

 Solid-state uses less power to operate


 … optical uses more power to operate

 Solid-state runs quietly


 … optical makes more noise

 Solid state is more durable/robust


 … optical is less durable/robust

 Solid state storage has a large storage capacity


 … optical has a much smaller limit to its storage capacity

 Solid-state is more expensive per GB of data


 … optical is cheaper per GB of data

 Solid-state stores data onto silicon chips/transistors using logic (floating/control/NAND/NOR) gates to control the
movement of electrons
 … optical stores data by using lasers to burning pits and lands onto a disk

© Cambridge University Press & Assessment 2024 Page 10 of 12


0478/12 Cambridge IGCSE – Mark Scheme 491
May/June 2024
PUBLISHED
Question Answer Marks

10(a) Any two from: 2


 The simulation of intelligent behaviours by computers
 A collection of data and the rules for using that data
 Has the ability to reason
 Has the ability to learn/adapt

10(b) Any five from: 5


 The user will enter data into the interface // The user will plug the car into an interface // The user is given questions
using the interface
 The inference engine will decide which questions to ask
 … by using the previous answers given
 The inference engine will decide on a diagnosis
 … by comparing the data/answers entered to the knowledge base and rule base
 … by calculating which option is most likely if there are multiple
 The interface will output the diagnosis/result
 The explanation system shows how the diagnosis was reached

© Cambridge University Press & Assessment 2024 Page 11 of 12


0478/12 Cambridge IGCSE – Mark Scheme 492
May/June 2024
PUBLISHED
Question Answer Marks

11(a) Any two from: 2


 The internet is the infrastructure
 The world wide web is a collection of web pages

11(b) Protocol 3
Domain name
File name // web page name

11(c) Any three from: 3


Example:
 Displays a web page
 Storing bookmarks/favourites
 Recording user history
 Allowing use of multiple tabs
 Storing cookies
 Providing navigation tools
 Can set a home page

© Cambridge University Press & Assessment 2024 Page 12 of 12


* 0019655533401 * 493

, ,

Cambridge IGCSE™

¬OŠ. 3mKo[‘U¢8¦6W
¬—™`I£0£]v†§¦Lb:V‚
¥U •5•¥5U•5¥ Eu5U
* 4 5 6 7 6 0 4 2 2 6 *

COMPUTER SCIENCE 0478/22


Paper 2 Algorithms, Programming and Logic May/June 2024

1 hour 45 minutes

You must answer on the question paper.

No additional materials are needed.

INSTRUCTIONS
● Answer all questions.
● Use a black or dark blue pen. You may use an HB pencil for any diagrams or graphs.
● Write your name, centre number and candidate number in the boxes at the top of the page.
● Write your answer to each question in the space provided.
● Do not use an erasable pen or correction fluid.
● Do not write on any bar codes.
● Calculators must not be used in this paper.

INFORMATION
● The total mark for this paper is 75.
● The number of marks for each question or part question is shown in brackets [ ].
● No marks will be awarded for using brand names of software packages or hardware.

This document has 16 pages. Any blank pages are indicated.

DC (LK/CB) 329121/3
© UCLES 2024 [Turn over
* 0019655533402 * 494

DO NOT WRITE IN THIS MARGIN


2
, ,

1 Tick (✓) one box to identify a method used to design and construct a solution to a computing
problem.

A analysis

B coding

C flowchart

D testing
[1]

DO NOT WRITE IN THIS MARGIN


2 Four logic functions and five standard symbols for logic gates are shown.

Draw one line to link each logic function to its standard symbol. Not all standard symbols will be
used.

Logic function Standard symbol

AND

DO NOT WRITE IN THIS MARGIN


XOR

NAND

OR

DO NOT WRITE IN THIS MARGIN


[4]

3 Identify three different tasks in the analysis stage of the program development life cycle.

1 .......................................................................................................................................................

..........................................................................................................................................................

2 .......................................................................................................................................................
DO NOT WRITE IN THIS MARGIN

..........................................................................................................................................................

3 .......................................................................................................................................................

..........................................................................................................................................................
[3]

ĬÍĊ®Ġ³íËïÛđÕ̵Ĩ¸Ď×
© UCLES 2024 ĬėěßÌħ¼ąÖċôČβĒĂÎĂ
ĥąĕĕõõåÕĥÕĥåąÅåµĕÕ
0478/22/M/J/24
* 0019655533403 * 495
DO NOT WRITE IN THIS MARGIN

3
, ,

4 A program needs to make sure the characters input for a product code meet these rules:

• The product code is six characters in length.


• The first two characters must be “PD”.
• The last four characters must be a number in the range 1000 to 9999 inclusive.

(a) Identify three validation checks and state how each check would make sure the product code
met one of these rules.

Check 1 ....................................................................................................................................
DO NOT WRITE IN THIS MARGIN

...................................................................................................................................................

...................................................................................................................................................

Check 2 ....................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Check 3 ....................................................................................................................................
DO NOT WRITE IN THIS MARGIN

...................................................................................................................................................

...................................................................................................................................................
[6]

(b) The program design will include a pseudocode algorithm. Assume that the product code is
stored in the variable Product

(i) Write the pseudocode to make sure that the product code is six characters in length.

...........................................................................................................................................

...........................................................................................................................................
DO NOT WRITE IN THIS MARGIN

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

(ii) Write the pseudocode to make sure that the first two characters of the product code are
“PD”.

...........................................................................................................................................

...........................................................................................................................................
DO NOT WRITE IN THIS MARGIN

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

ĬÏĊ®Ġ³íËïÛđÕ̵Ħ¸Ď×
© UCLES 2024 ĬėĜàÄġ¸õãíý½ĊÊÆĂÞĂ
ĥąĥÕµĕŵõåµåąåÅõąÕ
0478/22/M/J/24 [Turn over
* 0019655533404 * 496

DO NOT WRITE IN THIS MARGIN


4
, ,

5 A high-level programming language makes use of arithmetic, Boolean and logical operators.

State how each type of operator is used.


Give an example statement, in pseudocode, for each one.

Arithmetic .........................................................................................................................................

..........................................................................................................................................................

Example ...........................................................................................................................................

DO NOT WRITE IN THIS MARGIN


..........................................................................................................................................................

Boolean ............................................................................................................................................

..........................................................................................................................................................

Example ............................................................................................................................................

..........................................................................................................................................................

DO NOT WRITE IN THIS MARGIN


Logical ..............................................................................................................................................

..........................................................................................................................................................

Example ...........................................................................................................................................

..........................................................................................................................................................
[6]

DO NOT WRITE IN THIS MARGIN


DO NOT WRITE IN THIS MARGIN

ĬÍĊ®Ġ³íËïÛđÕĢ·Ĩ¸Đ×
© UCLES 2024 ĬėĜÝÄīÆôØóĆÆìĦĨĒÖĂ
ĥµµÕõĕÅĕĕąÅåÅåĥõĕÕ
0478/22/M/J/24
* 0019655533405 * 497
DO NOT WRITE IN THIS MARGIN

5
, ,

6 Totalling and counting are standard methods of solution.

Numbers are input. The number 9999.9 is the last number to be input and is ignored.

(a) Write an algorithm in pseudocode to total the numbers input and to output the total.
You do not need to validate the input.

...................................................................................................................................................

...................................................................................................................................................
DO NOT WRITE IN THIS MARGIN

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
DO NOT WRITE IN THIS MARGIN

............................................................................................................................................. [4]

(b) Write an algorithm in pseudocode to count and output the number of input values that are
greater than 100. You do not need to validate the input.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
DO NOT WRITE IN THIS MARGIN

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]
DO NOT WRITE IN THIS MARGIN

ĬÏĊ®Ġ³íËïÛđÕĢ·Ħ¸Đ×
© UCLES 2024 ĬėěÞÌĝÊĄáąûăðĎ´ĒæĂ
ĥµÅĕµõåõąõĕåÅÅąµąÕ
0478/22/M/J/24 [Turn over
* 0019655533406 * 498

DO NOT WRITE IN THIS MARGIN


6
, ,

7 An algorithm has been written in pseudocode to find and display the maximum and minimum
values in an array of 1000 positive numbers. The array List[] starts at index 1

01 Max List[1]
02 Min List[1]
03 FOR Counter 2 TO 1000
04 IF List[Counter] < Max
05 THEN
06 Max List[Counter]
07 ENDIF
08 IF List[Count] ˂ Min

DO NOT WRITE IN THIS MARGIN


09 THEN
10 Min List[Counter]
11 ENDWHILE
12 NEXT Counter
13 OUTPUT "Maximum value is ", Max
14 OUTPUT "Minimum value is ", Min

(a) Give a line number for each of these types of statement:

Assignment statement ..............................................................................................................

Selection statement ..................................................................................................................

DO NOT WRITE IN THIS MARGIN


Iteration statement ....................................................................................................................
[3]

(b) Identify the line numbers of the three errors in the pseudocode and suggest a correction for
each error.

Error 1 line number ...................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................

DO NOT WRITE IN THIS MARGIN


Error 2 line number ...................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................

Error 3 line number ...................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................
[3]
DO NOT WRITE IN THIS MARGIN

ĬÑĊ®Ġ³íËïÛđÕ̶ĦµĎ×
© UCLES 2024 ĬėĜÞÇħâĊéĂĊúĐĦѺÖĂ
ĥĥĥĕµÕåÕÅĕµåąÅåõÕÕ
0478/22/M/J/24
* 0019655533407 * 499
DO NOT WRITE IN THIS MARGIN

7
, ,

8 A logic circuit is to be built to control the opening of a safe used to store money. There are two
keys, A and B, and a time switch C. The safe can only open if both keys are used and the time
switch is off.

not used 0
key A
used 1

not used 0
key B
DO NOT WRITE IN THIS MARGIN

used 1

switch off 0
time switch C
switch on 1

safe cannot open 0


safe X
safe can open 1

(a) Write the logic expression for this problem.

............................................................................................................................................. [3]
DO NOT WRITE IN THIS MARGIN

(b) Complete the truth table for this problem.

Working space
A B C X

0 0 0

0 0 1
DO NOT WRITE IN THIS MARGIN

0 1 0

0 1 1

1 0 0

1 0 1

1 1 0
DO NOT WRITE IN THIS MARGIN

1 1 1

[4]

ĬÓĊ®Ġ³íËïÛđÕ̶ĨµĎ×
© UCLES 2024 ĬėěÝ¿ġÞúÐø÷¯ÌĎąºæĂ
ĥĥĕÕõµÅµÕĥĥåąåŵÅÕ
0478/22/M/J/24 [Turn over
* 0019655533408 * 500

DO NOT WRITE IN THIS MARGIN


8
,  ,

9 This flowchart represents an algorithm.

START

A FALSE
B 1

DO NOT WRITE IN THIS MARGIN


IS List[B] > No
T List[B]
List[B + 1]?

Yes
List[B] List[B + 1]

List[B + 1] T

A TRUE

DO NOT WRITE IN THIS MARGIN


B B+1

No IS B =
5?

Yes

Yes IS A =
TRUE?

DO NOT WRITE IN THIS MARGIN


No

STOP

(a) The array List[1:5] used in the flowchart contains this data:

List[1] List[2] List[3] List[4] List[5]

15 17 20 5 9
DO NOT WRITE IN THIS MARGIN

ĬÑĊ®Ġ³íËïÛđÕ̏ĦµĐ×
© UCLES 2024 Ĭėěà¿īÐïëúð¸Ī²çêÎĂ
ĥÕÅÕµµÅĕµÅĕåÅåĥµÕÕ
0478/22/M/J/24
* 0019655533509 * 501
DO NOT WRITE IN THIS MARGIN

9
,  ,

Complete the trace table using the data given in the array.

A B List[1] List[2] List[3] List[4] List[5] T


15 17 20 5 9
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN

[5]

(b) Describe what the algorithm represented by the flowchart is doing.


DO NOT WRITE IN THIS MARGIN

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]
ĬÓĉ¯Ġ³íËïÛđÕĢ·ĦµĐ×
© UCLES 2024 ĬėěÞÄĨßęÜûĄăÑòçĚæĂ
ĥĥĥĕµĕĥõÕŵåąĥĥõĥÕ
0478/22/M/J/24 [Turn over
* 0019655533510 * 502

DO NOT WRITE IN THIS MARGIN


10
, ,

10 A television subscription service has a new database table named Contract to store details of
their subscribers’ contracts. The table contains these fields:

• ContractNumber – the contract number, for example CT567


• Months – the length of the contract in months, for example 6
• EndDate – the date the contract finishes, for example 30 November 2024
• News – the news service, yes or no
• Movie – the movie service, yes or no
• Sport – the sports service, yes or no
• Junior – the children’s service, yes or no.

DO NOT WRITE IN THIS MARGIN


(a) Identify the field that will be the most appropriate primary key for this table.

............................................................................................................................................. [1]

(b) Complete the table to identify the most appropriate data type for these fields in Contract

Field Data type

ContractNumber

Months

DO NOT WRITE IN THIS MARGIN


EndDate

Sport

[2]

(c) Explain the purpose of these structured query language (SQL) statements.

Statement 1: SELECT SUM (Months) FROM Contract;

Statement 2: SELECT COUNT (News) FROM Contract WHERE News;

DO NOT WRITE IN THIS MARGIN


Statement 1 ..............................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Statement 2 ..............................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[3]
DO NOT WRITE IN THIS MARGIN

ĬÑĉ¯Ġ³íËïÛđÕ̶Ĩ·Ď×
© UCLES 2024 ĬėęÝÁĤëïãĆöĠĩČėâÞĂ
ĥµõĕõõåĕĥąĥĥąåąµÅÕ
0478/22/M/J/24
* 0019655533511 * 503
DO NOT WRITE IN THIS MARGIN

11
, ,

(d) Complete this SQL statement to find the contract numbers of the subscribers that take both
the news and sports services.

SELECT .....................................................................................................................................

FROM Contract

WHERE .......................................................... AND ................................................................. ;


[2]
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN

ĬÓĉ¯Ġ³íËïÛđÕ̶Ħ·Ď×
© UCLES 2024 ĬėĚÞÉĦçÿÖôċé­ôÃâÎĂ
ĥµąÕµĕÅõõõµĥąÅĥõÕÕ
0478/22/M/J/24 [Turn over
* 0019655533512 * 504

DO NOT WRITE IN THIS MARGIN


12
, ,

11 A one-player game uses the two-dimensional (2D) array Grid[] to store the location of a secret
cell to be found by the player in 10 moves. Each row and column has 5 cells.

Start
Grid[1,1]

DO NOT WRITE IN THIS MARGIN


At the start of the game:

• The program places an ‘X’ in a random cell (not in Grid[1,1]) and empties all the other
cells in the grid.
• The player starts at the top left of the grid.
• The player has 10 moves.

During the game:

DO NOT WRITE IN THIS MARGIN


• The player can move left, right, up or down by one cell and the move must be within the grid.
• “You Win” is displayed if the player moves to the cell with ‘X’ and has played 10 moves or
less.
• “You Lose” is displayed if the player has made 10 moves without finding the ‘X’.

Write a program that meets these requirements.

You must use pseudocode or program code and add comments to explain how your code works.

You do not need to declare any arrays or variables; you may assume that this has already been
done.

DO NOT WRITE IN THIS MARGIN


All inputs and outputs must contain suitable messages.

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................
DO NOT WRITE IN THIS MARGIN

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................
ĬÑĉ¯Ġ³íËïÛđÕ̏Ĩ·Đ×
© UCLES 2024 ĬėĚßÉĠÕĊáîĄâďÐġ²æĂ
ĥąÕÕõĕÅÕĕÕÅĥÅÅÅõÅÕ
0478/22/M/J/24
* 0019655533513 * 505
DO NOT WRITE IN THIS MARGIN

13
, ,

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................
DO NOT WRITE IN THIS MARGIN

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................
DO NOT WRITE IN THIS MARGIN

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................
DO NOT WRITE IN THIS MARGIN

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................
DO NOT WRITE IN THIS MARGIN

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................
ĬÓĉ¯Ġ³íËïÛđÕ̏Ħ·Đ×
© UCLES 2024 ĬėęàÁĪÙúØČíħËèµ²ÖĂ
ĥąåĕµõåµąåĕĥÅååµÕÕ
0478/22/M/J/24 [Turn over
* 0019655533514 * 506

DO NOT WRITE IN THIS MARGIN


14
, ,

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

DO NOT WRITE IN THIS MARGIN


..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

DO NOT WRITE IN THIS MARGIN


..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

DO NOT WRITE IN THIS MARGIN


..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................
DO NOT WRITE IN THIS MARGIN

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

.................................................................................................................................................. [15]
ĬÍĉ¯Ġ³íËïÛđÕĢ·ĥ¶Ē×
© UCLES 2024 ĬėĚÞÄĨæĂæþúÌħí±ĂÎĂ
ĥååÕõĕĥĕĥµĕåąĥąõąÕ
0478/22/M/J/24
0478/22 Cambridge IGCSE – Mark Scheme 507
May/June 2024
PUBLISHED
Question Answer Marks

1 C 1

Question Answer Marks

2 One mark for each correct line 4


Logic function Standard symbol

AND

XOR

NAND

OR

© Cambridge University Press & Assessment 2024 Page 4 of 16


0478/22 Cambridge IGCSE – Mark Scheme 508
May/June 2024
PUBLISHED
Question Answer Marks

3 One mark for each correct answer max three 3


MP1 abstraction
MP2 decomposition
MP3 identification of problem
MP4 identification of requirements // outline of success criteria

Question Answer Marks

4(a) One mark per mark point 6


MP1 length check …
MP2 … to ensure the product code entered is 6 characters in length
MP3 format check …
MP4 … to ensure the first two characters of the product code entered are “PD”
MP5 range check …
MP6 … to ensure that the value of the last four figures of the product code entered is between 1000 and 9999

4(b)(i) One mark for correct use of LENGTH operation, one mark for appropriate test 2
Example:
REPEAT
INPUT Product
UNTIL LENGTH(Product) = 6

4(b)(ii) One mark for correct use of SUBSTRING operation, one mark for appropriate test 2
Example:
REPEAT
INPUT Product
UNTIL SUBSTRING(Product, 1, 2) = "PD"

© Cambridge University Press & Assessment 2024 Page 5 of 16


0478/22 Cambridge IGCSE – Mark Scheme 509
May/June 2024
PUBLISHED
Question Answer Marks

5 One mark for each description, one mark for each example 6
 arithmetic – used in calculations (1) A  B + C (1)
 Boolean – used for operations with true or false values (1) IF B AND C (1)
 logical – used in comparisons/conditional statements/selection statements (1) IF B > C (1)

Question Answer Marks

6(a) One mark for: 4


MP1 adding current value to total

One mark for each point max three.


MP2 input more than one number
MP3 setting total to zero before loop
MP4 correct use of loop including terminal condition
MP5 output total after loop

Example:
Total  0
INPUT Value
WHILE Value <> 9999.9
Total  Total + Value
INPUT Value
ENDWHILE
OUTPUT Total

Value  0
Total  0
REPEAT
Total  Total + Value
INPUT Value
UNTIL Value = 9999.9
OUTPUT Total

© Cambridge University Press & Assessment 2024 Page 6 of 16


0478/22 Cambridge IGCSE – Mark Scheme 510
May/June 2024
PUBLISHED
Question Answer Marks

6(b) One mark for each point 4


MP1 adding one to counter
MP2 correct use of selection, if current value > 100 THEN … ENDIF

One mark for each point, max two


MP3 input more than one number
MP4 setting counter to zero before loop
MP5 correct use of loop including terminal condition
MP6 output value of counter after loop

Example:
Counter  0
INPUT Value
WHILE Value <> 9999.9
IF Value > 100
THEN
Counter  Counter + 1
ENDIF
INPUT Value
ENDWHILE
OUTPUT Counter

Question Answer Marks

7(a) 01//02//06//10 3
04(07) and/or 08
03(12)

© Cambridge University Press & Assessment 2024 Page 7 of 16


0478/22 Cambridge IGCSE – Mark Scheme 511
May/June 2024
PUBLISHED
Question Answer Marks

7(b) One mark for each error identified and corrected 3


Line 04 < should be >
Line 08 Count should be Counter
Line 11 ENDWHILE should be ENDIF

01 Max  List[1]
02 Min  List[1]
03 FOR Counter  2 TO 1000
04 IF List[Counter] > Max
05 THEN
06 Max  List[Counter]
07 ENDIF
08 IF List[Counter] < Min
09 THEN
10 Min  List[Counter]
11 ENDIF
12 NEXT Counter
13 OUTPUT "Maximum value is ", Max
14 OUTPUT "Minimum value is ", Min

Question Answer Marks

8(a) X= 1 mark 3
(A AND B) // A AND B 1 mark
AND NOT C 1 mark

X = (A AND B) AND NOT C

© Cambridge University Press & Assessment 2024 Page 8 of 16


0478/22 Cambridge IGCSE – Mark Scheme 512
May/June 2024
PUBLISHED
Question Answer Marks

8(b) Four marks for 8 correct outputs 4


Three marks for 6/7 correct outputs
Two marks for 4/5 correct outputs
One mark for 2/3 correct outputs

A B C X

0 0 0 0

0 0 1 0

0 1 0 0

0 1 1 0

1 0 0 0

1 0 1 0

1 1 0 1

1 1 1 0

© Cambridge University Press & Assessment 2024 Page 9 of 16


0478/22 Cambridge IGCSE – Mark Scheme 513
May/June 2024
PUBLISHED
Question Answer Marks

9(a) One mark for each of columns A, B and T 5


Two marks for columns List[1] to List[5] all entries correct or
One mark for columns List[1] to List[5] with one error

A B List[1] List[2] List[3] List[4] List[5] T


15 17 20 5 9
FALSE 1 17 15 15
TRUE 2 20 15 15
TRUE 3
TRUE 4 9 5 5
5
FALSE 1 20 17 17
TRUE 2
3
4
5
FALSE 1
2
3
4
5

© Cambridge University Press & Assessment 2024 Page 10 of 16


0478/22 Cambridge IGCSE – Mark Scheme 514
May/June 2024
PUBLISHED
Question Answer Marks

9(b) One mark for each point 2


MP1 (bubble) sort data in array
MP2 in descending order

Question Answer Marks

10(a) ContractNumber 1

10(b) One mark for every two correct data types 2

Field Data type

ContractNumber text/alphanumeric

Months integer

EndDate date/time

Sport Boolean

10(c) One mark for each point 3


MP1 to find the total number of months for all contracts
MP2 to find the number of contracts
MP3 … that are subscribed to News

10(d) ContractNumber 2
News AND Sport // Sport AND News

Example answer:
SELECT ContractNumber
FROM Contract
WHERE News // News = TRUE AND Sport // Sport = TRUE ;

© Cambridge University Press & Assessment 2024 Page 11 of 16


0478/22 Cambridge IGCSE – Mark Scheme 515
May/June 2024
PUBLISHED
Question Answer Marks

11 Data Structures required with names as given in the scenario: 15


Arrays or lists Grid

Requirements (techniques)
R1 Set up game – generate random cell, clear all other cells in array, set player start position and start player moves
counter (iteration, use of arrays and library routines (round and random))
R2 Input and check move – is it valid? (input, output, iteration and selection)
R3 Decide outcome – has move found the X? If so, give appropriate output. If not increment counter and continue. If 10
moves exceeded, give appropriate output (use of arrays, iteration, selection and output).

Example 15-mark answer in pseudocode


// Set up game
FOR Row  1 TO 5
FOR Column  1 TO 5
Grid[Row, Column]  ''// set grid cells to be empty
NEXT Column
NEXT Row

© Cambridge University Press & Assessment 2024 Page 12 of 16


0478/22 Cambridge IGCSE – Mark Scheme 516
May/June 2024
PUBLISHED
Question Answer Marks

11 REPEAT // not in cell 1,1


XRow  ROUND ((RANDOM() * 4) + 1, 0) // Random row position between 1 and 5 in GRID
XColumn  ROUND ((RANDOM() * 4) + 1, 0) // Random column position between 1 and 5 in
GRID
UNTIL XRow <> 1 and XColumn <> 1 // not in cell 1,1

Grid [XRow, XColumn]  'X'


MaxMove  10
NumberMoves  0
PlayerRow  1
PlayerColumn  1
Win  FALSE

// during game
WHILE NumberMoves < MaxMove AND NOT Win
MoveError  FALSE
OUTPUT "Please enter your move, L – Left, R – Right, U – Up or D - Down"
INPUT UPPER(PlayerMove)
REPEAT
CASE OF PlayerMove
'L' : TempColumn  PlayerColumn – 1
'R' : TempColumn  PlayerColumn + 1
'U' : TempRow  PlayerRow – 1
'D' : TempRow  PlayerRow + 1
OTHERWISE MoveError  TRUE
ENDCASE

// check for out-of-range moves


IF TempColumn < 1 or TempColumn > 5
THEN
MoveError  TRUE
ELSE
PlayerColumn  TempColumn
ENDIF

© Cambridge University Press & Assessment 2024 Page 13 of 16


0478/22 Cambridge IGCSE – Mark Scheme 517
May/June 2024
PUBLISHED
Question Answer Marks

11 IF TempRow < 1 or TempRow > 5


THEN
MoveError  TRUE
ELSE
PlayerRow  TempRow
ENDIF

// check win if X Found


IF Grid [PlayerRow, PlayerColumn] = 'X'
THEN
OUTPUT "You Win"
Win  TRUE
ELSE
IF NOT MoveError
THEN
NumberMoves  NumberMoves + 1
ENDIF
ENDIF
UNTIL NOT MoveError
ENDWHILE

IF NOT Win
THEN
OUTPUT "You Lose"
ENDIF

© Cambridge University Press & Assessment 2024 Page 14 of 16

You might also like