0% found this document useful (0 votes)
80 views16 pages

CompSci U1 P2 2024

Uploaded by

Sajiv Jadoonanan
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)
80 views16 pages

CompSci U1 P2 2024

Uploaded by

Sajiv Jadoonanan
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/ 16

TEST CODE 02115020

FORM TP 2024202 MAY/JUNE 2024

EXA MINA TIONS COUNCIL


CARIBBEAN
CARIBBEAN ADVANCED PROFICIENCY EXAMINATION
COMPUTER SCIENCE

FUNDAMENTALSOF COMPUTER SCIENCE

UNIT 1- Paper 02
2 hours 30 minutes

447

READ THE FOLLOWING INSTRUCTIONS CAREFULLY.

1. This paper consists of SIX questions. Answer ALL questions.


2. Write your answers in the spaces provided in this booklet.
3. DoNOT write in the margins.

4. If you need to rewrite any answer and there is not enough space to do so on the
original page, you must use the extra lined page(s) provided at the back of this
booklet. Remember to draw a line through your original answer.

A000 5. If you use the extra page(s), you MUST write the question number clearly in
thebox provided at the top of the extra page(s) and, where relevant, include
the question part beside the answer.

DONOT TURN THIS PAGE UNTIL YOUARE TOLD TO DO SO.

Copyright © 2023 Caribbean Examinations Council


All rights reserved.
L
02115020/MJ/CAPE 2024
SECTION A

COMPUTER ARCHITECTURE

Answer BOTH questions.

1. (a)
State the function of EACH of the following registers that are commonly found in
microprocessors.
(i) Instruction register (IR)

[1 mark)
(ii) Memory address register (MAR)

[1 mark]
(iii) Memory data register (MDR)

[lmark]

GE
02115020/MJ/CAPE 2024 GO ON TO THE NEXT PA
AREA terms of access method and access
(b) () Explain how a hard disk differs from RAM in
speed.
THIS

IN
WRITE

NOT
DO

AKEAn.

447

[3 marks]
portability.
INTHS (ii) Explain how RAM differs from a flash drive in terms of volatility and

THISAREADONOERITE

A000

[3 marks]

LN
KRITE

DONOI

GO ON TO THE NEXT PAGE


02115020/MJ/CAPE 2024

L 02 11 5 0 2 0 0 S
-6

'instruction format'.
(c) (i) Describe the term

[2 marks]

modes.
(i) Describe the following addressing
447
One-address

[2 marks]
Two-address

A000

(2 marks]

Total15 marks

02115020/MJ/CAPE 2024
GO ON TO THE NEXT PAGE
L -7

2. (a) The following is the truth table for a certain circuit.


Inputs Output
A B Z
1
0 1

1 1 1

Design and draw the circuit digram represented by the truth table above, using only primary
logic gates.

04

|4 marks|

GO ON TO THE NEXT PAGE


02115020/MJ/CAPE 2024

02
- 8

In a security system, four sensors are used to transmit data to a single line for alarm
(b)
second.
notification, Each sensor transmits data for one
described above
(i) Explain howa multiplexer can be used for the purpose

447

(3 marks]
(ii) Draw a clearly labelled block diagram of a 4 to 1 multiplexer that can be used in
the security system.

A000

(3marks]

02115020/MJ/CAPE 2024
GO ON TO THE NEXT PAGE
-9

(c) (i) State the smallest and largest integers that can be stored in eight bits when
signed
magnitude representation is used.
Smallest integer
Largest integer
[2 marks]
(ii) Calculate the 8-bit two's complement representation of-87.

[3 marks]

Total 15 marks

GO ON TO THE NEXT PAGE


02115020/MJ/CAPE 2024
- 10 -

SECTION B THE
WR
DO
PROBLEM-SOLVING WITH COMPUTERS

Answer BOTH questions.

to acowte
3. called Tech World sells used laptops and tablets. Tech World wishes
(a) Acompany laptops and tablets in stock and handle
software to track purchases, the quantities of
the serviceS of a software company
customer information, The company has contracted
that writes software applications.
generally follow when creating
Describe any TWO stages that the software company would
the software for Tech World.
47

ARE

THI

IN
HRI

NOT

DO
[4 marks]

A000 (b) () State TWOproperties of well-defined algorithms.

ARE

THI

IN
[2marks] WRI

NOT

DO

02115020/MJ/CAPE 2024 GOON TO THE NEXT PAGE

02 0 1 0
- 1| -

(ii) A Certain cellular company provides the following rates for purchasing cellphone
data.

Less thanlgigabyte = $4.00 per gigabyte


Between l and 2 gigabytes = $3.00per gigabyte
More than 2 gigabytes = $2.50 per gigabyte

Draw aflowchart that reads an integer value representing the number of gigabytes
used for voice calls and that calculates and prints the cost of calls.

19 marks|

Total15 marks
GO ON TO THE NEXT PAGE
02115020/MJ/CAPE 2024
J
- 12

4. (a) Describe the following problem-solving methods.


() Stepwise refinement

[2 marks]
(ii) Bottom up
447

[2 marks]
(b) List the THREE types of control constructs in structured
programming.

[3 marks]
A000
J
- 13
(c)
Consider the following
IF
algorithm.
(num > 1)
IF (num==3)

ELSE
PRINT "RED"
PRINT "BLUE"
ENDIF
ENDIF
PRINT "GREEN"
Write the output of the
algorithm when
(i) num == 1

(ii) num = 2

(iii) num =3

|3marks]

GO ON TO THE NEXT PAGE

02115020/MJ/CAPE 2024
01 3
- 14 -

(d) Complete the trace table for the following algorithm.


BoN
THSA
X=9
y=2
while (x >>y)
y=y+1
X=X- 1
Print x
Print y
End while

Iteration Print
447

2 ARB
3
THS
4

HRTE

[5 marks]
NOT
Total 15 marks
DO

A000

REA
INH

NOTW

DO
NOT
O

02115020/MJ/CAPE 2024
GO ON TO THE NEXT PAGE

L S0 2 0 1 4
L - 15

SECTION C

PROGRAMMING

Answer BOTH questions.

5. (a) (i) Define the term 'debugging'.

[1 mark]

(ii) State how EACH of the following can be used to create maintainable code.
Indentation

Comments

[2 marks]

GO ON TO THE NEXT PAGE


02115020/MJ/CAPE 2024
- 16

(b) Consider the following code segment.

Line 1. int a, b:
Line 2. for (a = 1;a <= 5: a)
Line 3. for (b =1:b<a: b=b+ 1)
Line 4. printf ("%s", b);
Line S. printf (n):
errors occur and
ldentify the THREE erors in the segment. State the lines in which the
rewrite the lines corectly.
Line

147
Line

Line

[6 marks
(C) Write C code to performthe following fileoperations.
(i) Read

[2 marks]
A000
(iü) Append

[2 marks]

(iii) Close

(2 marks
Total 15 marks
GOON TO THE NEXT PAGE
02115020/MJ/CAPE 2024
- 17

(a)
6. Differentiate between 'obiject oriented' and <functional'
programming languages.

[2 marks]

(b) Describe the following stages of the program translation proceSS.


() Lexical analysis

(ii) Syntax analysis

(ii) Code generation

[3marks|

programming languages.
TWOappropriate examples, explain the need for different
(c) Using

(J marka|

GO ON TO THE NEXI PAGi

02115020/MJ/CAPE 2024 J
- 18 -

(arr) and
accepts two parameters, an integer array print .
AREA
(d) Cfunction, maximum, that
Write a function should
indicating the size of the array. The
an integer variable (size) return a value. THMS
maximum value in the array and should not
WN

NOI
DO

447

[7 marks]
Total 15 marks

WR
NO
no

END OFTEST
IE VOIFINISH BEFORE TIME IS CALLED, CHECK YOUR
WORK ON THIS TEST.

You might also like