0% found this document useful (0 votes)
66 views4 pages

0795 A - LEVEL Computer SC P2

This document outlines the Computer Science Advanced Level examination for March 2025, including subject code 0795 and instructions for answering six questions within two and a half hours. It covers various topics such as binary operations, algorithms, object-oriented programming, computer architecture, networking, and database management systems. Each question carries 17 marks and includes specific tasks such as calculations, algorithm writing, and theoretical explanations.

Uploaded by

loudlyne74
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)
66 views4 pages

0795 A - LEVEL Computer SC P2

This document outlines the Computer Science Advanced Level examination for March 2025, including subject code 0795 and instructions for answering six questions within two and a half hours. It covers various topics such as binary operations, algorithms, object-oriented programming, computer architecture, networking, and database management systems. Each question carries 17 marks and includes specific tasks such as calculations, algorithm writing, and theoretical explanations.

Uploaded by

loudlyne74
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

COMPUTER SCIENCE 2

0795
INSPECTORATE OF COMPUTER SCIENCE NORTH REGION
MARCH 2025 ADVANCED LEVEL
Subject Title Computer Science
Paper No. 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 answer at each stage.
Electronic calculators are allowed.
_______________________________________________________________________________________________
1. (i) Computers use 2’s complement to easily perform operations
(a) Give the range of numbers that can be represented in two’s complement given n bits. (1mark)
(b) Using 7 bits, add 63 and -64 in 2’s complement. (2marks)
(ii) The binary pattern 101111100100 could be interpreted in a number of different ways
(a) State its hexadecimal representation (1mark)
(b) State its value in denary if it represent unsigned fixed point number with 4 bits after the binary point.
Show your working (2marks)
(c) State its value in denary if it represents a two’s complement integer. Show your working (2marks)
(iii) Convert the decimal real number (10.75) into a binary floating point representation using 8bits for mantissa
and 4bits for exponent and then normalize it. (2marks)
(iv) In the diagram, boxes A and B represent two registers in CPU of a computer

A CPU B

Data bus Control bus Address bus

Main memory

For this architecture, identify and state the purpose of registers A and B respectively (4marks)
(v) A bank approves a customer for an account based on the criteria in the following table.
Parameter Description of parameter Binary value Condition
A Employed 1 True
0 False
B Self-employed 1 True
0 False
C Over 21 1 True
0 False
D Earn more than 30000FCFA 1 True
0 False
E Another account 1 True
0 False
A customer is approved (Q = 1) if the person is over 21 and employed or is over 21 and self-employed and
either earns more than 30000FCFA or has another account.
(a) Establish an output equation Q for this system (2marks)
(b) Draw a logic circuit to represent the model. (2marks)
2
2. (i) (a) Write a recursive algorithm to calculate the factorial of a positive integer n(i.e n!).
Note 1! =1 (2marks)
b) Write an iterative algorithm for the same computational as in (a) above. (2marks)
c) Which of them is faster at runtime? Why? (2marks)
(ii)(a) Describe the following terms as used in object-oriented programming (OOP): object and inheritance.
(2marks)
(b) With the use of diagrams only and three classes A, B and C, distinguish between multiple inheritance and
multi-level inheritance. (2marks)
(iii) A web browser is used to request and display a page stored on an internet web server. Explain how each of
the following items is used in this event.
(a) Router (2marks)
(b)TCP/IP (2marks)
(iv) Consider the internet protocol address [Link]
(a) Every IP address has two parts, identify the parts with respect to the IP address given above. (2marks)
(b) State the class of the IP address given above. (1mark)

3. (i) (a) what is a subroutine? (1mark)


(b) State TWO advantages of subroutine in programming (2marks)
(c) State and describe TWO ways by which parameters can be passed to a subroutine (4marks)
(ii) Consider a pseudocode fragment below where this() is a subroutine, X,Y,Num1,Num2 are positive
integers
1. Sub this(X, Y)
2. X←X+Y
3. Y←X-Y
4. X←X-Y
5. EndSub
//Main program
6. BEGIN
7. GET Num1
8. GET Num2
9. this (Num1, Num2)
10. PRINT (Num1, Num2)
11. END
(a) Give ONE example each of actual parameter and a formal parameter used in the pseudocode fragment
above (2marks)
(b) State the output on line 10,given that the input values for Num1 and Num2 are 3 and 5 respectively and
parameters are passed by value (2marks)
(c) Is the subroutine this () a function or procedure? Explain why (2marks)
(iii)(a) What is counting loop? What three actions do counting loops typically perform using the counter
variable? (2marks)
(b) Write a Pseudocode (use for…loop structure) that takes 10 numbers from a user and output their total
(2marks)
_________________________________________________________________________________________
4. (i)Describe the function of each of the following in a computer system
(a)Address bus
(b)Program counter (2marks)
(ii) (a)What is stored program concept in Von Neumann architecture (2marks)
(b) What is cache memory? How is cache memory different from main memory? (2marks)
(c) Explain how increasing the RAM size can improve the performance of a computer (2marks)
3

(iii)(a) Describe a common scenario where the reverse Polish notation may be used. (1mark)
(b) The expression ab+cd-/ is an arithmetic expression given in reverse Polish notation. Give its infix
expression. (1mark)
𝒂
(c) Change into a prefix expression. (2marks)
𝟐∗(𝒃+𝒄)
(iv) (a) A student will not be allowed to sit for anexamination if he or she attendance is less than 80%. Take the
following input from the user:
-Number of classes held
-Number of classes that were attented by the student. Write a algorithm in pseudocode to find out the attendance
percentage for the student and show if the student will be allowed to sit for the examination or not. (2marks)
(b)Assuming your algorithm can be accepted to use multiple processors on parallel machines, briefly state the
difference between using a single processor and using parallel processors in running programs. (2marks)
(c) State a main advantage of using parallel processors in this case (1mark)
_________________________________________________________________________________________________
5. (i)(a) What is a scheduling policy in operating systems? (2marks)
(b)Describe the terms throughput and turnaround time as used in scheduling, stating how each can be used as a
metric for a given scheduling policy. (4marks)
(c)Describe TWO different events that leads to the scheduler being invoked. (2marks)
(ii) Consider the table given below about a set of processes to be executed by the processor
Process Execution time Arrival time
P1 8 0
P2 4 1
P3 9 2
P4 5 3

Draw a Gantt chart for each of the 4 processes using the following scheduling algorithms
(a) Round Robin (RR) with a time slice of 4 milliseconds (1mark)
(c) Shortest Remaining time Next (SRTN) (2marks)
(d) Calculate the average waiting time of the above scheduling algorithms (4marks)
(e) State which of them is best to implement and why? (2marks)
_________________________________________________________________________________________________
6. (i) Explain the difference between the following pairs of networking terms:
(a) Half-duplex and full-duplex communication (2marks)
(b) Synchronous and asynchronous transmission. (2marks)
(c) Many fast broadband connections use fiber optic cables instead of copper cables. State two reasons why fiber
optic cable is the preferred choice. (2marks)
(ii) The letters P, W, O, E, I, R, U, T and Y are to be inserted in the given order into an initially empty binary
search tree. Draw the corresponding binary search tree and give its Breadth first traversal. (3marks)
(iii) Consider the binary search tree below

E O

Q
C G Figure 1

(a)What is a complete binary tree? (1mark)


(b) What is the height of this tree? (1mark)
(c)State in what order a Node, its Left child and its Right child would be visited in each of pre-order and post-
order. Hence, determine the pre-order and post-order traversals of the tree above. (3marks)
4

(d) Node L is to be deleted from the tree above. Draw the resulting binary tree when a replacement node is
chosen from the left subtree. (2marks)
(e) Give an array representation of the binary tree in Figure 1. (1mark)
__________________________________________________________________________________________
7.(i) A school stores a large amount of data. This includes student attendance, qualification, and contact details.
The school’s software uses a file-based approach to store this data.
(a) The school is considering changing to a DBMS. What is DBMS? Give ONE example of DBMS. (2marks)
(b) The DBMS has replaced software that used a file-based approach with a relational
database. Describe how using a relational database has overcome the previous problems
associated with a file-based approach. (2marks)
(ii) A relation NADDR is defined as follows NADDR= (Name, street, city, state, postalCode) where Name is
unique and for any given postal code, there is just one city and state.
a) Give a set of functional dependencies for this relation (2marks)
b) Is NADDR in 2NF? Explain why (1mark)
c) NADDR is not in 3NF, normalized it into 3NF relation (2marks)
(iii) Consider the database schema below.
tblStudents (studentId, studentName, DOB)
tblSubjects(SubjectCode, SubjectTitle)
tblResults(studentId, subjectCode, grade)
(a) Give an SQL DDL definition for the table tblResults, tblSubjects, tblStudents. (3marks)
(b)Explain the term referential integrity as used in databases. (1mark)
(c) Identify ONE referential integrity constraint that has been included in the DDL definition in (a) above.
(1mark)
(d)Present exactly ONE row of sample data for the table tblStudents and TWO rows of sample data for each of
the tables tblSubjects and tblResults. (2marks)
(e)Draw an E_R diagram for the relations (2marks)
__________________________________________________________________________________________________
8. (i) (a) what is software testing? Why is software testing very important? (4marks)
(b)What are data coupling and control coupling? (2marks)
(ii)(a)Explain the waterfall model of software development life cycle. State TWO of its main limitations?
(4marks)
(b)Why is design an important phase in software development life cycle? Describe the design process
(3marks)
(iii) The quality of software is determined by six major Attributes: Usability, Efficiency, Maintainability and
Portability. Define these terms in the light of software quality assurance (4marks)
__________________________________________________________________________________________

THE END

You might also like