9618/32 · May/June 2023
Download PDFNumbers 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 exponent.
Write the normalised floating-point representation of the following binary number using this system: 0101010.111 Show your working. Working ..................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ...................................................................................................................................................
Describe the reason why the normalised form of the following binary number cannot be represented accurately using this system. 0101011.111001
Describe how records are organised and accessed in a sequential file.
A hashing algorithm is used to calculate storage locations for records in a random access file. The algorithm calculates hash values using the function modulus 5. The function modulus gives the remainder after integer division. For example, 3003 modulus 5 = 3, so the record key 3003 gives a hash value of 3. Complete the table to show the remaining hash values.
| Record key | Hash value |
|---|---|
| 3003 | 3 |
| 1029 | |
| 7630 |
Several syntax diagrams are shown.





State whether each variable is valid or invalid and give a reason for your choice in each case. 9SW ........................................................................................................................................... Reason ..................................................................................................................................... ................................................................................................................................................... UWY ........................................................................................................................................... Reason ..................................................................................................................................... ...................................................................................................................................................
<word> contains one or more letters. Complete the Backus-Naur Form (BNF) for <word> and use this to complete the BNF for <variable>. <word> ::= ............................................................................................................................ ................................................................................................................................................... <variable> ::= ................................................................................................................... ...................................................................................................................................................
Vehicle registrations must begin with two letters and be followed by one, two or three digits. Valid letters and digits are shown in the syntax diagrams on page 4. State an example of a valid vehicle registration.
Draw a syntax diagram for a vehicle registration.
Draw one line from each Object-Oriented Programming (OOP) term to its most appropriate description. OOP term: • Encapsulation • Getters • Polymorphism • Setters Description: • methods used to return the value of a property • the process of putting data and methods together as a single unit • methods used to update the value of a property • allows methods to be redefined for derived classes • enables the defining of a new class that inherits from a parent class
Encryption is used to scramble data to make it meaningless if intercepted. Describe the purpose of quantum cryptography.
Explain the differences between symmetric and asymmetric cryptography when encrypting and decrypting data.
Write pseudocode statements to declare the composite data type, TAppointments, to hold data about patients for a dental clinic. It will include for each patient: • name (first name and last name) • date of birth • telephone number • date of last appointment • date of next appointment • all treatments are complete (yes or no).
This pseudocode algorithm reads dental records stored in a random file using the user-defined data type TAppointments and prints the contents of the file, one record at a time. Complete this file handling pseudocode: DECLARE DentalRecord : ARRAY[1:250] OF TAppointments DECLARE DentalFile : STRING DECLARE Count : INTEGER DentalFile ← "DentalFile.dat" OUTPUT "The file ", DentalFile, " contains these records:" OPENFILE ................................................................................................................. .......................................................................................... ← 1 REPEAT SEEK DentalFile, Count ..................................................................................................................... OUTPUT DentalRecord[Count] Count ← Count + 1 .....................................................................(DentalFile) .............................................................................................
State two examples of where it would be appropriate to use packet switching.
Give four differences between circuit switching and packet switching. 1 ................................................................................................................................................ ................................................................................................................................................... 2 ................................................................................................................................................ ................................................................................................................................................... 3 ................................................................................................................................................ ................................................................................................................................................... 4 ................................................................................................................................................ ...................................................................................................................................................
Describe the use of pipelining in Reduced Instruction Set Computers (RISC).
The processing of instructions is divided into five stages: • instruction fetch (IF) • instruction decode (ID) • operand fetch (OF) • instruction execute (IE) • write back result (WB) Each stage is carried out using a different register when pipelining is used. Complete the table to show how a program consisting of six instructions would be completed using pipelining.
This truth table represents a logic circuit.
| INPUT | OUTPUT | |||
|---|---|---|---|---|
| A | B | C | D | Z |
| 0 | 0 | 0 | 0 | 1 |
| 0 | 0 | 0 | 1 | 1 |
| 0 | 0 | 1 | 0 | 1 |
| 0 | 0 | 1 | 1 | 1 |
| 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 0 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 | 0 |
| 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 | 0 |

Write the Boolean logic expression that corresponds to the given truth table as the sum-of-products. Z = ............................................................................................................................................
Complete the Karnaugh map (K-map) for the given truth table.
Draw loop(s) around appropriate group(s) in the K-map to produce an optimal sum-of-products.
Write the Boolean logic expression from your answer to part (c) as a simplified sum-of-products. Z = ............................................................................................................................................
Use Boolean algebra to give your answer to part (d) in its simplest form. Z = ......................................................................................................................................

State one category of machine learning.
Calculate the path that takes the shortest time to travel from the Begin node to the End node, using the A* algorithm. Show your working in the table provided. The first two rows have already been completed.
The pseudocode shown represents a queue Abstract Data Type (ADT) with procedures for initialisation and to add new items. It is incomplete. CONSTANT MaxLength = 50 DECLARE FrontPointer : INTEGER DECLARE RearPointer : INTEGER DECLARE Length : INTEGER DECLARE Queue : ARRAY[0 : MaxLength – 1] OF STRING // initialisation of queue PROCEDURE Initialise FrontPointer ← -1 ..................................................................................................................... ................................................................. ← 0 ENDPROCEDURE // adding a new item to the queue PROCEDURE Enqueue(NewItem : STRING) IF ............................................................................................. THEN RearPointer ← .................................................................................. IF RearPointer > MaxLength – 1 THEN RearPointer ← 0 ENDIF ................................................................................................................ Length ← Length + 1 ENDIF ENDPROCEDURE Study the pseudocode and insert the identifiers to complete this table.
| Identifier | Data type | Description |
|---|---|---|
| STRING | An array to store the contents of the queue. | |
| INTEGER | Points to the last item of the queue. | |
| INTEGER | Indicates the number of items in the queue. | |
| INTEGER | Points to the first item of the queue. |
Complete the given pseudocode.
Explain the reasons why a queue ADT works better than a stack ADT in organising print jobs.






