Cambridge A Level Computer Science 9608 — 2017 May/June Paper 3 · Variant 1

9608/31/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.

← All Computer Science papersWhat was in this paper?

Question paper16 pages

Cambridge A Level Computer Science 9608 2017 May/June Paper 3 · Variant 1 question paper, page 1 of 16
Page 1 of 16
Cambridge A Level Computer Science 9608 2017 May/June Paper 3 · Variant 1 question paper, page 2 of 16
Page 2 of 16
Cambridge A Level Computer Science 9608 2017 May/June Paper 3 · Variant 1 question paper, page 3 of 16
Page 3 of 16
Cambridge A Level Computer Science 9608 2017 May/June Paper 3 · Variant 1 question paper, page 4 of 16
Page 4 of 16
Cambridge A Level Computer Science 9608 2017 May/June Paper 3 · Variant 1 question paper, page 5 of 16
Page 5 of 16
Cambridge A Level Computer Science 9608 2017 May/June Paper 3 · Variant 1 question paper, page 6 of 16
Page 6 of 16
Cambridge A Level Computer Science 9608 2017 May/June Paper 3 · Variant 1 question paper, page 7 of 16
Page 7 of 16
Cambridge A Level Computer Science 9608 2017 May/June Paper 3 · Variant 1 question paper, page 8 of 16
Page 8 of 16
Cambridge A Level Computer Science 9608 2017 May/June Paper 3 · Variant 1 question paper, page 9 of 16
Page 9 of 16
Cambridge A Level Computer Science 9608 2017 May/June Paper 3 · Variant 1 question paper, page 10 of 16
Page 10 of 16
Cambridge A Level Computer Science 9608 2017 May/June Paper 3 · Variant 1 question paper, page 11 of 16
Page 11 of 16
Cambridge A Level Computer Science 9608 2017 May/June Paper 3 · Variant 1 question paper, page 12 of 16
Page 12 of 16
Cambridge A Level Computer Science 9608 2017 May/June Paper 3 · Variant 1 question paper, page 13 of 16
Page 13 of 16
Cambridge A Level Computer Science 9608 2017 May/June Paper 3 · Variant 1 question paper, page 14 of 16
Page 14 of 16
Cambridge A Level Computer Science 9608 2017 May/June Paper 3 · Variant 1 question paper, page 15 of 16
Page 15 of 16
Cambridge A Level Computer Science 9608 2017 May/June Paper 3 · Variant 1 question paper, page 16 of 16
Page 16 of 16

Mark scheme7 pages

Answers below. Sit the paper first if you are practising.

Mark scheme, page 1 of 7
Page 1 of 7
Mark scheme, page 2 of 7
Page 2 of 7
Mark scheme, page 3 of 7
Page 3 of 7
Mark scheme, page 4 of 7
Page 4 of 7
Mark scheme, page 5 of 7
Page 5 of 7
Mark scheme, page 6 of 7
Page 6 of 7
Mark scheme, page 7 of 7
Page 7 of 7

Questions as text

Q1 · Consider the following user-defined data type: TYPE LibraryBookRecord DECLARE ISBN…

1 (a) Consider the following user-defined data type: TYPE LibraryBookRecord DECLARE ISBN : INTEGER DECLARE Title : STRING ENDTYPE (i) Write a pseudocode statement to declare a variable, Book, of type LibraryBookRecord. .......................................................................................................................................[1] (ii) Write a pseudocode statement that assigns ‘Dune’ to the Title of Book. .......................................................................................................................................[1] (b) The user-defined data type LibraryBookRecord needs to be modified by adding the following fields: • a field called Genre which can take two values, fiction or non-fiction • a field called NumberOfLoans which can be an integer value in the range 1 to 99 Write the updated version of LibraryBookRecord. ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ...............................................................................................................................................[3] (c) A pointer is a variable that stores the address of a variable of a particular type. Consider the code on page 3, which uses the following identifiers: Identifier Data type Description IntPointer ^INTEGER pointer to an integer IntVar INTEGER an integer variable Temp1 INTEGER an integer variable Temp2 INTEGER an integer variable IntVar 57 // assigns the value 57 to the integer // variable IntVar IntPointer @IntVar // assigns to IntPointer the address of the // integer variable IntVar Temp2 IntPointer^ // assigns to variable Temp2 the value at an // address pointed at by IntPointer IntPointer^ Temp1 // assigns the value in the variable Temp1 to // the memory location pointed at by IntPointer The four assignment statements are executed. The diagram shows the memory contents after execution. Memory Variable Contents address . . . 8217 IntVar 8216 88 8215 8214 . . . 7307 IntPointer 7306 8216 7305 . . . 6717 Temp1 6716 88 Temp2 6715 57 6714 . . . Use the diagram to state the current values of the following expressions: (i) @Temp2 .........................................................................................................................[1] (ii) IntPointer .................................................................................................................[1] (iii) IntPointer^ ...............................................................................................................[1] (iv) IntPointer^ = Temp2 + 6 .....................................................................................[1] (d) Write pseudocode statements that will achieve the following: (i) Assign the value 22 to the variable Temp2. .......................................................................................................................................[1] (ii) Place the address of Temp1 in IntPointer. .......................................................................................................................................[1] (iii) Copy the value in Temp2 into the memory location currently pointed at by IntPointer. .......................................................................................................................................[1]

Mark scheme: Question Answer Marks 1(a)(i) DECLARE Book : LibraryBookRecord 1 1(a)(ii) Book.Title ← "Dune" 1 1(b) TYPE LibraryBookRecord 3 DECLARE ISBN : INTEGER DECLARE Title : STRING DECLARE Genre : (Fiction, Non-Fiction) 1 DECLARE NumberOfLoans : 1 .. 99 1 ENDTYPE mark for correct declaration and first two fields (note: only if attempt at modification) 1 1(c)(i) 6715 1 1(c)(ii) 8216 1 1(c)(iii) 88 1 1(c)(iv) FALSE 1 1(d)(i) Temp2 ← 22 1 1(d)(ii) IntPointer ← @Temp1 1 1(d)(iii) IntPointer^ ← Temp2 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) A standalone piece of malicious software that can replicate itself using a network. ...................................... [1] (ii) Use email to attempt to obtain an individual’s confidential data. ...................................... [1] (iii) ................................................................................. ................................................................................. ................................................................................. Virus ................................................................................. ................................................................................. ................................................................................. [2] (b) State two vulnerabilities that the malware in part (a)(i) or part (a)(iii) can exploit. Vulnerability 1 ........................................................................................................................... ................................................................................................................................................... Vulnerability 2 ........................................................................................................................... ................................................................................................................................................... [2] Question 2 continues on the next page. (c) Anna has to send an email to Bob containing confidential information. Bob and Anna have never sent emails to each other before. Bob and Anna both have public and private keys. The first step is for Anna to request that Bob sends her one of his keys. (i) State the key that Bob sends. .......................................................................................[1] (ii) Explain how Anna can be sure that it is Bob who has sent the key. ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... .......................................................................................................................................[2] (iii) Anna has received the key from Bob. The following incomplete table shows the sequence of actions between Anna and Bob to communicate the confidential information. Complete the table. The person performing the What that person does action Anna Requests Bob’s <answer to part (c)(i)> key. Bob .......................................................................................................... Anna .......................................................................................................... Anna Sends the email to Bob. .......................................................................................................... Bob .......................................................................................................... [4] Question 3 begins on page 8.

Mark scheme: 2(a)(i) Worm 1 2(a)(ii) Phishing 1 2(a)(iii) Malicious software that replicates by inserting a copy of itself (1) 2 into a file of data (1) 2(b) Example: Max 2 No up-to-date anti-virus (or equivalent) software Regular virus scans not performed Operating system not up-to-date Attachments/suspicious links clicked on 1 mark for any valid vulnerability 2(c)(i) public 1 2(c)(ii) Bob sends his digital certificate 2 Digital certificate contains Bob’s public key Successful decryption of certificate using CA’s public key provides legitimacy 1 mark for any valid point – max 2 2(c)(iii) 4 The person performing What that person does the action Anna Requests Bob’s public key. Bob Sends Anna his public key. 1 Anna Encrypts email with Bob’s public key. 1 Anna Sends the email to Bob. Decrypts email. 1 Bob Using his private key. 1

Q3 · Consider the following logic circuit, which contains a redundant logic gate

3 Consider the following logic circuit, which contains a redundant logic gate. A X B C (a) Write the Boolean algebraic expression corresponding to this logic circuit. X = ........................................................................................................................................[3] (b) Complete the truth table for this logic circuit. A B C Working space X 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). AB 00 01 11 10 0 C 1 [1] The K-map can be used to simplify the expression in part (a). (ii) Draw loop(s) around appropriate groups to produce an optimal sum-of-products. [2] (iii) Write a simplified sum-of-products expression, using your answer to part (ii). X = .................................................................................................................................[2] (d) One Boolean identity is: A + ̅A.B = A + B Simplify the expression for X in part (a) to the expression for X in part (c)(iii). You should use the given identity. ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ...............................................................................................................................................[2]

Mark scheme: 3(a) X = A.(B + (B . C)) 3 B.C 1 B + B.C 1 A. 1 3(b) 2 A B C Working Space X 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 1 1 0 1 1 1 1 0 0 1 1 1 1 1 mark first four entries, 1 mark for the last four entries 3(c)(i) 1 AB 00 01 11 10 0 0 0 0 1 C 1 0 0 1 1 3(c)(ii) 2 AB 00 01 11 10 1 0 0 0 0 C 1 0 0 1 1 3(c)(iii) X = A.B + A.C 2 1 1 3(d) X = A.(B + (B . C)) 2 X = A.(B + C ) 1 X = A.B + A.C 1 (dependent mark – must be correct outcome from previous line)

Q4 · A bank has 95 000 customers

4 A bank has 95 000 customers. Each customer has a unique ID. When a customer uses an Automated Teller Machine (ATM) to obtain cash, their current balance is checked. The balance is stored in a file which has the following fields: • the customer ID (6-digit number in the range 100000 to 999999) • an encrypted PIN • the current balance The file can store a maximum of 100 000 records. (a) Give a reason why a random organisation would be appropriate for this file. ................................................................................................................................................... ...............................................................................................................................................[1] (b) An algorithm for inserting a new record in this file uses the following hash function: RecordKey CustomerID MOD 100000 where RecordKey is the record position in the file. (i) Complete the table to show the values generated by the hash function for the given customer IDs. CustomerID RecordKey 802139 2139 700004 689998 102139 [1] (ii) State the range of possible values for RecordKey. Minimum value of RecordKey: ......................................................................................... Maximum value of RecordKey: ........................................................................................ [2] (iii) A procedure is written to insert a new record into the file. Complete the algorithm for this procedure. PROCEDURE InsertRecord(CustomerID : INTEGER) RecordKey CustomerID MOD 100000 Success FALSE // Find position for new record and insert it REPEAT IF record at position RecordKey is ……………………… THEN Insert new record at position RecordKey Success TRUE ELSE IF RecordKey = ……………………… THEN RecordKey ELSE RecordKey ……………………… + 1 ENDIF ENDIF UNTIL Success = TRUE ENDPROCEDURE [4] (c) (i) Explain why an encrypted version of the PIN is stored in the file. ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... .......................................................................................................................................[2] (ii) A customer attempts to withdraw cash from an ATM. An algorithm is used to check if the customer has entered the correct PIN. Complete the algorithm. 1. Customer ID is read from card. 2. Customer enters PIN. 3. Customer PIN is ................................................................................................... 4. ...................................................................................................................................... 5. Customer record is located in file. 6. ..................................................................................................................................... 7. If match then transaction can proceed. [3]

Mark scheme: 4(a) Example: 1 Speed of access Just used as a look-up file No need for any serial or sequential processing 1 mark for any valid point 4(b)(i) 1 CustomerID RecordKey 802139 2139 700004 4 689998 89998 102139 2139 4(b)(ii) Minimum value: 0 1 2 Maximum value: 99999 1 4(b)(iii) PROCEDURE InsertRecord(CustomerID : INTEGER) 4 RecordKey ← CustomerID MOD 100000 Success ← FALSE // Find position for new record and insert it REPEAT IF record at position RecordKey is empty THEN Insert new record at position RecordKey Success ← TRUE ELSE IF RecordKey = 99999 THEN RecordKey ← 0 ELSE RecordKey ← RecordKey + 1 ENDIF ENDIF UNTIL Success = TRUE ENDPROCEDURE 4(c)(i) For security Max 2 If file is hacked then encrypted PIN cannot be used Only encrypted PINs are transmitted and compared 1 mark for any valid point 4(c)(ii) 1. Customer ID is read from card 3 2. Customer enters PIN 3. Customer PIN is encrypted 4. Customer ID is hashed 5. Customer record is located in file 6. PIN is checked against PIN in record 7. If match then transaction can proceed

Q5 · A web browser is used to request and display a page stored on an internet web server

5 (a) A web browser is used to request and display a page stored on an internet web server. Explain how each of the following items is used in this event. (i) Packet: .............................................................................................................................. ........................................................................................................................................... ........................................................................................................................................... .......................................................................................................................................[2] (ii) Router: ............................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... .......................................................................................................................................[2] (iii) TCP/IP: .............................................................................................................................. ........................................................................................................................................... ........................................................................................................................................... .......................................................................................................................................[2] (b) The Internet can be used for video conferencing. Data can be transmitted over the Internet using either packet switching or circuit switching. (i) State two problems that could arise if video conferencing were to use packet switching. Problem 1 .......................................................................................................................... ........................................................................................................................................... Problem 2 .......................................................................................................................... ........................................................................................................................................... [2] (ii) Explain what is meant by circuit switching. ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... .......................................................................................................................................[2] (iii) Explain how the use of circuit switching overcomes the problems you have identified in part (i). ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... .......................................................................................................................................[3]

Mark scheme: 5(a)(i) Packet: 2 Both web page and web page request are split into packets 1 Each packet is sent individually from device to device 1 5(a)(ii) Router: Max 2 Transmit packets Contain connections to many other routers When packets arrive at router, router decides where next to send packet 1 mark for any valid point 5(a)(iii) TCP/IP: 2 Is the protocol 1 Rules for communication between web server and browser 1 5(b)(i) Two from: Max 2 Picture and sound not synchronised 1 Interruptions // video not continuous 1 Can be degraded by other competing traffic 1 5(b)(ii) Dedicated communications channel between the two communicating devices 1 2 Established prior to start of communication // removal of links at end of communication 1 5(b)(iii) In packet switching, packets can take different routes and may not arrive in Max 3 order Will arrive in order (only one route) As packets can take many different routes / share paths with others can be delayed Dedicated circuit has full bandwidth No loss of synch 1 mark for any valid point

Q6 · A computer system is used to manage some of the functions in a vehicle

6 A computer system is used to manage some of the functions in a vehicle. The vehicle has a number of sensors and actuators. One sensor is used to monitor the moisture on the screen. If the moisture exceeds a pre-set value, the windscreen wiper motor turns on automatically. The software used in the computer system is dedicated to the sensor management functions. When the system starts, the software runs some initial tasks. It then loops continuously until the system is switched off. (a) (i) State the name given to the type of system described. .......................................................................................................................................[1] (ii) Explain your answer to part (i). ........................................................................................................................................... .......................................................................................................................................[1] (b) Within the software loop, the value of each sensor is read in turn. The value read from the sensor is then processed. State two drawbacks with this method of reading and processing sensor data. Drawback 1 ............................................................................................................................... ................................................................................................................................................... Drawback 2 ............................................................................................................................... ................................................................................................................................................... [2] (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 1. ........................................................................................................................................... ........................................................................................................................................... .......................................................................................................................................[1] (ii) State the purpose of step 6. ........................................................................................................................................... ........................................................................................................................................... .......................................................................................................................................[1] (iii) Explain how the current task is saved in step 2. ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... .......................................................................................................................................[2] (iv) State two benefits of using interrupts to read and process the sensor data. Benefit 1 ............................................................................................................................ ........................................................................................................................................... Benefit 2 ............................................................................................................................ ........................................................................................................................................... [2] (v) The interrupt handler in step 3 has to test each bit of a 16-bit register to discover the source of the interrupt. The contents of the 16-bit register are loaded into the 16-bit accumulator: Accumulator Bit: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 0 0 0 0 0 1 0 1 0 1 0 1 0 0 0 An instruction is required to achieve the following: • If bit 9 is zero, set the accumulator to zero. • If bit 9 is one, set the accumulator to a non-zero value. Write this instruction using an appropriate bitwise operation. .......................................................................................................................................[2]

Mark scheme: 6(a)(i) Control system 1 6(a)(ii) Use of actuators means that the system is controlling 1 6(b) System wastes processor time checking for values that are not changing 1 2 Some sensor input needs to be acted upon immediately 1 6(c)(i) Interrupts need to be disabled so that the process of dealing with an interrupt is 1 itself not interrupted 6(c)(ii) After handling the interrupt interrupts need to be enabled so that further 1 interrupts can be dealt with 6(c)(iii) Content of registers 1 2 Placed on stack 1 6(c)(iv) Changing sensor value dealt with as soon as it happens 1 2 Processor needs to check sensor only when an interrupt occurs 1 6(c)(v) AND #B0000001000000000 // AND #&0200 // AND #512 2 Op code 1 Operand 1

What you needed in this session

Cambridge’s own grade thresholds for 2017 May/June, Paper 3 · Variant 1. A higher threshold means an easier paper — the bar moves with how the cohort did.

A49/75
B45/75
C38/75
D31/75
E24/75