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

Computer Science 9618/31 October/November 2023: question paper and mark scheme

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

9618_w23_qp_319618_w23_ms_319618/31/O/N/23

Paper
Paper 3 Advanced Theory
Total marks
75
Time
1 hour 30 minutes
Code on the paper
9618/31/O/N/23
9618_w23_ms_31.pdf

9618/31 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 15 marks

Question

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. (a) Write the normalised floating-point representation of +65.25 in this system. Show your working. Mantissa Exponent Working …… …… [3] (b) Explain the problem that will occur in storing the normalised floating-point representation of +65.20 in this system. …… [2]

Mark scheme

1(a) One mark for working (Max 1) 3 • conversion of 65.25 to binary seen e.g. 1000001.01 = 65.25 // 64 + 1 + 0.25 / ¼ One mark per mark point (Max 2) • correct mantissa • correct exponent Mantissa Exponent 0 1 0 0 0 0 0 1 0 1 0 0 0 1 1 1 1(b) One mark per mark point (Max 2) 2 MP1 the decimal fraction 0.20 cannot be represented exactly (the closest is 0.25 / 0.1875) MP2 therefore, there will be a loss of precision due to a rounding error/truncation

Question 26 marks

Question

(a) Draw one line to connect each protocol to its most appropriate use. Protocol Use to provide peer-to-peer file sharing HTTP when retrieving email messages from a mail server over a TCP/IP connection BitTorrent when transmitting hypertext documents SMTP to map MAC addresses onto IP addresses IMAP when sending email messages towards the intended destination [4] (b) Outline the purpose of the Link layer in the TCP / IP protocol suite. …… [2]

Mark scheme

2(a) One mark for each correct line connecting a protocol to its most appropriate 4 description (Max 4). Protocol Use to provide peer-to-peer file sharing HTTP when retrieving email messages from a mail server over a TCP/IP connection BitTorrent when transmitting hypertext documents SMTP to map MAC addresses onto IP addresses IMAP when sending email messages towards the intended destination 2(b) One mark per mark point (Max 2) 2 MP1 To ensure correct network protocols are followed MP2 To enable the upper layers to access the physical medium // enables connection/ communication with the internet / network layer MP3 To be responsible for transporting data within the network/local segments MP4 To format the data into frames for transmission MP5 Maps IP addresses to MAC/Physical addresses.

Question 34 marks

Question

Describe what is meant by enumerated and pointer data types. Enumerated …… Pointer …… [4]

Mark scheme

3 One mark per mark point – enumerated type (Max 2) 4 MP1 A user-defined non-composite (data type) (only award once) MP2 …with a list of all possible values MP3 …that is ordered. One mark per mark point – pointer type (Max 2) MP4 A user-defined non-composite (data type) (only award once) MP5 …that stores addresses/memory locations only MP6 …and indicates the type of data stored in the memory location.

Question 46 marks

Question

(a) Describe sequential and random methods of file organisation. Sequential file organisation …… Random file organisation …… [4] (b) Outline the process of sequential access for serial and sequential files. …… [2]

Mark scheme

4(a) One mark per mark point – sequential (Max 2) 4 MP1 Records (in the file) are ordered MP2 …based on the key field MP3 A new version (of the file) has to be created to update the file One mark per mark point – random (Max 2) MP4 Records are stored in no particular order within the file // There is no sequencing in the placement of the records MP5 There is a relationship between the key of the record and its location within the file // a hashing algorithm is used to find the location of the record MP6 Updates to the file can be carried out directly. 4(b) One mark per mark point (Max 2) 2 MP1 Start at the beginning of the file MP2 …check records linearly MP3 …until the desired record is found // … processing / updating records as required //… EOF found.

Question 54 marks

Question

Describe the features of SISD and MIMD computer architectures. SISD …… MIMD …… [4]

Mark scheme

5 One mark per mark point – SISD (Max 2) 4 MP1 Single Instruction, Single Data (architecture). // Data is taken from a single source and a single instruction is performed on the data. MP2 Contains one processor, a control unit and a memory unit. MP3 …that executes instructions sequentially. One mark per mark point – MIMD (Max 2) MP4 Multiple Instruction, Multiple Data (architecture). // At any time, any processor can execute different instructions on different sets of data. MP5 Contains many processors MP6 …that operate asynchronously / independently.

Question 66 marks

Question

This diagram represents a logic circuit. A B Z C D (a) Complete the truth table for the given logic circuit. Working space A B C D 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) Simplify the given Boolean expression using Boolean algebra. Show your working. Y = A.B.C.D + A.B.C.D + A.B.C.D + A.B.C.D …… [3]

Mark scheme

6(a) One mark for every shaded block of rows for column Z correct (Max 3) 3 A B C D Z 0 0 0 0 1 0 0 0 1 0 0 0 1 0 1 0 0 1 1 0 0 1 0 0 1 0 1 0 1 0 0 1 1 0 1 0 1 1 1 0 1 0 0 0 1 1 0 0 1 0 1 0 1 0 1 1 0 1 1 0 1 1 0 0 1 1 1 0 1 0 1 1 1 0 0 1 1 1 1 0 6(b) One mark for correct working from points (Max 2), for example: 3 (Y =) A.B.C.D + A.B.C.D + A.B.C.D + A.B.C.D (Y =) A.D.(B.C + B.C + B.C + B.C) (Y =) A.D.(B.(C + C) + B.(C + C)) (Y =) A.D.(B.(1) + B.(1)) (Y =) A.D.(B + B) (Y =) A.D.(1) One mark for correct answer (Y =) A.D

Question 75 marks

Question

(a) A student buys a new computer. State one benefit to the student of a user interface and give an example. Benefit …… Example …… [2] (b) Two of the process states are the running state and the ready state. Identify one other process state. …… [1] (c) Outline conditions under which a process could change from the running state to the ready state. …… [2]

Mark scheme

7(a) One mark for a benefit (Max 1) e.g. 2 MP1 The user interface hides the complexities of the computer hardware/operating system from the user MP2 It provides appropriate access systems for users with differing needs MP3 Complex commands involving memory locations/buses/computer hardware/ are avoided One mark for a valid example (Max 1) e.g. Clicking on icon rather than writing code Using a graphical user interface / icons for navigation 7(b) Blocked (state) 1 7(c) One mark per mark point (Max 2) 2 MP1 When the time slice of the running process expires (round robin). MP2 …and there is a process with a higher priority in the ready queue, the running process is pre-empted MP3 When an interrupt arrives at the CPU, (the process running on the CPU gets pre-empted).

Question 88 marks

Question

(a) A pseudocode algorithm finds a customer account record in a random file and outputs it. The records are stored using the user-defined data type TAccount. TYPE TAccount DECLARE AccountNumber : INTEGER DECLARE LastName : STRING DECLARE FirstName : STRING DECLARE Address : STRING DECLARE ContactNumber : STRING ENDTYPE Complete the file handling pseudocode. The function Hash() takes the customer account number as a parameter, calculates and returns the hash value. DECLARE Customer : TAccount DECLARE Location : INTEGER DECLARE AccountFile : STRING …… "AccountRecords.dat" …… AccountFile …… OUTPUT "Please enter an account number" INPUT Customer.AccountNumber Location Hash( ……) SEEK …… , Location …… AccountFile, …… OUTPUT Customer // output customer record CLOSEFILE AccountFile [5] (b) Define the term exception handling. …… [1] (c) State two possible causes of an exception. …… [2]

Mark scheme

8(a) One mark for each correctly completed line (Max 5) 5 DECLARE Customer : TAccount DECLARE Location : INTEGER DECLARE AccountFile : STRING AccountFile ← "AccountRecords.dat" OPENFILE AccountFile FOR RANDOM OUTPUT "Please enter an account number" INPUT Customer.AccountNumber Location ← Hash(Customer.AccountNumber) SEEK AccountFile, Location GETRECORD AccountFile, Customer OUTPUT Customer CLOSEFILE AccountFile 8(b) One mark for correct definition 1 (Exception handling is the process of) responding to an unexpected event when the program is running so it does not halt unexpectedly 8(c) One mark per mark point (Max 2), for example: 2 • Programming errors • User errors • Hardware failure • Runtime errors

Question 99 marks

Question

(a) (i) Write the infix expression for this Reverse Polish Notation (RPN) expression: 5 2 – 5 4 + * 9 / …… [2] (ii) Show how the contents of the following stack will change as the RPN expression in part (a)(i) is evaluated. [4] (b) Explain how a stack can be used to evaluate RPN expressions. …… [3]

Mark scheme

9(a)(i) One mark per mark point (Max 2) 2 • (5 – 2) • * (5 + 4) / 9 Final correct expression (5 – 2) * (5 + 4) / 9 9(a)(ii) One mark per ring (Max 4) 4 4 2 5 5 9 9 5 5 3 3 3 3 27 27 3 OR 5 2 3 5 4 9 27 9 3 5 3 5 3 27 3 9(b) One mark per mark point (Max 3) 3 MP1 Evaluate the RPN expression from left to right MP2 Push each element of the RPN expression onto the stack in order until an operator is reached MP3 Pop the last two elements from the stack and apply the operator MP4 Push the result of the operation onto the stack MP5 Repeat the process until the whole expression is evaluated.

Question 1010 marks

Question

A stack is to be set up using the information in the table. Identifier Data type Description BasePointer INTEGER points to the bottom of the stack TopPointer INTEGER points to the top of the stack Stack REAL 1D array to implement the stack A constant, with identifier Capacity, limits the size of the stack to 25 items. (a) Write the pseudocode for the required declarations. …… [3] (b) Complete the pseudocode function Pop() to pop an item from Stack. // popping an item from the stack FUNCTION Pop()…… DECLARE Item : REAL Item 0 …… BasePointer THEN Item …… TopPointer …… ELSE OUTPUT "The stack is empty – error" ENDIF ENDFUNCTION [5] (c) Compare and contrast the queue and stack Abstract Data Types (ADT). …… [2]

Mark scheme

10(a) One mark per mark point (Max 3) 3 MP1 Correct constant declaration MP2 Two correct variable declarations MP3 Correct array declaration Example answer: CONSTANT Capacity = 25 DECLARE BasePointer : INTEGER DECLARE TopPointer : INTEGER DECLARE Stack : ARRAY[1:25] OF REAL 10(b) One mark for each correctly completed line (Max 5) 5 // popping an item from the stack FUNCTION Pop() RETURNS REAL DECLARE Item : REAL Item ← 0 IF TopPointer >= BasePointer THEN Item ← Stack[TopPointer] TopPointer ← TopPointer – 1 ELSE OUTPUT "The stack is empty – error" ENDIF RETURN Item ENDFUNCTION 10(c) One mark per mark point (Max 2) 2 MP1 A queue is a first in first out / FIFO data structure and a stack is a first in last out / FILO / LIFO data structure // Data is removed from a queue in the order it is received and removed from a stack in the reverse order to which it is received MP2 Both ADTs can vary in size / are of indeterminate length MP3 Data is popped and pushed (onto/from a stack) at the same end but it is enqueued and dequeued (to/from a queue) at different/opposite ends // a queue has two accessible ends and a stack has only one MP4 A stack has only one moveable pointer whereas a queue has two.

Question 118 marks

Question

A declarative programming language is used to represent subjects that students can choose to study. Students must choose two subjects. 01 subject(mathematics). 02 subject(physics). 03 subject(chemistry). 04 subject(computer_science). 05 subject(geography). 06 subject(history). 07 subject(english). 08 subject(biology). 09 student(tomaz). 10 student(josephine). 11 student(elspeth). 12 student(nico). 13 student(teresa). 14 student(pietre). 15 choice1(tomaz, mathematics). 16 choice1(teresa, chemistry). 17 choice1(pietre, mathematics). 18 choice1(nico, mathematics). 19 choice1(elspeth, chemistry). 20 choice2(tomaz, computer_science). 21 choice2(nico, geography). These clauses have the meanings: Clause Meaning 01 Mathematics is a subject. 09 Tomaz is a student. 15 Tomaz has chosen mathematics as his first choice. 20 Tomaz has chosen computer science as his second choice. (a) Anthony is a student who would like to study history and geography. Write additional clauses to represent this information. 22 …… 23 …… 24 …… [3] (b) Using the variable X, the goal: choice1(X, chemistry) returns X = teresa, elspeth Write the result returned by the goal: choice1(X, mathematics) X = …… [1] (c) Students must choose two different subjects such that: N may choose S, if N is a student and S is a subject and N has not chosen S as the first choice. Write this as a rule. may_choose_subject(N, S) IF …… …… [4]

Mark scheme

11(a) One mark for each correctly completed clause (Max 3) 3 (22) student(anthony). (23) choice1(anthony, history). (24) choice2(anthony, geography). 11(b) X = tomaz, pietre, nico 1 11(c) One mark per mark point (Max 4) 4 • student(N) • subject(S) • choice1(N, S) • all logical operators correct with no additional code (see example answers) Example answers: may_choose_subject(N, S) IF student(N) AND subject(S) AND NOT choice1(N, S) may_choose_subject(N, S) IF NOT choice1(N, S), student(N), subject(S)

Question 124 marks

Question

Artificial neural networks have played a significant role in the development of machine learning. Explain what is meant by the term artificial neural network. …… [4]

Mark scheme

12 One mark per mark point (Max 4) 4 MP1 An artificial neural network is the component of artificial intelligence that is meant to simulate the functioning of a biological brain. MP2 Artificial neural networks are a key component of machine learning. MP3 They can solve problems that would prove impossible or difficult for humans // Artificial neural networks have self-learning capabilities that enable them to produce better results as more data becomes available MP4 Artificial neural networks can be layered (input, hidden and output layers) // Artificial neural networks have many interconnected layers, some / many of which are hidden MP5 Weights are assigned between nodes MP6 Weights are adjusted through training to give a more accurate result MP7 More complex learning capabilities / more accurate results are available with larger numbers of hidden layers

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

Mark my 9618/31

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/31 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/31 questions

Where can I find the 9618/31 October/November 2023 mark scheme?

On this page, free: the mark scheme for AS & A Level Computer Science 9618/31, October/November 2023 (9618_w23_ms_31), and the question paper (9618_w23_qp_31), to read or download, with each question's marking points written out underneath.

How many marks is 9618/31 out of?

Computer Science 9618/31 for October/November 2023 is out of 75 marks, with 1 hour 30 minutes to answer it.

Can I get my 9618/31 answers marked?

Yes. Upload your answers to 9618/31/O/N/23 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.