Cambridge A Level Computer Science 9608 — 2017 Oct/Nov Paper 3 · Variant 2

9608/32/O/N/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 Oct/Nov Paper 3 · Variant 2 question paper, page 1 of 16
Page 1 of 16
Cambridge A Level Computer Science 9608 2017 Oct/Nov Paper 3 · Variant 2 question paper, page 2 of 16
Page 2 of 16
Cambridge A Level Computer Science 9608 2017 Oct/Nov Paper 3 · Variant 2 question paper, page 3 of 16
Page 3 of 16
Cambridge A Level Computer Science 9608 2017 Oct/Nov Paper 3 · Variant 2 question paper, page 4 of 16
Page 4 of 16
Cambridge A Level Computer Science 9608 2017 Oct/Nov Paper 3 · Variant 2 question paper, page 5 of 16
Page 5 of 16
Cambridge A Level Computer Science 9608 2017 Oct/Nov Paper 3 · Variant 2 question paper, page 6 of 16
Page 6 of 16
Cambridge A Level Computer Science 9608 2017 Oct/Nov Paper 3 · Variant 2 question paper, page 7 of 16
Page 7 of 16
Cambridge A Level Computer Science 9608 2017 Oct/Nov Paper 3 · Variant 2 question paper, page 8 of 16
Page 8 of 16
Cambridge A Level Computer Science 9608 2017 Oct/Nov Paper 3 · Variant 2 question paper, page 9 of 16
Page 9 of 16
Cambridge A Level Computer Science 9608 2017 Oct/Nov Paper 3 · Variant 2 question paper, page 10 of 16
Page 10 of 16
Cambridge A Level Computer Science 9608 2017 Oct/Nov Paper 3 · Variant 2 question paper, page 11 of 16
Page 11 of 16
Cambridge A Level Computer Science 9608 2017 Oct/Nov Paper 3 · Variant 2 question paper, page 12 of 16
Page 12 of 16
Cambridge A Level Computer Science 9608 2017 Oct/Nov Paper 3 · Variant 2 question paper, page 13 of 16
Page 13 of 16
Cambridge A Level Computer Science 9608 2017 Oct/Nov Paper 3 · Variant 2 question paper, page 14 of 16
Page 14 of 16
Cambridge A Level Computer Science 9608 2017 Oct/Nov Paper 3 · Variant 2 question paper, page 15 of 16
Page 15 of 16
Cambridge A Level Computer Science 9608 2017 Oct/Nov Paper 3 · Variant 2 question paper, page 16 of 16
Page 16 of 16

Mark scheme12 pages

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

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

Questions as text

Q1 · A Local Area Network (LAN) consists of three computers, one server and a router connected…

1 A Local Area Network (LAN) consists of three computers, one server and a router connected to the Internet. The LAN uses a bus topology. (a) Complete the following diagram to show how the computers, the server and the router could be connected. Router Server Computer A Internet Computer Computer B C [2] (b) There are four statements in the following table. For each statement, place a tick (3) in the appropriate column to indicate whether it is true or false. Statement True False The server can send packets to Computer B and the router at the same time. Computer C uses the IP address of a web server to send a request for a web page on the web server. Computer B can read a packet sent from Computer A to Computer C. The server can read all incoming packets from the Internet. [4] (c) The user on Computer A and the user on Computer B are both using the Internet at the same time. On a few occasions, Computer A and Computer B start transmitting packets to the router at exactly the same time. This causes a problem called a collision. (i) Explain what is meant by a collision in this context. ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... .......................................................................................................................................[2] (ii) As a result of the collision, both Computer A and Computer B stop transmitting. Computer A must carry out a number of steps to ensure the successful transmission of its packet. Give two of the steps. Step 1 ................................................................................................................................ Step 2 ................................................................................................................................ [2] (d) The LAN topology is redesigned. (i) Describe the changes that could be made to the LAN topology to overcome the problem identified in part (c). ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... .......................................................................................................................................[2] (ii) Explain how the redesign has overcome the problem. ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... .......................................................................................................................................[2]

Mark scheme: Question Answer Marks 1(a) 2 Computer Server A Router T T Computer Computer Internet B C Each device has a single connection to the bus (1) One terminator at each end (1) The terminators do not need to be labelled as long as they are obvious 1(b) 4 Statement True False The server can send packets to Computer B and the 9 (1) router at the same time. Computer C uses the IP address of a web server to 9 (1) send a request for a web page on the web server Computer B can read a packet sent from Computer 9 (1) A to Computer C. The server can read all incoming packets from the (1) 9 9 Internet. 1(c)(i) • Only one transmission is allowed on the bus at any one time // only one 2 packet can be transmitted on the bus at any one time (1) • The two packets from A and B cannot both use the bus at the same time (1) • The attempts to transmit will be unsuccessful, because the stations will realise that the bus is busy (1) • Reference to CSMA/CD (1) • Collision causes a change in voltage of the bus (1) 1 mark for each point, max 2 1(c)(ii) One mark for valid point, max 2 2 • Calculate a random wait time • Wait for the random time • Check for idle bus // Check status of bus • Attempt to re-transmit / re-send • If unable to transmit, repeat process 1(d)(i) • Star topology (1) 2 • Where each computer / device has its own dedicated connection to the server (1) Alternative answers: Mesh topology (1) Every device connects directly to every other device (1) Ring topology (1) Use of tokens means no collisions // Every device examines every packet (1) 1(d)(ii) As each computer is now not sharing a single bus // has dedicated path (to 2 the server) (1) Collisions cannot occur (1) Alternative answers: Mesh As each device now has a direct path to all the others (1) Collisions cannot occur (1) Ring Packets all travel in the same direction (1) Collisions cannot occur (1)

Q2 · The following diagram shows four descriptions and two types of processor

2 (a) The following diagram shows four descriptions and two types of processor. Draw lines to connect each description to the appropriate type of processor. Description Type of processor It has a simplified set of instructions. Emphasis is on the hardware rather CISC than the software. It makes extensive use of general RISC purpose registers. Many instruction formats are available. [4] (b) In a RISC processor, instructions are processed using pipelining. (i) Explain what is meant by pipelining. ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... .......................................................................................................................................[2] (ii) The following table shows the five stages that occur when instructions are fetched and executed. The table also shows a number of time intervals. Two instructions, D followed by E, are fetched and executed. The ‘E’ in the incomplete table shows that instruction E has been fetched in time interval 2. Complete each row of the table. Time interval Stage 1 2 3 4 5 6 7 8 Fetch instruction E Read registers and decode instruction Execute instruction Access operand in memory Write result to register [3] (c) The instruction set for a RISC processor that allows pipelining includes the following instruction. Instruction Explanation Op code Operands Add the integers in registers op1 and op2. ADD <dest>, <op1>, <op2> Place the result in register dest. A program contains the following three instructions. ADD r3, r2, r1 ADD r5, r4, r3 ADD r10, r9, r8 (i) Explain why pipelining fails for the first two instructions. ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... .......................................................................................................................................[2] (ii) The instructions were produced by a compiler after translation of a high-level language program. The compiler is not capable of code optimisation. State how the code from the compiler could have been optimised to overcome the problem in part (c)(i). ........................................................................................................................................... .......................................................................................................................................[1]

Mark scheme: 2(a) Description Type of processor 4 It has a simplified set of instructions. CISC Emphasis is on the hardware rather than the software. It makes extensive use of general RISC purpose registers. Many instruction formats are available. 1 mark for each correct line 2(b)(i) One mark per point – max 2 2 • Pipelining is instruction level parallelism • Execution (A: processing) of an instruction is split into a number of stages • When first stage for an instruction is completed the first stage of the next instruction can start executing • Another instruction can start executing before the previous one is finished • Processing of a number of instructions can be concurrent / simultaneous 2(b)(ii) Time Interval 3 Stage 1 2 3 4 5 6 7 8 Fetch instruction D E Read registers and decode D E instruction Execute instruction D E Access operand in memory D E Write result to register D E D at time interval 1 (1) D and E in second row (in that order) (1) Remainder completed correctly (1) 2(c)(i) Two from: 2 • The result of the first addition is not stored in (register) r3 (1) • Before the next instruction needs to load value from r3 (1) • There is a data dependency issue (1) • r3 is being fetched and stored on the same clock pulse (1) 2(c)(ii) The third instruction is not dependent on the first two, therefore, instruction 2 1 and 3 need to be swapped

Q3 · This diagram shows how applications P, Q and a software development environment can be…

3 (a) This diagram shows how applications P, Q and a software development environment can be run on a virtual machine system. Software Application P Application Q development environment .......A......operating .......A......operating system 1 system 2 Virtual machine software / virtual machine monitor .......B......operating system Hardware (i) State the operating systems labelled A and B in the diagram. A ........................................................................................................................................ B ........................................................................................................................................ [2] (ii) Application P is executing and requests data from a file. Describe what happens after .......A......operating system 1 has received the data request from the application. ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... .......................................................................................................................................[3] (b) A software development company uses virtual machines to produce software. (i) State one benefit to the company. ........................................................................................................................................... .......................................................................................................................................[1] (ii) Explain two limitations of this approach. Limitation 1 ........................................................................................................................ ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... Limitation 2 ........................................................................................................................ ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... [4]

Mark scheme: 3(a)(i) A: Guest (operating system) (1) 2 B: Host (operating system) (1) 3(a)(ii) One mark for each valid point, max 3 3 • Guest OS (A) handles request as if it were running on its own physical machine // guest OS (A) is not aware it is running on a virtual platform • Guest OS (A) handles the request as usual • I/O requests are translated by the virtual machine software • Into instructions executed by host OS (B) • Host OS (B) retrieves the data from the file • Host OS (B) passes the data to the virtual machine software • The virtual machine software passes the data to the guest OS (A) • Guest OS passes the data to the application 3(b)(i) One mark from: 1 • 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 3(b)(ii) Max 2 marks per limitation, max 2 limitations – max 4 marks 4 Virtual machine may not be able to emulate some hardware « So that hardware cannot be tested using a virtual machine « By relevant example, e.g. developing hardware drivers Using virtual machine means execution of extra code // processing time increased « so cannot accurately test speed of real performance A virtual machine might not be as efficient « By relevant example, e.g. might not be able to access sufficient memory

Q4 · The following syntax diagrams for a particular programming language show the syntax of: •…

4 The following syntax diagrams for a particular programming language show the syntax of: • an unsigned number • an unsigned integer • a digit. Unsigned number Digit Unsigned Unsigned 1 integer . integer 2 3 Unsigned integer 4 Digit 5 6 7 8 9 0 (a) (i) Explain why 32 is a valid unsigned integer. ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... .......................................................................................................................................[2] (ii) Explain why 32.5 is a valid unsigned number. ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... .......................................................................................................................................[2] (b) Complete the Backus-Naur Form (BNF) for the syntax diagrams shown. <unsigned_number> ::= ................................................................................................... ................................................................................................................................................... <unsigned_integer> ::= ................................................................................................. ................................................................................................................................................... <digit> ::= ......................................................................................................................... ................................................................................................................................................... [5] The format of an unsigned number is amended to include numbers with possible exponents. If an unsigned number has an exponent, then the exponent part: • will start with an ‘E’ • be followed by an optional ‘+’ or ‘−’ sign • and be completed by an unsigned integer. Examples of unsigned numbers with exponents include: 3E2, 3E+3, 3E−32, 3.45E−2 (c) (i) Redraw the syntax diagram for unsigned number to include numbers that might have exponents. [4] (ii) Use your syntax diagram from part (c)(i) to write the BNF for an unsigned number to include numbers with exponents. <unsigned_number> ::= ............................................................................................ ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... .......................................................................................................................................[4]

Mark scheme: 4(a)(i) Because a valid unsigned integer can be two digits / one or more digits (1) 2 Both 3 and 2 are digits (1) 4(a)(ii) Because a valid unsigned number can be an unsigned integer followed by a 2 decimal point followed by an unsigned integer (1) 32 is an unsigned integer and 5 is an unsigned integer (because it is a digit) and there is a point in between (1) Alternative response for 2 marks, combination of order and validity: 32 is a (valid) unsigned integer, followed by a decimal point, and 5 which is another (valid) unsigned integer Validity mark must refer to 32 and 5 4(b) <unsigned number> ::= 5 <unsigned_integer> | (1) <unsigned_integer>.<unsigned_integer> (1) Accept order reversed: <unsigned_integer> ::= <digit> | (1) <digit> <unsigned_integer> (1) Accept <digit> |<unsigned_integer> <digit> If order reversed mark as above <digit> ::= 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 (1) Accept the list in any order, as long as all 10 digits included

Q5 · Complete the truth table for this NOR gate: A B X 0 0 A 0 1 X B 1 0 1 1 [1] A SR…

5 (a) Complete the truth table for this NOR gate: A B X 0 0 A 0 1 X B 1 0 1 1 [1] A SR flip-flop is constructed using two NOR gates. R Q Q S (b) Complete the truth table for the SR flip-flop: S R Q Q Initially 1 0 1 0 S changed to 0 0 0 R changed to 1 0 1 R changed to 0 0 0 S and R changed to 1 1 1 [4] Another type of flip-flop is the JK flip-flop. The JK flip-flop is an improvement on the SR flip-flop. (c) (i) The JK flip-flop has three inputs. Two of the inputs are the Set (J) and the Reset (K). State the third input. .......................................................................................................................................[1] (ii) There are two problems with the SR flip-flop that the JK flip-flop overcomes. State each problem and state why it does not occur for the JK flip-flop. Problem 1 .......................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... Problem 2 .......................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... [4]

Mark scheme: 5(a) 1 A B X 0 0 1 0 1 0 1 0 0 1 1 0 5(b) 4 S R Q Q Initially 1 0 1 0 S changed to 0 0 0 1 0 (1) R changed to 1 0 1 0 1 (1) R changed to 0 0 0 0 1 (1) S and R changed to 1 1 1 0 0 (1) 5(c)(i) Clock (pulse) 1 5(c)(ii) Max 2 marks per problem – max 4 marks 4 Problem 1 • One combination of S and R gives NOT valid / indeterminate output // Q and Q have the same value • The JK flip-flop does not allow for Q and Q to have the same value for any combination of inputs // Q and Q have to be complementary Problem 2 • Inputs may not arrive at the same time • The JK flip-flop has a clock pulse to synchronise inputs

Q6 · The environment in a very large greenhouse is managed by a computer system

6 The environment in a very large greenhouse is managed by a computer system. The system uses a number of different sensors that include temperature sensors. In addition, the system controls a number of heaters, windows and sprinklers. (a) State one other type of sensor that could be used with this system. Justify your choice. Sensor ...................................................................................................................................... Justification ............................................................................................................................... ................................................................................................................................................... [2] (b) Describe why feedback is important in this system. ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ...............................................................................................................................................[3] (c) (i) The system makes use of a number of parameters. These parameters are used in the code that runs the system. State one of the parameters used in controlling the temperature in the greenhouse. .......................................................................................................................................[1] (ii) Explain how the parameter identified in part (c)(i) is used in the feedback process. ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... .......................................................................................................................................[2] (d) There are eight temperature sensors numbered 1 to 8. Readings from these sensors are stored in four 16-bit memory locations. The memory locations have addresses from 4000 to 4003. Each memory location stores two sensor readings as two unsigned binary integers. Sensor 1 reading is stored in bits 8 to 15 of address 4000; Sensor 2 reading is stored in bits 0 to 7 of address 4000 and so on. The diagram shows that the current sensor 1 reading has a value of 97. 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 4000 0 1 1 0 0 0 0 1 0 0 1 1 1 0 0 1 4001 1 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 4002 0 0 0 1 0 1 0 0 0 0 0 0 1 1 0 1 4003 1 0 0 0 0 0 1 0 1 1 0 0 0 1 0 1 (i) Give the denary value of the current reading for Sensor 5. ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... .......................................................................................................................................[1] (ii) The following table shows part of the instruction set for a processor. The processor has one general purpose register, the Accumulator (ACC). Instruction Explanation Op code Operand LDD <address> Direct addressing. Load the contents of the location at the given address to ACC. 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. XOR <address> Bitwise XOR operation of the contents of ACC with the contents of <address>. 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. LSL #n Bits in ACC are shifted n places to the left. Zeros are introduced on the right hand end. LSR #n Bits in ACC are shifted n places to the right. Zeros are introduced on the left hand end. The reading for Sensor 5 is used in a calculation. The calculation is carried out by two assembly language instructions. The first instruction loads the contents of the 16-bit location that contains the value for Sensor 5. The second instruction moves the bits in Sensor 5 so that the 16-bit value is the value of Sensor 5. Complete the two instructions in the following code. Use the instruction set provided. LDD ............................ // load the contents of the 16-bit location containing the value for Sensor 5 into the Accumulator .................................... // move the bits in the Accumulator so that the Accumulator stores the value of Sensor 5 as an unsigned 16-bit binary integer [3]

Mark scheme: 6(a) One mark for suitable sensor, one mark for justification 2 Max one sensor, max two marks humidity « to ensure that the plants have the right level of moisture in the air pressure / proximity « to detect whether the windows are open or closed condone ‘check’ moisture « to ensure the water levels in the soil are correct light « to ensure the light levels in the greenhouse are correct for plant growth « to ensure the windows are closed when night falls Accept pH sensor for one mark only Accept CO2 sensor for one mark only, accept gas or O2 for one mark only Justification needs to answer the question why? Not just describe the sensor Accept suitable actions resulting from sensor readings as justification 6(b) Three from: 3 • Actions taken by system // or by example: e.g. adjust heater / turn on sprinkler / open windows • May affect the readings taken by the sensors // or by example • Which in turn may cause a change in the actions taken by the system // or by example • This is a continuous process« 6(c)(i) One from: 1 • Lowest allowable temperature • Highest allowable temperature • Sampling time interval 6(c)(ii) If answer to c(i) is highest allowable or lowest allowable temperature: 2 • The sensor reading is compared to a stored parameter (1) • Depending upon result of comparison an action may or may not be carried out (1) If answer to c(i) is sampling time interval: • The higher the sampling rate« (1) • «The better / more efficient is the control system (1) 6(d)(i) 20 1 6(d)(ii) LDD 4002 // load the contents of the 16 bit 3 location containing the value for Sensor 5 into the Accumulator LSR #8 // move the bits in the Accumulator so that the Accumulator stores the value of Sensor 5 as unsigned 16-bit binary integer 1 mark for 4002 1 mark for LSR 1 mark for #8

What you needed in this session

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

A50/75
B44/75
C37/75
D31/75
E25/75