Computer Science (9618) · Oct/Nov 2022 · Mark scheme 31
Cambridge Computer Science (9618) mark scheme for paper 31, Oct/Nov 2022 — 9618/31/O/N/22, file 9618_w22_ms_31.pdf.
Text of this paper
Cambridge International AS & A Level
COMPUTER SCIENCE
9618/31
Paper 3 Problem Solving & Programming
October/November 2022
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 October/November 2022 series for most
Cambridge IGCSE™, Cambridge International A and AS Level components and some Cambridge O Level
components.
This document consists of 15 printed pages.
© UCLES 2022
[Turn over
9618/31
Cambridge International AS & A Level – Mark Scheme
PUBLISHED
Generic Marking Principles
October/November 2022
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 descriptors 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.
© UCLES 2022
Page 2 of 15
9618/31
Cambridge International AS & A Level – Mark Scheme
PUBLISHED
October/November 2022
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.
© UCLES 2022
Page 3 of 15
Cambridge International AS & A Level – Mark Scheme
PUBLISHED
9618/31
Question
1(a)
October/November 2022
Answer
Marks
Two marks for working
One mark for correct answer
3
Working:
Conversion to binary + 202 = 11001010 // repeated division by 2 // 128 + 64 + 8 + 2
Appropriate shifting of binary point for + 202 = 0.1100101 28 // exponent = 8
Answer:
= 01100101 00001000 (stored as mantissa and exponent)
1(b)
Two marks for working
One mark for correct answer
3
Working:
• Appropriate method of conversion e.g.
= 10011010 (one’s complement of 8-bit mantissa)
= 10011011 (two’s complement of 8-bit mantissa)
–256 + 32 + 16 + 4 +2
•
Realisation that the exponent doesn’t change // value of exponent = 8 // appropriate shifting of binary point
Answer:
= 10011011 00001000 (stored as mantissa and exponent)
1(c)(i)
The mantissa does not begin with 01/10 (as its most significant bits)
// the mantissa begins with 00 // first two digits are the same.
1
1(c)(ii)
One mark for each point:
2
•
•
Correct mantissa
Correct exponent
Mantissa
0
© UCLES 2022
1
1
1
1
Exponent
0
0
0
0
0
0
1
0
1
1
Page 4 of 15
0
Cambridge International AS & A Level – Mark Scheme
PUBLISHED
9618/31
Question
2
Answer
One mark for each point (Max 3)
MP1
MP2
MP3
MP4
MP5
October/November 2022
Marks
5
The Transport Layer breaks data into manageable packets / performs segmentation
It sequences the packets // adds data to the packet header // adds a packet header
It sends the packets to the Internet / Network Layer // It receives data from the Application Layer
It controls the flow of packets
It handles packet loss/corruption // Acknowledges receipt of complete error free packets
One mark for each point (Max 3)
MP6
MP7
MP8
MP9
MP10
The Internet Layer identifies the intended network and host
It transmits packets to the (Data) Link / Physical Layer
It routes the packets independently through the optimum route
It addresses packets with their source and destination IP addresses
It then uses an IP address and port number to form a socket.
Question
Answer
Marks
3(a)
A (user-defined non-composite) data type with an ordered list of possible values.
1
3(b)
A user-defined non-composite data type used to reference a memory location.
1
3(c)
Marks as shown in the square brackets:
2
TYPE Quarter1 = (January, February, March)
TYPE Quarter1 = [1]
(January, February, March) [1]
3(d)(i)
© UCLES 2022
DECLARE Pet1 : Pet
1
Page 5 of 15
Cambridge International AS & A Level – Mark Scheme
PUBLISHED
9618/31
Question
3(d)(ii)
Answer
One mark for each point:
•
•
•
Marks
3
Correct assignment of all string data values
Correct assignment of char data value
Correct assignment of integer data value
Example answer:
Pet1.PetName "Tibbles"
Pet1.AnimalType "Cat"
Pet1.PetAge 8
Pet1.PetGender 'M'
Pet1.OwnerName "Jasmine Smith"
© UCLES 2022
October/November 2022
Page 6 of 15
Cambridge International AS & A Level – Mark Scheme
PUBLISHED
9618/31
Question
4
Answer
One mark for each correct line connecting one stage of compilation to a description
Question
Answer
October/November 2022
Marks
4
Marks
a b * b + d - 15 +
1
5(b)(i)
(a - b) * (c + d) / a
1
5(b)(ii)
–39
1
5(a)
© UCLES 2022
Page 7 of 15
Cambridge International AS & A Level – Mark Scheme
PUBLISHED
9618/31
Question
6(a)
Answer
One mark for each correct point (Max 2)
•
•
•
6(b)
•
•
•
© UCLES 2022
A private key is the unpublished/secret key/never transmitted anywhere.
It has a matching public key
It is used to decrypt data that was encrypted with its matching public key.
2
The message to be sent is encrypted using the recipient’s public key. // The message to be sent is encrypted using
the sender’s private key.
The message is decrypted using the recipient’s private key. // The message is decrypted using the sender’s public
key.
One mark for each correct point (Max 4)
•
•
•
Marks
2
One mark for each correct point (Max 2)
•
6(c)
October/November 2022
4
The message together with the digital signature is decrypted using the receiver’s private key
The digital signature received is decrypted with the sender’s public key to recover the message digest sent
The decrypted message received is hashed with the agreed hashing algorithm to reproduce the message digest of the
message received
The two message digests are compared
… if both digests are the same the message has not been altered // if they are different the message has been
altered.
Page 8 of 15
Cambridge International AS & A Level – Mark Scheme
PUBLISHED
9618/31
Question
7(a)
Answer
Two marks if no errors present
One mark if one error present
AB
7(b)
© UCLES 2022
Marks
2
00
01
11
10
00
0
1
1
1
01
0
1
1
1
11
0
0
0
0
10
0
0
0
0
CD
October/November 2022
One mark for correct loop (Max 2)
2
Page 9 of 15
Cambridge International AS & A Level – Mark Scheme
PUBLISHED
9618/31
Question
7(c)
October/November 2022
Answer
One mark for each point
Marks
3
•
•
Any correct Boolean term
Boolean terms and operator correct and no other terms present
_
_
(Z =) BC + AC
One mark for simplest form
_
(Z =) C (A + B)
Question
8(a)
Answer
One mark for each correct point (Max 3)
•
•
•
•
8(b)
•
•
© UCLES 2022
3
Disk / secondary storage is used to extend the RAM / memory available
… so the CPU appears to be able to access more memory space than the available RAM
Only the data in use needs to be in main memory so data can be swapped between RAM and virtual memory as
necessary
Virtual memory is created temporarily.
One mark for a correct statement about the difference between paging and segmentation e.g.
•
Marks
Paging allows the memory to be divided into fixed size blocks and
Segmentation divides the memory into variable sized blocks.
The operating system divides the memory into pages, the compiler is responsible for calculating the segment size.
Access times for paging is faster than for segmentation.
Page 10 of 15
1
Cambridge International AS & A Level – Mark Scheme
PUBLISHED
9618/31
Question
9(a)
Answer
2
Uses artificial neural network(s)
… that contain(s) a high number of hidden layers
… modelled on the human brain.
Deep learning uses many layers to progressively extract higher level features from the (raw) input.
Deep learning is a specialised form of machine learning.
One mark for each correct point (Max 2)
•
•
•
•
•
2
Deep learning makes good use of unstructured data.
Deep learning outperforms other methods if the data size is large.
Deep learning systems enable machines to process data with a nonlinear approach.
Deep learning is effective at identifying (hidden) patterns / patterns that humans might not be able to see / patterns that
are too complex / time consuming for humans to carry out.
It can provide a more accurate outcome with higher numbers of hidden layers.
Question
10(a)
Answer
Marks
Two marks for all five rows correct
One mark for four rows correct
2
Statement
RISC
uses a smaller instruction set
✓
uses single-cycle instructions and limited addressing modes
✓
CISC
uses fewer general-purpose registers
✓
uses both hardwired and micro coded control unit
✓
uses a system where cache is split between data and
instructions
© UCLES 2022
Marks
One mark for each correct point (Max 2)
•
•
•
•
•
9(b)
October/November 2022
Page 11 of 15
✓
Cambridge International AS & A Level – Mark Scheme
PUBLISHED
9618/31
Question
10(b)
Answer
One mark for each correct point (Max 4)
•
•
•
•
•
•
© UCLES 2022
Marks
4
Instructions are divided into subtasks / 5 stages
… Instruction fetch / IF, Instruction decode / ID, operand fetch / OF, opcode/instruction execute IE, result store / write
back result / WB
Each subtask is completed during one clock cycle
No two instructions can execute their same stage at the same clock cycle
The second instruction begins in the second clock cycle, while the first instruction has moved on to its second subtask.
The third instruction begins in the third clock cycle while the first and second instructions move on to their second and
third subtasks, respectively, etc.
Question
11(a)
October/November 2022
Answer
One mark for each correct OOP term definition:
Marks
3
•
Instance – an occurrence of an object // a specific object based on the class // an instantiation of a class.
•
Inheritance – the capability of defining a new class of objects that has all the attributes and methods from a parent
class.
•
Polymorphism – allows the same method to take on different behaviours depending on which class is instantiated //
methods can be redefined for derived classes.
Page 12 of 15
Cambridge International AS & A Level – Mark Scheme
PUBLISHED
9618/31
Question
11(b)
Answer
One mark for each point:
•
•
•
•
•
Marks
5
Car and ENDCLASS
Four declarations – must use the identifiers used in the assignments
Constructor header – must use CarBodyType
Two assignments – must use CarMake
Constructor identifier for the car model and the identifier in the Model assignment statement match
CLASS Car
PRIVATE Make : STRING
PRIVATE Model : STRING
PRIVATE BodyType : STRING
PRIVATE Fuel : STRING
PRIVATE NumberBuilt : INTEGER
PUBLIC PROCEDURE NEW (CarMake : STRING,
CarModel : STRING, CarBodyType : STRING)
Make CarMake
Model CarModel
BodyType CarBodyType
Fuel ""
NumberBuilt 0
ENDPROCEDURE
getFuel()
getNumberBuilt()
ENDCLASS
© UCLES 2022
October/November 2022
Page 13 of 15
Cambridge International AS & A Level – Mark Scheme
PUBLISHED
9618/31
Question
12(a)
Answer
One mark for each point (Max 6)
•
•
•
•
•
•
October/November 2022
Marks
6
Initialisation of upper bound
Test if upper bound is less than lower bound
Re-setting of mid value if current value is lower than the target
Re-setting of mid value if current value is higher than the target
Finding the value
Correct termination of loop
Lower 0
Upper 99
Mid 0
Exit FALSE
OUTPUT "Enter the name to be found "
INPUT Target
REPEAT
IF Upper < Lower THEN
OUTPUT Target, " does not exist"
Exit TRUE
ENDIF
Mid Lower + (Upper – Lower + 1) DIV 2
IF Names[Mid] < Target THEN
Lower Mid + 1
ENDIF
IF Names[Mid] > Target THEN
Upper Mid - 1
ENDIF
IF Names[Mid] = Target THEN
OUTPUT Target, " was found at location ", Mid
Exit TRUE
ENDIF
UNTIL Exit // UNTIL Exit = TRUE
12(b)(i)
© UCLES 2022
O(n)
1
Page 14 of 15
Cambridge International AS & A Level – Mark Scheme
PUBLISHED
9618/31
Question
12(b)(ii)
Answer
One mark for each point (Max 2)
•
•
•
© UCLES 2022
October/November 2022
Marks
2
O(log n) is a time complexity that uses logarithmic time.
The time taken goes up linearly as the number of items rises exponentially
O(log n) is the worst case scenario (time complexity for a binary search).
Page 15 of 15