Cambridge A Level Computer Science 9608 — 2018 May/June Paper 3 · Variant 2

9608/32/M/J/18 · 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 paper12 pages

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

Mark scheme9 pages

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

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

Questions as text

Q1 · Data types can be defined in a programming language

1 Data types can be defined in a programming language. The data type, StudentRecord, is defined by the code: TYPE StudentRecord DECLARE StudentID : INTEGER DECLARE StudentFirstName : STRING DECLARE StudentSurname : STRING DECLARE StudentDOB : DATE DECLARE StudentCourse : ARRAY[1:10] OF STRING ENDTYPE A variable, CollegeStudent, is declared with the code: DECLARE CollegeStudent : StudentRecord (a) Write a pseudocode statement to assign 6539 to the StudentID of CollegeStudent. ...............................................................................................................................................[1] (b) The type definition for StudentRecord is changed. (i) Students can take six courses from: Computer Science, Engineering, Science, Maths, Physics, Chemistry, Music, Drama and English Language. Rewrite one line from the type definition of StudentRecord to implement the change. DECLARE ........................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... .......................................................................................................................................[2] (ii) The values for the field StudentID must be between 1 and 8000 inclusive. Rewrite one line from the type definition of StudentRecord to implement the change. DECLARE .......................................................................................................................[1] (c) A programmer is asked to write a program to process the assessment data for each student. Students sit one exam in every course they take. A composite data type, StudentAssessment, needs to be defined with the following three fields. • a student assessment code (a unique code of three letters and two digits) • the marks for the six exams • the average mark of the six exams (i) Write pseudocode to define the data type StudentAssessment. ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... .......................................................................................................................................[4] (ii) Data about all students and their assessments are stored in a file that uses random organisation. The StudentID is used as the key field. The program allows a user to enter data for a new student. Explain how the program adds the new data to the file. ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... .......................................................................................................................................[3]

Mark scheme: Question Answer Marks 1(a) CollegeStudent.StudentID ← 6539 1 1(b)(i) 1 mark per bullet 2 • StudentCourse: ARRAY[1:6] OF • All valid string options , for example: DECLARE StudentCourse: ARRAY[1:6] OF ("Computer Science", "Engineering", "Science", "Maths", "Physics", "Chemistry", "Music", "Drama", "English Language") 1(b)(ii) DECLARE StudentID: 1 .. 8000 1 1(c)(i) 1 mark per bullet 4 • Type declaration TYPE and ENDTYPE • Declaring Code as STRING • Declaring Mark as ARRAY [1:6] OF INTEGER • AverageMark as REAL For example: TYPE StudentAssessment DECLARE Code : STRING DECLARE Mark : ARRAY[1:6] OF INTEGER DECLARE AverageMark : REAL ENDTYPE 1(c)(ii) Any 3 from, 1 mark per bullet 3 • StudentID/key field is hashed to produce home location • If home location is free, insert record/data • Else use overflow method to find free location to store record / data • If no free location available then file is full and record/data cannot be stored

Q2 · The following syntax diagrams show the syntax of: • an assignment statement • a variable…

2 The following syntax diagrams show the syntax of: • an assignment statement • a variable • an unsigned integer • a letter • a digit • an operator assignment statement variable = variable operator variable ; variable letter unsigned integer unsigned integer digit letter A B C digit operator 1 + 2 - 3 * 4 / 5 (a) The following assignment statements are invalid. Give the reason in each case. (i) A = B + 5; Reason .............................................................................................................................. .......................................................................................................................................[1] (ii) A = B − D; Reason .............................................................................................................................. .......................................................................................................................................[1] (iii) C4 = B2 − A1 + C3; Reason .............................................................................................................................. .......................................................................................................................................[1] (b) Complete the Backus-Naur Form (BNF) for the syntax diagrams shown on the opposite page. <assignment statement> ::= ................................................................................................................................................... <variable> ::= ................................................................................................................................................... <unsigned integer> ::= ................................................................................................................................................... <operator> ::= ................................................................................................................................................... [6] (c) The syntax of variable is changed to allow one or more letters followed by an unsigned integer. Draw a syntax diagram for the new syntax of the variable. [3]

Mark scheme: 2(a)(i) 5 is not a variable 1 2(a)(ii) D is not a valid letter 1 2(a)(iii) There are two operators (only one is allowed) // three variables on the right hand 1 side but only two allowed 2(b) 1 mark for each bullet 6 assignment: • <variable> = <variable><operator><variable>; variable: • <letter>| • <letter><unsigned integer> unsigned integer: • <digit>| • <digit><unsigned integer> operator: • + | - | * | / <assignment statement> ::= <variable> = <variable><operator><variable>; <variable> ::= <letter> | <letter><unsigned integer> <unsigned integer> ::= <digit> | <digit><unsigned integer> <operator> ::= + | - | * | / 2(c) 1 mark per bullet 3 • variable with arrow • followed by repeated letter • followed by unsigned integer and arrow variable letter unsigned integer

Q3 · In a computer system, real numbers are stored using normalised-floating point…

3 In a computer system, real numbers are stored using normalised-floating point representation with: • 8 bits for the mantissa • 4 bits for the exponent • two’s complement form for both mantissa and exponent. (a) Calculate the normalised floating-point representation of + 21.75 in this system. Show your working. Working ..................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... Mantissa Exponent [3] (b) Find the denary value for the following binary floating-point number. Mantissa Exponent 1 0 1 1 0 0 0 0 1 1 1 0 Show your working. Working ..................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... Answer ...................................................................................................................................... [3]

Mark scheme: 3(a) 1 mark per bullet 3 • 21.75 = 010101.11 (conversion to correct binary) • 0.1010111 × 25 (evidence of shifting binary point appropriately) • 01010111 0101 (stored as mantissa and exponent) 3(b) 1 mark per bullet, max 2 3 • 1110 = –2 (conversion of exponent to denary) • 1.011000 = –0.101 (conversion of mantissa to negative binary number)// – 0.625 (denary value of mantissa)// –5/8 • –0.00101 (binary value) // Or • Use exponent to denormalise mantissa 1 mark for correct answer • –5/32 // –0.15625

Q4 · The TCP/IP protocol suite is used on the Internet

4 The TCP/IP protocol suite is used on the Internet. (a) The table has statements about transmitting data across the Internet. Put a tick (✓) in each row to identify whether the responsibility belongs to TCP or IP. Responsibility TCP IP Correct routing Host to host communication Communication between networks Retransmitting missing packets Reassembling packets into the correct order [5] (b) Identify two other internet protocols. State a use for each protocol. Protocol 1 ................................................................................................................................. ................................................................................................................................................... Use ........................................................................................................................................... ................................................................................................................................................... Protocol 2 ................................................................................................................................. ................................................................................................................................................... Use ........................................................................................................................................... ................................................................................................................................................... [4] (c) State the name of the TCP/IP layer that uses IP addresses. ...............................................................................................................................................[1] (d) Emails are transmitted across the Internet using packet switching and routing tables. (i) Give four items of data in an IP data packet. 1 ........................................................................................................................................ 2 ........................................................................................................................................ 3 ........................................................................................................................................ 4 ........................................................................................................................................ [4] (ii) Describe two benefits of using packet switching. Benefit 1 ............................................................................................................................ ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... Benefit 2 ............................................................................................................................ ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... [4] (iii) Give two items of data stored in a routing table. 1 ........................................................................................................................................ 2 ........................................................................................................................................ [2]

Mark scheme: 4(a) 1 mark per correct row 5 Responsibility TCP IP Correct routing 9 Host to host communication 9 Communication between networks 9 Retransmitting missing packets 9 Reassembling packets into the correct order 9 4(b) 1 mark for name, 1 mark for matching use, max 4 for 2 protocols 4 • POP3/IMAP (1) receiving emails // download emails from a server (1) • SMTP (1) sending emails (1) • FTP (1) allows files to be transferred from one computer to another (1) • HTTP/HTTPS (1) transfer of web pages/hypertext (1) • Bit Torrent (1) used for peer-to-peer file sharing (1) 4(c) Internet / Network (layer) 1 4(d)(i) 1 mark per bullet to max 4 4 • Message data / payload • IP version number • Internet header length • Type of service • Explicit Congestion Notification • Total length/size of packet (in bytes) • Identification / sequence / packet number • Fragmentation flags • Fragmentation offset • Time to live // number of hops • Protocol • (Header) checksum • Source (IP) address • Destination (IP) address 4(d)(ii) 1 mark per benefit, 1 mark per expansion, max 4 for 2 benefits 4 For example : • alternative route available« • in case of network problem • If packet fails to arrive« • then only that packet has to be resent 4(d)(iii) 1 mark per bullet to max 2 2 • Network ID // (IP Address of) network destination (1) Subnetmask (1) • Routing metric // data to decide best route • (IP Addresses of possible) next hop / Gateway • Interface

Q5 · Katarina works for a company specialising in the sale of computer parts and accessories

5 Katarina works for a company specialising in the sale of computer parts and accessories. She works in the London office and her colleague Lucy works in the Hong Kong office. Katarina emails confidential information to Lucy so that only Lucy can read the information. (a) Explain how public and private keys are used to ensure that only Lucy has a readable copy of the confidential information. ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ...............................................................................................................................................[4] (b) Julio is buying items from the online shop. He already has an account with the shop. Explain how the use of Secure Socket Layer (SSL) or Transport Layer Security (TLS) helps to keep Julio’s confidential information secure. ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ...............................................................................................................................................[3] (c) The manager of the company is concerned about the threat of malware. State three vulnerabilities that a malware can exploit. 1 ................................................................................................................................................ ................................................................................................................................................... 2 ................................................................................................................................................ ................................................................................................................................................... 3 ................................................................................................................................................ ................................................................................................................................................... [3]

Mark scheme: 5(a) 1 mark per bullet to max 4 4 • Katarina’s computer/software encrypts the email before she sends it • using Lucy’s public key • Lucy’s computer/software decrypts the email when it is received • using Lucy’s private key • As the private key is known only to Lucy, only she can understand the email 5(b) 1 mark per bullet to max 3 3 • Julio’s computer/software checks the digital certificate of the online shop’s website • If digital certificate is invalid his computer/software rejects website • If valid a session is created/the transaction can continue • The encryption algorithms to be used are agreed • The session keys to be used are generated • The (session) key is used to encrypt the data sent 5(c) 1 mark per bullet to max 3 3 • Attaching a portable storage device • Opening an email attachment // clicking links on an email attachment • Accessing a suspicious website • Downloading a file from the Internet • Buffer overflow • Software not up to date // Software poorly written • No up-to-date anti-virus/anti-malware software installed • Regular virus/malware scans not completed • A firewall that is not set up correctly • Weak/easily cracked passwords • Lack of user/staff training

Q6 · There are five scenarios on the left and two types of system on the right

6 (a) There are five scenarios on the left and two types of system on the right. Draw a line to link each scenario to its correct type of system. Scenario System Car speed display Aeroplane autopilot Control Rollercoaster Monitoring Recording the rainfall at a weather station Robot loading a part onto a conveyor belt [2] (b) Mary has six fish tanks. The temperature of the water in each tank needs to be within a specific range. Identify three items of hardware that Mary can add to her tanks to help maintain the temperature. Describe the purpose of each item. Item 1 ........................................................................................................................................ Purpose .................................................................................................................................... ................................................................................................................................................... Item 2 ........................................................................................................................................ Purpose .................................................................................................................................... ................................................................................................................................................... Item 3 ........................................................................................................................................ Purpose .................................................................................................................................... ................................................................................................................................................... [6] (c) A temperature reading is taken from each tank once per minute. The temperature reading is stored as two successive bytes. The format is shown: Fish tank Temperature reading 7 6 5 4 3 2 1 0 Byte 1 Byte 2 The fish tank number is indicated by setting one of the bits in Byte 1 to 1. For example, fish tank number 5 is indicated by setting bit 5 to 1. Bit 7 of Byte 1 is a flag: • the flag’s initial value is zero • when the reading has been processed, the flag’s value is set to 1 Bit 0 of Byte 1 is unused. Byte 2 contains the temperature reading as a two’s complement integer. (i) After a temperature reading has been taken, the bytes contain the following data. 7 6 5 4 3 2 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 1 Byte 1 Byte 2 Analyse the data contained in the two bytes. ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... .......................................................................................................................................[3] (ii) The system receives a temperature reading of − 2 from fish tank number 4. Complete the bytes to show the values for this reading after it has been processed. 7 6 5 4 3 2 1 0 Byte 1 Byte 2 [2] (d) A hardware device to affect the temperature of each tank is on or off depending on the value of a bit in memory location 6753. If bit 4 is 1, then the hardware device in fish tank 4 is on. Write assembly language instructions to set bit 4 of memory location 6753 to 1 without changing any other bits. Use the instruction set provided. ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ...............................................................................................................................................[3] Instruction set Instruction Explanation Op code Operand LDD <address> Direct addressing. Load the contents of the location at the given address to ACC. STO <address> Store the contents of ACC at the given address. AND #n Bitwise AND operation of the contents of ACC with the operand. AND <address> Bitwise AND operation of the contents of ACC with the contents of <address>. XOR #n Bitwise XOR operation of the contents of ACC with the operand. OR #n Bitwise OR operation of the contents of ACC with the operand. OR <address> Bitwise OR operation of the contents of ACC with the contents of <address>. <address> can be an absolute address or a symbolic address.

Mark scheme: 6(a) 2 marks for all 5 single lines correct, 1 mark for 4 lines correct otherwise zero 2 Scenario System Car speed display Aeroplane autopilot Control Rollercoaster Monitoring Recording the rainfall at a weather station Robot loading a part onto a conveyer belt 6(b) 1 mark for identifying hardware, 1 for purpose to max 6 for 3 hardware devices 6 • temperature sensor/thermistor (1) measures current temperature (1) • thermostat (1) measures current temperature automatically turns heater on/off (1) • actuator/relay/switch (1) to turn a heater/fan on or off (1) • heater (1) to heat the water in the tank(s) (1) • fan (1) to cool the water in the tank(s) (1) • analogue to digital converter (1) to convert analogue signal from sensor to a digital value that can be stored/manipulated (1) • transmission hardware/cable (1) to transfer data/signals (1) • processor (1) to manage the temperature control (1) • Visible/audible warning device (1) to give warning to a human if temperature is at a dangerous level (1) 6(c)(i) 1 mark per bullet 3 • temperature reading in fish tank number 3 • temperature is 11 • has not been processed 6(c)(ii) 1 mark per bullet 2 • Byte 1: 10010000 • Byte 2: 11111110 6(d) 1 mark per bullet 3 • LDD 6753 • OR #B00010000 / #16 / #&10 • STO 6753

What you needed in this session

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

A52/75
B45/75
C38/75
D32/75
E25/75