Cambridge A Level Computer Science 9608 — 2020 May/June Paper 3 · Variant 3
9608/33/M/J/20 · 9 questions · 75 marks · ≈84 min
The question paper and its mark scheme, free to read here and free to download. This is Cambridge’s own paper, exactly as it was sat.
Question paper16 pages
















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








Questions as text
Q1 · In a particular computer system, real numbers are stored using floating-point…
1 In a particular computer system, real numbers are stored using floating-point representation with: • 10 bits for the mantissa • 6 bits for the exponent • two’s complement form for both mantissa and exponent. (a) Calculate the normalised floating-point representation of +192.5 in this system. Show your working. Mantissa Exponent Working ..................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ............................................................................................................................................. [3] (b) Calculate the normalised floating-point representation of –192.5 in this system. Show your working. Mantissa Exponent Working ..................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ............................................................................................................................................. [3] (c) The floating-point representation has changed. There are now 12 bits for the mantissa and 4 bits for the exponent as shown. Mantissa Exponent Explain why +192.5 cannot be accurately represented in this format. ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ............................................................................................................................................. [3]
Mark scheme: Question Answer Marks 1(a) = (0)11000000.1 (conversion to binary) [1] 3 = 0.110000001 × 28 (evidence of shifting binary point appropriately) [1] = 0110000001 001000 (stored as mantissa and exponent) [1] 1(b) 1001111110 (one’s complement of 10 bit mantissa) [1] 3 1001111111 (two’s complement of 10 bit mantissa) [1] 1001111111 001000 (stored as mantissa and exponent) [1] 1(c) Any three from: 3 • Exponent too large to fit in 4 bits as a two’s complement number • Exponent will turn negative/−8 • … therefore, point moves the wrong way • Value will be approx. +0.0029(296875)
Q2 · The diagram shows four files and three methods of file organisation
2 The diagram shows four files and three methods of file organisation. Draw one line to match each file with its most appropriate method of file organisation. File File organisation Text file Sequential File for recording the temperature every hour Random Master file for paying each employee every month Serial Customer user name and password file [4]
Mark scheme: 2 One mark for each correct line drawn 4
Q3 · A mobile phone company uses circuit switching for voice calls and packet switching to…
3 A mobile phone company uses circuit switching for voice calls and packet switching to send and receive other data. (a) (i) Describe circuit switching. ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... ..................................................................................................................................... [3] (ii) Explain why the company uses circuit switching for voice calls. ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... ..................................................................................................................................... [2] (b) (i) Describe packet switching. ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... ..................................................................................................................................... [3] (ii) Explain why the company uses packet switching to send and receive other data. ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... ..................................................................................................................................... [2]
Mark scheme: 3(a)(i) Any three from: 3 • A circuit is established at the start of the communication • Between sender and receiver • This lasts for the duration of the call/data transfer • Then the links that make up the circuit are removed 3(a)(ii) Any two from: 2 • A dedicated channel // Not sharing channel • …can use all bandwidth • Two-way real time conversation • No delay as no switching • Data arrives in order it is sent 3(b)(i) Any three from: 3 • A circuit does not have to be established at the start of the communication • The data to be sent is divided into packets • That can travel along different routes • From node to node • Packets are reassembled in the correct order at the receiver’s end • Must wait until the last packet is received to put the data back together 3(b)(ii) Any two from: 2 • Communication is asynchronous • Allows for error checking • Real time transmission is not required • Smaller amounts of data are sent (than voice calls) therefore dedicated line/higher bandwidth not required // can share the bandwidth • Doesn’t matter if data arrives out of order
Q4 · Write the Boolean algebraic expressions for the following logic circuit
4 (a) Write the Boolean algebraic expressions for the following logic circuit. P X Q R Y X = ............................................................................................................................................ ................................................................................................................................................... Y = ............................................................................................................................................ ................................................................................................................................................... [5] (b) The logic circuit given in part (a) is a full adder. (i) Give the purpose of outputs X and Y in this circuit. X ........................................................................................................................................ Y ........................................................................................................................................ [2] (ii) Give the use of the input R in this circuit. ..................................................................................................................................... [1]
Mark scheme: 4(a) X = ((P XOR Q) XOR R) 5 Y = ((P XOR Q) AND R) OR (P AND Q) or + X = ( P.Q + P.Q ).R ( P.Q + P.Q ) .R + P.Q Y = ( P.Q + P.Q ) .R One mark for correct use of XOR One mark for correct use of AND One mark for correct use of OR One mark for X correct One mark for Y correct 4(b)(i) X: Sum 2 Y: Carry (out) 4(b)(ii) Carry (in) 1
Q5 · Complete these three statements about computer processors
5 Complete these three statements about computer processors. A processor with a few simple fixed-length instructions that have a small number of instruction formats is called a ............................................................................................. processor. A processor with many complex variable-length instructions that has many instruction formats is called a ............................................................................................. processor. Instruction-level parallelism, applied to the execution of instructions during the fetch-execute cycle, is called ............................................................................................. . [3]
Mark scheme: 5 • RISC / reduced instruction set computer 3 • CISC / complex instruction set computer • Pipelining
Q6 · Duraid writes a short program in a high-level programming language
6 Duraid writes a short program in a high-level programming language. An interpreter executes the program. The following is part of Duraid’s program. DECLARE P, Q, R, X, Y : INTEGER CONSTANT M = 10 P = 4 Q = 2 R = 1 X = (P + Q) * (P – Q) Y = (M / Q) * (P + Q - R) (a) Write the Reverse Polish Notation (RPN) for the following expression from Duraid’s program. (P + Q) * (P – Q) ............................................................................................................................................. [2] (b) The interpreter is executing Duraid’s program. The expressions are in infix form. The interpreter converts the infix to RPN. The RPN expression for Y is: M Q / P Q + R − * The interpreter evaluates this RPN expression using a stack. (i) Show the changing contents of the stack, as the interpreter evaluates the expression for Y. Use the values of the variables and constant given in the program. The first entry has been done for you. 10 [4] (ii) Convert the following RPN expression back to its infix form. P Q + M * R P − − ........................................................................................................................................... ..................................................................................................................................... [2] (c) Explain how RPN is used by an interpreter to evaluate expressions. ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ............................................................................................................................................. [2]
Mark scheme: 6(a) P Q + P Q - * 2 One mark for P Q + One mark for P Q - * 6(b)(i) 4 One mark for each correct stack after a calculation 6(b)(ii) ((P + Q) * M) – (R – P) 2 One mark for ((P + Q) * M) One mark for – (R – P) 6(c) Any two from: 2 • Expressions are always evaluated left to right • Each operator uses the two previous values on the stack (except unary minus) • Description of pushing and popping on a stack
Q7 · A computer at a remote weather station is performing three tasks: • measuring and…
7 A computer at a remote weather station is performing three tasks: • measuring and recording the temperature every 10 seconds • measuring and recording the wind speed every 10 seconds • sending the previous day’s temperature and wind speed readings to a scientist at another location via the Internet. The operating system is managing the multitasking of these tasks. (a) At one point in time: • the temperature measuring and recording task is idle • the wind speed is being recorded • the task to send the previous day’s temperature and wind speed readings is waiting for an internet connection. Identify the process state for each task. Give a reason why each task is in that process state. Temperature measuring and recording process state .............................................................. Reason ..................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... Wind speed measuring and recording process state ............................................................... Reason ..................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... Sending process state .............................................................................................................. Reason ..................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... [6] (b) The weather station computer uses an operating system. Explain how this operating system uses interrupts to schedule the measuring and recording tasks. ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ............................................................................................................................................. [4]
Mark scheme: 7(a) For each task: 6 One mark for correct state One mark for suitable reason • Temperature: ready • Reason: waiting for the 10 seconds to be finished • Windspeed: running • Reason: it is currently recording the windspeed • Sending: blocked • Reason: it is waiting for the internet connection 7(b) Any four from: 4 • Uses a timer // uses two timers • Each timer is continually checked to see if 10 seconds has passed • …if it has, an interrupt is sent to the OS • …OS checks interrupt status • …and may pass control to the interrupt handling routine • (If 10 seconds has passed) then the ISR switches process state to running/ready • When finished it passes control back to OS • The timer is restarted
Q8 · Martha wants to send a private message to Joshua over the Internet
8 Martha wants to send a private message to Joshua over the Internet. (a) Martha and Joshua’s computers have already exchanged digital certificates. Identify three items that could be contained in a digital certificate. 1 ................................................................................................................................................ ................................................................................................................................................... 2 ................................................................................................................................................ ................................................................................................................................................... 3 ................................................................................................................................................ ................................................................................................................................................... [3] (b) Joshua and Martha’s digital certificates are used to ensure that Martha’s message has not been altered during transmission. Explain how asymmetric encryption uses the contents of the digital certificates to ensure that the message has not been altered during transmission. ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ............................................................................................................................................. [6]
Mark scheme: 8(a) Any three from: 3 • a hashing algorithm • a public key • serial number • dates valid 8(b) Any six from: 6 • Martha’s message is encrypted using Joshua’s public key (provided by Joshua’s digital certificate). • Martha’s hashing algorithm is used on the message to produce the message digest. • The message digest is then encrypted with Martha’s private key to provide a digital signature. • Both the encrypted message and the digital signature are sent. • The message is decrypted with Joshua’s private key. • Martha’s digital signature is decrypted with Martha’s public key (provided by the Martha’s digital certificate) to obtain the message digest. • Martha’s hashing algorithm (provided by the Martha’s digital certificate) recreates the message digest from the decrypted message. • The two message digests are compared, if they are the same then the message should be authentic/has not been tampered.
Q9 · A train cannot move if any of the eight automatic train doors are open
9 A train cannot move if any of the eight automatic train doors are open. The train door monitoring system, set out below, checks that all the doors are closed before the train can move. • If a monitoring system detects that a door is open, it sets a specific bit in address 500 to 1. • If the bit for door one is equal to 1, the binary value for hexadecimal FF is sent to address 501. The contents of address 501 are changed to make door 1’s light flash when the door is open. • If the bit for door two is equal to 1, the binary value for hexadecimal FF is sent to address 502. The contents of address 502 are changed to make door 2’s light flash when the door is open. This is repeated for each door from 3 to 8. • Each door sets its bit in address 500 to zero when the door closes, and the contents of the corresponding door address are set to zero. • The train manager can identify which door is open from the flashing light. The current contents of address 500 are: Door number 1 2 3 4 5 6 7 8 Address 500 1 0 0 1 0 0 1 0 (a) Complete the following table by writing the values stored in addresses 503 to 508. Use the contents of address 500 shown above. Note that addresses 501 and 502 are complete. 501 1 1 1 1 1 1 1 1 Door 1 502 0 0 0 0 0 0 0 0 Door 2 503 Door 3 504 Door 4 505 Door 5 506 Door 6 507 Door 7 508 Door 8 [2] (b) The following table shows assembly language instructions for the processor controlling the train door monitoring system that has one general purpose register, the Accumulator (ACC). Instruction Explanation Label Op code Operand LDM &n Load the hexadecimal number n to ACC Load the contents of the location at the given address LDD <address> to ACC STO <address> Store the contents of ACC at the given address Bitwise AND the contents of ACC with the hexadecimal AND &n number n Compare the contents of ACC with the hexadecimal CMP &n number n Following a compare instruction, jump to <address> or JPE <address> <label> if the compare was True <label>: <op code> <operand> Labels an instruction Macro to wait one second before the next instruction is WAIT executed After rechecking the doors, address 500 now contains 10101010. (i) Complete the table by writing the values of the Accumulator (ACC) and the contents of address 501 as these instructions are executed once to check door 1. Instruction ACC 501 Label Op code Operand CHECK1: LDD 500 AND &80 CMP &00 JPE DOOR1 LDM &FF DOOR1: STO 501 WAIT LDM &00 STO 501 WAIT JMP CHECK1 [4] (ii) Write the assembly language instructions to check door 2. Instruction Label Op code Operand [4] (c) Explain how the check door routines show a flashing light or no light. ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ............................................................................................................................................. [2]
Mark scheme: 9(a) 2 One mark for open doors correct One mark for closed doors correct 9(b)(i) 4 Instruction ACC 501 Label Op code Operand CHECK1: LDD 500 &AA AND &80 &80 CMP &00 JPE DOOR1 LDM &FF &FF DOOR1: STO 501 &FF WAIT LDM &00 &00 STO 501 &00 WAIT JMP CHECK1 Two marks for all values of ACC correct Or One mark for 3 values of ACC correct Two marks for both values of 501 correct Or One mark for one value of 501 correct 9(b)(ii) 4 Instruction Label Op code Operand CHECK2: LDD 500 AND &40 CMP &00 JPE DOOR2 LDM &FF DOOR2: STO 502 WAIT LDM &00 STO 502 WAIT JMP CHECK2 One mark for correct LDM values One mark for correct AND value One mark for correct labels and jumps One mark for fully correct code 9(c) • Either the value in 500 is always zero which means the light is off 2 • Or it alternates between zero (light off) and 1 (light on) every second