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

Question paper and mark scheme75 marks11 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/32 · May/June 2023

Download PDF
1

Numbers are stored in a computer using floating point representation with: • 10 bits for the mantissa • 6 bits for the exponent • two’s complement form for both the mantissa and exponent.

a

Write the normalised floating-point representation of the following binary number using this system: 0101010.111 Show your working. Working ..................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ...................................................................................................................................................

[2]
b

Describe the reason why the normalised form of the following binary number cannot be represented accurately using this system. 0101011.111001

[3]
2
a

Describe how records are organised and accessed in a sequential file.

[3]
b

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

Record keyHash value
30033
1029
7630
[2]
3

Several syntax diagrams are shown.

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

State whether each variable is valid or invalid and give a reason for your choice in each case. 9SW ........................................................................................................................................... Reason ..................................................................................................................................... ................................................................................................................................................... UWY ........................................................................................................................................... Reason ..................................................................................................................................... ...................................................................................................................................................

[2]
b

<word> contains one or more letters. Complete the Backus-Naur Form (BNF) for <word> and use this to complete the BNF for <variable>. <word> ::= ............................................................................................................................ ................................................................................................................................................... <variable> ::= ................................................................................................................... ...................................................................................................................................................

[3]
c(i)

Vehicle registrations must begin with two letters and be followed by one, two or three digits. Valid letters and digits are shown in the syntax diagrams on page 4. State an example of a valid vehicle registration.

[1]
c(ii)

Draw a syntax diagram for a vehicle registration.

[3]
4

Draw one line from each Object-Oriented Programming (OOP) term to its most appropriate description. OOP term: • Encapsulation • Getters • Polymorphism • Setters Description: • methods used to return the value of a property • the process of putting data and methods together as a single unit • methods used to update the value of a property • allows methods to be redefined for derived classes • enables the defining of a new class that inherits from a parent class

[4]
5
a

Encryption is used to scramble data to make it meaningless if intercepted. Describe the purpose of quantum cryptography.

[2]
b

Explain the differences between symmetric and asymmetric cryptography when encrypting and decrypting data.

[3]
6
a

Write pseudocode statements to declare the composite data type, TAppointments, to hold data about patients for a dental clinic. It will include for each patient: • name (first name and last name) • date of birth • telephone number • date of last appointment • date of next appointment • all treatments are complete (yes or no).

[4]
b

This pseudocode algorithm reads dental records stored in a random file using the user-defined data type TAppointments and prints the contents of the file, one record at a time. Complete this file handling pseudocode: DECLARE DentalRecord : ARRAY[1:250] OF TAppointments DECLARE DentalFile : STRING DECLARE Count : INTEGER DentalFile ← "DentalFile.dat" OUTPUT "The file ", DentalFile, " contains these records:" OPENFILE ................................................................................................................. .......................................................................................... ← 1 REPEAT SEEK DentalFile, Count ..................................................................................................................... OUTPUT DentalRecord[Count] Count ← Count + 1 .....................................................................(DentalFile) .............................................................................................

[5]
7
a

State two examples of where it would be appropriate to use packet switching.

[2]
b

Give four differences between circuit switching and packet switching. 1 ................................................................................................................................................ ................................................................................................................................................... 2 ................................................................................................................................................ ................................................................................................................................................... 3 ................................................................................................................................................ ................................................................................................................................................... 4 ................................................................................................................................................ ...................................................................................................................................................

[4]
8
a

Describe the use of pipelining in Reduced Instruction Set Computers (RISC).

[2]
b

The processing of instructions is divided into five stages: • instruction fetch (IF) • instruction decode (ID) • operand fetch (OF) • instruction execute (IE) • write back result (WB) Each stage is carried out using a different register when pipelining is used. Complete the table to show how a program consisting of six instructions would be completed using pipelining.

[4]
9

This truth table represents a logic circuit.

INPUTOUTPUT
ABCDZ
00001
00011
00101
00111
01000
01010
01101
01111
10000
10010
10100
10110
11000
11010
11100
11110
Figure 1 of 1 for question 9
a

Write the Boolean logic expression that corresponds to the given truth table as the sum-of-products. Z = ............................................................................................................................................

[3]
b

Complete the Karnaugh map (K-map) for the given truth table.

[2]
c

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

[2]
d

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

[2]
e

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

[1]
10
Figure 1 of 1 for question 10
a

State one category of machine learning.

[1]
b

Calculate the path that takes the shortest time to travel from the Begin node to the End node, using the A* algorithm. Show your working in the table provided. The first two rows have already been completed.

[5]
11
a(i)

The pseudocode shown represents a queue Abstract Data Type (ADT) with procedures for initialisation and to add new items. It is incomplete. CONSTANT MaxLength = 50 DECLARE FrontPointer : INTEGER DECLARE RearPointer : INTEGER DECLARE Length : INTEGER DECLARE Queue : ARRAY[0 : MaxLength – 1] OF STRING // initialisation of queue PROCEDURE Initialise FrontPointer ← -1 ..................................................................................................................... ................................................................. ← 0 ENDPROCEDURE // adding a new item to the queue PROCEDURE Enqueue(NewItem : STRING) IF ............................................................................................. THEN RearPointer ← .................................................................................. IF RearPointer > MaxLength – 1 THEN RearPointer ← 0 ENDIF ................................................................................................................ Length ← Length + 1 ENDIF ENDPROCEDURE Study the pseudocode and insert the identifiers to complete this table.

IdentifierData typeDescription
STRINGAn array to store the contents of the queue.
INTEGERPoints to the last item of the queue.
INTEGERIndicates the number of items in the queue.
INTEGERPoints to the first item of the queue.
[2]
a(ii)

Complete the given pseudocode.

[5]
b

Explain the reasons why a queue ADT works better than a stack ADT in organising print jobs.

[3]

Mark scheme

9618/32 · May/June 2023

Download PDF

1a · 2 marks

  • 1 mark

    correct mantissa

  • 1 mark

    correct exponent with associated working

1b · 3 marks

  • 1 mark

    the mantissa of the number would need to be 0.101011111001 / 13 bits / digits

  • 1 mark

    … it can only store 10 bits / digits

  • 1 mark

    The 3 least significant digits would be truncated

  • 1 mark

    …causing a loss of precision

2a · 3 marks

  • 1 mark

    records are stored in a particular order

  • 1 mark

    the order is determined based on the value in a key field

  • 1 mark

    records are accessed one after the other

  • 1 mark

    records can be found by searching from the beginning of the file, record by record,

  • 1 mark

    … until the required record is found or key field value is exceeded.

2b · 2 marks

  • 1 mark

    Correct hash value for 3003 (3) / 1029 (4)

  • 1 mark

    Correct hash value for 7630 (0)

3a · 2 marks

  • 1 mark

    9SW – Invalid with Reason - This begins with a digit and a variable must begin with a letter

  • 1 mark

    UWY – Valid with Reason – This begins with a letter and is followed by two other letters.

3b · 3 marks

  • 1 mark

    <word> ::= <letter>|

  • 1 mark

    …<word><letter>

  • 1 mark

    <variable> ::= <word>|<word><digit>

3c(i) · 1 mark

  • 1 mark

    Answer must be two letters followed by one, two or three digits using the letters and digits on the syntax diagram.

3c(ii) · 3 marks

  • 1 mark

    always has only two letters

  • 1 mark

    one, two or three digits possible

  • 1 mark

    correct arrows, boxes and name of syntax diagram

4 · 4 marks

  • 1 mark

    Encapsulation connected to 'the process of putting data and methods together as a single unit'

  • 1 mark

    Getters connected to 'methods used to return the value of a property'

  • 1 mark

    Polymorphism connected to 'allows methods to be redefined for derived classes'

  • 1 mark

    Setters connected to 'methods used to update the value of a property'

5a · 2 marks

  • 1 mark

    to produce a virtually unbreakable encryption system / send virtually un-hackable secure messages …

  • 1 mark

    …using the laws / principles of quantum mechanics / properties of photons

  • 1 mark

    detects eavesdropping …

  • 1 mark

    …because the properties of photons change

  • 1 mark

    to protect security of data transmitted over fibre optic cables

  • 1 mark

    to enable the use of longer keys.

5b · 3 marks

  • 1 mark

    Symmetric cryptography uses a single key to encrypt and decrypt messages, Asymmetric cryptography uses two.

  • 1 mark

    The symmetric key is shared, whereas with asymmetric, only the public key is shared (and the private key isn’t).

  • 1 mark

    … the risk of compromise is higher with symmetric encryption and asymmetric encryption is more secure.

  • 1 mark

    Symmetric cryptography is a simple process that can be carried out quickly, but asymmetric is much more complex, so slower.

  • 1 mark

    The length of the keys in symmetric encryption are (usually) shorter than those for asymmetric (128/256 bits v 2048 bits).

6a · 4 marks

  • 1 mark

    TYPE TAppointments and ENDTYPE correct

  • 1 mark

    First two correct declarations

  • 1 mark

    Next two correct declarations

  • 1 mark

    Final two correct declarations

6b · 5 marks

  • 1 mark

    DECLARE DentalRecord : ARRAY[1:250] OF TAppointments

  • 1 mark

    DentalFile  "DentalFile.dat"

  • 1 mark

    OPENFILE DentalFile FOR RANDOM

  • 1 mark

    SEEK DentalFile, Count and GETRECORD DentalFile, DentalRecord[Count]

  • 1 mark

    UNTIL EOF(DentalFile)

7a · 2 marks

  • 1 mark

    Packet switching is most commonly used on data networks such as the internet to send large data files that don’t need to be live streamed

  • 1 mark

    Packet switching is used when it is necessary to be able to overcome failed/faulty lines by rerouting.

  • 1 mark

    Packet switching is used when it is necessary for the communication to be more secure.

  • 1 mark

    Packet switching is used for high volume data transmission.

  • 1 mark

    Packet switching is used when it isn’t necessary to use all the bandwidth.

  • 1 mark

    Specific examples e.g. email, text messages, documents, VOIP etc. (up to two marks).

7b · 4 marks

  • 1 mark

    Circuit switching uses a dedicated channel to make communication, whereas packet switching forms data into packets to transmit over a digital network.

  • 1 mark

    The dedicated path for circuit switching must be established before the transfer of data can commence, which is not the case with packet switching (as it doesn’t require a dedicated path).

  • 1 mark

    Data in packet switching is split into packets, in circuit switching the message remains intact.

  • 1 mark

    All of the transmission in circuit switching follows the same path whereas different packets in packet switching can take different routes.

  • 1 mark

    The message is received in the same order in which it is sent with circuit switching, but with packet switching, the packets can be received out of order (for assembly at the destination).

  • 1 mark

    Circuit switching is implemented at the physical layer while packet switching is implemented at the network layer.

  • 1 mark

    Circuit switching uses the whole bandwidth of the channel used, packet switching can share bandwidth.

  • 1 mark

    Circuit switching communication ends with an error but packet switching allows packets to be re-sent.

  • 1 mark

    Circuit switching is a simpler process than packet switching.

8a · 2 marks

  • 1 mark

    Pipelining allows several instructions to be processed simultaneously / concurrently.

  • 1 mark

    … therefore, increasing the CPU instruction throughput / the number of instructions completed per unit of time.

  • 1 mark

    Each instruction stage / subtask is completed during one clock cycle

  • 1 mark

    No two instructions can execute their same stage of instruction / subtask at the same clock cycle.

  • 1 mark

    … e.g., while one instruction is being decoded, the next instruction can be fetched, etc.

8b · 4 marks

  • 1 mark

    First stage of first instruction in first clock cycle

  • 1 mark

    First instruction successfully completed over five clock cycles

  • 1 mark

    Remaining instructions completed over ten clock cycles …

  • 1 mark

    … with no extra instruction sections added on any row.

9a · 3 marks

  • 1 mark

    First two correct products

  • 1 mark

    Next two correct products

  • 1 mark

    Final two correct products

9b · 2 marks

  • 2 marks

    Correct Karnaugh map entries (Two marks if no errors present, one mark if one error present)

9c · 2 marks

  • 1 mark

    Loop of 4 for column AB=00

  • 1 mark

    Loop of 4 for rows CD=11,10 and columns AB=00,01

9d · 2 marks

  • 1 mark

    Any correct Boolean term

  • 1 mark

    Boolean terms and operator correct and no other terms present

9e · 1 mark

  • 1 mark

    (Z =) Ā (B̄ + C)

10a · 1 mark

  • 1 mark

    Supervised (learning) / Unsupervised (learning) / Reinforcement (learning) / Deep (learning)

10b · 5 marks

  • 1 mark

    Calculation for Node B / Node C (from Begin)

  • 1 mark

    Calculation for Node D (from Begin) / remaining node from Begin

  • 1 mark

    Calculation for Node G (from C)

  • 1 mark

    Calculation for Node F and Node End (from G) / Node End (from F)

  • 1 mark

    Correct path: Begin ⇨ C ⇨ G ⇨ F ⇨ End

11a(i) · 2 marks

  • 1 mark

    First two correct identifiers

  • 1 mark

    Next two correct identifiers

11a(ii) · 5 marks

  • 1 mark

    DECLARE Queue : ARRAY[0:MaxLength – 1] OF STRING

  • 1 mark

    RearPointer  -1

  • 1 mark

    IF Length < MaxLength THEN // IF Length <= MaxLength - 1 THEN

  • 1 mark

    RearPointer  RearPointer + 1

  • 1 mark

    Queue[RearPointer]  NewItem

11b · 3 marks

  • 1 mark

    Print jobs are expected to be actioned by the printer in the order they are received

  • 1 mark

    … because the printer queue is a queue, the first job to be sent to the printer would be the first job printed.

  • 1 mark

    If the printer queue was on a stack, the first job the printer received would not be printed until all the other jobs have been printed.

Questions

  1. 1
    Question 15 marks
    Mark scheme ›
  2. 2
    Question 25 marks
    Mark scheme ›
  3. 3
    Question 39 marks
    Mark scheme ›
  4. 4
    Question 44 marks
    Mark scheme ›
  5. 5
    Question 55 marks
    Mark scheme ›
  6. 6
    Question 69 marks
    Mark scheme ›
  7. 7
    Question 76 marks
    Mark scheme ›
  8. 8
    Question 86 marks
    Mark scheme ›
  9. 9
    Question 910 marks
    Mark scheme ›
  10. 10
    Question 106 marks
    Mark scheme ›
  11. 11
    Question 1110 marks
    Mark scheme ›

More 9618 papers

Other papers from May/June 2023

Solve it on ExamPalStart