Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
356 views16 pages

Computer Science Paper 3 Theory 2025

Uploaded by

syedahmedadeel2
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)
356 views16 pages

Computer Science Paper 3 Theory 2025

Uploaded by

syedahmedadeel2
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

* 0000800000001 *

, ,

Cambridge International AS & A Level

¬OŠ. 4mHuOªEŠ]{5€W
¬Dn|Z¥¦’Sˆ‡;]DEq‚
¥E¥•55e5¥•¥ •EUUU
* 6 0 0 5 3 5 2 7 4 2 *

COMPUTER SCIENCE 9618/31


Paper 3 Advanced Theory May/June 2025

1 hour 30 minutes

You must answer on the question paper.

No additional materials are needed.

INSTRUCTIONS
● Answer all questions.
● Use a black or dark blue pen.
● 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.
● You may use an HB pencil for any diagrams, graphs or rough working.
● Calculators must not be used in this paper.

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

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

DC (DE/CT) 342251/3
© UCLES 2025 [Turn over
* 0000800000002 *

DO NOT WRITE IN THIS MARGIN


2
, ,

1 A programmer is writing a program to manage bookings for a small taxi company. The programmer
requires some user-defined data types.

(a) Write a pseudocode statement to declare the enumerated data type, Vehicle, to hold the
identity code of each of the company’s taxis:

M100, M230, T101, T102, T120, T150

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

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

DO NOT WRITE IN THIS MARGIN


(b) Write pseudocode statements to declare the composite data type, Booking, to hold data
about taxi bookings. The data required includes:

• booking number (any combination of letters and numbers)


• destination
• client name
• client telephone number
• date of departure
• address for pick-up
• the identity code of the taxi used.

DO NOT WRITE IN THIS MARGIN


Use the most appropriate data type in each case, including the enumerated data type from
part (a).

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

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

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

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

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

DO NOT WRITE IN THIS MARGIN


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

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

............................................................................................................................................. [4] DO NOT WRITE IN THIS MARGIN

ĬÍĊ®Ġ´íÈõÏĪÅĊàù·þ×
© UCLES 2025 ĬÄðûÛġĢøìùñØĕºõÉĘĂ
ĥĕõĕõÕĥÕÕÕµÅąÕåĕõÕ
9618/31/M/J/25
* 0000800000003 *
DO NOT WRITE IN THIS MARGIN

3
, ,

2 Numbers are stored in a computer using binary floating-point representation with:

• 10 bits for the mantissa


• 6 bits for the exponent
• two’s complement form for both the mantissa and the exponent.

(a) Write the normalised floating-point representation of the following binary number using this
system.

0.00000011010111
DO NOT WRITE IN THIS MARGIN

Mantissa Exponent

[2]

(b) Calculate the normalised binary floating-point representation of –25.3125 in this system.
Show your working.

Mantissa Exponent
DO NOT WRITE IN THIS MARGIN

Working .....................................................................................................................................

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

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

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

...................................................................................................................................................
DO NOT WRITE IN THIS MARGIN

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

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

...................................................................................................................................................
[4]
DO NOT WRITE IN THIS MARGIN

ĬÏĊ®Ġ´íÈõÏĪÅĊàû·þ×
© UCLES 2025 ĬÄïüÓħĞĈÍÿĀđÁÂáÉĨĂ
ĥĕąÕµµąµÅåĥÅąµÅÕĥÕ
9618/31/M/J/25 [Turn over
* 0000800000004 *

DO NOT WRITE IN THIS MARGIN


4
, ,

3 (a) The Application Layer and Transport Layer are two layers of the TCP/IP protocol suite.

Describe the purpose of the Application Layer and the purpose of the Transport Layer.

Purpose of Application Layer ....................................................................................................

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

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

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

DO NOT WRITE IN THIS MARGIN


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

Purpose of Transport Layer ......................................................................................................

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

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

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

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

DO NOT WRITE IN THIS MARGIN


[5]

(b) Describe packet switching as a method of transmitting messages across the internet.

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

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

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

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

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

DO NOT WRITE IN THIS MARGIN


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

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

............................................................................................................................................. [4]
DO NOT WRITE IN THIS MARGIN

ĬÍĊ®Ġ´íÈõÏĪÅĊÞù·Ā×
© UCLES 2025 ĬÄïùÓĝĐāêāćĚģĞăÙĐĂ
ĥåÕÕõµąĕåąĕÅŵĥÕõÕ
9618/31/M/J/25
* 0000800000005 *
DO NOT WRITE IN THIS MARGIN

5
, ,

4 (a) A linked list of nodes is used to store an ordered list of integers. Each node consists of the
data, a left pointer and a right pointer, for example:

Left pointer Data Right pointer


20

The linked list will be organised as a binary tree.

−1 is used to represent a null pointer.


DO NOT WRITE IN THIS MARGIN

Complete the binary tree, including null pointers, to show how the data will be organised after
the following integers have been added:

6, 15, 41, 66
Root pointer
DO NOT WRITE IN THIS MARGIN

36

12 40

–1 3
DO NOT WRITE IN THIS MARGIN

[4]

(b) Describe what is meant by recursion.


DO NOT WRITE IN THIS MARGIN

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

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

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

............................................................................................................................................. [2]
ĬÏĊ®Ġ´íÈõÏĪÅĊÞû·Ā×
© UCLES 2025 ĬÄðúÛīĔñÏ÷úÏ·Ė×ÙĠĂ
ĥååĕµÕĥõµõÅÅÅÕąĕĥÕ
9618/31/M/J/25 [Turn over
* 0000800000006 *

DO NOT WRITE IN THIS MARGIN


6
, ,

(c) A binary tree is a suitable Abstract Data Type (ADT) that a designer can implement using
recursive algorithms.

Identify one other ADT that a designer can implement using recursive algorithms.

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

5 This truth table represents a logic circuit.

DO NOT WRITE IN THIS MARGIN


INPUT OUTPUT
A B C D Z
0 0 0 0 1
0 0 0 1 0
0 0 1 0 0
0 0 1 1 0
0 1 0 0 0
0 1 0 1 1

DO NOT WRITE IN THIS MARGIN


0 1 1 0 0
0 1 1 1 1
1 0 0 0 1
1 0 0 1 0
1 0 1 0 0
1 0 1 1 0
1 1 0 0 0
1 1 0 1 1

DO NOT WRITE IN THIS MARGIN


1 1 1 0 0
1 1 1 1 1

(a) Write the Boolean logic expression that corresponds to the given truth table as the
sum-of-products.

Z = ............................................................................................................................................

............................................................................................................................................. [2]
DO NOT WRITE IN THIS MARGIN

ĬÑĊ®Ġ´íÈõÏĪÅĊßû¶þ×
© UCLES 2025 ĬÄïúØġüû×ôċæ×жñĐĂ
ĥõąĕµõĥÕõĕĥÅąÕåÕµÕ
9618/31/M/J/25
* 0000800000007 *
DO NOT WRITE IN THIS MARGIN

7
, ,

(b) (i) Complete the Karnaugh map (K-map) for the given truth table.

AB

CD 00 01 11 10

00

01
DO NOT WRITE IN THIS MARGIN

11

10

[2]

(ii) Draw loop(s) around appropriate group(s) in the K-map to produce an optimal
sum-of-products. [2]

(iii) Write the Boolean logic expression from your answer to part (b)(ii) as the simplified
sum-of-products.
DO NOT WRITE IN THIS MARGIN

Z = .....................................................................................................................................

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

6 Describe the process of executing a program using an interpreter.

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

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

..........................................................................................................................................................
DO NOT WRITE IN THIS MARGIN

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

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

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

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

.................................................................................................................................................... [4]
DO NOT WRITE IN THIS MARGIN

ĬÓĊ®Ġ´íÈõÏĪÅĊßù¶þ×
© UCLES 2025 ĬÄðùÐħøċâĆöģăĖĢñĠĂ
ĥõõÕõĕąµĥĥµÅąµÅĕåÕ
9618/31/M/J/25 [Turn over
* 0000800000008 *

DO NOT WRITE IN THIS MARGIN


8
,  ,

7 Several syntax diagrams are shown.

uppercase lowercase
A b

C d

E f

DO NOT WRITE IN THIS MARGIN


G h

J k

symbol digit
$ 0

@ 1

DO NOT WRITE IN THIS MARGIN


# 2

& 3

% 4

DO NOT WRITE IN THIS MARGIN


6

9
lowercase
DO NOT WRITE IN THIS MARGIN

passcode
uppercase symbol

digit

ĬÑĊ®Ġ´íÈõÏĪÅĊÝû¶Ā×
© UCLES 2025 ĬÄðüÐĝĆþÕČíĬáºÄġĘĂ
ĥÅåÕµĕąĕąÅÅÅŵĥĕµÕ
9618/31/M/J/25
* 0000800000009 *
DO NOT WRITE IN THIS MARGIN

9
,  ,

(a) State why each passcode is invalid for the given syntax diagrams.

#Jd7
Reason .....................................................................................................................................

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

C%6A
Reason .....................................................................................................................................
DO NOT WRITE IN THIS MARGIN

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

(b) Complete the Backus-Naur Form (BNF) for <uppercase> and <passcode>.

<uppercase> ::= .................................................................................................................

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

<passcode> ::= ...................................................................................................................


DO NOT WRITE IN THIS MARGIN

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

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

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

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

...................................................................................................................................................
[4]
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN

ĬÓĊ®Ġ´íÈõÏĪÅĊÝù¶Ā×
© UCLES 2025 ĬÄïûØīĊîäîĄÝõÂĘġĨĂ
ĥÅÕĕõõĥõĕµĕÅÅÕąÕåÕ
9618/31/M/J/25 [Turn over
* 0000800000010 *

DO NOT WRITE IN THIS MARGIN


10
, ,

8 (a) Describe what is meant by multi-tasking and how it benefits process management.

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

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

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

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

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

DO NOT WRITE IN THIS MARGIN


(b) Explain the function of the shortest remaining time scheduling routine and give a benefit of
this routine.

Function ....................................................................................................................................

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

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

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

DO NOT WRITE IN THIS MARGIN


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

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

Benefit ......................................................................................................................................

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

9 Secure Socket Layer (SSL) and Transport Layer Security (TLS) are two protocols.

(a) State two functions of SSL/TLS.

DO NOT WRITE IN THIS MARGIN


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

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

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

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

(b) Give two examples of situations where the use of SSL/TLS would be appropriate.

1 ................................................................................................................................................
DO NOT WRITE IN THIS MARGIN

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

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

...................................................................................................................................................
[2]
ĬÑĊ®Ġ´íÈõÏĪÅĊàû¸þ×
© UCLES 2025 ĬÄíüÕğþĜÛăö½¼èÙĠĂ
ĥĕÅĕµĕåĕåõÅąÅĕĥĕąÕ
9618/31/M/J/25
* 0000800000011 *
DO NOT WRITE IN THIS MARGIN

11
, ,

10 (a) Describe the purpose of a graph when used in an Artificial Intelligence (AI) system.

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

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

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

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

(b) Explain the use of artificial neural networks in Deep Learning.


DO NOT WRITE IN THIS MARGIN

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

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

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

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

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

...................................................................................................................................................
DO NOT WRITE IN THIS MARGIN

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

............................................................................................................................................. [4]
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN

ĬÓĊ®Ġ´íÈõÏĪÅĊàù¸þ×
© UCLES 2025 ĬÄîûÍĩĂĬÞõċćęÄôÙĐĂ
ĥĕµÕõõÅõµąĕąÅõąÕĕÕ
9618/31/M/J/25 [Turn over
* 0000800000012 *

DO NOT WRITE IN THIS MARGIN


12
, ,

11 (a) A medical centre uses objects of the class Appointment to record treatments given and
medication prescribed during each doctor’s appointment. Some of the attributes required in
the class are listed in the table.

Attribute Data type Description


DateSeen DATE date of treatment
Treatments STRING treatments given
Medications STRING medications prescribed

DO NOT WRITE IN THIS MARGIN


Patients are identified by a unique 8-digit number, beginning with the patient’s year of birth,
for example, 20108989.
Doctors are identified by their name, for example, A N Other.

Complete the class diagram for Appointment, to include:

• attribute and data type for the identification of the patient


• attribute and data type for the identification of the doctor
• methods to assign date seen, treatments given and medications prescribed
• method to return the date seen and the attributes for the patient and the doctor.

Appointment

DO NOT WRITE IN THIS MARGIN


DateSeen : DATE

.......................................................... : .............................................................................

.......................................................... : .............................................................................

Treatments : STRING
Medications : STRING

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

DO NOT WRITE IN THIS MARGIN


SetPatientID(PatientNumber : INTEGER)

SetDoctor(DoctorID : STRING)

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

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

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

............................................................................................................................................
DO NOT WRITE IN THIS MARGIN

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

GetTreatments()

GetMedications()
[5]
ĬÑĊ®Ġ´íÈõÏĪÅĊÞû¸Ā×
© UCLES 2025 ĬÄîúÍģôĝÙûĄĀ»ĠÒÉĨĂ
ĥåĥÕµõÅÕÕåĥąąõåÕąÕ
9618/31/M/J/25
* 0000800000013 *
DO NOT WRITE IN THIS MARGIN

13
, ,

(b) (i) Identify the object-oriented programming (OOP) feature whose function includes
restricting external access to the data.

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

(ii) Describe what is meant by the OOP feature inheritance.

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

...........................................................................................................................................
DO NOT WRITE IN THIS MARGIN

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

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

12 The pseudocode algorithm checks whether a location in a stock file [Link] is empty
or not. The location is given by the user. If the location is empty, a suitable message is displayed,
otherwise the item stored at that location is displayed.

Complete this file-handling pseudocode algorithm.

DECLARE Location : INTEGER


DO NOT WRITE IN THIS MARGIN

DECLARE Item : STRING


DECLARE Continue : BOOLEAN
DECLARE Answer : CHAR
Continue TRUE

OPENFILE .......................................................................................................................................
WHILE Continue
OUTPUT "Enter a location between 1 and 500: "
INPUT Location

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

GETRECORD ..............................................................................................................................
DO NOT WRITE IN THIS MARGIN

IF Item = "" THEN


OUTPUT "This record is missing."
ELSE
OUTPUT "The item in stock is ", ........................................................................
ENDIF
OUTPUT "Another location (Y or N)?"
INPUT Answer
IF Answer <> 'Y' THEN
Continue FALSE
ENDIF
ENDWHILE

..........................................................................................................................................................
DO NOT WRITE IN THIS MARGIN

OUTPUT "End of program"


[5]

ĬÓĊ®Ġ´íÈõÏĪÅĊÞù¸Ā×
© UCLES 2025 ĬÄíùÕĥðčàýíÉğĘĆÉĘĂ
ĥåĕĕõĕåµÅÕµąąĕÅĕĕÕ
9618/31/M/J/25
© UCLES 2025
,
* 0000800000014 *

ĥąĕÕµõĥĕåŵÅÅÕĥÕÅÕ
ĬÄîûØīăĥÎċúĦýĂùĐĂ
ĬÍĊ®Ġ´íÈõÏĪÅĊÝúµĂ×
,
14

9618/31/M/J/25
BLANK PAGE

DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN

© UCLES 2025
,
* 0000800000015 *

ĥąĥĕõĕąõµµĥÅŵąĕÕÕ
ĬÄíüÐĝÿĕëíćãėµÖùĠĂ
ĬÏĊ®Ġ´íÈõÏĪÅĊÝüµĂ×
,
15

9618/31/M/J/25
BLANK PAGE
* 0000800000016 *

DO NOT WRITE IN THIS MARGIN


16
, ,

BLANK PAGE

DO NOT WRITE IN THIS MARGIN


DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN

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 [Link] 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 2025 ĬÄíùÐħíĔÐóĀìµęøĩĘĂ
ĥµµĕµĕąÕÕĕĕÅąµåĕÅÕ
9618/31/M/J/25

You might also like