9618/31

Computer Science 9618/31October/November 2024

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

11
questions
75
marks
90
minutes

Topics Data Representation · Hardware and Virtual Machines · Communication and Internet Technologies · System Software · Further Programming · Computational Thinking and Problem-solving

Q1MediumData Representation

Numbers are stored in a computer using binary 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.

(a)

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

Show your working.

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

3M
(b)

Calculate the denary value of the given normalised binary floating-point number.

Show your working.

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

Answer ......................................................................................................................................

3M
Q24MEasyHardware and Virtual Machines

Reduced Instruction Set Computers (RISC) is a type of processor.

Identify four features of a RISC processor.

1 .......................................................................................................................................................

2 .......................................................................................................................................................

3 .......................................................................................................................................................

4 .......................................................................................................................................................

Similar questions
Q3Medium-EasyCommunication and Internet Technologies
(a)

Describe circuit switching as a method of data transmission.

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

3M
(b)

State one benefit and one drawback of circuit switching as a method of data transmission.

Benefit ......................................................................................................................................

Drawback ..................................................................................................................................

2M
Q44MMedium-EasyCommunication and Internet Technologies

The TCP/IP protocol may be viewed as a stack that contains four layers: Application, Transport, Internet, Link.

Describe how the layers of the TCP/IP protocol stack interact with each other.

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

Similar questions
Q5Medium-EasyData Representation
(a)

Explain what is meant by a hashing algorithm in the context of file access.

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

3M
(b)

The use of a hashing algorithm can result in the same storage location being identified for more than one record.

Outline two methods of overcoming this issue.

1 ................................................................................................................................................

2 ................................................................................................................................................

2M
Q6MediumData Representation
(a)

Describe the user-defined data type set.

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

3M
(b)

Write pseudocode statements to declare the set data type, SymbolSet, to hold the following set of mathematical operators, using the variable Operators.

+ – * / ^

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

4M
Q7MediumHardware and Virtual Machines

The truth table for a logic circuit is shown.

INPUTOUTPUT
ABCDT
00000
00011
00100
00111
01000
01010
01100
01110
10000
10011
10100
10111
11000
11011
11100
11111
(a)

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

T = ............................................................................................................................................

3M
(b)

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

2M
(c)

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

2M
(d)
3M
(i)

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

T = ......................................................................................................................................

2M
(ii)

Use Boolean algebra to write your answer to part (d)(i) in its simplest form.

T = ...............................................................................................................................

1M
Q8Medium-EasySystem Software
(a)

Describe the process of segmentation for memory management.

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

4M
(b)

Explain what is meant by disk thrashing.

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

3M
Q9MediumFurther Programming

A veterinary surgery wants to create a class for individual pets.
Some of the attributes required in the class are listed in the table.

AttributeData typeDescription
PetIDSTRINGunique ID assigned at registration
PetTypeSTRINGtype of pet assigned at registration
OwnerTelephoneSTRINGtelephone number of owner assigned at registration
DateRegisteredDATEdate of registration
(a)

State one reason why the attributes would be declared as PRIVATE.

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

1M
(b)

Complete the class diagram for Pet, to include:

• an attribute and data type for the name of the pet
• an attribute and data type for the name of the owner
• a method to create a Pet object and set attributes at the time of registration
• a method to assign a pet ID
• a method to assign the date of registration
• a method to return the pet name
• a method to return the owner’s telephone number.

5M
Q10MediumSystem Software

Several syntax diagrams are shown.

(a)

Complete the Backus-Naur Form (BNF) for the given syntax diagrams.

<operator> ::= ..................................................................................................................

<label> ::= .........................................................................................................................

<equation> ::= ..................................................................................................................
4M
(b)

A new syntax rule, password, is required. It must begin with a letter or a symbol, followed by a digit and end with one or two symbols.

5M
(i)

Draw a syntax diagram for password.

3M
(ii)

Write the BNF for password.

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

2M
Q11MediumComputational Thinking and Problem-solvingData Representation

The following diagram shows an ordered binary tree.

(a)

A linked list of nodes is used to store the data. Each node consists of a left pointer, the data and a right pointer.

–1 is used to represent a null pointer.

Complete this linked list to represent the given binary tree.

4M
(b)

A user-defined record structure is used to store the nodes of the linked list in part (a).

Complete the diagram, using your answer for part (a).

RootPtrIndexLeftPtrDataRightPtr
00Red
1Green
2Yellow
3Blue
4Orange
5Indigo
FreePtr6Violet
7
4M
(c)

The linked list in part (a) is implemented using a 1D array of records. Each record contains a left pointer, data and a right pointer.

The following pseudocode represents a function that searches for an element in the array of records BinTree. It returns the index of the record if the element is found, or it returns a null pointer if the element is not found.

Complete the pseudocode for the function.

FUNCTION SearchTree(Item : STRING) ........................................................................
    NowPtr ← .........................................................................................................................
    WHILE NowPtr <> -1 
        IF ..................................................................................................................... THEN
            NowPtr ← BinTree[NowPtr].LeftPtr
        ELSE
            IF BinTree[NowPtr].Data < Item THEN
                .........................................................................................................................
            ELSE 
                RETURN NowPtr
            ENDIF
        ENDIF
    ENDWHILE
    RETURN NowPtr
ENDFUNCTION
4M