0% found this document useful (0 votes)
18 views198 pages

Cs Booklet

Uploaded by

swftshadows
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)
18 views198 pages

Cs Booklet

Uploaded by

swftshadows
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/ 198

Cambridge IGCSE™

*0123456789*

COMPUTER SCIENCE 0478/02


Paper 2 Algorithms, Programming and Logic For examination from 2023
SPECIMEN PAPER B 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.

© Cambridge University Press & Assessment 2023 [Turn over


2

1 A range check is used to check that a value input is above 10 and below 20.

Tick ( ) one box to show which value would be accepted.

A 10

B 15

C 20

D 30
[1]

2 Four programming concepts and four descriptions are shown.

Draw one line to connect each programming concept to the most appropriate description.

Programming concept Description

A subroutine that may not


Library routine
return a value.

A standard subroutine that is


Structure diagram
available for immediate use.

A subroutine that can be used


Procedure
in an assignment statement.

An overview of a program
Function
or subroutine.
[3]

© Cambridge University Press & Assessment 2023 0478/02B/SP/23


3

3 A program checks if the weight of a baby is at least 2 kilograms.

Give, with reasons, two different values of test data that could be used for the baby’s weight.
Each reason must be different.

Value 1 .............................................................................................................................................

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

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

Value 2 .............................................................................................................................................

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

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

4 (a) Circle the two actions that a program needs to take to store data in a file.

activate calculate close open output

print read search sort write


[2]

(b) A program halted unexpectedly with the error message ‘File not found’ whilst trying to
read data from a file.

Outline the actions that the program needs to take to prevent this error occurring.

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

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

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

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

© Cambridge University Press & Assessment 2023 0478/02B/SP/23 [Turn over


4

5 (a) Draw a flowchart for an algorithm to:


allow numbers to be input
ignore any numbers that are negative
count how many numbers are positive
output the count of positive numbers when zero is input and end the algorithm.

[6]

© Cambridge University Press & Assessment 2023 0478/02B/SP/23


5

(b) Explain the changes you will make to your algorithm to also count the negative numbers.

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

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

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

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

6 This section of program code asks for 80 numbers between 100 and 1000 inclusive to be entered.
The pseudocode checks that the numbers are in the correct range and then stores the valid
numbers in an array. It counts how many of the numbers are larger than 500 and then outputs the
result when finished.

01 Count 0
02 FOR Index 1 TO 80
03 INPUT "Enter a number between 100 and 1000 ", Number
04 WHILE Number <= 99 AND Number >= 1001
05 INPUT "This is incorrect, please try again", Number
06 ENDWHILE
07 Num[80] Number
08 IF Number > 500 THEN Count Count + 1 ENDIF
09 UNTIL Index = 80
10 PRINT Index
11 PRINT "numbers were larger than 500"

There are four lines of code that contain errors.

State the line number for each error and write the correct code for that line.

Error 1 Line Number ....................

Correct Code ....................................................................................................................................

Error 2 Line Number ....................

Correct Code ....................................................................................................................................

Error 3 Line Number ....................

Correct Code ....................................................................................................................................

Error 4 Line Number ....................

Correct Code ....................................................................................................................................


[4]

© Cambridge University Press & Assessment 2023 0478/02B/SP/23 [Turn over


6

7 Consider the truth table:

A B C X
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 1

(a) Draw a logic circuit to represent the given truth table.

Each logic gate should have maximum of two inputs.

Do not simplify the logic circuit.

B X

[6]

© Cambridge University Press & Assessment 2023 0478/02B/SP/23


7

(b) Write a logic expression for the given truth table.


Do not simplify the logic expression.

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

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

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

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

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

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

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

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

© Cambridge University Press & Assessment 2023 0478/02B/SP/23 [Turn over


8

8 This flowchart inputs the weight of items, in kilograms, to be loaded on a trailer.


Any item over 25 kilograms is rejected. The trailer can take up to 100 kilograms.

START

TotalWeight ! 0
Reject ! 0

INPUT
Weight

IS Weight Yes
Reject ! Reject + 1
> 25?

No

TotalWeight ! TotalWeight + Weight

IS
No TotalWeight
> 100?
Yes

TotalWeight ! TotalWeight – Weight

OUTPUT "Weight of items",


TotalWeight, "Number of items
rejected", Reject

STOP

© Cambridge University Press & Assessment 2023 0478/02B/SP/23


9

Complete the trace table for the input data:

13, 17, 26, 25, 5, 10, 15, 35, 20, 15

Weight Reject TotalWeight OUTPUT

[5]

9 Verification checks can be made on input data.

Tick ( ) one box to show which check is a verification check on input data.

A checksum

B double entry check

C echo check

D parity check
[1]

© Cambridge University Press & Assessment 2023 0478/02B/SP/23 [Turn over


10

10 A function LENGTH(X) finds the length of a string X and a function SUBSTRING(X,Y,Z) finds
a substring of X starting at position Y and Z characters long. The first character in the string is
position 1.

(a) Show the value of the variable after each pseudocode statement has been executed.

01 P "Computer Science" ........................................................................................

02 Q LENGTH(P) ............................................................................................................

03 R SUBSTRING(P,10,7) ..........................................................................................

04 S LENGTH(R) ............................................................................................................

05 T SUBSTRING(R,1,3) ............................................................................................
[5]

(b) Write a pseudocode statement to extract the word Computer from P and store it in the
variable F.

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

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

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

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

© Cambridge University Press & Assessment 2023 0478/02B/SP/23


11

11 A database table, PERFORMANCE, is used to keep a record of the performances at a local theatre.

ShowNumber Type Title Date SoldOut


SN091 Comedy An Evening at Home 01 Sept Yes
SN102 Drama Old Places 02 Oct No
SN113 Jazz Acoustic Evening 03 Nov No
SN124 Classical Mozart Evening 04 Dec Yes
SN021 Classical Bach Favourites 01 Feb Yes
SN032 Jazz 30 Years of Jazz 02 Mar Yes
SN043 Comedy Street Night 03 Apr No
SN054 Comedy Hoot 04 May No

(a) State the number of fields and records in the table.

Fields ........................................................................................................................................

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

(b) Give two validation checks that could be performed on the ShowNumber field.

Validation check 1 .....................................................................................................................

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

Validation check 2 .....................................................................................................................

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

(c) Show the output that would be given by this structured query language (SQL) statement:

SELECT Date, Title

FROM PERFORMANCE

WHERE NOT SoldOut AND Type = "Jazz";

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

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

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

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

© Cambridge University Press & Assessment 2023 0478/02B/SP/23 [Turn over


12

12 (a) Rewrite this pseudocode algorithm using a WHILE … DO … ENDWHILE loop.

B FALSE
INPUT Num
FOR Counter 1 TO 12
IF A[Counter] = Num
THEN
B TRUE
ENDIF
NEXT Counter

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

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

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

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

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

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

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

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

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

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

(b) Identify the purpose of the algorithm in (a).

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

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

(c) Explain the difference between a WHILE … DO … ENDWHILE and a REPEAT … UNTIL loop.

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

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

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

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

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

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

© Cambridge University Press & Assessment 2023 0478/02B/SP/23


13

13 The names of patients are stored in the one-dimensional (1D) array Patient[] of type string.
A separate two-dimensional (2D) array Readings[] stores the latest data recorded about each
patient. The array already contains the readings taken by a nurse for each patient:
temperature measured to one decimal place
pulse rate, a whole number.

Temperature readings should be in the range 31.6 to 37.2 inclusive.


Pulse readings should be in the range 55.0 to 100.0 inclusive.

The hospital number given to the patient is used for the index on both arrays, this is a value
between 1 and 1000 inclusive.

When the data for a patient is checked a warning is given if any of the readings are out of range.
If both readings are out of range, then a severe warning is given.

Write a procedure, using pseudocode or program code, that meets the following requirements:
takes the hospital number as a parameter
checks if the number is valid
outputs an error message and exits the procedure if the number is not valid
if the hospital number is valid:
– output the patient’s name
– output ‘Normal readings’ if both the readings are within range
– output ‘Warning’ and the name of the reading e.g. ‘Pulse’ if one reading is out of range
– output ‘Severe warning’ and the names of the two readings ‘Pulse and temperature’ if
both readings are out of range
– exits the procedure.

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 arrays.

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

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

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

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

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

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

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

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

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

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

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

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

..........................................................................................................................................................
© Cambridge University Press & Assessment 2023 0478/02B/SP/23 [Turn over
14

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

..........................................................................................................................................................
© Cambridge University Press & Assessment 2023 0478/02B/SP/23
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


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


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.

You must show all your working.

Working space ...........................................................................................................................

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

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

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

Register:
[2]

© UCLES 2020 0478/01/SP/23 [Turn over


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


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


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


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


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


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


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


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


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) 313514/3
© UCLES 2023 [Turn over
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


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


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


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


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


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


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


10

9 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


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


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


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


15

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

..........................................................................................................................................................
© UCLES 2023 0478/22/F/M/23 [Turn over
www.dynamicpapers.com

Cambridge IGCSE™
* 4 8 1 6 0 2 0 7 0 1 *

COMPUTER SCIENCE 0478/21


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 (CJ/CT) 313987/4
© UCLES 2023 [Turn over
www.dynamicpapers.com
2

1 (a) Four descriptions of stages in the program development life cycle are shown.

Draw one line to link each description to its most appropriate program development life cycle
stage.

Not all program development life cycle stages will be used.

Program development life cycle description Program development life cycle stage

develop an algorithm to solve the problem analysis


by using structure diagrams, flowcharts or
pseudocode

coding

detect and fix the errors in the program


design

identify the problem and its requirements


evaluation

write and implement the instructions to


solve the problem testing
[4]
(b) Identify three of the component parts after a problem has been decomposed.

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

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

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

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

3 ................................................................................................................................................

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

2 Tick (ü) one box to show the name of the data structure used to store a collection of data of the
same data type.

A Array

B Constant

C Function

D Variable
[1]
© UCLES 2023 0478/21/M/J/23
www.dynamicpapers.com

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

COMPUTER SCIENCE 0478/23


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 (CJ/CGW) 313989/4
© UCLES 2023 [Turn over
www.dynamicpapers.com
2

1 Tick (3) one box to complete the sentence.

A constant

A stores a value that can change at any time during the execution of a program.

B stores a value that cannot change during the execution of a program.

C stores values of multiple data types.

D stores values that must be of the same data type.


[1]

2 Explain the purpose of the library routines MOD and RANDOM

MOD ...................................................................................................................................................

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

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

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

RANDOM ............................................................................................................................................

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

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

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

3 Describe what happens when a function is called during the execution of a program.

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

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

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

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

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

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

© UCLES 2023 0478/23/M/J/23


www.dynamicpapers.com
3

4 (a) Explain why verification checks are used when data is input.

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

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

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

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

(b) Give two types of verification check and state how each one can be used.

Verification check 1 ...................................................................................................................

Use ...........................................................................................................................................

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

Verification check 2 ...................................................................................................................

Use ...........................................................................................................................................

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

© UCLES 2023 0478/23/M/J/23 [Turn over


www.dynamicpapers.com
4

5 (a) Four descriptions of validation checks are shown.

Draw one line to link each description to the most appropriate check.

Not all checks will be used.

Description Check

to check that the data entered is an integer check digit

format check
to check that some data has been entered

length check
to check that the data entered has an appropriate
number of characters
presence check

to check that an identification number contains


no errors type check
[4]

(b) Write an algorithm in pseudocode to make sure that an input for the variable Length is
between 15 and 35 inclusive. The code must iterate until a valid input has been made and the
code must include appropriate messages.

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

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

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

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

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

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

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

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

6 An algorithm has been written in pseudocode to allow 100 positive numbers to be input. The total
and the average of the numbers are output.
01 Counter 100
02 Total 0
03 WHILE Counter > 100 DO
04 INPUT Number
05 IF Number > 0
06 THEN
07 Total Total + Counter
08 Counter Counter + 1
09 ENDCASE
10 ENDWHILE
11 OUTPUT "The total value of your numbers is ", Total
12 OUTPUT "The average value of your numbers is ", Total / 100

© UCLES 2023 0478/23/M/J/23


www.dynamicpapers.com
5

(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) Describe the changes you should make to the corrected algorithm so that a count-controlled
loop is used to allow 100 positive numbers to be input.

You do not need to rewrite the algorithm.

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

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

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

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

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

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

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

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

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

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

© UCLES 2023 0478/23/M/J/23 [Turn over


www.dynamicpapers.com
6

7 The flowchart represents an algorithm.


An input of –1 will terminate the algorithm.

START

Total 0

INPUT
Value

IS Yes
Value =
–1 ?

No OUTPUT
OUTPUT Total
"Rejected" Five1 Value DIV 5

STOP
Five2 Value / 5

No IS
Five1 =
Five2 ?

Yes

Ten1 Value DIV 10

Ten2 Value / 10

No IS
Ten1 =
Ten2 ?

Yes
Total Total + Value
© UCLES 2023 0478/23/M/J/23
www.dynamicpapers.com
7

(a) Complete the trace table for the input data:

5, 50, 52, 555, 57, 500, –1, 5500, 55

Total Value Five1 Five2 Ten1 Ten2 OUTPUT

[6]

(b) Describe the purpose of the algorithm.

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

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

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

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

© UCLES 2023 0478/23/M/J/23 [Turn over


www.dynamicpapers.com
8

8 Consider the logic expression:

Z is 1 if (A = 1 AND C = NOT 1) AND (B = 1 NOR C = 1)

(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/23/M/J/23


www.dynamicpapers.com
9

9 The variable Saying is used to store string data in a program.

(a) Write the pseudocode statement to declare the variable Saying

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

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

(b) Write the pseudocode statements to:


• allow a string to be input to the variable Saying
• store the content of the variable Saying in a text file named "Quotations.txt"
• make sure the text file is closed at the end of the algorithm.

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

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

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

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

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

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

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

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

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

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

© UCLES 2023 0478/23/M/J/23 [Turn over


www.dynamicpapers.com
10

10 A database table called Site1 stores details of some holiday homes at a holiday park. The
database shows the type of home, number of guests, whether it is privately owned and the weekly
rate to hire it.

Name Type Private Rate$ NumberGuest


Bay Lodge Lodge NO 1000 10
Bay View Cabin NO 400 4
Blue Skies Cabin NO 350 4
Cliff View Cabin NO 650 6
Coppice Lodge Lodge NO 1200 12
Green Lodge Lodge NO 1000 8
Henry Cabin YES 300 2
Hikers’ Rest Retreat NO 750 6
Poppy Cabin NO 300 2
Summer Joy Retreat YES 750 6
Valley View Cabin NO 600 6
West Lodge Lodge YES 1200 12

(a) State the number of fields and the number of records in this database table.

Fields ........................................................................................................................................

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

(b) Describe the purpose of a primary key.

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

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

© UCLES 2023 0478/23/M/J/23


www.dynamicpapers.com
11

(c) The database uses the data types:


• alphanumeric
• character
• Boolean
• integer
• real
• date/time.

Complete the table to show the most appropriate data type for each field.

Field Data type


Type
Private
Rate$
NumberGuest
[2]

(d) Give the output that would be produced by the structured query language (SQL) statement:

SELECT Name, NumberGuest, Rate$


FROM Site1
WHERE NumberGuest >= 10;

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

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

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

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

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

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

© UCLES 2023 0478/23/M/J/23 [Turn over


www.dynamicpapers.com
12

11 A two-dimensional (2D) array Contacts[] is used to store names and telephone numbers. All
the data is stored as strings. The array must have the capacity to store 100 contacts in the form of:
• column 1 – contact names as: last name, first name
for example: Smith, John
• column 2 – telephone numbers.

The variable CurrentSize shows how many contacts are in the array.

Write a program that meets the following requirements:


• display a menu of choices:
○ enter new contact details
○ display all the contact details
○ delete all the contact details
• validate the menu input
• allow up to a maximum of five new contacts to be added to the array at any one time
• do not allow more than 100 contacts in total
• after new contacts have been added, sort the array by contact name, as long as there are at
least two contacts in the array
• output the whole of the array
• delete the contents of the array.

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 array Contacts[] and the variable CurrentSize

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

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

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

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

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

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

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

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

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

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

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

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

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

© UCLES 2023 0478/23/M/J/23


www.dynamicpapers.com
13

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

..........................................................................................................................................................
© UCLES 2023 0478/23/M/J/23 [Turn over
www.dynamicpapers.com

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
www.dynamicpapers.com
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


www.dynamicpapers.com
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


www.dynamicpapers.com
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


www.dynamicpapers.com
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


www.dynamicpapers.com
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


www.dynamicpapers.com
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


www.dynamicpapers.com
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


www.dynamicpapers.com
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


www.dynamicpapers.com
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


www.dynamicpapers.com
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
www.dynamicpapers.com
13

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

..........................................................................................................................................................
© UCLES 2023 0478/22/M/J/23 [Turn over
www.dynamicpapers.com

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
www.dynamicpapers.com
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


www.dynamicpapers.com
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


www.dynamicpapers.com
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


www.dynamicpapers.com
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
www.dynamicpapers.com
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


www.dynamicpapers.com
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


www.dynamicpapers.com
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


www.dynamicpapers.com
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


www.dynamicpapers.com
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


www.dynamicpapers.com
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


Cambridge IGCSE™
*0123456789*

COMPUTER SCIENCE 0478/01


Paper 1 Computer Systems For examination from 2023
SPECIMEN PAPER B 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.

© Cambridge University Press & Assessment 2023 [Turn over


2

1 Binary is a number system used by computers.

(a) (i) Four 8-bit binary values are given.

Tick ( ) one box to show which 8-bit binary value is the correct conversion for the
denary value 50.

A 00101010

B 00110010

C 01001100

D 01010000
[1]

(ii) Four 8-bit binary values are given.

Tick ( ) one box to show which 8-bit binary value is the correct conversion for the
hexadecimal value 90.

A 00001001

B 01011010

C 10010000

D 01100100
[1]

(b) Explain why a computer system can only process data in binary form.

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

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

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

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

© Cambridge University Press & Assessment 2023 0478/01B/SP/23


3

(c) Two 8-bit binary values are given.

Add the two 8-bit binary values.

Give your answer in binary. Show all your working.

+0 1 0 0 1 0 1 0

[3]

(d) Two 8-bit binary values are added.

The result of this calculation needs to be stored in an 8-bit register.

The denary result of this calculation is 301. This generates an error.

State the name of this type of error and explain why this error occurs.

Error name ................................................................................................................................

Explanation ...............................................................................................................................

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

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

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

© Cambridge University Press & Assessment 2023 0478/01B/SP/23 [Turn over


4

2 The contents of three binary registers have been transmitted from one computer to another.

Even parity has been used as an error detection method.

The outcome after transmission is:

No errors have been detected in Register A and Register C.

An error has been detected in Register B.

Complete the parity bit for each register to show the given outcome.

Parity bit
Register A 0 1 0 0 1 0 1

Register B 1 0 0 0 0 0 1

Register C 1 0 0 0 0 1 1
[3]

© Cambridge University Press & Assessment 2023 0478/01B/SP/23


5

3 A student uses a laptop and a calculator for schoolwork.

(a) The laptop has a central processing unit (CPU) that performs the fetch–decode–execute
cycle.

The CPU has several components, including the memory data register (MDR) and the
arithmetic logic unit (ALU).

Describe how the MDR and the ALU are used in the fetch–decode–execute cycle.

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

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

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

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

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

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

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

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

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

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

(b) The calculator has an embedded system.

Describe what is meant by an embedded system.

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

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

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

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

(c) Both the laptop and the calculator have read only memory (ROM).

State one reason why both devices have ROM.

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

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

© Cambridge University Press & Assessment 2023 0478/01B/SP/23 [Turn over


6

4 A student is concerned about the threats to their computer when using the internet.

The student wants to use some security solutions to help protect the computer from the threats.

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

Each security solution must be different.

Threat Security solution


Computer virus
Hacking
Spyware
[3]

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

Computer virus security solution ..............................................................................................

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

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

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

Hacking security solution ..........................................................................................................

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

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

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

Spyware security solution .........................................................................................................

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

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

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

© Cambridge University Press & Assessment 2023 0478/01B/SP/23


7

5 (a) Complete the statements about different types of programming language.

Use the terms from the list.

Some of the terms in the list will not be used. You should only use a term once.

assembly denary executable file instruction storage

hexadecimal high-level low-level machine code protocol

source code style syntax translator

The structure of language statements in a computer program is called the

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

A programming language that uses natural language statements is called a

............................................. language.

When programs are written in this type of language they need a .............................................

to convert them into ............................................. .

A programming language that is written using mnemonic codes is called an

............................................. language.

This is an example of a ............................................. language.


[6]

(b) A programmer often uses an integrated development environment (IDE) when writing a
computer program.

Give three common functions of an IDE.

Function 1 .................................................................................................................................

Function 2 .................................................................................................................................

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

© Cambridge University Press & Assessment 2023 0478/01B/SP/23 [Turn over


8

6 A finance company uses cloud storage to archive their accounts.

(a) Describe what is meant by cloud storage.

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

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

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

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

(b) The computers in the finance company use both primary and secondary storage.

(i) One example of primary storage is ROM.

Give one other example of primary storage.

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

(ii) Give two examples of secondary storage.

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

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

(c) The computers also use virtual memory.

Describe how virtual memory is created and used.

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

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

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

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

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

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

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

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

© Cambridge University Press & Assessment 2023 0478/01B/SP/23


9

7 (a) In a computer system the operating system is run directly on the firmware.

Identify which type of software runs directly on the operating system.

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

(b) One function of an operating system is to manage interrupts.

Give two examples of when an interrupt would be generated.

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

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

8 Digital currency can be used to buy products from the world wide web.

(a) State what is meant by a digital currency.

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

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

(b) Describe the process of blockchain in digital currency.

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

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

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

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

© Cambridge University Press & Assessment 2023 0478/01B/SP/23 [Turn over


10

9 The following data is stored as a text file:

red, green, yellow, green, purple, blue, red, purple, blue, yellow, grey, black, pink, red,

Explain how lossless compression would compress this file.

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

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

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

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

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

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

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

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

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

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

© Cambridge University Press & Assessment 2023 0478/01B/SP/23


11

10 An expert system is an example of artificial intelligence. One component of an expert system is a


knowledge base.

(a) Explain why an expert system needs a knowledge base.

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

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

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

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

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

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

(b) Identify three other components that are present in an expert system.

Component 1 ............................................................................................................................

Component 2 ............................................................................................................................

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

(c) An expert system can make use of machine learning.

State what is meant by machine learning.

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

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

© Cambridge University Press & Assessment 2023 0478/01B/SP/23 [Turn over


12

11 An office has an automated lighting system. When movement is detected in the office, the lights
are switched on. If movement is not detected for a period of two minutes, the lights are switched
off.

The system uses a sensor and a microprocessor.

(a) Identify the most appropriate sensor.

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

(b) Describe what is meant by a microprocessor.

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

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

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

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

(c) Describe how the sensor and the microprocessor are used in this automated lighting system.

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

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

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

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

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

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

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

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

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

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

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

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

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 (Cambridge University Press & Assessment) 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.

Cambridge Assessment International Education is part of Cambridge University Press & Assessment. Cambridge University Press & Assessment is a department
of the University of Cambridge.

© Cambridge University Press & Assessment 2023 0478/01B/SP/23


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


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


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


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


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


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


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


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


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


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


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


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


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


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


www.dynamicpapers.com

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
www.dynamicpapers.com
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


www.dynamicpapers.com
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


www.dynamicpapers.com
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


www.dynamicpapers.com
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


www.dynamicpapers.com
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


www.dynamicpapers.com
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
www.dynamicpapers.com
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


www.dynamicpapers.com
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


www.dynamicpapers.com
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


www.dynamicpapers.com
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


Cambridge IGCSE™
* 7 7 1 9 9 1 0 7 7 6 *

COMPUTER SCIENCE 0478/11


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. Any blank pages are indicated.

DC (LK) 314031/3
© UCLES 2023 [Turn over
2

1 A student uses a computer and several hardware devices to complete his schoolwork.

The computer has a central processing unit (CPU).

(a) The student uses a keyboard to complete his schoolwork.

Tick (3) one box to show which type of device the keyboard is.

A input

B memory

C output

D storage
[1]

(b) The student uses a printer to print his schoolwork.

Tick (3) one box to show which type of device the printer is.

A input

B memory

C output

D storage
[1]

(c) A component in the CPU sends signals to manage the fetch-decode-execute cycle.

State the name of this component.

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

(d) The CPU has a clock speed of 2.4 Ghz.

Describe what is meant by a 2.4 Ghz clock speed.

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

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

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

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

© UCLES 2023 0478/11/O/N/23


3

(e) The CPU contains registers including the memory data register (MDR).

(i) Describe the role of the MDR in the fetch-decode-execute cycle.

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

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

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

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

(ii) Identify three other registers contained in the CPU.

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

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

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

2 A car park has a payment machine that allows a customer to pay for their parking.

The cost of parking is displayed as a denary number on a screen on the payment machine.

The cost of parking is stored in two 8-bit binary registers.

For the parking cost of $10.50:


• register 1 stores the denary value 10 as binary
• register 2 stores the denary value 50 as binary.

(a) Give the parking cost that would be displayed on the payment machine when the registers
store:
• register 1: 00010001
• register 2: 01000110

Parking cost displayed $ ............................................................................... [2]

Working space

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

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

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

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

© UCLES 2023 0478/11/O/N/23 [Turn over


4

(b) The parking cost of $14.98 is displayed on the payment machine.

Give the 8-bit binary numbers that are stored in the registers to display the parking cost.

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

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

Working space

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

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

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

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

(c) The payment machine gives the customer a ticket when they have paid their parking cost.
Each ticket has a 4-digit hexadecimal ticket number that is stored as binary.

The binary number 1010000000111101 is stored for a customer’s ticket number.

Give the hexadecimal ticket number that would be displayed on this customer’s ticket.

Hexadecimal ticket number ................................................................................................ [4]

Working space

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

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

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

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

(d) Explain why data input into the payment machine needs to be converted to binary.

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

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

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

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

© UCLES 2023 0478/11/O/N/23


5

(e) When a customer is leaving the car park they arrive at a barrier. The customer needs to insert
their ticket into a system at the barrier. This system reads the ticket number then checks
whether the parking cost has been paid for the car. The barrier is raised if it has been paid.

The system uses a microprocessor.

Describe the role of the microprocessor in the system and how it checks whether the parking
cost has been paid.

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

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

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

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

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

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

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

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

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

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

3 The table contains four descriptions about a computer system.

Complete the table by writing the correct term for each description.

Term Description

A collective term for the physical components


....................................................................... of the computer system.

A type of software that provides services


that the user requires and allows the user to
.......................................................................
perform tasks on the computer.

A type of software that manages the


main functions of the computer, including
.......................................................................
managing files and managing memory.

A type of software that is stored in the


read only memory (ROM). It includes the
....................................................................... basic input output system (BIOS) and the
bootloader.
[4]

© UCLES 2023 0478/11/O/N/23 [Turn over


6

4 Data is transmitted between a computer and a printer.

(a) The data is transmitted one bit at a time down a single wire. The computer can transmit data
to the printer and the printer can transmit data to the computer, using the same connection.

Circle the two data transmission methods that will transmit data in this way.

parallel full-duplex parallel half-duplex parallel simplex

serial full-duplex serial half-duplex serial simplex


[2]

(b) An odd parity check is used to detect errors in the data transmission.

Explain how the odd parity check detects errors.

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

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

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

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

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

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

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

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

(c) Another error detection method sends the data from the computer to the printer, then a copy
of the data received is sent back from the printer to the computer. The two sets of data are
compared to see if they match.

State the name of this type of error detection method.

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

© UCLES 2023 0478/11/O/N/23


7

5 A musician is recording herself playing the music for a song on the piano.

(a) Explain how the analogue sound is recorded and converted to digital.

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

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

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

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

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

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

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

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

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

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

(b) State two ways that the accuracy of the recording could be increased.

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

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

(c) The musician compresses the sound file using lossless compression instead of lossy
compression.

Explain why the musician would choose to use lossless compression instead of lossy
compression.

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

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

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

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

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

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

© UCLES 2023 0478/11/O/N/23 [Turn over


8

(d) The musician types the words for the song into a document.

Two character sets that can be used when converting text to digital are the American standard
code for information interchange (ASCII) and Unicode.

Explain the differences between the ASCII character set and the Unicode character set.

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

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

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

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

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

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

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

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

6 Draw and annotate a diagram to demonstrate how a firewall works.

[4]
© UCLES 2023 0478/11/O/N/23
9

7 Complete the statements about data packets and packet switching.

Use the terms from the list.

Some of the terms in the list will not be used. You should only use a term once.

destination address first footer header

last main data packets payload

routers servers trailer

Data is broken down into packets. A data packet has a packet .......................................................

that contains the packet number and the ....................................................... .

Each packet could take a different path from the sender to the receiver; this is controlled by

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

Packets may arrive out of order. Once the ...................................................... packet has arrived,

the packets are reordered.


[4]

8 Storage can be described as being magnetic, solid-state or optical.

(a) Give two features of magnetic storage.

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

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

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

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

(b) Give three features of solid-state storage.

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

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

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

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

3 ................................................................................................................................................

...................................................................................................................................................
[3]
© UCLES 2023 0478/11/O/N/23 [Turn over
10

(c) Give one example of each type of storage.

Magnetic ...................................................................................................................................

Solid-state .................................................................................................................................

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

9 An interrupt is a type of signal that is used in a computer.

(a) State the name of the type of software that manages interrupts.

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

(b) Describe how interrupts are used when a key is pressed on a keyboard.

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

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

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

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

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

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

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

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

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

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

(c) Interrupts can be hardware based or software based.

A key press is one example of a hardware interrupt.

(i) Give two other examples of a hardware interrupt.

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

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

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

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

© UCLES 2023 0478/11/O/N/23


11

(ii) Give two examples of a software interrupt.

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

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

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

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

© UCLES 2023 0478/11/O/N/23


12

BLANK PAGE

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/11/O/N/23


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


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


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


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


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


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


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


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


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


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


Cambridge IGCSE™
* 2 3 6 8 9 8 2 0 0 8 *

COMPUTER SCIENCE 0478/13


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. Any blank pages are indicated.

DC (LK) 314035/3
© UCLES 2023 [Turn over
2

1 A mobile telephone has built-in input and output devices.

(a) Give two examples of an input device that would be built into a mobile telephone.

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

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

(b) Give one example of an output device that would be built into a mobile telephone.

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

(c) The data storage in the mobile telephone can be measured using different units of
measurement.

(i) State how many bits are equal to a byte.

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

(ii) State how many kibibytes (KiB) equal a mebibyte (MiB).

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

(d) The mobile telephone has an operating system.

Describe the purpose of the operating system.

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

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

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

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

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

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

2 Humans use a denary number system and computers use a binary number system.

(a) Explain what is meant by a binary number system.

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

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

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

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

© UCLES 2023 0478/13/O/N/23


3

(b) Convert the denary numbers 14, 59 and 234 to binary.

14 ..............................................................................................................................................

59 ..............................................................................................................................................

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

Working space

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

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

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

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

(c) Convert the denary numbers 9, 26 and 65 to hexadecimal.

9 ................................................................................................................................................

26 ..............................................................................................................................................

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

Working space

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

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

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

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

(d) Convert the positive denary number 123 to 8-bit binary using two’s complement.

Show all your working.

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

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

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

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

© UCLES 2023 0478/13/O/N/23 [Turn over


4

(e) Add the binary values 00110011 and 01111000 using binary addition.

Give your answer in binary. Show all your working.

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

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

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

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

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

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

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

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

3 A computer has a central processing unit (CPU).

(a) Circle three components that are built into the CPU.

accumulator (ACC) control unit (CU) graphics card

hard disk drive (HDD) motherboard program counter (PC)

random access memory (RAM) read only memory (ROM)


[3]

(b) The CPU has cache.

Explain the purpose of the cache.

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

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

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

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

© UCLES 2023 0478/13/O/N/23


5

(c) The CPU has a component that regulates the number of fetch–decode–execute cycles the
CPU can perform in a second.

State the name of this component.

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

(d) The CPU has a component that carries out all calculations and logical operations.

State the name of this component.

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

4 An employee uses a web browser on their computer.

(a) Describe the main purpose of a web browser.

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

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

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

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

(b) The employee wants his payment details to be automatically filled in when he buys products
using the internet.

Identify the function of a web browser that could be used for this purpose.

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

(c) The employee wants to be able to quickly access websites that he regularly uses.

Identify the function of a web browser that could be used for this purpose.

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

(d) The web browser uses the secure socket layer (SSL) protocol to transmit personal data
securely over the internet.

State how the SSL protocol secures the data for transmission.

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

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

© UCLES 2023 0478/13/O/N/23 [Turn over


6

5 Errors can occur when data is transmitted.

(a) Give one reason an error may occur when data is transmitted.

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

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

(b) Some error detection methods use a calculated value to check for errors.

Tick (3) one box to show which error detection method does not use a calculated value to
check for errors.

A Check digit

B Checksum

C Echo check

D Parity check
[1]

(c) An automatic repeat request (ARQ) can be used to make sure that data is received free of
errors. It can use a positive or negative acknowledgement method to do this.

Explain how an ARQ operates using a positive acknowledgement method.

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

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

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

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

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

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

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

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

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

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

© UCLES 2023 0478/13/O/N/23


7

6 A company uses cloud storage to store its data.

(a) Tick (3) one box to show which is not a characteristic of cloud storage.

A Data is accessed through a network

B Data is stored locally

C Data is stored remotely

D Physical servers are used to store the data


[1]

(b) Explain two advantages for the owners of the company of storing its data in cloud storage.

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

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

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

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

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

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

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

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

(c) Explain one disadvantage to employees of the company storing data in the cloud.

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

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

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

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

© UCLES 2023 0478/13/O/N/23 [Turn over


8

7 A photographer takes an image with a digital camera. The photographer sets the resolution and
colour depth for the image.

(a) State what is meant by the image resolution.

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

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

(b) State what is meant by the image colour depth.

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

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

(c) Give one benefit of increasing the colour depth of the image.

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

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

(d) The photographer compresses the image using a method that permanently reduces the
colour depth and resolution of the image.

Identify which compression method the photographer uses.

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

(e) One benefit for compressing the image is to reduce the storage space it uses.

Give two other benefits of compressing the image.

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

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

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

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

© UCLES 2023 0478/13/O/N/23


9

8 Draw and annotate a diagram to represent the role of a router.

[4]

9 A computer has secondary storage.

(a) The table contains statements about secondary storage.

Complete the table by writing the type of secondary storage that applies to each statement.
Some types of secondary storage may apply to more than one statement.

Type of secondary storage Statement

data is stored using pits and lands


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

data is stored using control gates and floating gates


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

data is stored using electromagnets


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

data is stored using a laser


................................................
data is stored on a platter that is divided into tracks and
................................................ sectors
[5]

© UCLES 2023 0478/13/O/N/23 [Turn over


10

(b) Explain two differences between primary storage and secondary storage.

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

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

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

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

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

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

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

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

10 A car repair garage uses an expert system.

(a) Complete the description about the operation of the expert system.

Use the terms from the list. Some of the terms in the list will not be used.

inference engine interface knowledge base

machine learning mechanical engine output device

question base rule base

An expert system has a ....................................................... that contains a list of facts.

The ....................................................... applies the .......................................................

to the ....................................................... to reach a diagnosis for the repair of the car.

The user provides data to the system using an ....................................................... .


[5]

© UCLES 2023 0478/13/O/N/23


11

(b) The expert system has machine learning capabilities.

Describe what is meant by machine learning capabilities.

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

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

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

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

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

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

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

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

© UCLES 2023 0478/13/O/N/23


12

BLANK PAGE

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/O/N/23


Cambridge IGCSE™
* 5 6 2 6 6 1 3 3 2 9 *

COMPUTER SCIENCE 0478/21


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 (LK/SG) 314037/5
© UCLES 2023 [Turn over
2

1 Tick (3) one box to show which operator means less than or equal to.

A OR

B <

C <=

D >=
[1]

2 Tick (3) one box to show how a value can be passed to a procedure.

A function

B parameter

C return

D subroutine
[1]

3 Four descriptions of data and five data types are shown.

Draw one line to link each description to the most appropriate data type.
Not all data types will be used.

Description Data type

BOOLEAN
a whole number

CHAR
a single letter

INTEGER

a word or phrase
REAL

a number with two decimal places STRING

[4]

© UCLES 2023 0478/21/O/N/23


3

4 Circle the three words representing places where data may be stored.

array constant dimension input

output procedure variable


[3]

5 The first stage of the program development life cycle is analysis. Two of the tasks in analysis are
abstraction and decomposition.

(a) Describe what is meant by abstraction.

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

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

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

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

(b) Identify three of the component parts when a problem has been decomposed at the analysis
stage.

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

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

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

(c) Identify and describe one other stage of the program development life cycle.

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

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

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

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

© UCLES 2023 0478/21/O/N/23 [Turn over


4

6 An algorithm has been written in pseudocode.

01 DECLARE A[1:10] : STRING


02 DECLARE T : STRING
03 DECLARE C, L : INTEGER
04 L 10
05 FOR C 1 TO L
06 OUTPUT "Please enter name "
07 INPUT A[C]
08 NEXT C
09 FOR C 1 TO L
10 FOR L 1 TO 9
11 IF A[L] > A[L + 1]
12 THEN
13 T A[L]
14 A[L] A[L + 1]
15 A[L + 1] T
16 ENDIF
17 NEXT L
18 NEXT C
19 FOR C 1 TO L
20 OUTPUT "Name ", C, " is ", A[C]
21 NEXT C

(a) State the purpose of this pseudocode algorithm.

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

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

© UCLES 2023 0478/21/O/N/23


5

(b) State four processes in this algorithm.

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

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

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

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

3 ................................................................................................................................................

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

4 ................................................................................................................................................

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

(c) Meaningful identifiers have not been used in this algorithm.


Suggest suitable meaningful identifiers for:

The array:

A ................................................................................................................................................

The variables:

T ................................................................................................................................................

C ................................................................................................................................................

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

(d) State two other ways the algorithm can be made easier to understand and maintain.

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

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

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

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

© UCLES 2023 0478/21/O/N/23 [Turn over


6

7 Consider this logic circuit.

B X

(a) Write a logic expression for this logic circuit. Do not attempt to simplify this logic expression.

X = ............................................................................................................................................

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

(b) Complete the truth table from the given logic circuit.

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/21/O/N/23


7

BLANK PAGE

© UCLES 2023 0478/21/O/N/23 [Turn over


8

8 A programmer is designing an algorithm to calculate the cost of a length of rope.


The program requirements are:
• input two values: the length of rope in metres Length and the cost of one metre Cost
• perform a validation check on the length to ensure that the value is between 0.5 and 6.0
inclusive
• calculate the price Price
• output the price rounded to two decimal places.

Use the variable names given.

(a) State the name of the validation check.

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

(b) Complete the flowchart for this algorithm.

START

STOP

[6]
© UCLES 2023 0478/21/O/N/23
9

(c) Give two different sets of test data for this algorithm and state the purpose of each set.

Set 1 .........................................................................................................................................

Purpose ....................................................................................................................................

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

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

Set 2 .........................................................................................................................................

Purpose ....................................................................................................................................

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

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

(d) Complete the headings for the trace table to show a dry-run for this algorithm.
You do not need to trace the algorithm.

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

[3]

(e) Describe an improvement that should be made to the requirements for this algorithm.

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

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

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

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

© UCLES 2023 0478/21/O/N/23 [Turn over


10

9 A model shop wants to set up a database to help with stock control of the model figures available
for sale. The shop wants to store this information about the model figures:
Field 1 – catalogue number, for example MD1234
Field 2 – description, for example ‘small white dog’
Field 3 – number in stock, for example 5
Field 4 – the price of each model, for example 7.40
Field 5 – if the model has already been painted, yes or no.

(a) The shop needs five fields for each record.


Give a suitable name and data type for each field.

Field 1 name .............................................................................................................................

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

Field 2 name ..............................................................................................................................

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

Field 3 name .............................................................................................................................

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

Field 4 name .............................................................................................................................

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

Field 5 name .............................................................................................................................

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


[5]

(b) (i) Give the name of the field that should be used for the primary key.

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

(ii) State why this field is used as the primary key.

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

(c) Structured query language (SQL) is used to query data stored in this database.
State what these SQL commands are used for.

SELECT .....................................................................................................................................

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

FROM .........................................................................................................................................

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

WHERE .......................................................................................................................................

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

© UCLES 2023 0478/21/O/N/23


11

BLANK PAGE

© UCLES 2023 0478/21/O/N/23 [Turn over


12

10 Drama students put on a performance of a play for one evening. Seats in a small theatre can be
booked for this performance.

The theatre has 10 rows of 20 seats. The status of the seat bookings for the evening is held in the
two-dimensional (2D) Boolean array Evening[]

Each element contains FALSE if the seat is available and TRUE if the seat is booked.

Up to and including four seats can be booked at one time. Seats are allocated in order from those
available. A row or seat number cannot be requested.

The array Evening[] has already been set up and some data stored.

Write a program that meets the following requirements:


• counts and outputs the number of seats already booked for the evening
• allows the user to input the number of seats required
• validates the input
• checks if enough seats are available:
– if they are available
○ changes the status of the seats
○ outputs the row number and seat number for each seat booked
– if they are not available:
○ outputs a message giving the number of seats left or ‘House full’ if the theatre is fully
booked.

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 do not need to initialise the data in the array Evening[]
All inputs and outputs must contain suitable messages.

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

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

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

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

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

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

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

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

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

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

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

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

© UCLES 2023 0478/21/O/N/23


13

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

..........................................................................................................................................................
© UCLES 2023 0478/21/O/N/23 [Turn over
14

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.................................................................................................................................................. [15]

© UCLES 2023 0478/21/O/N/23


15

BLANK PAGE

© UCLES 2023 0478/21/O/N/23


16

BLANK PAGE

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/21/O/N/23


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


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


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


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


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


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


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


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


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


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
13

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

..........................................................................................................................................................
© UCLES 2023 0478/22/O/N/23 [Turn over
14

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.................................................................................................................................................. [15]

© UCLES 2023 0478/22/O/N/23


15

BLANK PAGE

© UCLES 2023 0478/22/O/N/23


16

BLANK PAGE

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/O/N/23


Cambridge IGCSE™
* 2 5 0 4 8 4 8 1 1 1 *

COMPUTER SCIENCE 0478/23


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 (CJ/CT) 313523/5
© UCLES 2023 [Turn over
2

1 Tick (3) one box to show which term is an example of a verification check.

A Double entry check

B Format check

C Length check

D Presence check
[1]

2 Tick (3) one box to show which library routine returns the remainder of a division.

A DIV

B MOD

C RANDOM

D ROUND
[1]

© UCLES 2023 0478/23/O/N/23


3

3 (a) Four pseudocode descriptions and five pseudocode keywords are shown.

Draw one line to link each pseudocode description to the most appropriate pseudocode
keyword. Not all pseudocode keywords will be used.

Pseudocode description Pseudocode keyword

stores data in a file OUTPUT

WRITE
retrieves data from a file

READ

displays data on a screen


OPEN

enters data from a keyboard INPUT

[4]

(b) Give two reasons for storing data in a file.

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

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

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

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

© UCLES 2023 0478/23/O/N/23 [Turn over


4

4 A programmer is writing a data entry program for booking theatre seats.


The programmer needs the program to accept only whole numbers that are greater than or equal
to one and less than or equal to six.

(a) Give the names of two validation checks that are required for this program.

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

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

(b) Complete this pseudocode to perform your two validation checks, using your answers given
in (a):

OUTPUT "Please enter the number of seats you want to book "

INPUT Seats

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

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

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

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

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

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

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

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

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

(c) Give one item of test data to use when testing this program.
State the reason for your choice of test data.

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

Reason for choice .....................................................................................................................

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

© UCLES 2023 0478/23/O/N/23


5

BLANK PAGE

© UCLES 2023 0478/23/O/N/23 [Turn over


6

5 An algorithm has been written in pseudocode to check if a new password is in a list of previously
used passwords OldList[]
If the password is not found, the new password will be stored at the end of the list to replace
"XXXX" already stored there.

01 OUTPUT "Enter your new password "


02 INPUT NewPassword
03 Posn 1
04 Found FALSE
05 REPEAT
06 IF Password = OldList[Posn]
07 THEN
08 Found TRUE
09 ELSE Posn Posn + 1
10 ENDIF
11 UNTIL Found AND OldList[Posn] = "XXXX"
12 IF Found
13 THEN
14 OUTPUT "Password has been used before"
15 ELSE
16 INPUT "New password accepted"
17 OldList[Posn] NewPassword
18 ENDIF

(a) Identify the three errors in the pseudocode and suggest corrections.

Error 1 .......................................................................................................................................

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

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

Error 2 .......................................................................................................................................

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

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

Error 3 .......................................................................................................................................

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

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

© UCLES 2023 0478/23/O/N/23


7

(b) Complete this flowchart for the corrected algorithm:

START

STOP

[6]

© UCLES 2023 0478/23/O/N/23 [Turn over


8

6 There are three descriptions of logic gates. Each logic gate has two inputs A and B with one
output X.
Identify each logic gate.
Complete a truth table for each logic gate.

(a) The only time the output is 1 is when both inputs are 1.
A B X
Logic gate ...............................................
0 0
Complete the truth table for this description.
0 1

1 0

1 1

[2]

(b) The output is 1 when both inputs are different.


A B X
Logic gate ...............................................
0 0
Complete the truth table for this description.
0 1

1 0

1 1

[2]

(c) The only time the output is 1 is when both inputs are 0.
A B X
Logic gate ...............................................
0 0
Complete the truth table for this description.
0 1

1 0

1 1

[2]

© UCLES 2023 0478/23/O/N/23


9

(d) Consider this logic expression:

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

Draw a logic circuit for this logic expression. Each logic gate must have a maximum of two
inputs. Do not attempt to simplify this logic expression.

B X

[5]

7 A program uses both local variables and global variables.

Describe two differences between local variables and global variables.

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

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

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

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

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

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

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

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

© UCLES 2023 0478/23/O/N/23 [Turn over


10

8 This is an algorithm to find if a batch of parts has been manufactured successfully.

START

Accept 0
Reject 0

INPUT PartOK

No
IS PartOK Reject Reject + 1
= 'Y'?
Yes

Accept Accept + 1

No IS Accept
= 10 ?

Yes

Yes
IS Reject Error Reject/Accept * 100
> 1?

No
OUTPUT
"Too many rejected ",
OUTPUT Error, "% error"
"Success"

STOP

© UCLES 2023 0478/23/O/N/23


11

(a) Complete the trace table using this data:


Y, Y, Y, N, Y, Y, Y, Y, N, Y, Y, Y, Y

Accept Reject PartOK Error OUTPUT

[5]

(b) Describe how the algorithm should be changed to accept ‘Y’ or ‘y’ for a successfully
manufactured part.

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

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

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

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

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

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

© UCLES 2023 0478/23/O/N/23 [Turn over


12

9 A sanctuary for pheasants has set up a new database table called PheasantList to store details
of the different species of bird at the sanctuary. Part of this table is given, showing: species,
description, number of birds at the sanctuary, if the birds are breeding or not, and number of
young born this year.

Species Description NumberBirds Breeding Young


Edwards blue-black with white tail 5 Yes 0
Japanese green dark green with pale grey tail 2 Yes 2
Reeves golden, white and red scaled plumage 4 Yes 1
Crawfords Kalij glossy blue-black plumage 4 No 0
Crested fireback blue-black with black tail 3 No 0
True silver white laced top half and black lower half 7 Yes 1
Siamese fireback grey plumage with crimson legs and feet 5 No 0
Mikado iridescent plumage with white striped wings 3 Yes 4
Red junglefowl many colours 2 Yes 0
Himalayan monal many colours with metallic green crest 3 Yes 2
White eared white with ear tufts 5 Yes 3
Brown eared brown with ear tufts 9 Yes 1
Ring necked long tail with white ring neck 2 Yes 2
Golden rainbow coloured 3 Yes 4

(a) State the number of records and fields in this part of the database table.

Records .....................................................................................................................................

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

(b) (i) Give the name of a field that could be used for the primary key.

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

(ii) Explain why the sanctuary might decide not to use the field in (b)(i) as the primary key.

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

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

(iii) A new field SpeciesID is added to the database table.


This field contains a six-character code, for example Ph0001.

Give a reason why this field would be a better primary key.

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

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

© UCLES 2023 0478/23/O/N/23


13

(c) Write the output that would be given by this structured query language (SQL) statement:

SELECT Species, Description

FROM PheasantList

WHERE NumberBirds > 6;

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

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

(d) Complete this SQL statement to display all the species of pheasant where the birds are
breeding and there were no young born this year:

SELECT ....................................................................................................................................

FROM ........................................................................................................................................

WHERE ......................................................................................................................................

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

© UCLES 2023 0478/23/O/N/23 [Turn over


14

10 A weather station takes temperature readings once an hour for a week. These temperatures are
stored in a two-dimensional (2D) array Temperatures[]
Each column contains 24 readings for a single day. The first temperature is recorded at 00:00 and
the final temperature at 23:00. There are seven columns, one for each day of the week, starting
with Monday and ending with Sunday.

The variables MaxDay, MinDay and AvDay are used to store the maximum, minimum, and
average temperatures for a day. The variables MaxWeek, MinWeek and AvWeek are used to store
the maximum, minimum, and average temperatures for the week.

The array has already been set up and the data stored.

Write a program that meets the following requirements:


• finds the maximum and minimum temperatures for each day
• calculates the average temperature for each day
• outputs for each day:
– name of the day, for example Monday
– maximum temperature
– minimum temperature
– average temperature
• finds the maximum and minimum temperatures for the week
• calculates the average temperature for the week
• outputs:
– maximum temperature for the week
– minimum temperature for the week
– average temperature for the week.

All temperatures output must be rounded to two decimal places.

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 do not need to declare any arrays or variables; you may assume that this has already been
done.
You do not need to initialise the data in the array Temperatures[]

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

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

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

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

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

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

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

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

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

..........................................................................................................................................................
© UCLES 2023 0478/23/O/N/23
15

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................
© UCLES 2023 0478/23/O/N/23 [Turn over
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/23/O/N/23

You might also like