9618/32

Computer Science 9618/32May/June 2024

Cambridge A-Level · Advanced Theory · worked solutions for every part, with the mark scheme

11
questions
75
marks
90
minutes

Topics Data Representation · System Software · Hardware and Virtual Machines · Communication and Internet Technologies · Security · Computational Thinking and Problem-solving · +2 more

Q1MediumData Representation
(a)

Describe the effect of changing the allocation of bits used for the mantissa and for the exponent in a floating-point number with a fixed total number of bits.

2M
(b)

Real numbers are stored in a computer, using floating-point representation with:

  • 12 bits for the mantissa
  • 4 bits for the exponent
  • two’s complement form for both the mantissa and exponent.

Calculate the normalised floating-point representation of +54.8125+54.8125 in this system.

Show your working.

Working .....................................................................................................................................

3M
Q2Medium-EasyCommunication and Internet Technologies
(a)

Outline why protocols are essential for communication between computers.

2M
(b)

State the names of two different protocols associated with the sending and receiving of emails between computers.

Sending ....................................................................................................................................

Receiving ..................................................................................................................................

2M
(c)

Explain the meaning of the phrase:

BitTorrent protocol provides peer-to-peer file sharing.

3M
Q3Medium-EasyData Representation
(a)

Explain what is meant by the term non-composite data type and give an example of a non-composite data type.

Example ....................................................................................................................................

3M
(b)

Write pseudocode statements to declare the set data type EvenNumbers to hold this set of even numbers between 2 and 12:

2, 4, 6, 8, 10, 12

4M
Q44MMedium-EasySecurity

Sheila has a customer called Fred. Fred wants to send Sheila a confidential document as part of a transaction.

Explain how Fred uses asymmetric encryption to send his document securely.

Similar questions
Q5MediumSystem Software
(a)

Write this infix expression in Reverse Polish Notation (RPN):

(7 – 2 + 8) / (9 – 5)

2M
(b)

Evaluate this RPN expression:

a d + a b + c - *

when

a = 6, b = 3, c = 7 and d = 9

Show the changing contents of the stack as the RPN expression is evaluated.

4M
(c)

Write this RPN expression in infix form:

b a c - + d b + * c /

3M
Q6MediumHardware and Virtual Machines

The diagram shows a logic circuit.

(a)

Complete the truth table for the given logic circuit.
Show your working.

Working space
ABCPQRSTZ
000
001
010
011
100
101
110
111
3M
(b)

Write the Boolean expression that corresponds to the logic circuit as a sum-of-products.

Z = ............................................................................................................................................

2M
(c)
5M
(i)

Complete the Karnaugh map (K-map) for this Boolean expression:

ABC+ABC+ABC+ABC+ABC+ABC\overline{A} \cdot \overline{B} \cdot \overline{C} + \overline{A} \cdot B \cdot \overline{C} + \overline{A} \cdot B \cdot C + A \cdot \overline{B} \cdot \overline{C} + A \cdot B \cdot \overline{C} + A \cdot B \cdot C

2M
(ii)

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

2M
(iii)

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

1M
Q7MediumData Representation
(a)

Outline what is meant by direct access as a method of file access.

2M
(b)

Explain how direct access is used to locate a specific record in sequential files and random files.

4M
(i)

Sequential files

2M
(ii)

Random files

2M
Q8MediumComputational Thinking and Problem-solving
(a)

Complete the pseudocode to find an item in a 1D array Widgets of type STRING, using a linear search.

DECLARE Widgets : ARRAY[1:50000] OF STRING
DECLARE TopOfList : INTEGER
DECLARE EndOfList : INTEGER
DECLARE Count : INTEGER
DECLARE ToFind : STRING
DECLARE Found : BOOLEAN
DECLARE NotInList : BOOLEAN
TopOfList ← 1
EndOfList ← 50000
OUTPUT "Enter the name of the item you wish to find "
INPUT ToFind

.....................

NotInList ← FALSE
Count ← TopOfList

WHILE ..................... AND .....................
    IF ..................... THEN
        Found ← TRUE
    ENDIF
    Count ← Count + 1
    IF ..................... THEN
        NotInList ← TRUE 
    ENDIF
ENDWHILE

IF Found = TRUE THEN
    OUTPUT "Item found at position ", Count - 1, " in array"
ELSE
    OUTPUT "Item not in array"
ENDIF
4M
(b)

Compare the methods used by the linear and binary search algorithms to find an item in an array. Refer to Big O notation in your answer.

4M
Q9Medium-EasyHardware and Virtual MachinesSystem Software
(a)

Outline two benefits and two limitations of a virtual machine.

Benefit 1 ...................................................................................................................................

Benefit 2 ...................................................................................................................................

Limitation 1 ...............................................................................................................................

Limitation 2 ...............................................................................................................................

4M
(b)

Explain the roles of the host operating system and the guest operating system as used in a computer system running a virtual machine.

3M
Q10MediumFurther Programming

A declarative programming language is used to allow clients to choose daily activities at the beach.

01 activity(paddleboarding).
02 activity(sailing).
03 activity(rowing).
04 activity(kayaking).
05 activity(jetskiing).
06 client(stevie).
07 client(antonio).
08 client(henry).
09 client(eliza).
10 client(rebeka).
11 client(danny).
12 client(erik).
13 client(simone).
14 client(petra).
15 client(frankie).
16 choice(petra, rowing).
17 choice(frankie, sailing).
18 choice(erik, sailing).
19 choice(eliza, rowing).
20 choice(stevie, jetskiing).
21 choice(henry, sailing).
22 done(henry, jetskiing).
23 done(rebeka, jetskiing).
24 done(antonio, kayaking).

These clauses have the meanings:

ClauseMeaning
01Paddle boarding is an activity.
06Stevie is a client.
16Petra has chosen rowing.
22Henry has already done jet skiing.
(a)

Jane is a client who would like to choose the activity surfing and she has already done sailing.

Write additional clauses to represent this information.

25 .............................................................................................................................................

26 .............................................................................................................................................

27 .............................................................................................................................................

28 .............................................................................................................................................

4M
(b)

Using the variable List, the goal:

choice(List, rowing)

returns

List = petra, eliza

Write the result returned by the goal:

choice(List, sailing)

List = ..............................................................................................................................

1M
(c)

C is a client who would like to choose A if A is an activity and C has not already done A.

Write this as a rule:

may_choose_activity(C, A)

IF ............................................................................................................................................

4M
Q113MMedium-EasyArtificial Intelligence (AI)

Explain what is meant by Reinforcement Learning in relation to Artificial Intelligence.

Similar questions