0% found this document useful (0 votes)
49 views

HIHS AL CSC Paper 2 2024

The document is a mock exam for computer science containing 7 questions testing knowledge of topics such as data structures, algorithms, databases, computer architecture, operating systems and computer networks. Students are required to answer 6 out of the 7 questions, with each question worth 17 marks.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views

HIHS AL CSC Paper 2 2024

The document is a mock exam for computer science containing 7 questions testing knowledge of topics such as data structures, algorithms, databases, computer architecture, operating systems and computer networks. Students are required to answer 6 out of the 7 questions, with each question worth 17 marks.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

HOLY INFANT HIGH SCHOOL MELEN-YAOUNDE

Mock General Certificate of Education Examination

0795 Computer Science 2

MOCK EXAM 2024 ADVANCED LEVEL

Paper title Computer Science


Paper No. Paper 2
Subject Code No. 0795

Two and a Half Hours

Answer any SIX questions.

All questions carry 17 marks each. For your guidance, the approximate mark for each part of a
question is indicated in brackets.

You are reminded of the necessity for good English and orderly presentation in your answers.

In calculations, you are advised to show all the steps in your working, giving your answer at
each stage.

___________________________________________________________________________________

0795/2/C/2 © MARCH 2024 HIHS


1)
a) Computers use 2’s complement to easily perform operations
i) Give the range of numbers that can be represented in two’s complement given n bits. (1 mark)
ii) Using 7 bits, add 63 and -64 in 2’s complement. (3 marks)
b) A floating point binary number 11101011 is stored using 5 bits for the mantissa and 3 bits for the exponent, both
in 2’s complement form. Show how this number can be normalized. (2 marks)
i) Find the denary equivalent of the normalized number (2 marks)
c) Explain the main difference between a sequential and combinational logic circuit. (2 marks)
d) From the truth table below;
i) Deduce the Boolean expression for sum and carry, and then draw the logic circuit diagram. (4 marks)

X Y sum carry
0 0 0 0
0 1 1 0
1 0 1 0
1 1 1 1

ii) Using Boolean identities, Proof that XNOR gate is the complement of a X’OR gate. (3 marks)
2)
a) Briefly explain the difference between the followings
i) Computer architecture and computer organization. (2 marks)
ii) Polling and interrupt. (2 marks)
b)
i) What do you understand by the term addressing mode as used in computer architecture? (2 marks)
ii) Suppose the notation #K denotes “take value of K” and R1 R2 R3 are registers. If ADD is an opcode and (R1
R2 #R3) and (R2,#10) are operands. State for each set of operands, the addressing mode used and how it
works with the ADD opcode. (4 marks)
c) A microprocessor has RAM chip with capacity of 128 x 8.
i) How many of these memory chips are needed to provide a memory capacity of 2KB. (2 marks)
ii) And how many address lines must be used to access the memory. (2 marks)
iii) How many of these lines will be common to all chips? (1 marks)
d) Briefly explain the concept of pipelining and how it affects machine performance. (2 marks)
3)
a) In the context of process management, define throughput, response time, critical section, context switch. (4
marks)
b) Two types of processes in the operating system (OS) are I/O bound and CPU bound processes. How do they
differ? (2 marks)
c) Consider the table given below about a set of processes to be executed by the processor

process Arrival time Service time


P1 0 8
P2 1 4
P3 2 9
P4 3 5
i) Draw the gant charts for shortest Remaining time Next (SRTN), and for round Robin(RR) scheduling
strategies using a time slice of 4 milliseconds (2 marks)
ii) Calculate the average waiting times of each of the processes in each algorithm. ( 6 marks)
iii) Give one advantage of SRNT scheduling policy over all other scheduling policies. (1 mark)
0795/2/C/2 © MARCH 2024 HIHS
d) Briefly explain one method of file organizations in operating systems. ( 2 marks)

4)
a) The OSI model is a conceptual model that describes how devices communicate on a network
i) List the 7 layers of the OSI model in chronological order. (3 marks)
ii) Name one device and one network protocol applicable in layer 2. (2 marks)
b) Explain ONE method that can be used to detect errors during data transmission. (2 marks)
c) Then state 2 major considerations for selecting a topology for a school network. (2 marks)
d) Consider the internet protocol address 172.16.1.45
i) Every IP address has two parts, identify the parts with respect to the IP address given above. (2 marks)
ii) State the class of the IP address given above. (1 mark)
e) Distinguish between synchronous and asynchronous communication (2 marks)
f) Briefly describe any TWO guided and ONE unguided transmission media. (3 marks)

5)
a)
i) Briefly explain is the difference between Composite and simple data structure? (2 marks)
ii) Describe briefly, the concept of binary search algorithm (2 marks)
iii) Explain the term “complexity of algorithm”. (2 marks)

b) Consider the data structure below


4 15 10 16 1
i)
Write out the content of this data structure after the second pass (scan), when insertion sort algorithms is
applied. (2 marks)
c) Below is a recursive algorithm to compute the Fibonacci sequence
Function fibo(n){
IF n <=1 THEN
RETURN n
ELSE
RETURN fibo(n-1) + fibo(n-2)

i) Draw the recursive tree diagram to trace this algorithm for n = 5 (3 marks)
ii) Write an equivalent algorithm in pseudo code format using iteration and draw the flowchart. (6 marks)
6)
a) C programming language supports imperative, procedural and structured programming paradigms. Briefly
explain these paradigms with respect to C language. (3 marks)
i) Explain the object oriented programming (OOP) concepts of encapsulation and abstraction giving ONE real
life example of each. (4 marks)
b) Three common programming errors are syntax, semantic and run time errors. Give an example of a situation
where each of these errors may occur in C programming. (3 marks)
c) Define the term portability in the context of programming (1 mark)
d) Below is a subroutine that computes the factorial of a positive integer. Design suitable test data that will
rigorously test the subroutine. Make sure you give reasons for your choice of test data item(s). (6 marks)
def factorial(number)
IF number < 0:
RETURN “Factorial is not defined for negative numbers”
ELSE IF number == 0:
RETURN 1
ELSE
RETURN number * factorial(number - 1)
END FUNCTION
0795/2/C/2 © MARCH 2024 HIHS
7)
a) Briefly define the following database related terms
i) Entity, attribute, data model, data integrity. (4 marks)
ii) State and explain the type of data dependencies addressed by the second (2NF), and the third normal forms
(3NF). (4 marks)
b) Consider the database schema illustrated below
Employee(empID, empName, dptmID*)
Department(dptmID, dpmtName, Location)
i) Explain the term referential integrity using the database schema above. (3 marks)

The database is to be modified such that an employee can work in more than one department, and a department
may have several employees.

ii) State the type of relationship that exists between the employees and the departments entities? (1 mark)
iii) Briefly explain how this type of relationship could be implemented in a database. (2 marks)
iv) Write an SQL DDL query to create an associative table for this database called empDepmt including its key
fields. (3 marks)
8)
a) SDLC comprise of the well-defined standard steps to develop an information system.
i) What is an information system? (2 marks)
ii) Describe one type of information system. (2 marks)
iii) Outline the major activities involved in the design and support phases of SDLC. (4 marks)
b) Briefly explain the purpose of documentation in SDLC. Give any TWO types, stating their contents. (4 marks)
c) Consider the expression 7+ ((8 x (3^2)) + 4.
i) Draw the binary expression tree of the expression. (3 marks)
ii) Produce the postfix and prefix forms of these expressions. (2 marks)

GO BACK AND CHECK YOUR WORK!!!!

0795/2/C/2 © MARCH 2024 HIHS

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy