Cambridge A Level Computer Science 9608 — 2017 May/June Paper 3 · Variant 2
9608/32/M/J/17 · 6 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 · Consider the following pseudocode user-defined data type: TYPE MyContactDetail DECLARE…
1 (a) Consider the following pseudocode user-defined data type: TYPE MyContactDetail DECLARE Name : STRING DECLARE HouseNumber : INTEGER ENDTYPE (i) Write a pseudocode statement to declare a variable, NewFriend, of type MyContactDetail. .......................................................................................................................................[1] (ii) Write a pseudocode statement that assigns 129 to the HouseNumber of NewFriend. .......................................................................................................................................[1] (b) The user-defined data type MyContactDetail needs to be modified by: • adding a field called Area which can take three values, uptown, downtown or midtown • amending the field HouseNumber so that house numbers can only be in the range 1 to 499. Write the updated version of MyContactDetail. ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ...............................................................................................................................................[3] (c) A pointer is a variable that stores the address of a variable of a particular type. Consider the pseudocode on page 3, which uses the following identifiers: Identifier Data type Description IPointer ^INTEGER pointer to an integer Sum INTEGER an integer variable MyInt1 INTEGER an integer variable MyInt2 INTEGER an integer variable Sum 91 // assigns the value 91 to the integer variable Sum IPointer @Sum // assigns to IPointer the address of the // integer variable Sum MyInt1 IPointer^ // assigns to variable MyInt1 the value at an // address pointed at by IPointer IPointer^ MyInt2 // assigns the value in the variable MyInt2 to // the memory location pointed at by IPointer The four assignment statements are executed. The diagram shows the memory contents after execution. Memory Variable Contents Address . . . 5848 5847 IPointer 5846 4402 5845 . . . 4403 Sum 4402 33 4401 . . . 3428 MyInt1 3427 91 MyInt2 3426 33 3425 . . . Use the diagram to state the current values of the following expressions: (i) IPointer .....................................................................................................................[1] (ii) IPointer^ ...................................................................................................................[1] (iii) @MyInt1 ......................................................................................................................[1] (iv) IPointer^ = MyInt2 ...............................................................................................[1] (d) Write pseudocode statements that will achieve the following: (i) Place the address of MyInt2 in IPointer. .......................................................................................................................................[1] (ii) Assign the value 33 to the variable MyInt1. .......................................................................................................................................[1] (iii) Copy the value in MyInt2 into the memory location currently pointed at by IPointer. .......................................................................................................................................[1]
Mark scheme: Question Answer Marks 1(a)(i) DECLARE NewFriend : MyContactDetail 1 1(a)(ii) NewFriend.HouseNumber ← 129 1 1(b) Declaration of Name, Area, HouseNumber 1 3 Inclusion of three correct values for Area 1 Inclusion of correct range for HouseNumber 1 For example: TYPE MyContactDetail DECLARE Name : STRING DECLARE Area : (uptown, downtown, midtown) 1 DECLARE HouseNumber : 1..499 1 & 1 ENDTYPE 1(c)(i) 4402 1 1(c)(ii) 33 1 1(c)(iii) 3427 1 1(c)(iv) TRUE 1 1(d)(i) IPointer ← @MyInt2 1 1(d)(ii) MyInt1 ← 33 1 1(d)(iii) IPointer^ ← MyInt2 1
Q2 · The following incomplete table shows descriptions and terms relating to malware
2 The following incomplete table shows descriptions and terms relating to malware. (a) Complete the table with appropriate description and terms. Description Term (i) Malicious code is installed on a personal computer so that the user is misdirected to a fraudulent web ...................................... [1] site without their knowledge. (ii) An attempt to acquire sensitive information, often for malicious reasons, by trying to deceive the user ...................................... [1] through the contents of an email. (iii) ................................................................................. ................................................................................. ................................................................................. Worm ................................................................................. ................................................................................. ................................................................................. [2] (b) State two vulnerabilities that the malware in part (a)(i) or part (a)(ii) can exploit. Vulnerability 1 ........................................................................................................................... ................................................................................................................................................... Vulnerability 2 ........................................................................................................................... ................................................................................................................................................... [2] (c) Digital certificates are used in internet communications. A Certificate Authority (CA) is responsible for issuing a digital certificate. The digital certificate contains a digital signature produced by the CA. (i) Name three additional data items present in a digital certificate. 1 ........................................................................................................................................ 2 ........................................................................................................................................ 3 ........................................................................................................................................ [3] (ii) Describe how the digital signature is produced by the CA. ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... .......................................................................................................................................[3] (iii) Give the reason for including a digital signature in the digital certificate. ........................................................................................................................................... .......................................................................................................................................[1]
Mark scheme: 2(a)(i) Pharming 1 2(a)(ii) Phishing 1 2(a)(iii) A standalone/independent piece of malicious software 1 2 that can replicate/duplicate itself 1 2(b) No up-to-date anti-virus (or equivalent) software (used) / Regular virus scans not 2 performed No firewall Operating system not up-to-date/obsolete Attachments/suspicious links in emails clicked on Clicking on website with an out of date security certificate max 2 2(c)(i) (Certificate) serial number 1 3 Certificate Authority (that issued certificate) 1 Valid date(s) // Date of expiry 1 Subject name (name of user/owner, computer, network device) 1 Subject public key 1 Version (Number) 1 Hashing algorithm (data or signature) 1 max 3 2(c)(ii) CA uses hashing algorithm .. 1 3 To generate a message digest from the particular certificate 1 Message digest is encrypted with CA’s private key 1 2(c)(iii) Need to know that the certificate is genuine (and has not been altered) 1 // Authenticate or verify it (came from the CA)
Q3 · A logic circuit is shown: P S Q R (a) Write the Boolean algebraic expression…
3 A logic circuit is shown: P S Q R (a) Write the Boolean algebraic expression corresponding to this logic circuit: S = ........................................................................................................................................[4] (b) Complete the truth table for this logic circuit: P Q R Working space S 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 [2] (c) (i) Complete the Karnaugh Map (K-map) for the truth table in part (b). PQ 00 01 11 10 0 R 1 [1] The K-map can be used to simplify the function in part (a). (ii) Draw loop(s) around appropriate groups to produce an optimal sum-of-products. [1] (iii) Write a simplified sum-of-products expression, using your answer to part (ii). S = .................................................................................................................................[1] (d) One Boolean identity is: (A + B) . C = A . C + B . C Simplify the expression for S in part (a) to the expression for S in part (c)(iii). You should use the given identity and De Morgan’s Laws. ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ...............................................................................................................................................[3]
Mark scheme: 3(a) S = ( P + ( Q + R ) ) . R 4 P 1 ( Q + R ) 1 (P +( Q + R ) ) 1 . R (must be outside final brackets) 1 Or P 1 ( Q + R ) 1 P +( Q + R ) 1 («««..). R 1 3(b) 2 P Q R Working space S 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 0 2 marks all correct, 1 mark seven correct, 0 marks six or fewer correct 3(c)(i) PQ 1 00 01 11 10 0 0 0 0 0 R 1 1 1 0 0 3(c)(ii) PQ 1 00 01 11 10 0 0 0 0 0 R 1 1 1 0 0 3(c)(iii) S = P . R 1 3(d) S = (P + ( Q + R ) ) . R 3 S = (P + (Q . R ) ) . R // P .R + ( Q + R ) . R 1 S = (P . R ) + ( Q . R . R ) 1 S= P . R + Q . 0 ) S= P . R + 0 ) 1 S= P . R
Q4 · Three file organisation methods and two file access methods are shown below
4 (a) Three file organisation methods and two file access methods are shown below. Draw lines to link each file organisation method to its appropriate file access method(s). File organisation method File access method random sequential serial direct sequential [4] (b) An energy company supplies electricity to a large number of customers. Each customer has a meter that records the amount of electricity used. Customers submit meter readings using their online account. The company’s computer system stores data about its customers. This data includes: • account number • personal data (name, address, telephone number) • meter readings • username and encrypted password. The computer system uses three files: File Content Use A Account number and meter readings Each time a customer submits their for the current month. reading, a new record is added to the file. B Customer’s personal data. At the end of the month to create a statement that shows the electricity supplied and the total cost. C Usernames and encrypted passwords. When customers log in to their accounts to submit meter readings. For each of the files A, B and C, state an appropriate file organisation method for the use given in the table. All three file organisation methods must be different. Justify your choice. (i) File A organisation ............................................................................................................. Justification ....................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... .......................................................................................................................................[3] (ii) File B organisation ............................................................................................................ Justification ....................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... .......................................................................................................................................[3] (iii) File C organisation ............................................................................................................ Justification ....................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... .......................................................................................................................................[3]
Mark scheme: 4(a) File organisation File access 4 method method random sequential serial direct sequential 1 mark for random correct 1 mark for serial correct 2 marks for sequential correct (1 per correct line) 4(b)(i) File A: 3 Serial 1 Meter readings are submitted over time // added to the end of file 1 Stored chronologically 1 4(b)(ii) File B: 3 Sequential 1 Any two points from: Each customer has a unique account number 1 Sorted on Account number 1 High hit rate // Suitable for batch processing monthly statements 1 4(b)(iii) File C: 3 Random 1 Login without waiting // Random organisation allows fastest direct access to required record 1 Low hit rate // Suitable for access to individual records 1
Q5 · The TCP/IP protocol suite can be viewed as a stack with four layers
5 The TCP/IP protocol suite can be viewed as a stack with four layers. (a) Complete the stack by inserting the names of the three missing layers. Application layer [3] (b) BitTorrent is a protocol used at the Application layer for the exchange of data. (i) State the network model used with this protocol. .......................................................................................................................................[1] (ii) State the use of BitTorrent. .......................................................................................................................................[1] (iii) Explain how the exchange of data is achieved using BitTorrent. ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... .......................................................................................................................................[4] (c) State two additional protocols that are also used at the Application layer for the exchange of data. For each protocol, give an example of an appropriate exchange of data. Protocol 1 ................................................................................................................................. Example .................................................................................................................................... ................................................................................................................................................... Protocol 2 ................................................................................................................................. Example .................................................................................................................................... ................................................................................................................................................... [4]
Mark scheme: 5(a) 3 Option 1 Option 2 Application Layer Application Layer Transport Transport (Layer) 1 Internet Network (Layer) 1 Network Interface (Data) Link (Layer) 1 5(b)(i) Peer-to-peer 1 5(b)(ii) File sharing 1 5(b)(iii) Any four points from the following: Max 4 • Torrent descriptor file is made available • File to be shared is split into pieces • BitTorrent client software made available to other peers / users / computers Allowing them to work as seeds or leeches. A peer can act as a ‘seed’ – used to upload pieces of a file Peer downloading file can get pieces from different seeds simultaneously • Once a peer has a piece of the file it can become a seed for the parts downloaded Leeches download much more than they upload • Central server called a tracker keeps records of all the peers (‘swarm’) and the parts of the file they have Can pause and restart at any time. 5(c) Any two protocols from: Max 4 HTTP/HTTPS « 1 Used for transfer of web pages from server to client 1 FTP « 1 Used for interactive file transfer 1 SMTP « 1 Used for sending email messages 1 POP3 « 1 Used for incoming email messages 1
Q6 · A large office building has many floors
6 A large office building has many floors. On each floor there are security sensors and security cameras. There is the same number of sensors on each floor. The building has a single security room. The images from the security cameras are output on monitors (one monitor for each floor) placed in the security room. The data from the sensors are read and processed by a computer system. Sensor readings and warning messages can be displayed on the monitors. (a) (i) State the name given to the type of system described. .......................................................................................................................................[1] (ii) Explain your answer to part (i). ........................................................................................................................................... .......................................................................................................................................[1] (iii) State two sensors that could be used in this system. Sensor 1 ............................................................................................................................ Sensor 2 ............................................................................................................................ [2] (b) A software routine: • checks the readings from the sensors • outputs readings and warning messages to the monitors • loops continuously. The routine uses the following pseudocode variables: Identifier Data type Description FloorCounter INTEGER Loop counter for number of floors SensorCounter INTEGER Loop counter for number of sensors NumberOfFloors INTEGER Stores the number of floors NumberOfSensors INTEGER Stores the number of sensors ForEver BOOLEAN Stores value that ensures continuous loop (i) Complete the following pseudocode algorithm for the routine. 01 ForEver ............................................................................................................... 02 REPEAT 03 FOR FloorCounter 1 TO NumberOfFloors 04 FOR SensorCounter 1 TO ...................................................................... 05 READ Sensor(SensorCounter)on Floor(FloorCounter) 06 IF Sensor value outside range 07 THEN 08 OUTPUT “Problem on Floor ”, FloorCounter 09 ENDIF 10 ENDFOR 11 ENDFOR 12 // 13 // Delay loop 14 // Delay loop 15 // 16 UNTIL ......................................................................................................................... [3] (ii) A delay needs to be introduced before the loop is processed again. Write a FOR loop, in pseudocode, to replace lines 13 and 14. ........................................................................................................................................... .......................................................................................................................................[1] (iii) Give a reason for this delay in the system. ........................................................................................................................................... .......................................................................................................................................[1] (c) An alternative method of reading and processing sensor data is to use interrupts. Each sensor is connected so that it can send an interrupt signal to the processor if its value changes. On receipt of an interrupt signal, the processor carries out a number of steps as shown in the following diagram. Interrupt 1. Disable interrupts 2. Save current task 3. Identify source of interrupt 4. Jump to Interrupt Service Routine 5. Restore task Return to task 6. Enable interrupts (i) State the purpose of step 3. ........................................................................................................................................... .......................................................................................................................................[1] (ii) Explain what happens at step 4. ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... .......................................................................................................................................[2]
Mark scheme: 6(a)(i) Monitoring system 1 6(a)(ii) There is no element of ‘control’ in the system // the system does not alter 1 conditions in the building if sensors triggered 6(a)(iii) Any two sensors from: Max 2 Sound / acoustic Pressure Infra-red / motion /proximity Temperature / Thermal Light Smoke Tilt 6(b)(i) 01 ForEver ← FALSE //TRUE 1 3 02 REPEAT 03 FOR FloorCounter ← 1 TO NoOfFloors 04 FOR SensorCounter ← 1 TO NumberOfSensors 1 05 READ Sensor(SensorCounter)on Floor(FloorCounter) 06 IF Sensor value outside range 07 THEN 08 OUTPUT “Problem on Floor ”, FloorCounter 09 ENDIF 10 ENDFOR 11 ENDFOR 12 // 13 // Delay loop 14 // Delay loop 15 // 16 UNTIL ForEver/Forever = TRUE // NOT ForEver / ForEver = FALSE 1 6(b)(ii) FOR Counter ← 1 TO 999999 (any “large” number) 1 ENDFOR 6(b)(iii) To allow time to elapse between readings 1 6(c)(i) To identify which sensor caused the interrupt 1 6(c)(ii) Display appropriate warning message 1 2 On the correct monitor 1
What you needed in this session
Cambridge’s own grade thresholds for 2017 May/June, Paper 3 · Variant 2. A higher threshold means an easier paper — the bar moves with how the cohort did.