9618/33 · May/June 2022 · Worked solutions

Step-by-step solutions based on the mark scheme (not a mark-scheme dump).

Question 1

Paper page 2 for Q1
Original paper page 2

Part 1(a) — solution

LibraryBook.Title  "A Level Computer Science" 2 LibraryBook.Fiction  FALSE

Mark points

  • Include the ideas shown in the solution above.

Part 1(b)(i) — solution

DECLARE NumberOfCopies : 1 .. 10 1

Mark points

  • Include the ideas shown in the solution above.

Part 1(b)(ii) — solution

DECLARE AccessionNumber : ARRAY[1:NumberOfCopies] OF INTEGER 2

Mark points

  • Include the ideas shown in the solution above.

Part 1(c) — solution

  1. A data type constructed by a programmer // not a primitive data type
  2. A data type that references at least one other data type…
  3. … the data types can be primitive, or user defined
  4. Class / object / set

Mark points

  • A data type constructed by a programmer // not a primitive data type
  • A data type that references at least one other data type…
  • … the data types can be primitive, or user defined
  • Class / object / set

Question 2

Paper page 4 for Q2
Original paper page 4

Part 2(a) — solution

type(caracal, wild). 2 hair(caracal, short).

Mark points

  • Include the ideas shown in the solution above.

Part 2(b) — solution

persian 1

Mark points

  • Include the ideas shown in the solution above.

Part 2(c)(i) — solution

type(Pet, domestic). 1

Mark points

  • Include the ideas shown in the solution above.

Part 2(c)(ii) — solution

spots(WildSpotty, yes) 2 ,type(WildSpotty, wild). 2022 Page 4 of 11 9618/33 Cambridge International AS & A Level – Mark Scheme May/June 2022

Mark points

  • Include the ideas shown in the solution above.

Question 3

Paper page 6 for Q3
Original paper page 6

Part 3 — solution

  1. a dedicated circuit
  2. circuit is established before transmission starts //
  3. data is transferred using the whole bandwidth
  4. all data is transferred over the same route
  5. Advantage – data /frames arrive in order and do not need to be reassembled
  6. Disadvantage – nobody else can use the same circuit even if it is idle //less secure as only one route used
  7. data is split into packets
  8. each packet is given its own route
  9. the routing for a packet depends on the congestion
  10. packets may not arrive in the order sent
  11. Advantage – packets can be rerouted if there are problems// more secure as harder to intercept messages
  12. Disadvantage – time taken to reassemble packets at the destination

Mark points

  • a dedicated circuit
  • circuit is established before transmission starts //
  • data is transferred using the whole bandwidth
  • all data is transferred over the same route
  • Advantage – data /frames arrive in order and do not need to be reassembled
  • Disadvantage – nobody else can use the same circuit even if it is idle //less secure as only one route used
  • data is split into packets
  • each packet is given its own route
  • the routing for a packet depends on the congestion
  • packets may not arrive in the order sent
  • Advantage – packets can be rerouted if there are problems// more secure as harder to intercept messages
  • Disadvantage – time taken to reassemble packets at the destination

Question 4

Paper page 7 for Q4
Original paper page 7

Part 4(a) — solution

  1. Uses simple instructions
  2. Uses fixed length instructions
  3. Instructions only require one clock cycle
  4. Uses many registers
  5. Makes use of pipelining
  6. Hardwired CU
  7. Uses many instruction formats
  8. Uses variable length instructions
  9. Makes use of different addressing modes
  10. Uses few registers
  11. Has a large instruction set
  12. Requires complex circuits
  13. Frequently uses cache
  14. Instructions (converted to sub-instructions that) may require many clock cycles
  15. Programmable CU

Mark points

  • Uses simple instructions
  • Uses fixed length instructions
  • Instructions only require one clock cycle
  • Uses many registers
  • Makes use of pipelining
  • Hardwired CU
  • Uses many instruction formats
  • Uses variable length instructions
  • Makes use of different addressing modes
  • Uses few registers
  • Has a large instruction set
  • Requires complex circuits
  • Frequently uses cache
  • Instructions (converted to sub-instructions that) may require many clock cycles
  • Programmable CU

Part 4(b) — solution

  1. RISC has fewer instructions // CISC has more instructions
  2. RISC has many registers // CISC has few registers
  3. RISC’s instructions are simpler // CISC’s instructions are more complex
  4. RISC has a few instruction formats / CISC has many instruction formats
  5. RISC usually uses single-cycle instructions// CISC uses multi-cycle instructions
  6. RISC uses fixed-length instructions // CISC uses variable-length instructions
  7. RISC has better pipelineability // CISC has poorer pipelineability
  8. RISC requires less complex circuits// CISC requires more complex circuits
  9. RISC has fewer addressing modes // CISC has more addressing modes
  10. RISC makes more use of RAM// CISC makes more use of cache/less use of RAM
  11. RISC has a hard-wired control unit // CISC has a programmable control unit
  12. RISC only uses load and store instructions to address memory // CISC has many types of instructions to address

Mark points

  • RISC has fewer instructions // CISC has more instructions
  • RISC has many registers // CISC has few registers
  • RISC’s instructions are simpler // CISC’s instructions are more complex
  • RISC has a few instruction formats / CISC has many instruction formats
  • RISC usually uses single-cycle instructions// CISC uses multi-cycle instructions
  • RISC uses fixed-length instructions // CISC uses variable-length instructions
  • RISC has better pipelineability // CISC has poorer pipelineability
  • RISC requires less complex circuits// CISC requires more complex circuits
  • RISC has fewer addressing modes // CISC has more addressing modes
  • RISC makes more use of RAM// CISC makes more use of cache/less use of RAM
  • RISC has a hard-wired control unit // CISC has a programmable control unit
  • RISC only uses load and store instructions to address memory // CISC has many types of instructions to address

Question 5

Paper page 8 for Q5
Original paper page 8

Part 5(a) — solution

One mark for each in order jk+jk-/ 2 jk+ jk-/

Mark points

  • Include the ideas shown in the solution above.

Part 5(b)(i) — solution

1 mark per ring 4 Do not allow operators in stacks

Mark points

  • Include the ideas shown in the solution above.

Part 5(b)(ii) — solution

  1. Working from left to right in the expression
  2. PUSH 10/m onto the stack
  3. PUSH the following numbers (10/m, 3/j, 2/k) onto the stack
  4. When the first operator ,*, is reached
  5. … POP the top two numbers, 2/k and 3/j
  6. … apply the operation
  7. PUSH result back onto stack
  8. Continue to the end of the expression

Mark points

  • Working from left to right in the expression
  • PUSH 10/m onto the stack
  • PUSH the following numbers (10/m, 3/j, 2/k) onto the stack
  • When the first operator ,*, is reached
  • … POP the top two numbers, 2/k and 3/j
  • … apply the operation
  • PUSH result back onto stack
  • Continue to the end of the expression

Part 5(c) — solution

  1. recursion
  2. implementation of ADTs e.g. linked lists
  3. procedure calls
  4. interrupt handling (storing contents of registers etc)

Mark points

  • recursion
  • implementation of ADTs e.g. linked lists
  • procedure calls
  • interrupt handling (storing contents of registers etc)

Question 6

Paper page 9 for Q6
Original paper page 9

Part 6 — solution

Two marks each benefit description max 4 6 New system can be tried on different virtual hardware (1) without need to purchase the hardware (1) Easier to recover if software emulating the new computer causes system crash (1) as VM provides protection to other software (1) Emulate programs for the new computer system that are not compatible with the host computer / operating system (1) by using the guest operating system on the old computer (1) More than one new computer system can be emulated (1) this allows multiple operating systems to coexist on a single computer(1) Two marks each limitation description max 2 from: Virtual machines may not be able to emulate the new hardware (1) because this hardware may have been developed since the virtual machine was developed (1) Using virtual machine means execution of extra code // A virtual machine might not be as efficient // resources e.g. memory or processor time are shared (1) processing time increased // performance degrades (1) Use of a virtual machine increases the maintenance overheads (1) because both host system and the virtual machine must be maintained (1) 2022 Page 8 of 11 9618/33 Cambridge International AS & A Level – Mark Scheme May/June 2022

Mark points

  • Include the ideas shown in the solution above.

Question 7

Paper page 10 for Q7
Original paper page 10

Part 7(a) — solution

1 mark per point 5 Acrylic has attribute Soft of type BOOLEAN Wool has attribute WoolType with suitable data type Acrylic and Wool have method YarnInfo() Acrylic, Wool and Mix at least one inherit (one arrow correct) from Yarn … … Acrylic, Wool and Mix all inherit (all arrows correct) from Yarn Yarn Name: STRING Colour: STRING BatchCode: STRING Weight: INTEGER NumberBalls: INTEGER Type: STRING Constructor() EditNumberBalls() YarnInfo() Acrylic Wool Mix WoolType: STRING Percentage: INTEGER Soft: BOOLEAN Constructor() Constructor() Constructor() YarnInfo() YarnInfo() YarnInfo() 2022 Page 9 of 11 9618/33 Cambridge International AS & A Level – Mark Scheme May/June 2022

Mark points

  • Include the ideas shown in the solution above.

Part 7(b) — solution

  1. the data items / attributes
  2. the data types // characteristics
  3. defined in a class
  4. the procedures/ functions / programmed instructions in a
  5. … implementing the behaviours
  6. … that act on the properties / attributes
  7. Methods and properties / attributes contained in one class/ super class / base class
  8. Are made available to / reused by another class/ derived class

Mark points

  • the data items / attributes
  • the data types // characteristics
  • defined in a class
  • the procedures/ functions / programmed instructions in a
  • … implementing the behaviours
  • … that act on the properties / attributes
  • Methods and properties / attributes contained in one class/ super class / base class
  • Are made available to / reused by another class/ derived class

Question 8

Paper page 12 for Q8
Original paper page 12

Part 8(a)(i) — solution

  1. To ensure the message is authentic // came from a trusted source
  2. To ensure that only the intended receiver is able to understand the message
  3. To ensure the message has not been altered during transmission
  4. Non-repudiation, neither the sender or receiver can deny the transmission occurred

Mark points

  • To ensure the message is authentic // came from a trusted source
  • To ensure that only the intended receiver is able to understand the message
  • To ensure the message has not been altered during transmission
  • Non-repudiation, neither the sender or receiver can deny the transmission occurred

Part 8(a)(ii) — solution

Symmetric 2 Asymmetric

Mark points

  • Include the ideas shown in the solution above.

Part 8(b)(i) — solution

  1. Any eavesdropping can be identified (as the state will be changed)
  2. Integrity of the key once transferred can be guaranteed (cannot be copied and decrypted at a later date)
  3. Longer/more secure keys can be exchanged

Mark points

  • Any eavesdropping can be identified (as the state will be changed)
  • Integrity of the key once transferred can be guaranteed (cannot be copied and decrypted at a later date)
  • Longer/more secure keys can be exchanged

Part 8(b)(ii) — solution

  1. Limited range
  2. requires dedicated fibre (optic) line and specialist hardware
  3. cost of dedicated fibre (optic) line and specialist hardware is expensive
  4. polarisation of light may be altered whilst travelling down fibre optic cables

Mark points

  • Limited range
  • requires dedicated fibre (optic) line and specialist hardware
  • cost of dedicated fibre (optic) line and specialist hardware is expensive
  • polarisation of light may be altered whilst travelling down fibre optic cables

Question 9

Paper page 14 for Q9
Original paper page 14

Part 9(a) — solution

LDM #500: Immediate 500 3 LDD 500: Direct 100 LDI 500: Indirect 20

Mark points

  • Include the ideas shown in the solution above.

Part 9(b) — solution

Answer: 7

7 Instruction Label Opcode Operand LDM #20 STO Twenty LDI Y ADD Twenty STO Z Twenty: #20 Y: Z: One mark for LDM #20 seen One mark for storing 20 at any address One mark for labelling that address e.g. Twenty away from the program code One mark for labelling addresses away from the program code as Y and Z One mark for correct use of LDI Y One mark for correct use of STO Z One mark for correct use of ADD with labelled address 2022 Page 11 of 11

Mark points

  • Correct result: 7

Question 10

Part 10 — solution

10 10 10 10 10 40

Mark points

  • Include the ideas shown in the solution above.