Free until 14 Nov · 80% off for the first 100 · Pricing

Computer Science 9618/32 May/June 2025: question paper and mark scheme

Cambridge AS & A Level Computer Science (9618), Paper 3 Advanced Theory, May/June 2025. Read both free below, or download them. Done the paper? Get it marked by AI against this mark scheme.

9618_s25_qp_329618_s25_ms_329618/32/M/J/25

Paper
Paper 3 Advanced Theory
Total marks
75
Time
1 hour 30 minutes
Code on the paper
9618/32/M/J/25
9618_s25_ms_32.pdf

9618/32 mark scheme, question by question

Each question as it's printed, and the mark scheme's points for it, as text. Diagrams, tables and graphs are in the PDFs above.

Question 16 marks

Question

Data types can be defined using pseudocode. The composite record data type, Departure, is used to represent flights from Cambridge Airport and is defined in pseudocode as: TYPE Departure DECLARE FlightNumber : STRING DECLARE Destination : STRING DECLARE FlightDate : DATE DECLARE Gate : STRING DECLARE Airline : STRING ENDTYPE A variable, Flight1, is declared in pseudocode as: DECLARE Flight1 : Departure (a) Write pseudocode to store the following details to Flight1: Field Data FlightNumber SB2789 Destination Dublin FlightDate 30/07/2025 Gate N03 Airline Cambridge Airways …… [3] (b) The data type for Gate is changed to an enumerated data type, GateID. (i) Write a pseudocode statement to declare GateID to hold the identity codes for the airport gates: N01, N02, N03, W01, W02, W03, W04 …… [2] (ii) Write the new pseudocode statement required to replace the declaration of Gate in Departure. …… [1]

Mark scheme

1(a) One mark for each mark point 3 MP1 Use of correct Flight1 variable with given field names MP2 Correct assignments of four string data values MP3 Correct assignment of date data value Example answer Flight1.FlightNumber ← "SB2789" Flight1.Destination ← "Dublin" Flight1.FlightDate ← 30/07/2025 Flight1.Gate ← "N03" Flight1.Airline ← "Cambridge Airways" 1(b)(i) One mark per mark point 2 MP1 TYPE GateID = MP2 (N01, N02, N03, W01, W02, W03, W04) Example answer TYPE GateID = (N01, N02, N03, W01, W02, W03, W04) 1(b)(ii) DECLARE Gate : GateID 1

Question 26 marks

Question

Numbers are stored in a computer using binary floating-point representation with: • 12 bits for the mantissa • 4 bits for the exponent • two’s complement form for both the mantissa and the exponent. (a) Calculate the normalised binary floating-point representation of +124.4375 in this system. Show your working. Mantissa Exponent Working …… [3] (b) Calculate the denary value of the following normalised binary floating-point number. Show your working. Mantissa Exponent 1 0 1 0 0 0 1 0 1 0 1 1 0 1 1 0 Working …… Denary value …… [3]

Mark scheme

2(a) Two marks for working 3 • number converted to binary (0)1111100.0111 • use of exponent = 7 // Moving binary point the correct number (7) of places One mark for correct answer Mantissa Exponent 0 1 1 1 1 1 0 0 0 1 1 1 0 1 1 1 2(b) Two marks for working 3 • correct use of exponent seen • correct conversion method from binary to denary One mark for correct answer Working: 1010001.01011 // moving bp 6 places to right Evaluation of two’s complement −64 +16 + 1 + 0.25 + 0.0625 + 0.03125 // −64 + 16 + 1 + 1/4 + 1/16 + 1/32 // Converting two’s complement back and evaluating positive binary number 32 + 8 + 4 + 2 + 0.5 + 0.125 + 0.03125 // 32 + 8 + 4 + 2 + 1/2 + 1/8 + 1/32 Fractions methods - award both working marks for either (– 2048 + 512 + 32 + 8 + 2 + 1) / 2048 x 26 = -1493 / 32 OR – 1 + 1/4 + 1/64 + 1/ 256 + 1/1024 + 1/2048 x 26 = -1493 / 32 Answer: −46.65625 // −4621/32

Question 35 marks

Question

(a) Identify two different layers of the TCP/IP protocol suite. …… [1] (b) Describe how the TCP/IP protocol suite is applied when a message is sent through the internet from one host to another. Do not describe the function of individual layers of the TCP/IP protocol suite. …… [4]

Mark scheme

3(a) Two from 1 • Application Layer • Transport Layer • Internet Layer • Link Layer 3(b) One mark per mark point (Max 4) 4 MP1 The TCP/IP suite can be viewed as layers within a stack MP2 Each layer can only accept input from the next higher or the next lower layer/adjacent layer MP3 The user/sender/computer interfaces with the top layer/application layer to send/receive a message MP4 The message when sent passes from the top layer/application layer to the bottom layer/link layer MP5 The message when received passes from bottom layer/link layer to the top layer/application layer MP6 The link layer interfaces directly with the network and sends/receives the message.

Question 44 marks

Question

Circuit switching may be used as a method of data transmission. State two benefits and two drawbacks of circuit switching. Benefit 1 …… Benefit 2 …… Drawback 1 …… Drawback 2 …… [4]

Mark scheme

4 One mark for each benefit (Max 2) 4 MP1 Suitable for long continuous transmission once the connection is made, it is available until the end of the transmission MP2 No time lost in resending/rearranging packets as no loss of packets or out of order packets MP3 Steady/high rate of transmission because the whole of the bandwidth is available MP4 Data loss unlikely as all data follows the same path One mark for each drawback (Max 2) MP5 Delays due to dedicated connection required to be set up/established before transmission can begin MP6 The dedicated connection cannot be used to transmit any other data MP7 System resources may be underutilised/inefficient/not very flexible because the bandwidth can’t be shared/high bandwidth is required // Bandwidth may be wasted // May send empty frames // the circuit is always there whether or not used MP8 There are no alternative routes if there is a failure or fault on the line MP9 Reduced security due to use of single path MP10 Scalability is difficult

Question 57 marks

Question

The management and scheduling of processes are tasks carried out by an operating system. (a) Identify three process states. 1 …… 2 …… 3 …… [3] (b) Describe the function of the shortest job first scheduling routine and give a benefit of this routine. Function …… Benefit …… [4]

Mark scheme

5(a) One mark per point 3 • Running state • Ready state • Blocked state 5(b) One mark per mark point (Max 3) 4 MP1 The processes are queued as they arrive MP2 The process with the shortest time to complete/burst time is selected first and executed MP3 The process will continue until complete or put in a waiting state once execution has begun // it is non-pre-emptive MP4 The scheduler will continue to choose shorter processes over longer processes if they continue to be added to the queue can cause starvation for longer jobs One mark for a benefit (Max 1) MP5 Shorter jobs don’t have to wait for longer jobs to complete before processing // Significantly reduces the average overall waiting time for processes // Ensures starvation doesn’t occur for process with shorter burst times MP6 Higher throughput of processes

Question 66 marks

Question

(a) Describe the structure of a graph as used in an Artificial Intelligence (AI) system. …… [2] (b) Explain how supervised learning and unsupervised learning differ from each other. …… [4]

Mark scheme

6(a) One mark per point (Max 2) 2 MP1 A graph uses vertices/nodes to identify/represent entities such as destinations, people, etc MP2 Edges are used to connect nodes and can represent possible paths between them // a path is the list of nodes connected by edges between two given nodes MP3 Nodes/edges can be labelled/weighted, and this is a weighting that can be applied and used in the context of the application MP4 A cycle is a list of nodes that return to the same node. 6(b) One mark per mark point (Max 4) 4 MP1 Supervised learning uses labelled data // Unsupervised learning makes use of unlabelled data. MP2 Labelled data means that known outcomes are applied to specific inputs to help the AI predict outcomes. MP3 Supervised learning requires initial human input/training // Unsupervised learning does not require human input/training. MP4 With unlabelled data in unsupervised learning, outcomes are not known MP5 … the AI has to search for hidden patterns/structures/clusters MP6 … within the data in order to predict outcomes.

Question 78 marks

Question

The diagram shows a logic circuit. A Q B S P C R Z D (a) Complete the truth table for the given logic circuit. Show your working. Working space A B C D P Q R S Z 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 [3] (b) Write the Boolean logic expression that corresponds to the given logic circuit as the sum-of-products. Z = …… …… [1] (c) Use Boolean algebra including De Morgan’s laws to simplify the following expression. Show all working. (A + B) . (A . B + B . C) Working …… Simplified expression …… [4]

Mark scheme

7(a) One mark for working, (all four columns P, Q, R and S) 3 One mark for first eight rows of column Z (Shaded) One mark for second eight rows of column Z (Unshaded) Working space A B C D P Q R S Z 0 0 0 0 1 0 0 1 0 0 0 0 1 1 0 0 1 0 0 0 1 0 0 1 0 1 0 0 0 1 1 0 1 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 1 1 0 0 1 0 0 1 1 0 0 0 0 0 1 0 1 1 1 0 0 1 0 0 1 0 0 0 1 0 0 1 0 1 0 0 1 1 0 0 1 0 1 0 1 0 0 0 0 0 1 1 0 1 1 0 0 0 0 1 1 1 0 0 1 0 0 1 0 1 1 0 1 1 0 0 1 0 1 1 1 0 0 0 0 0 1 1 1 1 1 0 0 1 0 0 7(b) One mark for correct answer (terms may be in any order) 1 Z = A.B.C.D + A.B.C.D + A.B.C.D + A.B.C.D 7(c) One mark for each mark point 4 • Correct application of De Morgan’s laws • Correct application of Idempotent, Distributive or Absorption laws • Correct application of Idempotent, Distributive or Absorption laws • Correct final answer (A+B).(A.B+B.C) (A.B).(A+B+B+C) DeMorgan’s laws (A.B).(A+B+C) Idempotent laws (A.A+A.B+A.C).(B.A+B.B+B.C) Distributive laws (A+A.B+A.C).(A.B+B+B.C) Idempotent laws (A+A.C).(B+B.C) Absorption laws A.B // A + B Absorption laws / Final Answer

Question 84 marks

Question

Explain what is meant by lexical analysis during program compilation. …… [4]

Mark scheme

8 One mark per mark point (Max 4) 4 MP1 It is the first stage of compilation MP2 White space and comments are removed MP3 It takes modified source code and breaks it into a series of tokens MP4 Each token is categorised and assigned types MP5 Identifiers are stored in a symbol table MP6 If the lexical analyser finds invalid tokens, it generates an error MP7 Acceptable data from the lexical analyser passes to the syntax analyser

Question 96 marks

Question

Several syntax diagrams are shown. letter digit A 0 B 1 C 2 D 3 E 4 F 5 G 6 H 7 J 8 K 9 operator + – * / letter variable letter digit ^ (a) State why 9K is not a valid variable for the given syntax diagrams. …… [1] (b) Complete the Backus-Naur Form (BNF) for <operator>. <operator> ::= …… …… [1] (c) An expression is defined as follows: • A variable is assigned to a variable followed by an operator followed by another variable. • The operator and final variable stage can be repeated as many times as necessary. Complete the syntax diagram for an expression. expression variable = [3] (d) A character can be a letter or a digit. An additional constraint has been applied to the definition of variable. It must comply with the given syntax diagram, but it will only pass validation if it has at least four characters. State one example of a valid variable. …… [1]

Mark scheme

9(a) Variables must begin with a letter / not a digit 1 9(b) <operator> ::= + | - | * | / | ^ 1 9(c) One mark per mark point 3 MP1 Two variable boxes added to diagram MP2 One operator box added to diagram and all boxes in correct order MP3 Connections, arrows and return loop correctly added and no additional boxes or connections expression variable = variable operator variable 9(d) Answer must begin with a valid letter. It can then be followed by any number 1 of valid digits and/or letters, as long as it is at least four characters in length. Example answer AC768

Question 104 marks

Question

Identify the two main protocols that form Transport Layer Security (TLS) and state the purpose of each. Protocol 1 …… Purpose …… Protocol 2 …… Purpose …… [4]

Mark scheme

10 One mark for identifying a protocol and one mark for stating its purpose 4 MP1 Handshake protocol MP2 To establish a secure and reliable connection between two devices, systems or networks // Permits the web server and client to authenticate each other to make use of encryption algorithms MP3 Record protocol MP4 Provides a secure and reliable way to send and receive data over a network // To exchange records between the client and server // Responsible for securing application data end ensuring its integrity and authenticity during transmission // Encrypts and authenticates data exchanged between a client and a server // Deals with the format for data transmission.

Question 116 marks

Question

(a) A linked list of nodes is used to store an ordered list of strings. Each node consists of the data, a left pointer and a right pointer. Left pointer Data Right pointer Pp The linked list will be organised as a binary tree. 0 is used to represent a null pointer. Complete the binary tree, including null pointers, to show how the data will be organised after the following strings have been added: Aa, Mm, Ss, Xx Root pointer Pp Gg Rr 0 Kk [4] (b) A binary tree can be used to implement recursion. Identify one feature of an algorithm that makes it beneficial to use recursion. Give one example of an application that could use a recursive algorithm. Feature …… Example …… [2]

Mark scheme

11(a) One mark per mark point 4 MP1 Any two nodes added correctly with correct data (Aa, Mm, Ss, Xx) MP2 Remaining two nodes added with correct data (Aa, Mm, Ss, Xx) and all nodes with connecting arrows starting from correct pointer boxes MP3 Correct null pointers (0) added throughout MP4 … with no entries in other pointer boxes and all nodes correctly positioned and connected. Root pointer Pp Gg 0 Rr 0 Aa 0 0 Kk 0 Ss 0 Mm 0 0 Xx 0 11(b) One mark for feature and one mark for example (Max 2) 2 • Recursion is beneficial for algorithms when a problem naturally breaks down into smaller versions of itself. • … such as calculating a factorial / mathematical series / Fibonacci / compound interest / tree traversal / evaluation of RPN expressions.

Question 128 marks

Question

(a) A medical clinic uses objects of the class Patient to assign a priority and a doctor to a patient. Some of the attributes required in the class are listed in the table. Attribute Data type Description PatientID STRING Unique identifier of the patient Name STRING Patient’s full name, surname first DoctorID STRING ID of doctor administering treatment Treatment is prioritised with a numeric scale of 1 to 5. Complete the class diagram for Patient, to include: • attribute and data type for the date of birth • attribute and data type for the priority • methods to assign the patient ID, priority and doctor ID • methods to return the patient ID, patient date of birth and the priority. Patient PatientID : STRING Name : STRING …… : …… …… : …… DoctorID : STRING SetName(FullName : STRING) SetDateOfBirth(DOB : DATE) GetName() GetDoctorID() [5] (b) (i) Identify the object-oriented programming (OOP) term described as ‘an occurrence of an object’. …… [1] (ii) Describe what is meant by the OOP term polymorphism. …… [2]

Mark scheme

12(a) One mark per mark point 5 MP1 Two correct attributes (DateOfBirth : Date) and priority with a sensible name and integer data type MP2 SetPatientID(…) and SetDoctorID(…) seen MP3 … and appropriate parameters, with string data types MP4 GetPatientID() and GetDateOfBirth() seen MP5 Priority setter and getter fully correct with name matching Priority attribute, with appropriate parameter and correct data type. Patient PatientID : STRING Name : STRING DateOfBirth : DATE Priority : INTEGER DoctorID : STRING SetPatientID(PatientNumber : STRING) SetName(FullName : STRING) SetDateOfBirth(DOB : DATE) SetPriority(Urgency : INTEGER) SetDoctorID(DocID : STRING) GetPatientID() GetName() GetDateOfBirth() GetPriority() GetDoctorID() 12(b)(i) Instance // instantiation 1 12(b)(ii) One mark for each mark point 2 MP1 Polymorphism is when methods with the same name are redefined / behave differently … MP2 … in derived / inherited classes / subclasses

Question 135 marks

Question

The pseudocode algorithm below uses random file access to copy 50 records from a live file CurrentResults.dat to a stored file StoredResults.dat one record at a time. It uses the user-defined type StudentResult. TYPE StudentResult DECLARE LastName : STRING DECLARE FirstName : STRING DECLARE ExamGrade : STRING ENDTYPE If any grades are missing in CurrentResults.dat, the text "Missing grade" is added to the ExamGrade field in StoredResults.dat Complete this file handling pseudocode algorithm. DECLARE Grade : StudentResult DECLARE Position : INTEGER OPENFILE "StoredResults.dat" FOR RANDOM SEEK "CurrentResults.dat", Position GETRECORD "CurrentResults.dat", Grade IF Grade.ExamGrade = "" THEN ENDIF NEXT Position CLOSEFILE "CurrentResults.dat" CLOSEFILE "StoredResults.dat" [5]

Mark scheme

13 One mark for each correctly completed line 5 DECLARE Grade : StudentResult DECLARE Position : INTEGER OPENFILE "CurrentResults.dat" FOR RANDOM OPENFILE "StoredResults.dat" FOR RANDOM FOR Position ← 1 TO 50 SEEK "CurrentResults.dat", Position GETRECORD "CurrentResults.dat", Grade IF Grade.ExamGrade = "" THEN Grade.ExamGrade ← "Missing grade" ENDIF SEEK "StoredResults.dat", Position PUTRECORD "StoredResults.dat", Grade NEXT Position CLOSEFILE "CurrentResults.dat" CLOSEFILE "StoredResults.dat"

Checked your answers against these? Let AI mark the whole paper, on your own working.

Mark my 9618/32

How this paper is marked

Examiners follow the generic marking principles at the front of the scheme, then each question's points: method (M), accuracy (A) and independent (B) marks, error carried forward where the scheme allows it, and positive marking, so you're credited for what you got right.

Check your answers against it

Done this paper? Upload your script and CIE Buddy's AI marker marks it question by question against this exact scheme, puts the ticks on your own working and says what each lost mark needed.

9618/32 in other series

Find another Computer Science paper

Every AS & A Level Computer Science mark scheme

Question papers and mark schemes © Cambridge University Press & Assessment. CIE Buddy is independent and not connected to Cambridge.

9618/32 questions

Where can I find the 9618/32 May/June 2025 mark scheme?

On this page, free: the mark scheme for AS & A Level Computer Science 9618/32, May/June 2025 (9618_s25_ms_32), and the question paper (9618_s25_qp_32), to read or download, with each question's marking points written out underneath.

How many marks is 9618/32 out of?

Computer Science 9618/32 for May/June 2025 is out of 75 marks, with 1 hour 30 minutes to answer it.

Can I get my 9618/32 answers marked?

Yes. Upload your answers to 9618/32/M/J/25 as a PDF or photos, and CIE Buddy marks every question against this paper's official mark scheme, using Cambridge's marking rules. You get your score, each lost mark explained on your own script, and the topics to revise. It's a guide, not an official Cambridge grade.