Cambridge A Level Computer Science 9608 — 2021 Oct/Nov Paper 3 · Variant 2
9608/32/O/N/21 · 8 questions · 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 paper16 pages
















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







Questions as text
Q1 · Data types can be defined using pseudocode
1 Data types can be defined using pseudocode. The data type, BicycleRecord, is defined in pseudocode as: TYPE BicycleRecord DECLARE BicycleID : INTEGER DECLARE BicycleAvailable : BOOLEAN DECLARE BicycleLocation : (RiverSide, BusStation, TrainStation, TownSquare, Library) DECLARE DateChecked : DATE ENDTYPE A variable, LoanBicycle, is declared in pseudocode as: DECLARE LoanBicycle : BicycleRecord (a) Write pseudocode statements to assign 567 to the BicycleID of LoanBicycle and FALSE to the BicycleAvailable of LoanBicycle. ................................................................................................................................................... ............................................................................................................................................. [2] (b) The type definition for BicycleRecord is changed. (i) The definition has been extended to include borrower identification numbers, BorrowerID, for the last 10 people who borrowed a bicycle. Each identification number is an integer. Write the pseudocode statement needed in the type definition of BicycleRecord. ........................................................................................................................................... ..................................................................................................................................... [1] (ii) The values for the field BicycleID must be between 500 and 599 inclusive. Rewrite one pseudocode line from the type definition of BicycleRecord to implement the change. ........................................................................................................................................... ..................................................................................................................................... [1] (c) Data about all the bicycles are stored in a file that uses random file organisation. BicycleID is used as the key field. Explain how a program could add an extra record to this file. ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ............................................................................................................................................. [3]
Mark scheme: Question Answer Marks 1(a) LoanBicycle.BicycleID ← 567 2 LoanBicycle.BicycleAvailable ← FALSE 1(b)(i) DECLARE BorrowerID : ARRAY[1:10] OF INTEGER 1 1(b)(ii) DECLARE BicycleID : 500 .. 599 // 1 DECLARE BicycleID : INTEGER 500 .. 599 1(c) Any three from 3 • Bicycle ID hashed to give address / home location • Check if a record already stored at address / home location • If nothing stored, store new record • If another record already stored search overflow area / next record • Until free space found or whole area searched • If no space output error message
Q2 · The TCP/IP protocol suite can be viewed as a stack with four layers
2 The TCP/IP protocol suite can be viewed as a stack with four layers. (a) Complete the diagram of the stack by writing the names of the three missing layers. Layer Internet / Network [3] (b) Describe the TCP and IP protocols. TCP ........................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... IP .............................................................................................................................................. ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... [4]
Mark scheme: 2(a) One mark for correct layer in correct position 3 Application Transport Internet / Network Network Access // Network Interface // (Data) Link // Physical 2(b) One mark for per point max four 4 TCP Any three from • Transmission Control Protocol • Working at the Transport layer • sets up and maintains connection between two nodes • ensures delivery of data between two nodes (on the internet) IP Any three from • Internet Protocol • Working at the Internet/Network layer • provides rules for exchange of packets/datagrams over the Internet • decides the path for transmission of each packet
Q3 · The truth table for a logic circuit with four inputs is shown
3 (a) The truth table for a logic circuit with four inputs is shown. INPUT OUTPUT P Q R S X 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 0 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 0 1 1 1 0 0 1 1 1 1 1 (i) Write the Boolean algebraic expression for the truth table as a sum-of-products. X = ............................................................................................................................... [2] (ii) Complete the following Karnaugh Map (K-map) for the truth table. PQ 00 01 11 10 00 01 RS 11 10 [2] (iii) The K-map can be used to simplify the expression in part (a)(i). Draw loop(s) around appropriate groups in the K-map to produce an optimal sum-of-products. [2] (iv) Write the simplified sum-of-products from the K-map. X = ............................................................................................................................... [2] (b) Simplify the expression for X, represented by the truth table in part (a), using Boolean Algebra. ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ............................................................................................................................................. [2]
Mark scheme: 3(a)(i) One mark for 2 or 3 correct, 2 marks for 4 correct 2 X = P.Q.R.S + P.Q.R.S + P.Q.R.S + P.Q.R.S 3(a)(ii) One mark two correct rows/columns or 2 Two marks for four correct rows/columns PQ 00 01 11 10 00 1 0 0 1 01 0 0 0 0 RS 11 0 1 1 0 10 0 0 0 0 3(a)(iii) One mark for each correct loop max 2 2 PQ 00 01 11 10 00 1 0 0 1 01 0 0 0 0 RS 11 0 1 1 0 10 0 0 0 0 3(a)(iv) One mark per bullet point 2 • Q.R.S • +Q.R.S X = Q.R.S + Q.R.S or X = Q.R.S +Q.R.S 3(b) One mark for correct use of distributive law 2 One mark for correct use of complement law X = Q.R .S ( P + P ) + Q.R.S( P + P ) X = Q.R .S (1) + Q.R.S (1) Or Two marks for correct use of redundancy law + + ( Q.R.S ) P + ( Q.R.S ) P ) X = ( Q.R .S ) P ( Q.R .S ) P X = Q.R .S + Q.R.S
Q4 · Babar is building a wireless Local Area Network (LAN)
4 Babar is building a wireless Local Area Network (LAN). (a) Identify two differences between a wireless network and a wired network. 1 ................................................................................................................................................ ................................................................................................................................................... ................................................................................................................................................... 2 ................................................................................................................................................ ................................................................................................................................................... ................................................................................................................................................... [2] (b) Identify the hardware device needed to connect the wireless LAN to the Internet. Justify your choice. Device ....................................................................................................................................... Justification ............................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... [2]
Mark scheme: 4(a) One mark per point to max two 2 • nodes on use (high frequency) radio waves to communicate whereas a wired network uses cable // a wireless network requires less hardware / no cables whereas a wired network does • a wired network has higher security than a wireless network • a wired network has lower interference than a wireless network • wired network nodes can be further apart than wireless network nodes • a wired network has faster rate of data transfer than a wireless network • devices using a wireless network can be more portable whereas devices in a wired network use fixed connections 4(b) Device: (Wireless) router 2 Justification: To provide a public IP address
Q5 · Flora has written a program that uses the variables p, q, r and s
5 (a) Flora has written a program that uses the variables p, q, r and s. Part of the program contains the following calculations: p = 5 q = 4 r = 1 s = p * (p - q + r) (i) Write the Reverse Polish Notation (RPN) for the expression: p * (p - q + r) ..................................................................................................................................... [2] (ii) Show the changing contents of the stack as the value for s is calculated from the RPN expression. [4] (b) Convert this RPN expression back to its original infix form. p q * p q r + - + p / ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ............................................................................................................................................. [3] (c) Syntax analysis is one stage of the compilation of a program. Identify and describe two other stages of compilation. Stage 1 ..................................................................................................................................... Description ................................................................................................................................ ................................................................................................................................................... ................................................................................................................................................... Stage 2 ..................................................................................................................................... Description ................................................................................................................................ ................................................................................................................................................... ................................................................................................................................................... [4]
Mark scheme: 5(a)(i) p p q - r + * 2 One mark for p p q - One mark for r + * 5(a)(ii) One mark per ring to max four 4 5(b) Two marks all 3 elements of the expression are seen 3 One mark if any 2 elements of the expression are seen (p * q) // p * q +(p – (q + r)) // p – (q + r) / p One mark for fully correct expression ((p * q) + (p – (q + r))) / p (p * q + p – (q + r)) / p 5(c) Any two stages, one mark name, one mark matching description 4 • Lexical Analysis (1) converts source code into tokens (1) • Code Generation (1) produces the object code (1) • (Code) Optimisation (1) improving efficiency of object code (1)
Q6 · Lara wants to send an important message to her bank over the Internet
6 Lara wants to send an important message to her bank over the Internet. (a) Explain why the bank requires a digital signature for the message. ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ............................................................................................................................................. [2] (b) Asymmetric key cryptography is used to keep Lara’s message secure during transmission over the Internet. Describe this process of encrypting and decrypting Lara’s message. ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ............................................................................................................................................. [5] (c) Lara has received an email message that appears to be from her bank. She is not sure whether it is authentic. State two problems that could occur if Lara opens and responds to this suspicious email message. 1 ................................................................................................................................................ ................................................................................................................................................... 2 ................................................................................................................................................ ................................................................................................................................................... [2]
Mark scheme: 6(a) Any two from 2 • The bank wants to be sure that the message came from Lara • The bank wants to know that the message has not been tampered with during transmission • Lara cannot deny that she sent the message 6(b) Any five from 5 • Two matching keys are used … • … one public and one private • obtain the public key of the bank • before the message is sent • encrypt the message in plain text using the public key of the bank • when the message is received at the bank’s computer • decrypt the encrypted message using the private key of the bank 6(c) Any two from 2 • A virus/worm could be launched • Phishing could be attempted • Spyware could be installed on Lara’s computer • Lara’s personal details could be sent to a malicious third party etc.
Q7 · A virtual machine is the software emulation of a computer system using another computer…
7 A virtual machine is the software emulation of a computer system using another computer system. Describe two benefits and two limitations of using a virtual machine. Benefit 1 ........................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... Benefit 2 ........................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... Limitation 1 ....................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... Limitation 2 ....................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... [4]
Mark scheme: 7 One mark for each benefit to max 2 from 4 • Because software can be tried on different OS (using same hardware) • Because no need to purchase / request all sorts of different hardware • Easier to recover if software causes system crash • VM provides protection to other software / host OS from malfunctioning software One mark for each limitation to max 2 from • Virtual machines may not be able to emulate some hardware • Virtual machines cannot directly access some hardware • Using virtual machine means execution of extra code // processing time increased • A virtual machine might not be as efficient // performance degrades • Use of a virtual machine increases the maintenance overheads
Q8 · A large car park has 6 floors
8 A large car park has 6 floors. There is a large screen at the entrance to the car park. This screen displays the number of empty parking spaces on each floor. • There are 256 parking spaces for cars on each floor. • Each parking space has a sensor that detects if a car is parked on it. • Data from the sensors are read and processed by a computer system. (a) (i) Identify the type of system described. ..................................................................................................................................... [1] (ii) Justify your answer to part (a)(i). ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... ..................................................................................................................................... [2] (iii) Identify two types of sensor that could be used by this system. Sensor 1 ............................................................................................................................ Sensor 2 ............................................................................................................................ [2] (b) A program regularly checks each sensor’s readings. The number of empty parking spaces is displayed on the screen for each floor. If there are no empty parking spaces on a floor, a message is displayed on the screen to show that the floor is full. The pseudocode algorithm to display this information has been written using these identifiers. Identifier Data type Description FloorNumber INTEGER Floor number SpaceNumber INTEGER Parking space number SpaceAvailable INTEGER Counts number of empty parking spaces on a floor ForEver BOOLEAN Value to ensure continuous loop The pseudocode algorithm uses the function CheckSpace(Floor, Space). This function returns TRUE if the parking space is empty and FALSE otherwise. 02 REPEAT 03 FOR FloorNumber 1 TO ………………………………………………………………………… 04 SpaceAvailable 0 05 FOR SpaceNumber 1 TO ………………………………………………………………………… 06 IF CheckSpace(FloorNumber, SpaceNumber) 07 THEN 08 SpaceAvailable SpaceAvailable + 1 09 ENDIF 10 ENDFOR 11 IF SpaceAvailable > ………………………………………………………………………… 12 THEN 13 OUTPUT "Floor ", …………………………………………………………………………, " empty parking spaces "………………………………………………………………………… 14 ELSE 15 OUTPUT "Floor ", …………………………………………………………………………, " full" 16 ENDIF 17 ENDFOR 18 19 // delay loop 20 // delay loop 21 UNTIL ………………………………………………………………………… [6] (ii) Write a delay loop in pseudocode for lines 19 and 20 of the pseudocode algorithm. ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... ..................................................................................................................................... [2] (iii) State why a delay loop is used in this system. ........................................................................................................................................... ..................................................................................................................................... [1] (c) When a car is parked in a parking space, a bit is set in the appropriate memory location. • 32 memory locations are used for each floor with address X01 to X32, where X is the number of the floor. • Each location is one byte in length to hold the data for 8 parking spaces. For example, memory location 101 is used for parking spaces 1 to 8 and memory location 102 is used for parking spaces 9 to 16. The table shows part of floor 1 with cars parked in parking spaces 4, 11, 16 ... and 255. Memory Bits Parking space number location 101 0 0 0 0 1 0 0 0 8 – 1 102 1 0 0 0 0 1 0 0 16 – 9 … … … … … … … … … … 132 0 1 0 0 0 0 0 0 256 – 249 (i) The data in memory location 604 is shown. 604 1 0 0 0 0 0 0 1 State what this data represents. ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... ..................................................................................................................................... [2]
Mark scheme: 8(a)(i) Monitoring 1 8(a)(ii) Any two from 2 • System does not alter any conditions in the carpark • No feedback loop used • No actuators required 8(a)(iii) Any two from 2 • pressure sensor • light sensor • motion sensor • infra-red sensor 8(b)(i) 6 01 FALSE // TRUE 21 Forever/Forever = TRUE // NOT Forever/Forever = FALSE 03 6 05 256 11 0 13 FloorNumber 15 FloorNumber 13 SpaceAvailable 8(b)(ii) One mark for suitable loop, could be REPEAT or WHILE 2 One mark for suitable delay must be at least 100 FOR Count ← 1 to 99999 ENDFOR // NEXT // NEXT Count 8(b)(iii) To allow time to elapse between readings 1 8(c)(i) • Cars parking on floor 6 2 • Cars parked in spaces 25 and 32 // spaces 26 – 31 are empty // 6 spaces still available // 2 spaces full 8(c)(ii) Any five from 5 • Find the location 532 • … using 5 for the first digit of the address and • … using DIV 8 and 254 • … to give 32 for the last two digits • Decide on the bit to use (6/5) or (2/3) // 254 MOD 8 • AND 00100000 with contents of calculated location (532) • to mask out that bit • Check if that bit is zero
What you needed in this session
Cambridge’s own grade thresholds for 2021 Oct/Nov, Paper 3 · Variant 2. A higher threshold means an easier paper — the bar moves with how the cohort did.