REPUBLIQUE DU
REPUBLIC OF CAMEROON
CAMEROUN
Peace – Work – Fatherland
Paix – Travail - Patrie
**********
**********
MINESEC/ RDSE-FN
MINESEC/DRES-EN
GENERAL CERTIFICATE OF EDUCATION EXAMINATION
FAR NORTH REGIONAL MOCK
0795 COMPUTER SCIENCE Paper 2
MARCH 2023 ADVANCED LEVEL
TWO AND A HALF HOURS
INSTRUCTIONS :
Answer any SIX(06) questions
You are reminded of the necessity for good English and orderly presentation in your answer
Non programmable calculators maybe used
P a g e |1
(1) (i) (a) Given the decimal number -5.75, show how this number can be normalized (4marks)
in simple precision
(b) Add 1025 and 1023 using 12 bits in 2’s compliment notation. Show your (2marks).
working.
(c) Represent the number -24 in BCD (1mark)
(d) Using an 8-bits 2's and 1’s complement representation of negative (4marks)
numbers, perform the following operations: -35+(-11) and 19-(-14)
(ii) A RAM has a capacity of 16k x 16
(a) How many memory addressing does this RAM have? (2marks)
(b) How many address lines will be needed for this RAM? (2marks)
(iii) State De Morgan’s theorem for two logic gates A and B (2marks)
(2) (i) (a) Differentiate between a RAM and a hard disk (2marks)
(b) Draw the structure of Von Neumann Computer architecture and label its (2marks)
parts.
(c) For each of the parts named in (b) above name one hardware device that is (2marks)
used in each case
(ii) (a) What is network topology? (2marks)
(b) Name and illustrate ANY THREE types of network topologies. (3marks)
(c) With the aid of a diagrams, differentiate between client-server and peer-to- (2marks)
peer computer network.
(iii) Give the full meaning of the following abbreviations
(a) CMOS (1mark)
(b) BIOS (1mark)
(iv) Explain the difference between volatile and non-volatile memory giving an (2marks)
example in each case.
(3) (i) (a) What is multiprogramming? (1mark)
(b) Give an advantage of a multiprogramming environment over mono- (1mark)
programming environment
(c) Explain the main different between preemptive and non-preemptive. (1mark)
(ii) Consider the following set of processes with the arrival times and CPU-
burst times given in milliseconds.
Process Arrival time Burst time
P1 0 20
P2 1 3
P3 2 6
P4 3 2
(a) What do you understand by burst and arrival time of a process? (1mark)
(b) Draw the Gantt charts if FCFS, RR and SRT scheduling strategies have (3marks)
been used
(c) Calculate the average waiting time of these processes (3marks)
(d) Which of the above algorithms is most suitable to implement and why (2marks)
(iii) (a) What is deadlock (2marks)
(b) What is a resource allocation Graph? (1mark)
P a g e |2
(c) Draw a resource allocation graph having 3 processes P1,P2 and P3 having (2marks)
three resources R1, R2 and R3 where P1 is holding R1 and requesting for
R2 and the processes are in a deadlock.
(4) (i) (a) Distinguish between a compiler and an interpreter (2marks)
(b) Distinguish between and array and a record as used in programming (2marks)
(c) Give two advantages and two disadvantages of high-level programming (4marks)
languages over low level.
(ii) Consider the two algorithms which both calculates the sum of the first Algorithm B
n integer
Function
Algorithm A
Function SumNumber(n:integer)
SumNumber(n:integer) Begin
Begin Sum n*(n+1)/2
Sum0
Return Sum
For 10 to n do
Sum sum +i End
Endfor
Return Sum
end
(a) What do you understand by the term, complexity of an algorithm. (2marks)
(b) Trace the algorithms A and B above for n=3. (use trace table if possible). (2marks)
(c) Determine the complexity of these algorithms. (2marks)
(d) Which algorithm is more efficient? Why? (2marks)
(e) What do you understand by the term ‘dry run’ an algorithm. (1mark1)
(5) (i) (a) What is programming? (1mark)
(b) Give two differences between a programming language and human (2marks)
language?
(c) What do you understand by the term ‘good attributes of a software’? (1mark)
(d) State and explain TWO of such attributes in (i (c)) above. (2marks)
(e) Define the terms Imperative, Declarative and Procedural programming (3marks)
paradigms
(ii) (a) What is a function or a subroutine? Why is it important in programming? (2marks)
(b) How are sub routines called from the main program. (2marks)
(c) Differentiate between actual and formal parameters as used in (1mark)
programming.
(iii) (a) Explain informally how insertion sort algorithm works (1mark)
(b) Show how insertion sort will sort elements by writing out its content after (2marks)
each pass of the array
15 5 4 7 9 13
(6) (i) (a) What is a binary tree? (1mark)
(b) Give one example of the use of a binary tree in computing (1mark)
(ii) The following data on the regional headquarters of Cameroon are to be
entered into a binary tree in the order given: BAMENDA,
MAROUA,BAFOUSSAM,NGOUNDERE,EBOLOWA,
BERTOUA,YAOUNDE,DOUALA,GAROUA, BUEA.
(a) Draw a binary tree diagram showing how the above data will be stored (4marks)
P a g e |3
(b) How many nodes are there in the diagram? (1mark) (1mark)
(c) If DOUALA is being searched from the above tree, list the data items that (2marks)
must be accesses
(d) Is the tree constucted above comlete of is a full binary tree or it is both. 1mark
(e) Bring out the output of the above tree if it is being traversed in : (3marks)
Preorder
In-order
Post-order
(ii) (a) Give one application of reverse polish notation(RPN). (1mark)
(b) Convert the expression (300+23)*(43-21)/(84+7) into RPN (2marks)
(c) Convert the expression ABC*D/+E-FG/HI+/+ into infix expression. (2marks)
(d) Consider the following arithmetic expression X written in postfix notation. (2marks)
Translate into infix notation and hence or otherwise, calculate the value of
X. X: 12,7,3,-,/,2,1,5,+,*,+
(7) (i) Define the following terms as used in database.
(a) A table (1mark)
(b) A field (1mark)
(c) A record (1mark)
(d) An entity (1mark)
(e) A foreign Key (1mark)
(ii) In a small shop in your quarter, the shopkeeper has a two record books; one
for his daily sales and the other for his debtors and creditors. He adds up
sales per day to know how much money he has made on the day. He equally
adds amounts loaned to him and borrowed out(in articles) to know how
much he owes and how much he is owed respectively. He also subtracts
money loaned to him from money owed him to know his debt balance. In
the end, he adds the balance to his sales to know his business state of
account. That is whether he runs on a deficit or surplus.
(a) What is an information System (1mark)
(b) State any two types of Information system (1mark)
(c) Has this shop got an information system? Explain. Give the type of (3marks)
information system in case of yes.
(iii) The shopkeeper in (ii) above decided to hire someone to design a database
for him. The designer brings out a table as shown below.
BuyerID BorrowerID CreditorID Amount Date
(a) In what normal form is the table above? (1mark)
(b) Given your knowledge of the situation in the shop, put the supposed (3marks)
database (the table) in its third normal form(3NF).
(c) Give the various database entities that result from the normalization in (b) (3marks)
above, with their various attributes.
(8) The recur below is a recursive function. Study the function and answer the
questions that follow.
P a g e |4
Function recur(m,n)
Start
if(n=0)
return m
else
return recur(n,m mode n)
end
(i) (a) What is a recursive function? (1mark)
(b) Evaluate recur(6,3) and recur(4,6) (2marks)
(c) Deduce what the function does. (1mark)
(ii) (a) What is mutual exclusion in process management? (1 mark)
(b) State TWO major activities of an operating system with regard to process (2 marks)
management
(c) Draw the state diagram of a process from its creation to termination, (5 marks)
labelling all transitions.
(iii) Two teachers of computer science in a school use a central database which
is accessed remotely. The two teachers decide to modify a student's score in
computer science. Teacher A decides to increase the score by 5 because he
feels that the test was very difficult while teacher B decides to reduce three
marks because he thinks that the student cheated during the test. They each
go through the instruction below.
(a) If the teachers, A and B both decide to do these updates at the same time, (1mark)
Teacher B performs each instruction immediately after teacher A has done
his. Teacher A's execution of next instruction and B's execution of previous
instruction overlapping. What negative consequence can result from this
simultaneous access and modification of a shared memory location
(b) What do we call this condition? (1mark)
(c) How can it be avoided? (1mark)
(d) What would be the result if the original mark was 10/20? (1mark)
(e) What is the section "READ, MODIFY, STORE" called in process (1 mark)
management?
END
P a g e |5