Cambridge A Level Computer Science 9608 — 2016 Oct/Nov Paper 3 · Variant 1
9608/31/O/N/16 · 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 paper12 pages












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







Paper as text
Question paper, page 1
This document consists of 11 printed pages and 1 blank page. DC (NF/AR) 116626/4 © UCLES 2016 [Turn over Cambridge International Examinations Cambridge International Advanced Level * 2 1 5 5 3 9 6 6 5 3 * COMPUTER SCIENCE 9608/31 Paper 3 Advanced Theory October/November 2016 1 hour 30 minutes Candidates answer on the Question Paper. No Additional Materials are required. No calculators allowed. READ THESE INSTRUCTIONS FIRST Write your Centre number, candidate number and name in the spaces at the top of this page. Write in dark blue or black pen. You may use an HB pencil for any diagrams, graphs or rough working. Do not use staples, paper clips, glue or correction fluid. DO NOT WRITE IN ANY BARCODES. Answer all questions. No marks will be awarded for using brand names of software packages or hardware. At the end of the examination, fasten all your work securely together. The number of marks is given in brackets [ ] at the end of each question or part question. The maximum number of marks is 75.
Question paper, page 2
2 9608/31/O/N/16 © UCLES 2016 1 In a particular computer system, real numbers are stored using floating-point representation with: • 12 bits for the mantissa • 4 bits for the exponent • two’s complement form for both mantissa and exponent (a) Calculate the floating-point representation of + 2.5 in this system. Show your working. Mantissa Exponent • … … … … … … [3] (b) Calculate the floating-point representation of − 2.5 in this system. Show your working. Mantissa Exponent • … … … … … … [3]
Question paper, page 3
3 9608/31/O/N/16 © UCLES 2016 [Turn over (c) Find the denary value for the following binary floating-point number. Show your working. Mantissa Exponent 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 1 • … … … … … … [3] (d) (i) State whether the floating-point number given in part (c) is normalised or not normalised. … [1] (ii) Justify your answer given in part (d)(i). … … [1] (e) The system changes so that it now allocates 8 bits to both the mantissa and the exponent. State two effects this has on the numbers that can be represented. 1 … … 2 … … [2]
Question paper, page 4
4 9608/31/O/N/16 © UCLES 2016 2 There are four stages in the compilation of a program written in a high-level language. (a) Four statements and four compilation stages are shown below. Draw a line to link each statement to the correct compilation stage. Statement Compilation stage This stage removes any comments in the program source code. Lexical analysis This stage could be ignored. Syntax analysis This stage checks the grammar of the program source code. Code generation This stage produces a tokenised version of the program source code. Optimisation [4] (b) Write the Reverse Polish Notation (RPN) for the following expressions. (i) (A + B) * (C − D) … [2] (ii) − A / B * 4 / (C − D) … [3]
Question paper, page 5
5 9608/31/O/N/16 © UCLES 2016 [Turn over (c) An interpreter is executing a program. The program uses the variables w, x, y and z. The program contains an expression written in infix form. The interpreter converts the infix expression to RPN. The RPN expression is: x w z + y − * The interpreter evaluates this RPN expression using a stack. The current values of the variables are: w = 1 x = 2 y = 3 z = 4 (i) Show the changing contents of the stack as the interpreter evaluates the expression. The first entry on the stack has been done for you. 2 [4] (ii) Convert back to its original infix form, the RPN expression: x w z + y − * … … [2] (iii) Explain one advantage of using RPN for the evaluation of an expression. … … … … [2]
Question paper, page 6
6 9608/31/O/N/16 © UCLES 2016 3 A computer operating system (OS) uses paging for memory management. In paging: • main memory is divided into equal-size blocks, called page frames • each process that is executed is divided into blocks of the same size, called pages • each process has a page table that is used to manage the pages of this process The following table is the incomplete page table for a process X. Page Presence flag Page frame address Additional data 1 1 132 2 1 245 3 1 232 4 0 0 5 1 542 6 0 0 135 0 0 When a particular page of the process is currently in main memory, the Presence flag entry in the page table is set to 1. If the page is not currently present in memory, the Presence flag is set to 0. (a) The page frame address entry for Page 2 is 245. State what the value 245 could represent. … [1] (b) Process X executes until the next instruction is the first instruction in Page 4. Page 4 is not currently in main memory. State a hardware device that could be storing this page. … [1]
Question paper, page 7
7 9608/31/O/N/16 © UCLES 2016 [Turn over (c) When an instruction to be accessed is not present in main memory, its page must be loaded into a page frame. If all page frames are currently in use, the contents of a page frame will be overwritten with this new page. The page that is to be replaced is determined by a page replacement algorithm. One possible algorithm is to replace the page that has been resident in main memory for the longest time. (i) Give the additional data that would need to be stored in the page table. … … [1] (ii) Complete the table entries below to show what happens when Page 4 is swapped into main memory. Assume that Page 5 is the one to be replaced. In the final column, give an example of the data you have identified in part (c)(i). Page Presence flag Page frame address Additional data 4 … … … [3] An alternative algorithm is to replace the page that has been used least. (iii) Give the different additional data that the page table would now need to store. … … [1] (iv) In the following table, complete the missing data to show what happens when Page 3 is swapped into main memory. Assume that Page 1 is the one to be replaced. In the final column, give an example of the data you have identified in part (c)(iii). Page Presence flag Page frame address Additional data 3 … … … [3]
Question paper, page 8
8 9608/31/O/N/16 © UCLES 2016 (d) Explain why the algorithms given in part (c) may not be the best choice for efficient memory management. Longest resident … … … … Least used … … … … [4] 4 (a) (i) Complete the truth table for this logic circuit. X Y A B Input Output X Y A B 0 0 0 1 1 0 1 1 [2] (ii) State the name given to this logic circuit. … [1] (iii) Name the labels usually given to A and B. Label A … Label B … Explain why your answers are more appropriate for the A and B labels. … … … … [4]
Question paper, page 9
9 9608/31/O/N/16 © UCLES 2016 [Turn over (b) (i) Write the Boolean expression corresponding to the following logic circuit: X A B C … [2] (ii) Use Boolean algebra to simplify the expression that you gave in part (b)(i). Show your working. … … … … … … [3]
Question paper, page 10
10 9608/31/O/N/16 © UCLES 2016 5 The TCP/IP protocol suite can be viewed as a stack with four layers. (a) (i) Complete the stack by inserting the names of the three missing layers. Transport [3] (ii) State how each layer of the stack is implemented. … [1] (b) A computer is currently running two processes: • Process 1 is downloading a web page. • Process 2 is downloading an email. (i) Describe two tasks that the Transport layer performs to ensure that the incoming data is downloaded correctly. 1 … … … … 2 … … … … [4] (ii) Name a protocol that will be used by Process 1. … [1] (iii) Name a protocol that will be used by Process 2. … [1]
Question paper, page 11
11 9608/31/O/N/16 © UCLES 2016 6 (a) The table below gives descriptions of three types of malware. Description Term Malware that attaches itself to another program. Malware that redirects the web browser to a fake website. Email that encourages the receiver to access a website and give their banking details. Complete the table by adding the correct terms. [3] (b) Ben wants to send a highly confidential email to Mariah so that only she can read it. Plain text and cipher text will be used in this communication. (i) Explain the terms plain text and cipher text. Plain text … … Cipher text … … [2] (ii) Explain how the use of asymmetric key cryptography ensures that only Mariah can read the email. … … … … … … … … [4]
Question paper, page 12
12 9608/31/O/N/16 © UCLES 2016 BLANK PAGE Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the publisher will be pleased to make amends at the earliest possible opportunity. To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge International Examinations Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download at www.cie.org.uk after the live examination series. Cambridge International Examinations is part of the Cambridge Assessment Group. Cambridge Assessment is the brand name of University of Cambridge Local Examinations Syndicate (UCLES), which is itself a department of the University of Cambridge.
Mark scheme, page 1
® IGCSE is the registered trademark of Cambridge International Examinations. This document consists of 7 printed pages. © UCLES 2016 [Turn over Cambridge International Examinations Cambridge International Advanced Level COMPUTER SCIENCE 9608/31 Paper 3 Written Paper October/November 2016 MARK SCHEME Maximum Mark: 75 Published This mark scheme is published as an aid to teachers and candidates, to indicate the requirements of the examination. It shows the basis on which Examiners were instructed to award marks. It does not indicate the details of the discussions that took place at an Examiners’ meeting before marking began, which would have considered the acceptability of alternative answers. Mark schemes should be read in conjunction with the question paper and the Principal Examiner Report for Teachers. Cambridge will not enter into discussions about these mark schemes. Cambridge is publishing the mark schemes for the October/November 2016 series for most Cambridge IGCSE®, Cambridge International A and AS Level components and some Cambridge O Level components.
Mark scheme, page 2
Page 2 Mark Scheme Syllabus Paper Cambridge International A Level – October/November 2016 9608 31 © UCLES 2016 1 (a) +2.5 = 010100000000 0010 [3] Give full marks for correct answer (normalised or not normalised) = 10.1 [1] = 0.101 × 22 // evidence of shifting binary point appropriately [1] [Max 3] (b) –2.5 101100000000 0010 Give full marks for correct answer One’s complement of 12-bit mantissa of +2.5 101011111111 – allow f.t. [1] +1 to get two’s complement 101100000000 [1] [Max 3] (c) 3 [3] Give full marks for correct answer = 0.011 X 23 // exponent is 3 [1] = 11.0 // (1/4+1/8) * 8 [1] [Max 3] (d) (i) Not normalised [1] (ii) First two bits should be different for normalised number // because the number starts with 00 [1] (e) reduced accuracy [1] increased range [1]
Mark scheme, page 3
Page 3 Mark Scheme Syllabus Paper Cambridge International A Level – October/November 2016 9608 31 © UCLES 2016 2 (a) Statement Compilation stage 1 mark for each correct line This stage removes any comments in the program code Lexical analysis This stage could be ignored Syntax analysis This stage checks the grammar of the program code Code generation This stage produces a tokenised version of the program code Optimisation [4] (b) (i) A B + [1] C D – * [1] (ii) A – [1] B / 4 * [1] C D – / [1] (c) (i) 1 mark per ring 4 3 1 1 5 5 2 2 2 2 2 2 2 4 + – * [4] (ii) x * [1] (w + z – y) [1] Order must be correct for both parts (iii) No need for rules of precedence [1] No need for brackets [1] In RPN evaluation of operators is always left to right [1] [Max 2]
Mark scheme, page 4
Page 4 Mark Scheme Syllabus Paper Cambridge International A Level – October/November 2016 9608 31 © UCLES 2016 3 (a) The 245th page frame from the start of memory // the 245th page frame from some base address [1] (b) Flash memory // magnetic disk // hard drive [1] (c) (i) Time of entry (NOT time in memory) [1] (ii) Page Presence Flag Page frame address Additional data 4 1 542 12:07:34:49 [1 +1 + 1] (iii) Number of times the page has been accessed [1] (iv) Page Presence Flag Page frame address Additional data 3 1 132 0 [1 +1 + 1] Accept only zero for ‘additional data’ (d) For example: Longest resident: page in for lengthy period of time may be being accessed often [1] … so not a good candidate for being removed [1] Least used: a page just entered has a low least used value … [1] so likely to be a candidate for immediately being swapped out [1]
Mark scheme, page 5
Page 5 Mark Scheme Syllabus Paper Cambridge International A Level – October/November 2016 9608 31 © UCLES 2016 4 (a) (i) [2] (ii) Half adder [1] (iii) C // Carry [1] S // Sum [1] represents the carry part of the addition of two bits [1] represents the sum part of the addition of two bits [1] (b) (i) A. [1] (A.B + C) [1] (ii) Allow follow through from (b)(i) A.(A.B+C) = A.A.B + A.C = A.B +A.C = A.(B+C) 1 mark for each correct simplification line – max 2 [2] 1 mark for A.(B+C) if correct answer to part (b)(i) [1] Input Output 1 mark for each correct column (A and B) X Y A B 0 0 0 0 0 1 0 1 1 0 0 1 1 1 1 0
Mark scheme, page 6
Page 6 Mark Scheme Syllabus Paper Cambridge International A Level – October/November 2016 9608 31 © UCLES 2016 5 (a) (i) Application [1] Transport Internet [1] Network / Link [1] (ii) software / module / program / code [1] (b) (i) For example: check packet port … [1] to identify the application type [1] check packet destination socket … [1] so that packet sent to correct application [1] check incoming packet sequence number … [1] to ensure data is reassembled in correct order [1] recalculate checksum of packet … [1] to ensure integrity of packet [1] if packet checksum invalid … [1] send message to have packet retransmitted [1] [Max 2 tasks] [Max 4] (ii) HTTP / HTTPS [1] (iii) POP3 [1]
Mark scheme, page 7
Page 7 Mark Scheme Syllabus Paper Cambridge International A Level – October/November 2016 9608 31 © UCLES 2016 6 (a) Description Term Malware which attaches itself to another program. VIRUS [1] Malware designed to redirect the web browser to a fake website. PHARMING [1] Email that encourages the receiver to access a website and give their banking details. PHISHING [1] (b) (i) Plain text is the original text [1] Cipher text is the encrypted version of the plain text [1] (ii) Asymmetric keys means that the key used to encrypt (public key) is different from the key used to decrypt (private key) [1] Ben acquires Mariah’s public key [1] Ben encrypts email … [1] using Mariah’s public key [1] Ben sends encrypted email to Mariah [1] Mariah decrypts email … [1] Using her private key [1] [Max 4]
What you needed in this session
Cambridge’s own grade thresholds for 2016 Oct/Nov, Paper 3 · Variant 1. A higher threshold means an easier paper — the bar moves with how the cohort did.