Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

JUNE 2023 Paper 2 Solution JUNE 2023

1 (a) – Sequential Access: with sequential access, memory locations are accessed linearly controlled by the CP,
while with direct access storage devices are accessed directly without the control of the CPU.
(b) (i)

(ii) (a) A Half Adder is a combinational logic circuit that takes two inputs and gives two outputs(a sum and a
carry), whereas, a Full Adder is a combinational logic circuit that takes three inputs and gives two outputs a sum
and a carry[1].

(b) Block diagram

(iii)
- CPU clock Speed: the more instructions the CPU can fetch and execute per second the better the performance.
- Number of cores: the more the number of cores in a processor the better the performance.
- Cache Size: the larger the cache size the better the performance.
- Word Length: the larger the word size the better the performance.
- Instruction set: the fewer the instructions in the instruction architecture the faster the performance.
- Data bus width: the larger the data bus width the better the performance.

2.(i)(a) Denary equivalent

(b) in hexadecimal
. Grouping in 4 bits =>

(c)

The result is erroneous since the decimal value is larger than the maximum allowed decimal value using 8 bits. An
overflow has occurred.
(ii)(a)

,
If there is equal distribution of bits between Opcode field and Operand field, then each field will be assigned

Thus possible minimum for Opcode =


(b)
(c) Based on minimum for Ocode and Registers above,

(d) – It has fewer instruction formats


- It uses fewer addressing modes
- It makes use of single cycle instructions
- It executes instructions faster

(iii) (a) – SISD: Single Instruction Stream, Single Data Stream.

(b) Block Diagram

3.(i)(a) With paging, the logical address space of a process is split into equal sized blocks called pages each
assigned an equal sized memory block called a frame, whereas with segmentation a processes logical address space
is split into variable sized blocks called segments.
Other differences:
- Paging is a faster technique in accessing memory whereas segmentation is slower.
- Page sizes are determined by available memory while in segmentation, segment sizes are determined by the user.
- Paging might lead to internal fragmentation whereas segmentation may lead to external fragmentation.

(b) The Operating system manages and coordinates the functioning of hardware.

(c) – Real time processing is a type of processing in which data is processed immediately as it originates.
Real life Examples: Aircraft control systems, Defense Application Systems like RADAR, Command control
systems, Stock exchange systems for up to date information.

- Batch Processing is a type of processing system in which jobs are collected and accumulated over a period of
time and processed periodically.
Real life Examples: Payroll systems, Bank statement processing systems, Supply chain fulfillment, Inventory
processing, Report generation.

(ii)(a) Gantt chart

(b)
Process AT ST CT TAT WT
P1 0 7 16 16 9
P2 2 4 7 5 1
P3 4 1 5 1 0
P4 5 4 11 6 2
Average Turnaround time

Average Waiting time

(c)

4.(i) (a) A computer network is an interconnection of devices using communication links for the purpose of sharing
resources.
(b) Advantages
- File sharing: networks provide a rapid method for sharing and transferring files.
- Resource sharing: networks enable limited or expensive resources such as printers, scanners, copies or software
to be used by all configured devices in the network for which access is allowed.
- Increase storage capacity: it enables files and multimedia (such as images, audio, video) to be stored and accessed
remotely on other machines or network attached storage.
- Data is easy to backup since it stored in a file server.

Disadvantages
- Cost: the initial cost of setting up a network may be high.
- Liable to malware: Malware like viruses can spread to other computers throughout the network easily.
- Security: computers in a network are liable to dangers like hacking especially if they’re no protected with a
firewall.
- Server Failure: if the server breaks down, files and data will be in accessible.

(ii) (a) Twisted Pair, Coaxial and Fiber Optic cables.

(b) - Band width: the choice of cable should have a band width that provides the best band width desired for the
application.
- Transmission rate: the choice of cable should provide high data transmission rate as desired.
- Effect of transmission impairments: the choice of cable should be one less affected by transmission impairments
like attenuation, interference, distortion.
- Ease of installation: the choice of cabling should be one which can be installed within reasonable time and for
which there exist skilled personnel to set it up.

(c) Microwave (also: Satellite, Infrared, RFID(radio-frequency identification), Bluetooth, Free Space Optics) : it
makes use of electromagnetic(EM) waves to transmit signals between devices.

(d) Advantage
- Wireless networks are easier and faster to setup.
- Devices within range can easily be added to the network.
- Wireless networks can be accessed while moving around with your devices without being disconnected.
- They can be extended to places where cables cannot be accessed.

Disadvantage
- Wireless networks are more exposed to attacks by unauthorized users.
- Signal interruptions: interference may be experienced if other people also use wireless technology or other
sources emitting EM waves.
- Wireless transmission is relatively slower
- They have limited band width

5.(i)(a) Anomalies
- Insertion Anomaly: it occurs when the insertion of a new data record is not possible unless additional unrelated
data is added to the record.
Example: inserting a student record in a table containing student and course information is impossible unless course
data is provided.

- Deletion Anomaly: it occurs when the deletion of a data record leads to the deletion of unrelated data that was
stored as part of the record.
Example: deleting a student record in a table containing student and course information may lead to deletion of
information about a course.

Update Anomaly: it occurs when data that exist in many fields is updated in some but not all fields containing the
same data.
Example: if a student’s age is changed from 25 to 16 in one field but not in other fields for the same student, the
student age becomes inconsistent.

(ii)(a)
- Primary Key: it is an attribute or group of attributes that can uniquely identify records in a table e.g Stud_ID or
Trip_ID.
- Composite key: It is a collection of two or more attributes which are minimal. E.g (Stud_ID, Trip_ID)
- Associative table: A table that maps two or more tables together by referencing their primary keys e.g
PAYMENT.
.
(b) Many to Many (M:N) relationship. A student can attend many trips and a trip can be attended by many students.

(c) SQL Query


SELECT COUNT(payment.trip_id) AS Number_of_Payments, trip.trip_id
FROM trip, payment
where trip.trip_id = payment.trip_id
GROUP BY trip_id;

6. (i) (a)
- Infix: a way of representing arithmetic operations in which operators are placed in between operands.
- Prefix: here operators precede operands.
- Postfix: Here operators are placed after their operands.

(b) Expression Tree

(c) Post-Order Traversal is used.

Post-Fix Order:

(ii)(a) Trace Table

8 0 1
7 1 1
6 1 2
5 2 3
4 3 5
3 5 8
2 8 13
1 13 21
0 21 34

(b) Deduction of computation

The algorithm computes the Nth Fibonacci Number.

(c) Complexity

7.(i)(a) It is the order in which individual statements, instructions or function calls of an imperative program are
executed or evaluated.

(b) Pre & Post Test Loops


(c)
- Pre-Test Loop: For or While loop
- Post-Test Loop: Do-while (Repeat-Until) loop.

(ii) (a) Outputs

(b) f2 is more efficient. This is because f2 is called only once thus using less time and space compared to f1.

(c) Parameters are the variables declared in a functions parameter list, when it is declared or defined, whereas
arguments are the values passed to a function when it is called.

8.(i)
- Determining the type of data and data transformation procedures needed.
- Decide on the type of tools (software & Hardware) to use.
- Build a model/template of the new/existing system.
- Proposition of alternative solutions.
- Quality verification and validation.
- Planning and assessment for security risk.

(ii) This can occur if components pass the unit test but when integrated together do not interface correctly with each
other, and therefore fails to run. Integration testing fails.

(iii) (a)
- Immediate change: Applicable in small organizations which do not carry out critical operations.
- Running in Parallel: Applicable for organisations that run critical (high risk) operations that are similar for both
the old and new system.

- Gradual Introduction of New system: Applicable in Organisations that run clearly distinct operations in different
departments.

(iv)(a)
- Black box testing: here, the functioning of the system is tested without any knowledge of the internal working of
the system.
- White box testing: here, the internal structure or working of a program/system is verified, requiring coding or
technical skills.
(b) Test Data
Test data Justification
Normal/Valid data: Any integer 18 entered will display the message
age should be integer “you can vote” because it is within acceptable
18 voting age.
Abnormal/Invalid Any value entered the program should display
data: any age 18 “you cannot vote”, because it is an unacceptable
age range.
Boundary data: 18 It is acceptable since it is the minimum voting age.
The program will display “you can vote” when 28
is entered.

END of JUNE 2023

You might also like