Computer Science (9608) · Oct/Nov 2021 · Question paper 32

Cambridge Computer Science (9608) question paper for paper 32, Oct/Nov 2021 — 9608/32/O/N/21, file 9608_w21_qp_32.pdf.

Advertisement
Loading the paper…
Text of this paper

Cambridge International AS & A Level

* 6 5 6 7 7 0 5 8 1 2 *

COMPUTER SCIENCE

9608/32

Paper 3 Advanced Theory

October/November 2021
1 hour 30 minutes

You must answer on the question paper.
No additional materials are needed.
INSTRUCTIONS
●
Answer all questions.
●
Use a black or dark blue pen.
●
Write your name, centre number and candidate number in the boxes at the top of the page.
●
Write your answer to each question in the space provided.
●
Do not use an erasable pen or correction fluid.
●
Do not write on any bar codes.
●
You may use an HB pencil for any diagrams, graphs or rough working.
●
Calculators must not be used in this paper.
INFORMATION
●
The total mark for this paper is 75.
●
The number of marks for each question or part question is shown in brackets [ ].
●
No marks will be awarded for using brand names of software packages or hardware.

This document has 16 pages. Any blank pages are indicated.
DC (CE) 205104/3
© UCLES 2021

[Turn over

2
1

Data types can be defined using pseudocode.
The data type, BicycleRecord, is defined in pseudocode as:
TYPE BicycleRecord
DECLARE BicycleID

:

INTEGER

DECLARE BicycleAvailable :

BOOLEAN

DECLARE BicycleLocation : (RiverSide, BusStation, TrainStation,
TownSquare, Library)
DECLARE DateChecked

:

DATE

ENDTYPE
A variable, LoanBicycle, is declared in pseudocode as:
DECLARE LoanBicycle : BicycleRecord
(a) Write pseudocode statements to assign 567 to the BicycleID of LoanBicycle and
FALSE to the BicycleAvailable of LoanBicycle.

[2]
(b) The type definition for BicycleRecord is changed.
(i)

The definition has been extended to include borrower identification numbers,
BorrowerID, for the last 10 people who borrowed a bicycle. Each identification number
is an integer.
Write the pseudocode statement needed in the type definition of BicycleRecord.

[1]

(ii)

The values for the field BicycleID must be between 500 and 599 inclusive.
Rewrite one pseudocode line from the type definition of BicycleRecord to implement
the change.

[1]

© UCLES 2021

9608/32/O/N/21

3
(c) Data about all the bicycles are stored in a file that uses random file organisation.
BicycleID is used as the key field.
Explain how a program could add an extra record to this file.

[3]
2

The TCP/IP protocol suite can be viewed as a stack with four layers.
(a) Complete the diagram of the stack by writing the names of the three missing layers.
Layer

Internet / Network

[3]
(b) Describe the TCP and IP protocols.
TCP

IP

[4]

© UCLES 2021

9608/32/O/N/21

[Turn over

4
3

(a) The truth table for a logic circuit with four inputs is shown.
INPUT

(i)

OUTPUT

P

Q

R

S

X

0

0

0

0

1

0

0

0

1

0

0

0

1

0

0

0

0

1

1

0

0

1

0

0

0

0

1

0

1

0

0

1

1

0

0

0

1

1

1

1

1

0

0

0

1

1

0

0

1

0

1

0

1

0

0

1

0

1

1

0

1

1

0

0

0

1

1

0

1

0

1

1

1

0

0

1

1

1

1

1

Write the Boolean algebraic expression for the truth table as a sum-of-products.
X = [2]

(ii)

Complete the following Karnaugh Map (K-map) for the truth table.
PQ
00

01

11

10

00
RS

01
11
10
[2]

(iii)

The K-map can be used to simplify the expression in part (a)(i).
Draw loop(s) around appropriate groups in the K-map to produce an optimal
sum-of-products.

© UCLES 2021

9608/32/O/N/21

[2]

5
(iv)

Write the simplified sum-of-products from the K-map.
X = [2]

(b) Simplify the expression for X, represented by the truth table in part (a), using Boolean
Algebra.

[2]
4

Babar is building a wireless Local Area Network (LAN).
(a) Identify two differences between a wireless network and a wired network.
1

2

[2]
(b) Identify the hardware device needed to connect the wireless LAN to the Internet. Justify your
choice.
Device
Justification

[2]

© UCLES 2021

9608/32/O/N/21

[Turn over

6
5

(a) Flora has written a program that uses the variables p, q, r and s.
Part of the program contains the following calculations:
p
q
r
s
(i)

=
=
=
=

5
4
1
p * (p - q + r)

Write the Reverse Polish Notation (RPN) for the expression:
p * (p - q + r)
[2]

(ii)

Show the changing contents of the stack as the value for s is calculated from the RPN
expression.

[4]
(b) Convert this RPN expression back to its original infix form.
p q * p q r + - + p /

[3]

© UCLES 2021

9608/32/O/N/21

7
(c) Syntax analysis is one stage of the compilation of a program.
Identify and describe two other stages of compilation.
Stage 1
Description

Stage 2
Description

[4]

© UCLES 2021

9608/32/O/N/21

[Turn over

8
6

Lara wants to send an important message to her bank over the Internet.
(a) Explain why the bank requires a digital signature for the message.

[2]
(b) Asymmetric key cryptography is used to keep Lara’s message secure during transmission
over the Internet.
Describe this process of encrypting and decrypting Lara’s message.

[5]
(c) Lara has received an email message that appears to be from her bank. She is not sure
whether it is authentic.
State two problems that could occur if Lara opens and responds to this suspicious email
message.
1

2

[2]

© UCLES 2021

9608/32/O/N/21

9
7

A virtual machine is the software emulation of a computer system using another computer system.
Describe two benefits and two limitations of using a virtual machine.
Benefit 1

Benefit 2

Limitation 1

Limitation 2

[4]

© UCLES 2021

9608/32/O/N/21

[Turn over

10
8

A large car park has 6 floors.
There is a large screen at the entrance to the car park. This screen displays the number of empty
parking spaces on each floor.

•
•
•

There are 256 parking spaces for cars on each floor.
Each parking space has a sensor that detects if a car is parked on it.
Data from the sensors are read and processed by a computer system.

(a) (i)

Identify the type of system described.
[1]

(ii)

Justify your answer to part (a)(i).

[2]

(iii)

Identify two types of sensor that could be used by this system.
Sensor 1
Sensor 2
[2]

(b) A program regularly checks each sensor’s readings.
The number of empty parking spaces is displayed on the screen for each floor. If there are no
empty parking spaces on a floor, a message is displayed on the screen to show that the floor
is full.
The pseudocode algorithm to display this information has been written using these identifiers.
Identifier

Data type

Description

FloorNumber

INTEGER

Floor number

SpaceNumber

INTEGER

Parking space number

SpaceAvailable

INTEGER

Counts number of empty parking spaces
on a floor

ForEver

BOOLEAN

Value to ensure continuous loop

The pseudocode algorithm uses the function CheckSpace(Floor, Space). This function
returns TRUE if the parking space is empty and FALSE otherwise.

© UCLES 2021

9608/32/O/N/21

11
(i)

Complete the following pseudocode algorithm to check the number of parking spaces
available.

01 ForEver
02 REPEAT
03

FOR FloorNumber

04

SpaceAvailable

05

FOR SpaceNumber

06

0
1 TO

IF CheckSpace(FloorNumber, SpaceNumber)

07

THEN

08
09

1 TO

SpaceAvailable

SpaceAvailable + 1

ENDIF

10

ENDFOR

11

IF SpaceAvailable >

12

THEN

13

OUTPUT "Floor ", ,
" empty parking spaces "

14

ELSE

15
16
17

OUTPUT "Floor ", , " full"
ENDIF
ENDFOR

18
19 // delay loop
20 // delay loop
21 UNTIL

© UCLES 2021

9608/32/O/N/21

[6]

[Turn over

12
(ii)

Write a delay loop in pseudocode for lines 19 and 20 of the pseudocode algorithm.

[2]

(iii)

State why a delay loop is used in this system.

[1]

(c) When a car is parked in a parking space, a bit is set in the appropriate memory location.

•
•

32 memory locations are used for each floor with address X01 to X32, where X is the
number of the floor.
Each location is one byte in length to hold the data for 8 parking spaces.

For example, memory location 101 is used for parking spaces 1 to 8 and memory location
102 is used for parking spaces 9 to 16.
The table shows part of floor 1 with cars parked in parking spaces 4, 11, 16 ... and 255.
Memory
location

(i)

Bits

Parking space number

101

0

0

0

0

1

0

0

0

8–1

102

1

0

0

0

0

1

0

0

16 – 9

…

…

…

…

…

…

…

…

…

…

132

0

1

0

0

0

0

0

0

256 – 249

The data in memory location 604 is shown.
604

1

0

0

0

0

0

0

1

State what this data represents.

[2]

© UCLES 2021

9608/32/O/N/21

13
(ii)

Explain the way in which the parking space 254 on floor 5 can be checked to see if it is
empty.

[5]

© UCLES 2021

9608/32/O/N/21

14
BLANK PAGE

© UCLES 2021

9608/32/O/N/21

15
BLANK PAGE

© UCLES 2021

9608/32/O/N/21

16
BLANK PAGE

Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every
reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the
publisher will be pleased to make amends at the earliest possible opportunity.
To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge
Assessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download
at www.cambridgeinternational.org after the live examination series.
Cambridge Assessment International Education is part of the Cambridge Assessment Group. Cambridge Assessment is the brand name of the University of
Cambridge Local Examinations Syndicate (UCLES), which itself is a department of the University of Cambridge.

© UCLES 2021

9608/32/O/N/21

Advertisement