A Level Computer Science 9618 Paper 31, May/June 2023

Question paper and mark scheme75 marks12 questions

Solve it on ExamPal

Practise

Untimed. Write on the paper and check as you go.

Start

Exam

Timed, with a clock you set, like sitting the real paper.

Start

Opens full screen.

Papers open in

Opening the question paper

Read as textThe questions and the mark scheme as plain text. Easier to read on a phone.

Question paper

9618/31 · May/June 2023

Download PDF
1

Numbers are stored in two different computer systems by using floating-point representation. System 1 uses: • 10 bits for the mantissa • 6 bits for the exponent • two’s complement form for both the mantissa and the exponent. System 2 uses: • 8 bits for the mantissa • 8 bits for the exponent • two’s complement form for both the mantissa and the exponent.

a

Calculate the normalised floating-point representation of 113.75 and show how it would be represented in each of these two systems. Show your working. System 1 Mantissa Exponent System 2 Mantissa Exponent Working

[4]
b

Explain the problem that occurred in part (a) when representing the number in system 2.

[2]
2
a

Draw one line from each machine learning category to its most appropriate description. Machine learning category: Supervised learning Reinforcement learning Deep learning Unsupervised learning Description: simulates the data-processing capabilities of the human brain to make decisions enables learning by mapping an input to an output based on example input–output pairs enables information related to errors produced by the neural network to be transmitted enables learning in an interactive environment by trial and error using its own experiences enables learning by allowing the process to discover patterns on its own that were previously undetected

[4]
b

Describe the purpose of both the A* algorithm and Dijkstra’s algorithm.

[2]
3
a

A hashing algorithm is used to calculate storage locations for records in a random access file. It calculates hash values by using the function modulus 3. The function modulus gives the remainder after integer division. For example, 1030 modulus 3 = 1. Therefore, the record key 1030 gives a hash value of 1. Complete the table to show the remaining hash values.

Record keyHash value
10301
1050
1025
[2]
b

Describe what happens, in relation to the storage or retrieval of a record in the file, when the calculated hash value is a duplicate of a previously calculated hash value for a different record key.

[4]
4

Two descriptions of user-defined data types are given. Give appropriate type declaration statements for each, including appropriate names.

a

A data type to hold a set of prime numbers below 20. These prime numbers are: 2, 3, 5, 7, 11, 13, 17, 19

[2]
b

A data type to point to a day in the week, for example Monday.

[2]
5
a

State, with a reason, where it would be appropriate to use circuit switching.

[2]
b

Give two benefits and two drawbacks of circuit switching. Benefit 1 Benefit 2 Drawback 1 Drawback 2

[4]
6

Several syntax diagrams are shown.

Figure 1 of 7 for question 6
Figure 2 of 7 for question 6
Figure 3 of 7 for question 6
Figure 4 of 7 for question 6
Figure 5 of 7 for question 6
Figure 6 of 7 for question 6
Figure 7 of 7 for question 6
a

State whether each of the following passwords is valid or invalid and give a reason for your choice. DPAD99$ Reason DAD#95 Reason ADY123? Reason

[3]
b

Complete the Backus-Naur Form (BNF) for the syntax diagrams shown. <symbol> ::= <letter> ::=

[1]
c

An identifier begins with one or more letters, followed by zero digits or one digit or more digits. Valid letters and digits are shown in the syntax diagrams on page 6. Draw a syntax diagram for an identifier.

[4]
7
Figure 1 of 1 for question 7
a

Complete the Karnaugh map (K-map) for the following Boolean expression. Z=Aˉ.Bˉ.Cˉ.Dˉ+Aˉ.Bˉ.Cˉ.D+Aˉ.B.Cˉ.Dˉ+Aˉ.B.Cˉ.D+A.B.Cˉ.Dˉ+A.B.Cˉ.D

[2]
b

Draw loop(s) around appropriate group(s) in the K-map to produce an optimal sum-of-products.

[2]
c

Write the Boolean logic expression from your answer to part (b) as a simplified sum-of-products. Z =

[2]
d

Use Boolean algebra to give your answer to part (c) in its simplest form. Z =

[1]
8

Outline the characteristics of massively parallel computers.

[3]
9
a

Encryption is used to alter data into a form that makes it meaningless if intercepted. Describe the purpose of asymmetric key cryptography.

[2]
b

Identify two benefits and two drawbacks of quantum cryptography. Benefit 1 Benefit 2 Drawback 1 Drawback 2

[4]
10

The pseudocode algorithm shown copies an active accounts text file ActiveFile.txt to an archive accounts text file ArchiveFile.txt, one line at a time. Any blank lines found in the active accounts text file are replaced with the words "Account not present" in the archive accounts text file. Complete this file-handling pseudocode. DECLARE Account : STRING .......................................................................................................................................................... OPENFILE "ArchiveFile.txt" FOR WRITE WHILE NOT ...................................................................................................................................... READFILE "ActiveFile.txt", Account IF Account = "" THEN WRITEFILE "ArchiveFile.txt", " .........................................................................." ELSE WRITEFILE "ArchiveFile.txt", ............................................................................... ENDIF ENDWHILE .......................................................................................................................................................... CLOSEFILE "ArchiveFile.txt"

[5]
11

Pseudocode is to be written to implement a queue Abstract Data Type (ADT) with items of the string data type. This will be implemented using the information in the table.

IdentifierData typeDescription
FrontPointerINTEGERpoints to the start of the queue
RearPointerINTEGERpoints to the end of the queue
LengthINTEGERthe current size of the queue
QueueSTRING1D array to implement the queue

A constant, with identifier MaxSize, limits the size of the queue to 60 items.

a

Write the pseudocode to declare MaxSize, FrontPointer, RearPointer, Length and Queue.

[3]
b

Complete the following pseudocode for the function Dequeue to remove the front item from the queue. FUNCTION Dequeue RETURNS STRING DECLARE Item : STRING ......................................................................................................................... > 0 THEN Item ← ....................................................................................................................... ...................................................................................................................................... IF Length = 0 THEN CALL Initialise // reset the pointers ELSE IF FrontPointer > MaxSize THEN ....................................................................................................................... ← 1 ENDIF ENDIF ELSE OUTPUT "The print queue was empty – error!" Item ← "" ENDIF RETURN Item ENDFUNCTION

[4]
c

Explain how a new element can be added to the queue if it is implemented using two stacks.

[4]
12
a

Describe what is meant by recursion.

[2]
b

A Fibonacci sequence is a series of numbers formed by adding together the two preceding numbers, for example: 0, 1, 1, 2, … This function calculates and returns values in the Fibonacci sequence and uses recursion. FUNCTION Fib(Number : INTEGER) RETURNS INTEGER IF Number <= 1 THEN Result ← Number ELSE Result ← Fib(Number – 1) + Fib(Number – 2) ENDIF RETURN Result ENDFUNCTION Complete the trace table for the function when it is called as Fib(5).

Call numberFunction callNumberResultReturn value
5
[5]

Mark scheme

9618/31 · May/June 2023

Download PDF

1a · 4 marks

  • 1 mark

    conversion of 113.75 to binary seen 1110001.11

  • 1 mark

    exponent for normalisation 7 converted to binary 111 // evidence of binary point moved 7 places // evidence of finding exponent = 7

  • 1 mark

    system 1 answer (Mantissa: 0 1 1 1 0 0 0 1 1 1, Exponent: 0 0 0 1 1 1)

  • 1 mark

    system 2 answer showing correct version from system 1 (Mantissa: 0 1 1 1 0 0 0 1, Exponent: 0 0 0 0 0 1 1 1)

1b · 2 marks

  • 1 mark

    the mantissa in system 2 does not have enough bits to store the whole binary number // 10 bits required and only 8 bits available

  • 1 mark

    so precision is lost / the number is truncated

2a · 4 marks

  • 1 mark

    Supervised learning connected to 'enables learning by mapping an input to an output based on example input-output pairs'

  • 1 mark

    Reinforcement learning connected to 'enables learning in an interactive environment by trial and error using its own experiences'

  • 1 mark

    Deep learning connected to 'simulates the data processing capabilities of the human brain to make decisions'

  • 1 mark

    Unsupervised learning connected to 'enables learning by allowing the process to discover patterns on its own that were previously undetected'

2b · 2 marks

  • 1 mark

    to find the optimal / shortest / most cost-effective route

  • 1 mark

    … between two nodes in a // … based on distance / cost / time.

3a · 2 marks

  • 1 mark

    1030: 1

  • 1 mark

    1050: 0 and 1025: 2

3b · 4 marks

  • 1 mark

    MP1 A collision occurs when the record key doesn't match the stored record key // MP2 … this means the determined storage location has already been used for another record.

  • 1 mark

    MP3 Search the file linearly // MP4 … to find the next available storage space (closed hash)

  • 1 mark

    MP5 Search the overflow area linearly // MP6 … to find next available storage space (open hash)

  • 1 mark

    MP7 … search the overflow area linearly (open hash) until the matching record key is found // MP8 … search linearly from where you are (closed hash) until the matching record key is found // MP9 If not found record is not in file

4a · 2 marks

  • 1 mark

    TYPE Prime

  • 1 mark

    = (2, 3, 5, 7, 11, 13, 17, 19)

4b · 2 marks

  • 1 mark

    TYPE TDayPointer

  • 1 mark

    = ^STRING //^DayOfWeek

5a · 2 marks

  • 1 mark

    Circuit switching is used where a dedicated path needs to be sustained throughout the call / communication // where the whole bandwidth is required // where a real time communication is used.

  • 1 mark

    A typical application is standard voice communications / video streaming / private data networks

5b · 4 marks

  • 1 mark

    Benefit: MP1 Whole of bandwidth is available // MP2 Dedicated communication channel increases the quality of transmission // MP3 Data is transmitted with a fixed data rate // MP4 No waiting time at switches // MP5 Suitable for long continuous communication // MP6 Fast method of data transfer // MP7 Data arrives in the same order as it was sent // MP8 Data can’t get lost // MP9 Data all follows the same path / route // MP10 Better for real-time // MP11 Simple method of data transfer.

  • 1 mark

    Second benefit from MP1–MP11

  • 1 mark

    Drawback: MP1 A dedicated connection makes it impossible to transmit other data even if the channel is free // MP2 Not very flexible // MP3 No alternative route in case of failure // MP4 The time required to establish the physical link between the two stations can be too long // MP5 The need to establish a dedicated path for each connection can have cost implications // MP6 Dedicated channels require the whole bandwidth / bandwidth can’t be shared

  • 1 mark

    Second drawback from MP1–MP6

6a · 3 marks

  • 1 mark

    DPAD99$ – Valid; Reason – 4/multiple letters followed by 2/multiple digits followed by a symbol.

  • 1 mark

    DAD#95 – Invalid; Reason – The symbol comes before the digits – it should be after.

  • 1 mark

    ADY123? – Invalid; Reason – The ? is not a valid symbol.

6b · 1 mark

  • 1 mark

    <symbol> ::= $ | % | & | @ | # <letter> ::= A | D | P | R | Y

6c · 4 marks

  • 1 mark

    begins with a letter

  • 1 mark

    letter can repeat and digit present

  • 1 mark

    digit can repeat or can be bypassed

  • 1 mark

    correct structure – name, boxes and arrows (in and out).

7a · 2 marks

  • 2 marks

    Two marks if no errors present; One mark if one error present

7b · 2 marks

  • 1 mark

    First correct loop (group of 4 covering AB=00,01 and CD=00,01)

  • 1 mark

    Second correct loop (group of 4 covering AB=01,11 and CD=00,01)

7c · 2 marks

  • 1 mark

    Any correct Boolean term

  • 1 mark

    Boolean terms and operator correct and no other terms present

7d · 1 mark

  • 1 mark

    (Z =) C̅ (A̅ + B̅)

8 · 3 marks

  • 1 mark

    MP1 A large number of computer processors / separate computers connected together

  • 1 mark

    MP2 … simultaneously performing a set of coordinated computations // collaborative processing

  • 1 mark

    MP3 network infrastructure // MP4 communicate using a message interface / by sending messages.

9a · 2 marks

  • 1 mark

    MP1 To provide better security // MP2 … by using two different keys / a public key and a private key

  • 1 mark

    MP3 One of the keys is used to encrypt the message // MP4 … the matching key is used to decrypt the message.

9b · 4 marks

  • 1 mark

    Benefit: MP1 Provides security based on laws of physics rather than mathematical algorithms, so more secure. // MP2 To protect the security of data transmitted over fibre optic cables. // MP3 Virtually unhackable. // MP4 The performance of quantum cryptography is continuously improved, making it suitable for most valuable government/industrial secrets. // MP5 Longer keys can be used // MP6 Eavesdropping can be detected

  • 1 mark

    Second benefit from MP1–MP6

  • 1 mark

    Drawback: MP1 Lacks many vital features such as digital signature, certified mail, etc. // MP2 High cost of purchasing / maintaining equipment required. // MP3 Currently only works over relatively short distances. // MP4 Error rates are relatively high as technology is still being developed. // MP5 Polarisation of light can change during transmission. // MP6 Allows criminals and terrorists to hide their communications.

  • 1 mark

    Second drawback from MP1–MP6

10 · 5 marks

  • 1 mark

    OPENFILE "ActiveFile.txt" FOR READ

  • 1 mark

    OPENFILE "ArchiveFile.txt" FOR WRITE

  • 1 mark

    READFILE "ActiveFile.txt", Account

  • 1 mark

    WRITEFILE "ArchiveFile.txt", "Account not present"

  • 1 mark

    CLOSEFILE "ActiveFile.txt" / CLOSEFILE "ArchiveFile.txt"

11a · 3 marks

  • 1 mark

    correctly defined constant (CONSTANT MaxSize = 60)

  • 1 mark

    correctly defined array (DECLARE Queue : ARRAY[1:60] OF STRING // DECLARE Queue : ARRAY[0:59] OF STRING // DECLARE Queue : ARRAY[1:MaxSize] OF STRING // DECLARE Queue : ARRAY[0:MaxSize - 1] OF STRING)

  • 1 mark

    three correctly defined integers (DECLARE FrontPointer : INTEGER, DECLARE RearPointer : INTEGER, DECLARE Length : INTEGER)

11b · 4 marks

  • 1 mark

    Item  Queue[FrontPointer]

  • 1 mark

    FrontPointer  FrontPointer + 1

  • 1 mark

    Length  Length – 1

  • 1 mark

    FrontPointer  1

11c · 4 marks

  • 1 mark

    MP1 (Two stacks are required) so that the second stack can reverse the order of the first stack.

  • 1 mark

    MP2 Stack 1 operates as the queue with the newest elements at the bottom. Stack 2 is empty.

  • 1 mark

    MP3 To add an element, pop all the elements from stack 1 and push onto stack 2.

  • 1 mark

    MP4 Push the new element onto either stack. // MP5 Pop all the elements of stack 2 back onto stack 1.

12a · 2 marks

  • 1 mark

    A process using a function or procedure defined in terms of itself / calls itself.

  • 1 mark

    A recursive process must have a base case (which is a way to return without making a recursive call) // terminating solution // concept of unwinding described // There must (also) be a general case where the recursive call takes place.

12b · 5 marks

  • 1 mark

    Call number column correct

  • 1 mark

    Function call and Number columns correct

  • 1 mark

    Result column down to base case (Winding) rows 1–6 correct

  • 1 mark

    Result column down from base case (Unwinding) rows 7–10 correct

  • 1 mark

    Return value column correct

Questions

  1. 1
    Question 16 marks
    Mark scheme ›
  2. 2
    Question 26 marks
    Mark scheme ›
  3. 3
    Question 36 marks
    Mark scheme ›
  4. 4
    Question 44 marks
    Mark scheme ›
  5. 5
    Question 56 marks
    Mark scheme ›
  6. 6
    Question 68 marks
    Mark scheme ›
  7. 7
    Question 77 marks
    Mark scheme ›
  8. 8
    Question 83 marks
    Mark scheme ›
  9. 9
    Question 96 marks
    Mark scheme ›
  10. 10
    Question 105 marks
    Mark scheme ›
  11. 11
    Question 1111 marks
    Mark scheme ›
  12. 12
    Question 127 marks
    Mark scheme ›

More 9618 papers

Other papers from May/June 2023

Solve it on ExamPalStart