A Level Computer Science 9618 Paper 32, Oct/Nov 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/32 · Oct/Nov 2023

Download PDF
1
a

Real 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 the exponent. Write the normalised floating-point representation of –96.75 in this system. Show your working.

[3]
b

Explain why a binary representation is sometimes only an approximation to the real number it represents.

[3]
2

Describe what is meant by composite and non-composite data types. Composite ........................................................................................................................................ .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... Non-composite ................................................................................................................................. .......................................................................................................................................................... .......................................................................................................................................................... ..........................................................................................................................................................

[4]
3

The location of a record in a random file is determined using a hashing algorithm. A collision may occur during the process of adding a record.

a

Outline what is meant by the term collision in this context.

[2]
b

Explain how a collision can be dealt with when writing records to a random file.

[3]
4

Complete the following paragraph about a protocol suite, using words from the given list. Some words are not used. BitTorrent circuit switching layered link list peer-to-peer queue stack star TCP/IP The protocols in a ............................................................................. determine the interconnectivity rules for a ............................................................................. network model such as the ............................................................................. model.

[3]
5
a

Outline the reasons why an operating system may need to use virtual memory.

[2]
b

Explain the circumstances in which disk thrashing could occur.

[3]
6
a

The Reverse Polish Notation (RPN) expression: a b * 2 / c d / * is to be evaluated where a = 20, b = 3, c = 10 and d = 5. Show the changing contents of the following stack as the RPN expression is evaluated.

[4]
b

Explain how an expression stored in RPN can be evaluated.

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

This logic circuit represents the Boolean expression: X=A+B+C‾ Complete this truth table for the given logic circuit.

[1]
b

Apply De Morgan’s laws to the expression: X=A+B+C‾ X= ......................................................................................................................................

[1]
c

Simplify the following expression using Boolean algebra. Show all the stages in your simplification. T=X.Y.Z+X.Y‾.Z+X‾

[3]
8

Calculate the shortest distance between the Start and each of the destinations in the diagram using Dijkstra’s algorithm. Show your working and write your answers in the table provided.

[5]
Figure 1 of 1 for question 8
9
a(i)

A stack Abstract Data Type (ADT) is to be implemented using pseudocode, with procedures to initialise it and to push new items onto the stack. A 1D array Stack stores the contents of the stack. Study the pseudocode in part (a)(ii) and complete the table of identifiers by writing the missing data types and descriptions.

[2]
a(ii)

Complete the pseudocode. CONSTANT MaxSize = 40 DECLARE BasePointer : INTEGER DECLARE TopPointer : INTEGER DECLARE Stack : ARRAY[1:40] OF REAL // initialisation of stack PROCEDURE Initialise() ................................................................................ ← 1 ................................................................................ ← 0 ENDPROCEDURE // push an item onto the stack PROCEDURE Push(NewItem : REAL) ................................................................................ MaxSize THEN .......................................................................................................... Stack[TopPointer] ← ............................................................. ENDIF ENDPROCEDURE

[5]
b

Justify the use of a linked list instead of an array to implement a stack.

[2]
c

Explain how a compiler makes use of a stack when translating recursive programming code.

[4]
10

Describe the features of the SIMD and MISD computer architectures. SIMD ................................................................................................................................................ .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... MISD ................................................................................................................................................ .......................................................................................................................................................... .......................................................................................................................................................... ..........................................................................................................................................................

[4]
11

A declarative programming language is used to represent some facts about people and their hobbies. 01 hobby(music). 02 hobby(caving). 03 hobby(climbing). 04 hobby(camping). 05 hobby(baking). 06 hobby(travelling). 07 person(toby). 08 person(natasha). 09 person(fatima). 10 person(joseph). 11 person(elijah). 12 person(nina). 13 enjoys(natasha, travelling). 14 enjoys(toby, climbing). 15 enjoys(nina, climbing). 16 enjoys(elijah, camping). 17 enjoys(fatima, baking). 18 enjoys(joseph, camping). 19 dislikes(toby, caving). These clauses have the meanings: Clause Meaning 01 Music is a hobby 07 Toby is a person 13 Natasha enjoys travelling 19 Toby dislikes caving

a

Carlos is a person who enjoys the hobby of cycling but does not like music. Write additional clauses to represent this information. 20 ............................................................................................................................................ 21 ............................................................................................................................................ 22 ............................................................................................................................................ 23 ............................................................................................................................................

[4]
b

Using the variable P, the goal: enjoys(P, camping) returns P = elijah, joseph Write the result returned by the goal: enjoys(P, climbing) P = ....................................................................................................................................

[1]
c

N is a person who might enjoy H if H is a hobby and N does not dislike H. Write this as a rule. might_enjoy(N, H) IF ............................................................................................................................................ ................................................................................................................................................... ................................................................................................................................................... .............................................................................................................................................

[4]
12
a

Describe, with an example, what is meant by an exception.

[2]
b

A pseudocode algorithm searches for a customer record in a random file AccountRecord.dat. A user inputs the name of the customer. The records are stored using the user-defined data type TAccount. TYPE TAccount DECLARE AccountNumber : INTEGER DECLARE Name : STRING DECLARE Address : STRING DECLARE Telephone : STRING ENDTYPE If the record is found, it is output, otherwise an error message is displayed. Complete the file handling pseudocode. DECLARE Customer : TAccount DECLARE Location : INTEGER DECLARE MaxSize : INTEGER DECLARE FoundFlag : BOOLEAN DECLARE SearchCustomer : STRING MaxSize ← 1000 OPENFILE ............................................................................................................... Location ← 1 ............................................................................................................... ← FALSE OUTPUT "Enter the customer’s name" ............................................................................................................... ................................................................................... AND Location <= MaxSize ................................... "AccountRecord.dat", ............................................ GETRECORD "AccountRecord.dat", Customer IF SearchCustomer = Customer.Name THEN OUTPUT "Customer found: " OUTPUT Customer // output customer record FoundFlag ← TRUE ENDIF Location ← Location + 1 ENDWHILE IF NOT FoundFlag THEN OUTPUT ".........................................................................................................." ENDIF

[7]

Mark scheme

9618/32 · Oct/Nov 2023

Download PDF

1a · 3 marks

  • 1 mark

    conversion of −96.75 to binary e.g., positive 96.75, flip the bits + 1 to give 10011111.01 // –128 + 16 + 8 + 4 + 2 + 1 + 0.25 / ¼ seen

  • 1 mark

    correct mantissa (1 0 0 1 1 1 1 1 0 1)

  • 1 mark

    correct exponent (0 0 0 1 1 1)

1b · 3 marks

  • 1 mark

    Real numbers (can) have a fractional part (such as 1/3 and ½) / (such as 0.4 and 0.25)

  • 1 mark

    The fixed length of the storage means that you can’t store very large / very small numbers

  • 1 mark

    Binary numbers represent numbers based on powers of 2, with limited fractional representations such as 1/2, 1/4, 1/8, 1/16, etc.

2 · 4 marks

  • 1 mark

    A (user defined) data type that is a collection of data that can consist of multiple elements

  • 1 mark

    …of different or the same data types // …grouped under a single identifier.

  • 1 mark

    It can be defined without referencing another data type.

  • 1 mark

    It can be a primitive type available in a programming language, or a user- defined type.

3a · 2 marks

  • 1 mark

    A collision is when the two values / data items in the key field for two records (pass through a hashing algorithm and) result in the same hash value

  • 1 mark

    …so the location identified (by the hashing algorithm) may already be in use // two records cannot occupy the same address.

3b · 3 marks

  • 1 mark

    A process of collision resolution is used / Start at the original hashed storage space / Search the overflow area / Each storage space holds a reference to a collection / chain of items

  • 1 mark

    …go through the following spaces in a linear fashion / …which can be searched individually.

  • 1 mark

    …and store the data item in the first available slot / The data item is stored in the first available space in this chain.

4 · 3 marks

  • 1 mark

    stack

  • 1 mark

    layered

  • 1 mark

    TCP/IP

5a · 2 marks

  • 1 mark

    Virtual memory is used when RAM is running low // …such as when a computer is running many processes at once.

  • 1 mark

    Virtual memory may be used for efficient use of RAM / the processor // …such as if data / programs are not immediately needed, they can be moved from RAM to virtual memory

5b · 3 marks

  • 1 mark

    Disk thrashing is a problem that may occur when frequent transfers between main memory and secondary memory take place // Disk thrashing is a problem that may occur when virtual memory is being used

  • 1 mark

    As main memory fills up, more pages need to be swapped in and out of secondary/virtual memory

  • 1 mark

    This swapping leads to a very high rate of hard disk head movements // Eventually, more time is spent swapping the pages/data than processing the data.

6a · 4 marks

  • 1 mark

    First group of stacks correctly identified

  • 1 mark

    Second group of stacks correctly identified

  • 1 mark

    Third group of stacks correctly identified

  • 1 mark

    Fourth group of stacks correctly identified

6b · 3 marks

  • 1 mark

    The (RPN) expression is read from left to right, one item at a time // Each element is checked to see if it as operator or a value

  • 1 mark

    Values are pushed onto a stack until an operator is found

  • 1 mark

    The operator is applied to the last two values on the stack and the result is pushed back onto the stack // This repeats until a single value remains, which is the solution.

7a · 1 mark

  • 1 mark

    Correct column for X (1, 0, 0, 0, 0, 0, 0, 0)

7b · 1 mark

  • 1 mark

    X = A̅.B̅.C̅

7c · 3 marks

  • 1 mark

    First correct step of working shown (e.g. Distributive law or Complement law)

  • 1 mark

    Second correct step of working shown (e.g. Identity law or Redundancy law)

  • 1 mark

    (T=) X̄ + Z

8 · 5 marks

  • 1 mark

    Working point 1 (e.g. Initialisation – setting Start to 0 and the rest of the towns to ∞)

  • 1 mark

    Working point 2 (e.g. Evidence to show values at nodes being updated / visited node(s))

  • 1 mark

    Working point 3 (e.g. Evidence to show correct calculation of route(s))

  • 2 marks

    All six correct values (A=8, B=12, C=19, D=14, E=16, F=10)

9a(i) · 2 marks

  • 2 marks

    All five empty boxes correct (Two marks for all five empty boxes correct, One mark for any three or four empty boxes correct)

9a(ii) · 5 marks

  • 1 mark

    DECLARE BasePointer : INTEGER / DECLARE TopPointer : INTEGER / DECLARE Stack : ARRAY[1:40] OF REAL

  • 1 mark

    BasePointer  1

  • 1 mark

    TopPointer  0

  • 1 mark

    IF TopPointer < MaxSize THEN

  • 1 mark

    TopPointer  TopPointer + 1 / Stack[TopPointer]  NewItem

9b · 2 marks

  • 1 mark

    Linked list: A linked list is a dynamic data structure / not restricted in size // Has greater freedom to expand or contract by adding or removing nodes as necessary // Allows more efficient editing using pointers (instead of moving the data).

  • 1 mark

    Array: An array is a static data structure generally fixed in size // When the array is full, the stack cannot be extended any further.

9c · 4 marks

  • 1 mark

    The compiler must produce object code to

  • 1 mark

    …push return addresses / values of local variables onto a stack

  • 1 mark

    …with each recursive call // … to set up winding

  • 1 mark

    …pop return addresses / values of local variables off the stack …after the base case is reached // … to implement unwinding.

10 · 4 marks

  • 1 mark

    SIMD: Single Instruction, Multiple Data (architecture) // Performs the same operation on multiple different data streams simultaneously.

  • 1 mark

    SIMD: The instructions can be performed sequentially, taking advantage of pipelining // Parallel computers with multiple processors.

  • 1 mark

    MISD: Multiple Instruction, Single Data (architecture) // Performs different operations on the same data stream.

  • 1 mark

    MISD: Each processor works on the same data stream independently // Parallel computers with multiple processors.

11a · 4 marks

  • 1 mark

    20 person(carlos).

  • 1 mark

    21 hobby(cycling).

  • 1 mark

    22 enjoys(carlos, cycling).

  • 1 mark

    23 dislikes(carlos, music).

11b · 1 mark

  • 1 mark

    P = toby, nina

11c · 4 marks

  • 1 mark

    person(N)

  • 1 mark

    hobby(H)

  • 1 mark

    dislikes(N, H)

  • 1 mark

    all logical operators correct with no additional code (see example answers)

12a · 2 marks

  • 1 mark

    An exception is an event that occurs during the execution of a program that disrupts the normal flow of instructions / causes the program to halt execution

  • 1 mark

    Hardware failure // hard disk crash // Programming error // trying to access out-of-bounds array element // divide by zero error // runtime error // User error // typing incorrect filename / data type

12b · 7 marks

  • 1 mark

    DECLARE Customer : TAccount / DECLARE Location : INTEGER / DECLARE: FoundFlag : BOOLEAN / DECLARE SearchCustomer : STRING

  • 1 mark

    OPENFILE "AccountRecord.dat" FOR RANDOM

  • 1 mark

    FoundFlag  FALSE

  • 1 mark

    WHILE NOT FoundFlag AND Location <= MaxSize

  • 1 mark

    SEEK "AccountRecord.dat", Location

  • 1 mark

    GETRECORD "AccountRecord.dat", Customer

  • 1 mark

    IF SearchCustomer = Customer.Name THEN / FoundFlag  TRUE / Location  Location + 1 / IF NOT FoundFlag THEN

Questions

  1. 1
    Question 16 marks
    Mark scheme ›
  2. 2
    Question 24 marks
    Mark scheme ›
  3. 3
    Question 35 marks
    Mark scheme ›
  4. 4
    Question 43 marks
    Mark scheme ›
  5. 5
    Question 55 marks
    Mark scheme ›
  6. 6
    Question 67 marks
    Mark scheme ›
  7. 7
    Question 75 marks
    Mark scheme ›
  8. 8
    Question 85 marks
    Mark scheme ›
  9. 9
    Question 913 marks
    Mark scheme ›
  10. 10
    Question 104 marks
    Mark scheme ›
  11. 11
    Question 119 marks
    Mark scheme ›
  12. 12
    Question 129 marks
    Mark scheme ›

More 9618 papers

Other papers from Oct/Nov 2023

Solve it on ExamPalStart