Cambridge A Level Computer Science 9618 — 2024 May/June Paper 3 · Variant 2
9618/32/M/J/24 · 75 marks · ≈84 min
The question paper and its mark scheme, free to read here and free to download. This is Cambridge’s own paper, exactly as it was sat.
Question paper12 pages












Mark scheme14 pages
Answers below. Sit the paper first if you are practising.














Paper as text
Question paper, page 1
This document has 12 pages. [Turn over Cambridge International AS & A Level DC (DE) 352034/4 © UCLES 2024 COMPUTER SCIENCE 9618/32 Paper 3 Advanced Theory May/June 2024 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. * 4 9 7 1 7 0 3 6 1 7 *
Question paper, page 2
2 9618/32/M/J/24 © UCLES 2024 1 (a) Describe the effect of changing the allocation of bits used for the mantissa and for the exponent in a floating-point number with a fixed total number of bits. … … … … [2] (b) Real numbers are stored in a computer, using floating-point representation with: • 12 bits for the mantissa • 4 bits for the exponent • two’s complement form for both the mantissa and exponent. Calculate the normalised floating-point representation of +54.8125 in this system. Show your working. Mantissa Exponent Working … … … … … … [3]
Question paper, page 3
3 9618/32/M/J/24 © UCLES 2024 [Turn over 2 (a) Outline why protocols are essential for communication between computers. … … … … [2] (b) State the names of two different protocols associated with the sending and receiving of emails between computers. Sending … Receiving … [2] (c) Explain the meaning of the phrase: BitTorrent protocol provides peer-to-peer file sharing. … … … … … … [3]
Question paper, page 4
4 9618/32/M/J/24 © UCLES 2024 3 (a) Explain what is meant by the term non-composite data type and give an example of a non-composite data type. … … … … … Example … [3] (b) Write pseudocode statements to declare the set data type EvenNumbers to hold this set of even numbers between 2 and 12: 2, 4, 6, 8, 10, 12 … … … … … … … … [4]
Question paper, page 5
5 9618/32/M/J/24 © UCLES 2024 [Turn over 4 Sheila has a customer called Fred. Fred wants to send Sheila a confidential document as part of a transaction. Explain how Fred uses asymmetric encryption to send his document securely. … … … … … … … … [4]
Question paper, page 6
6 9618/32/M/J/24 © UCLES 2024 5 (a) Write this infix expression in Reverse Polish Notation (RPN): (7 – 2 + 8) / (9 – 5) … … … … [2] (b) Evaluate this RPN expression: a d + a b + c - * when a = 6, b = 3, c = 7 and d = 9 Show the changing contents of the stack as the RPN expression is evaluated. [4] (c) Write this RPN expression in infix form: b a c - + d b + * c / … … … … [3]
Question paper, page 7
7 9618/32/M/J/24 © UCLES 2024 [Turn over 6 The diagram shows a logic circuit. A P Q R S T Z B C (a) Complete the truth table for the given logic circuit. Show your working. Working space A B C P Q R S T 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 [3] (b) Write the Boolean expression that corresponds to the logic circuit as a sum-of-products. Z = … … … … [2]
Question paper, page 8
8 9618/32/M/J/24 © UCLES 2024 (c) (i) Complete the Karnaugh map (K-map) for this Boolean expression: A–.B–.C– + A–.B.C– + A–.B.C + A.B–.C– + A.B.C– + A.B.C 00 01 11 10 0 1 [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 expression from your answer to part c(ii) as a simplified sum-of-products. … … [1] 7 (a) Outline what is meant by direct access as a method of file access. … … … … [2] (b) Explain how direct access is used to locate a specific record in sequential files and random files. (i) Sequential files … … … … [2] (ii) Random files … … … … [2] BC A
Question paper, page 9
9 9618/32/M/J/24 © UCLES 2024 [Turn over 8 (a) Complete the pseudocode to find an item in a 1D array Widgets of type STRING, using a linear search. DECLARE Widgets : ARRAY[1:50000] OF STRING DECLARE TopOfList : INTEGER DECLARE EndOfList : INTEGER DECLARE Count : INTEGER DECLARE ToFind : STRING DECLARE Found : BOOLEAN DECLARE NotInList : BOOLEAN TopOfList 1 EndOfList 50000 OUTPUT "Enter the name of the item you wish to find " INPUT ToFind ………………………………………………………………………………………………………………………………… NotInList FALSE Count TopOfList WHILE …………………………………………………………… AND ……………………………………………………………………… IF ……………………………………………………………………………………………………………………………… THEN Found TRUE ENDIF Count Count + 1 IF …………………………………………………………………………………………………………………………… THEN NotInList TRUE ENDIF ENDWHILE IF Found = TRUE THEN OUTPUT "Item found at position ", Count - 1, " in array" ELSE OUTPUT "Item not in array" ENDIF [4] (b) Compare the methods used by the linear and binary search algorithms to find an item in an array. Refer to Big O notation in your answer. … … … … … … … … [4]
Question paper, page 10
10 9618/32/M/J/24 © UCLES 2024 9 (a) Outline two benefits and two limitations of a virtual machine. Benefit 1 … … … Benefit 2 … … … Limitation 1 … … … Limitation 2 … … … [4] (b) Explain the roles of the host operating system and the guest operating system as used in a computer system running a virtual machine. … … … … … … [3]
Question paper, page 11
11 9618/32/M/J/24 © UCLES 2024 [Turn over 10 A declarative programming language is used to allow clients to choose daily activities at the beach. 01 activity(paddleboarding). 02 activity(sailing). 03 activity(rowing). 04 activity(kayaking). 05 activity(jetskiing). 06 client(stevie). 07 client(antonio). 08 client(henry). 09 client(eliza). 10 client(rebeka). 11 client(danny). 12 client(erik). 13 client(simone). 14 client(petra). 15 client(frankie). 16 choice(petra, rowing). 17 choice(frankie, sailing). 18 choice(erik, sailing). 19 choice(eliza, rowing). 20 choice(stevie, jetskiing). 21 choice(henry, sailing). 22 done(henry, jetskiing). 23 done(rebeka, jetskiing). 24 done(antonio, kayaking). These clauses have the meanings: Clause Meaning 01 Paddle boarding is an activity. 06 Stevie is a client. 16 Petra has chosen rowing. 22 Henry has already done jet skiing. (a) Jane is a client who would like to choose the activity surfing and she has already done sailing. Write additional clauses to represent this information. 25 … 26 … 27 … 28 … [4]
Question paper, page 12
12 9618/32/M/J/24 © UCLES 2024 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. (b) Using the variable List, the goal: choice(List, rowing) returns List = petra, eliza Write the result returned by the goal: choice(List, sailing) List = … [1] (c) C is a client who would like to choose A if A is an activity and C has not already done A. Write this as a rule: may_choose_activity(C, A) IF … … … … [4] 11 Explain what is meant by Reinforcement Learning in relation to Artificial Intelligence. … … … … … … [3]
Mark scheme, page 1
This document consists of 14 printed pages. © Cambridge University Press & Assessment 2024 [Turn over Cambridge International AS & A Level COMPUTER SCIENCE 9618/32 Paper 3 Advanced Theory May/June 2024 MARK SCHEME Maximum Mark: 75 Published This mark scheme is published as an aid to teachers and candidates, to indicate the requirements of the examination. It shows the basis on which Examiners were instructed to award marks. It does not indicate the details of the discussions that took place at an Examiners’ meeting before marking began, which would have considered the acceptability of alternative answers. Mark schemes should be read in conjunction with the question paper and the Principal Examiner Report for Teachers. Cambridge International will not enter into discussions about these mark schemes. Cambridge International is publishing the mark schemes for the May/June 2024 series for most Cambridge IGCSE, Cambridge International A and AS Level and Cambridge Pre-U components, and some Cambridge O Level components.
Mark scheme, page 2
9618/32 Cambridge International AS & A Level – Mark Scheme PUBLISHED May/June 2024 © Cambridge University Press & Assessment 2024 Page 2 of 14 Generic Marking Principles These general marking principles must be applied by all examiners when marking candidate answers. They should be applied alongside the specific content of the mark scheme or generic level descriptions for a question. Each question paper and mark scheme will also comply with these marking principles. GENERIC MARKING PRINCIPLE 1: Marks must be awarded in line with: the specific content of the mark scheme or the generic level descriptors for the question the specific skills defined in the mark scheme or in the generic level descriptors for the question the standard of response required by a candidate as exemplified by the standardisation scripts. GENERIC MARKING PRINCIPLE 2: Marks awarded are always whole marks (not half marks, or other fractions). GENERIC MARKING PRINCIPLE 3: Marks must be awarded positively: marks are awarded for correct/valid answers, as defined in the mark scheme. However, credit is given for valid answers which go beyond the scope of the syllabus and mark scheme, referring to your Team Leader as appropriate marks are awarded when candidates clearly demonstrate what they know and can do marks are not deducted for errors marks are not deducted for omissions answers should only be judged on the quality of spelling, punctuation and grammar when these features are specifically assessed by the question as indicated by the mark scheme. The meaning, however, should be unambiguous. GENERIC MARKING PRINCIPLE 4: Rules must be applied consistently, e.g. in situations where candidates have not followed instructions or in the application of generic level descriptors.
Mark scheme, page 3
9618/32 Cambridge International AS & A Level – Mark Scheme PUBLISHED May/June 2024 © Cambridge University Press & Assessment 2024 Page 3 of 14 GENERIC MARKING PRINCIPLE 5: Marks should be awarded using the full range of marks defined in the mark scheme for the question (however; the use of the full mark range may be limited according to the quality of the candidate responses seen). GENERIC MARKING PRINCIPLE 6: Marks awarded are based solely on the requirements as defined in the mark scheme. Marks should not be awarded with grade thresholds or grade descriptors in mind.
Mark scheme, page 4
9618/32 Cambridge International AS & A Level – Mark Scheme PUBLISHED May/June 2024 © Cambridge University Press & Assessment 2024 Page 4 of 14 Question Answer Marks 1(a) One mark per mark point (Max 2) MP1 When the number of bits in the mantissa is raised, the precision / accuracy of the number represented increases // when the number of bits in the mantissa is lowered, the precision / accuracy of the number represented reduces. MP2 When the number of bits in the exponent is reduced, the range of numbers that can be represented is reduced // when the number of bits in the exponent is increased, the range of possible numbers that can be represented increases. MP3 When the range increases the accuracy decreases // When the range decreases the accuracy increases. 2 1(b) One mark per mark point (Max 3) number converted to binary e.g. 54.8125 = 00110110.1101 // Fractions method 1/2 + 1/4 + 1/16 + 1/32 + 1/128 + 1/256 + 1/1024 = 877/1024 // 32 + 16 + 4 + 2 + 0.5 + 0.25 + 0.0625 / (1/2 + 1/4 + 1/16) exponent = 6 // Moving binary point the correct number of places correct answer Mantissa Exponent 0 1 1 0 1 1 0 1 1 0 1 0 0 1 1 0 3 Question Answer Marks 2(a) One mark per mark point (Max 2) MP1 Protocols provide a standard set of rules that enables successful data transfer between devices. MP2 Allows communication between devices on different platforms. MP3 Makes communications independent of software and hardware. 2 2(b) One mark per mark point MP1 Sending - SMTP MP2 Receiving – POP3 // IMAP // Post Office Protocol 3 2 2(c) One mark per mark point (Max 3) MP1 BitTorrent allows the sharing of files between thousands of users who are connected together over the internet. MP2 It allows more users to share files with each other than would be the case with a peer-to-peer network. MP3 Users share files directly with each other // the users’ computers are acting as peers MP4 … no web server / central device is used // all users are of equal status. 3
Mark scheme, page 5
9618/32 Cambridge International AS & A Level – Mark Scheme PUBLISHED May/June 2024 © Cambridge University Press & Assessment 2024 Page 5 of 14 Question Answer Marks 3(a) One mark per mark point (Max 3) MP1 A data type that is defined without referencing another data type. MP2 It can be a primitive data type found in a programming language or a user-defined data type. MP3 Example – enumerated data type / pointer data type / allow a correct example of an enumerated or pointer data type declaration. 3 3(b) One mark per mark point (Max 4) MP1 Type statement fully correct MP2 DEFINE EvenNumbers MP3 Correct list of values in brackets MP4 : <set identifier> from Type statement used Example answer TYPE Numbers = SET OF INTEGER DEFINE EvenNumbers (2, 4, 6, 8, 10, 12): Numbers 4 Question Answer Marks 4 One mark per mark point (Max 4) MP1 Sheila’s computer uses an algorithm to generate a matching pair of keys private and public MP2 Sheila’s computer sends Fred’s computer Sheila’s public key // Fred‘s computer acquires Sheila’s public key MP3 Fred’s computer encrypts the document/plain text using Sheila’s public key to create cipher text MP4 Fred’s computer sends the cipher text to Sheila’s computer The cipher text can only be decrypted using Sheila’s private key // Sheila’s computer uses Sheila’s private key to decrypt the cipher text. 4 Question Answer Marks 5(a) One mark 7 2 – 8 + One mark 9 5 - / Complete answer 7 2 – 8 + 9 5 - / 2
Mark scheme, page 6
9618/32 Cambridge International AS & A Level – Mark Scheme PUBLISHED May/June 2024 © Cambridge University Press & Assessment 2024 Page 6 of 14 Question Answer Marks 5(b) One mark per ring (Max 4) 3 7 9 6 6 9 9 2 6 6 15 15 15 15 15 15 30 4 5(c) One mark per correct term (Max 3) (a – c + b) * (d + b) /c Complete correct answer (((a – c) + b) * (d + b))/c Or (a – c + b) * (d + b)/c 3
Mark scheme, page 7
9618/32 Cambridge International AS & A Level – Mark Scheme PUBLISHED May/June 2024 © Cambridge University Press & Assessment 2024 Page 7 of 14 Question Answer Marks 6(a) One mark for working, all five columns P, Q, R, S and T One mark for first four rows of column Z One mark for second four rows of column Z Working space A B C P Q R S T Z 0 0 0 1 1 1 1 1 0 0 0 1 1 1 0 1 0 1 0 1 0 1 0 1 1 0 1 0 1 1 1 0 0 1 0 1 1 0 0 0 1 1 0 0 0 1 0 1 0 1 0 1 0 1 1 1 0 0 0 1 1 0 1 1 1 1 0 0 0 1 0 1 3 6(b) Two marks for all six correct terms only One mark for any three correct terms (Z = ) A.B.C + A.B.C + A.B.C + A.B.C + A.B.C + A.B.C 2
Mark scheme, page 8
9618/32 Cambridge International AS & A Level – Mark Scheme PUBLISHED May/June 2024 © Cambridge University Press & Assessment 2024 Page 8 of 14 Question Answer Marks 6(c)(i) Two marks if all correct One mark if only one error present 00 01 11 10 0 1 0 1 1 1 1 0 1 1 2 6(c)(ii) One mark for each correct loop (Max 2) 00 01 11 10 0 1 0 1 1 1 1 0 1 1 2 6(c)(iii) B + C 1 Question Answer Marks 7(a) One mark per mark point (Max 2) MP1 Direct access allows a record to be found in a file without other records being read. MP2 Records are found by using the key field of the target record // the location of the record is found using a hashing algorithm. 2 7(b)(i) One mark per mark point (Max 2) MP1 In sequential files, an index of all key fields is kept MP2 The index is searched for the address of the file location where the target record is stored. 2 BC A BC A
Mark scheme, page 9
9618/32 Cambridge International AS & A Level – Mark Scheme PUBLISHED May/June 2024 © Cambridge University Press & Assessment 2024 Page 9 of 14 Question Answer Marks 7(b)(ii) One mark per mark point (Max 2) MP1 A hashing algorithm is used on the key field of the record MP2 … to calculate the address of the memory location where the target record is expected to be stored. MP3 Method to find a record if it is not at the expected location e.g. linear probing, search overflow area etc. 2
Mark scheme, page 10
9618/32 Cambridge International AS & A Level – Mark Scheme PUBLISHED May/June 2024 © Cambridge University Press & Assessment 2024 Page 10 of 14 Question Answer Marks 8(a) One mark for each correctly completed line (Max 4) DECLARE Widgets : ARRAY[1:50000] OF STRING DECLARE TopOfList : INTEGER DECLARE EndOfList : INTEGER DECLARE Count : INTEGER DECLARE ToFind : STRING DECLARE Found : BOOLEAN DECLARE NotInList : BOOLEAN TopOfList 1 EndOfList 50000 OUTPUT "Enter the name of the item you wish to find " INPUT ToFind Found FALSE NotInList FALSE Count TopOfList WHILE Found = FALSE AND NotInList = FALSE // Count <= EndOfList IF ToFind = Widgets[Count] // Widgets[Count] = ToFind THEN Found TRUE ENDIF Count Count + 1 IF Found = FALSE AND Count > EndOfList THEN NotInList TRUE ENDIF ENDWHILE IF Found = TRUE THEN OUTPUT "Item found at position ", Count - 1, " in array" ELSE OUTPUT "Item not in array" ENDIF 4
Mark scheme, page 11
9618/32 Cambridge International AS & A Level – Mark Scheme PUBLISHED May/June 2024 © Cambridge University Press & Assessment 2024 Page 11 of 14 Question Answer Marks 8(b) Max 4 One mark per mark point (Max 3) MP1 Linear search sequentially checks each element of the array / list. MP2 … until the matching element is found, or the end of the array / list is reached. MP3 Binary search finds the mid-point of an array/list and determines which side contains the item to be found MP4 … it discards the half of the array/list not containing the search item // … it finds the position of a target value within an array / list by repeatedly halving the target search field. MP5 The binary search requires the elements to be sorted // The linear search does not require the elements to be sorted. MP6 The binary search will usually do many fewer comparisons of records/iterations against the target than a linear search before it finds its target. MP7 Linear search starts at the beginning of the array/list and binary search starts in the middle of the array/list. One mark per mark point (Max 2) MP8 Big O for binary search is O (Log2 n) MP9 Big O for linear search is O (n) MP10 Big O notation is used to indicate the time / space complexity of an algorithm 4
Mark scheme, page 12
9618/32 Cambridge International AS & A Level – Mark Scheme PUBLISHED May/June 2024 © Cambridge University Press & Assessment 2024 Page 12 of 14 Question Answer Marks 9(a) One mark per mark point for up to two benefits (Max 2) MP1 COMPATIBILTY e.g. Applications that aren’t compatible with the host computer can be run on the virtual machine // It is possible to emulate old software on a new system by running a compatible guest operating system as a virtual machine // Software can be tried on different OS on the same hardware. MP2 PROTECTION e.g. The guest operating system has no effect on anything outside the virtual machine other virtual machines or the host computer//Virtual machines are useful for testing as they will not crash the host computer if something goes wrong // Easier to recover if software causes a system crash as virtual machine software protects the host system. MP3 COST e.g. No need to buy extra computers / hardware as multiple virtual machines can be implemented on the same hardware. One mark per mark point for up to two limitations (Max 2) MP4 PERFORMANCE e.g. The performance of the guest operating system will not be as good on a virtual machine as it would be on its own compatible machine because of the extra code / using more RAM/memory space // The performance of the VM is dependent on the capabilities of the host computer // Response times cannot be accurately measured using a virtual machine. MP5 COMPLEXITY e.g. Building an in-house virtual machine can be expensive, time consuming and complex to maintain / set-up. MP6 HARDWARE/SOFTWARE ISSUES e.g. Some hardware/software can’t be emulated with a virtual machine // Some of the host machine’s hardware can’t be directly accessed by the virtual machine. 4 9(b) One mark per mark point – host operating system (Max 2) MP1 The host operating system is the normal operating system for the host computer / machine. MP2 It has control of all the resources of the host computer / machine. // It can access the physical resources of the host computer / machine. MP3 It provides a user interface to operate the virtual machine software. MP4 It also runs the virtual machine software. One mark per mark point – guest operating system (Max 2) MP5 The guest operating system runs within the virtual machine. MP6 … it controls the virtual hardware/software during the emulation. // It accesses the actual hardware through the virtual machine and host operating system. MP7 It provides a virtual user interface for the emulated hardware/software. MP8 The guest operating system runs under the control of the host operating system. 3
Mark scheme, page 13
9618/32 Cambridge International AS & A Level – Mark Scheme PUBLISHED May/June 2024 © Cambridge University Press & Assessment 2024 Page 13 of 14 Question Answer Marks 10(a) One mark for each correctly completed clause (Max 4) Example answer (25) client(jane). (26) activity(surfing). (27) choice(jane, surfing). (28) done(jane, sailing). 4 10(b) (List =) frankie, erik, henry 1 10(c) One mark per mark point (Max 4) MP1 client(C) MP2 activity(A) MP3 done(C, A) MP4 all correct Boolean operators and punctuation (allow , for AND). There must be the correct number of terms and no additional lines of code Example answers may_choose_activity(C, A) IF client(C) AND activity(A) AND NOT done(C, A). client(C), activity(A), NOT (done(C, A)). 4
Mark scheme, page 14
9618/32 Cambridge International AS & A Level – Mark Scheme PUBLISHED May/June 2024 © Cambridge University Press & Assessment 2024 Page 14 of 14 Question Answer Marks 11 One mark per mark point (Max 3) MP1 Reinforcement learning is a machine learning technique based on feedback / rewards / punishment. MP2 … in which an agent learns to behave in an environment by performing the actions and seeing the results of the actions. MP3 … for each good action, the agent gets positive feedback / reward and each bad action receives negative feedback / punishment. MP4 The agent learns automatically using feedback without any labelled data / specific instructions. MP5 Adjust node weightings to achieve the correct outcome. // Using feedback to improve its performance at accomplishing similar tasks. 3
What you needed in this session
Cambridge’s own grade thresholds for 2024 May/June, Paper 3 · Variant 2. A higher threshold means an easier paper — the bar moves with how the cohort did.