Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
58 views
26 pages
CompSci U1 P2 2019
Uploaded by
Jonathan Williams
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save CompSci U1 P2 2019 For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
58 views
26 pages
CompSci U1 P2 2019
Uploaded by
Jonathan Williams
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save CompSci U1 P2 2019 For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save CompSci U1 P2 2019 For Later
You are on page 1
/ 26
Search
Fullscreen
fe 6 rest cope 02115020 | FORM TP 2019182 MAY/UNE 2019 CARIBBEAN EXAMINATIONS COUNCIL CARIBBEAN ADVANCED PROFICIENCY EXAMINATION® COMPUTER SCIENCE FUNDAMENTALS OF COMPUTER SCIENCE, | UNIT 1 —Paper 02 2 hours 30 minutes 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. Do NOT 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, 5. Ifyou use the extra page(s) you MUST write the question number clearly in the box provided at the top of the extra page(s) and, where relevant, include the question part beside the answer. DO NOT TURN THIS PAGE UNTIL YOU ARE TOLD TO DO SO, Copyright © 2018 Caribbean Examinations Council All rights reserved.SECTION A COMPUTER ARCHITECTURE AND ORGANIZATION Answer BOTH questions. 1. @)_~—@_ Construct the truth table for the cireuit in Figure 1. List ALL possible input bit patterns and corresponding outputs, annals i Output peel Figure 1. Cireuit [5 marks] GO ON TO THE NEXT PAGE, 02115020/MJ/CAPE 2019 SAE MBURARAGUERRAS PRU PARSER SER| iz fae “| (ii) Write the logic expression that represents the operation of the circuit in Figure 1. (2 marks] Gili) Draw a diagram of a circuit that can accept two binary inputs referred to as X and Y. The circuit should represent the propositional logie for (NOT X) OR (NOT Y). _DONOT WRITE IN THIS AREA DONOT WRITE IN THIS AREA [5 marks] DO NOE WRITE IN THES AREA GO ON TO THE NEXT PAGE, 02115020/MJ/CAPE 20195 (>) Describe the funetion of the following components, giving an example of the use of EACH in modern computer systems. ()— Multiplexor (i) Decoder [2 marks] | shah Aah sa moos GO ON TO THE NEXT PAGE, (02115020/MJ/CAPE 2019pe | DO NOT WRITE IN THIS AREA, DO.NOT WRITE IN THIS AREA DONOT WRITE IN THIS AREA r 7 7 (©) Describe, with the aid of a block diagram, how a 2-4 line decoder can be applied within a centralized gate opener system that manages four gates of an apartment complex. The system should allow each’of the four tenants to open his/her own gate, [5 marks} GO ON TO THE NEXT PAGE, 02115020/MINCAPE 2019lai a (@)__ Describe how the program counter register is useful while a computer program is exec! a series of steps. [4 marks} Total 25 marks GO ON TO THE NEXT PAGE, 02115020/MJ/CAPE 2019DO NOT WRITE IN THIS AREA DO NOT WRITE IN THIS AREA DO NOT WRITE IN THIS AREA * 1 2. (@)_~—()_State ONE reason why two’s complement representation is considered more suitable to represent integers in modern computers than sign and magnitude and ‘one’s complement. {1 mark] Gi) State the range of numbers that can be represented by using two’s complement format with 16 bits. [2 marks} Gii)__Detive the two's complement representation of the decimal value -75. Show all working at each stage in the conversion [3 marks] GO ON TO THE NEXT PAGE, 02115020/MJ/CAPE 2019Cs -10- aa (b) The sequence 01010101 represents a simplified floating point number format with a 1-bit sign, 3-bit exponent and 4-bit mantissa, In the simplified format, the smallest value in the ‘mantissa is 0, and the Binary point is situated immediately to the left of the mantissa. Write the decimal value that 01010101 represents. Show all working. [5 marks} a aT GO ON TO THE NEXT PAGE 02115020/MVCAPE 2019DO NOT WRITE IN THISAREA ‘DO NOT WRITE IN THIS AREA DO NOT WRITE IN THIS AREA T ek © microprocessors: | + Memory Address Register (MAR) 5 State the function of EACH of the following registers that are commonly found in + Memory Data Register (MDR) + Instruction Register (IR) [1 mark] [1 mark] 02115020/MJ/CAPE 2019 [6 marks] GO ON TO THE NEXT PAGEr “es 1 @_ @__ Explain how cache memory can increase the speed of a computer system. [3 marks] (i) Briefly outline ONE situation where cache memory does not help to speed up a computer. TE ea [2 marks} Total 25 marks GO ON TO THE NEXT PAGE 02115020/MJ/CAPE 2019DO NOT WRITE IN THIS AREA DO NOT WRITE IN THISAREA DO NOT WRITE IN THIS AREA 3. (a) (b) -B- “| SECTION B PROBLEM-SOLVING WITH COMPUTERS Answer BOTH questions, List THREE properties of a well-designed algorithm, [3 marks} ‘Write an algorithm that accepts an integer and then prints all multiples of 7 that are less than the accepted integer. You may assume the existence of a function named mod, which accepts two arguments, and returns the remainder when the first argument is divided by the second. [6 marks} GO ON TO THE NEXT PAGE (02115020/MJ/CAPE 2019r “m 7 (© Consider the following algorithm where b, x and Result are integers. Read b Read x If (<0) or (x <0) Result else Result = While (x> 0) begin Result = Result * b; xex-1 end Print Result GO ON TO THE NEXT PAGE, 02115020/MI/CAPE 2019DONOT WRITE IN THIS AREA DONOT WRITE IN THIS AREA DO NOT WRITE IN THIS AREA | fee = 15+ @_—__Drawa flowchart that shows the algorithm, 02115020/MI/CAPE 2019 [10 marks} GO ON TO THE NEXT PAGE7 “6 1 Gi) Write the value that is printed if =3.and x=3 at the start of the algorithm, [1 mark] Write the value that is printed if b= 3 and x = 0 at the start of the algorithm. ‘lL mark] (d)___Aconstruction company sells equipment and wishes to aequire software to track purchases, customer information and the quantity of construction equipment in stock. ‘The company has contracted the services of a software company that writes software applications. Briefly describe any TWO stages that the software company should follow when ereating the software for the construction company. “ld marks] ‘Total 25 marks | : | GO ON TO THE NEXT PAGE, 02115020/MJ/CAPE 2019‘DO NOT WRITE IN THIS AREA DO NOT WRITEIN THis AREA DO NOT WRITE INTHISAREA | i “m 7 (@) Define EACH of the following terms: (i) Selection structure Tt mark] eration structure [1 mark] Gil) Funetion [1 mark] (b) [B marks] GO ON TO THE NEXT PAGE (02115020/MJ/CAPE 2019i -18- 7 (©) Consider the function print which has been written using C, void print (int numstars) { int row, i iH0; row=; while (row <= numstars) { i-0; while (i <(numstars —row)/2) t printt#"); it; 3 while (i < row) { printg(“*"); ies < (oumstars — rowy/2) print); rowst; printi(in"); 3 } GO ON TO THE NEXT PAGE, 02115020/M/CAPE 2019rs DONOTWRITEIN THIS AREA DO NOT WRITE IN THIS AREA DO NOL WRTEIN THIS REL fF “ 7 (Draw the output expected when print(S) is executed. [5 marks] GO ON TO THE NEXT PAGE 02115020/MJ/CAPE 2019=20- 5 Gi) Rewrite the function print using for statements instead of while statements, 02115020/MNCAPE 2019 GO ON TO THE NEXT PAGE.(| DONOT WRITE IN THIS AREA ape DONOT WRITE IN THIS AREA SiR) BO NOT WRITE INT E a . ()___ The factorial ofa positive integer is defined as the product of all integers between itself and 1, and the factorial of | is,1. Write a function named faet that accepts an integer argument 1 and returns the factorial. As examples, . fact(1) should return 1, . fact(3) should evaluate 3x 2 * 1 and return 6, and . fact(5) should evaluate 5x 4 x3 x 2x | and return 120 18 marks] Total 25 marks GO ON TO THE NEXT PAGE, 02115020/MJ/CAPE 20195. @ a, Gi) =22- at SECTION C PROGRAMMING ‘Answer BOTH questions. Define the term ‘debugging’ [1 mark} State how EACH of the following can be used to create maintainable code: Indentation Comments Descriptive variable names [B marks} GO ON TO THE NEXT PAGE. 02115020/MJ/CAPE 2019r 2. a (©) Write a set of € program statements that allow a user to enter timings for a traifie light Until all entered values are valid. Timing values to be entered for the number of seconds the light is red, green and orange are referred to as redTime, greenTime and orangeTime respectively. Validity rules for entered timings are as follows: : 5 : 5 3 + redTime must not be less than the sum of the greenTime and orangeTime. + orangeTime must not be less than five seconds reenTime must be greater than 4 multiplied by the orangeTime If timings are valid, the program should output “Timings are valid”, and exit. I timings are not valid, the program should output “Invalid timings : Please re-enter”, and accept a new set.of values. ag “DO NOT WRITE IN THIS (REA THISAREA iN NOT WRITE I [12 marks} GO ON TO THE NEXT PAGE, 02115020/MI/CAPE 2019r a 1 (©) Consider the following code segment. » 1%” 5 printf(\n); (i) Identify the THREE syntax errors in the segment. Deseribe the error and rewrite the line correctly. “To marks} (ii) Write the expected output ofthe program after the syntax errors have been corrected. {3 marks] Total 25 marks GO ON TO THE NEXT PAGE, 02115020/MJ/CAPE 2019DONOT WRITE IN THIS 4REA DO NOT WRITE IN THISAREA | a 6. (@) Briefly describe the characteristics of EACH of the following programming paradigms: (Declarative [2 marks] Gi) Procedural Gil) Scripting [2 marks} (b) State TWO reasons why using modular code is considered good programming practice, GO ON TO THE NEXT PAGE, 02115020/MI/CAPE 2019(©) @_ Whatis a function prototype in C? [1 mark} \Wrtea function named ealeTotal that accepts two integer arguments, and returns the sum of the first argument added to a 20% increase of the second, In other words, ealeTotal accepts first and second, and returns first + 1.2 * second. GO ON TO THE NEXT PAGE, 02115020/MNCAPE 2019r 2 a Gil) A local court system is implementing a file access program for civil cases. ‘The to allow the recording of specific information for objective of the, system reporting on a summary of recorded information. Four items of information per case are to be recorded, namely the name of the complainant, the loss suffered, the name of the accused and the court fees. Court fees attract a 20% tax. All / names consist of a first name and a last name. The final line of the file contains a hashtag for the complainant's name. A sample of the file is shown below. Note that if the ease is thrown out of court, the loss and fees are both set to zero. DO NOT WRITE IN THIS AREA John Publie 200 Jill Yardly 20 Alice Wonderland 50 Bob Sky 10 Trouble Maker 0 Innocent One 0 ¥ Use C code to write a function that loops through the file and reads the loss suffered and court fees for each record, then prints the total cost payable by EACH of the accused persons. Use the function ealeTotal in your solu ‘DONOT Weare IN THIS AREA | GO ON TO THE NEXT PAGE, z 02115020/MI/CAPE 2019-28- 7 t Total 25 marks marks} END OF TEST IF YOU FINISH BEFORE TIME IS CALLED, CHECK YOUR WORK ON THIS TEST. 02115020/MI/CAPE 2019
You might also like
5254278-Class Xi Ip Ut1 Set 2
PDF
100% (1)
5254278-Class Xi Ip Ut1 Set 2
3 pages
S4 Computer Science Nesa 2025
PDF
No ratings yet
S4 Computer Science Nesa 2025
6 pages
CompSci U1 P2 2024
PDF
No ratings yet
CompSci U1 P2 2024
16 pages
Sample Exam
PDF
No ratings yet
Sample Exam
16 pages
Screenshot 2025-05-13 at 20.01.55
PDF
No ratings yet
Screenshot 2025-05-13 at 20.01.55
17 pages
Computer Science Paper 1 HL
PDF
No ratings yet
Computer Science Paper 1 HL
7 pages
2019 Paper 2
PDF
No ratings yet
2019 Paper 2
6 pages
Structured Programing Module20001
PDF
No ratings yet
Structured Programing Module20001
4 pages
Computer Science GR 9 T1 Exam Nov 2023
PDF
No ratings yet
Computer Science GR 9 T1 Exam Nov 2023
14 pages
Computer Science U1 P2 2009
PDF
No ratings yet
Computer Science U1 P2 2009
9 pages
SSC-II Computer Science (2 Sets With Solutions) - Combined
PDF
No ratings yet
SSC-II Computer Science (2 Sets With Solutions) - Combined
37 pages
CAPE 2014 Unit 1 Computer Science P2
PDF
No ratings yet
CAPE 2014 Unit 1 Computer Science P2
8 pages
SSC-II Final Model Paper Computer Science
PDF
No ratings yet
SSC-II Final Model Paper Computer Science
8 pages
Computer Science B.SC - .Prog - .Sem - Nov Dec 2016
PDF
No ratings yet
Computer Science B.SC - .Prog - .Sem - Nov Dec 2016
98 pages
Csec Add Maths Paper 1 July 2021
PDF
50% (4)
Csec Add Maths Paper 1 July 2021
11 pages
Class Xi Ip Term I SQP
PDF
No ratings yet
Class Xi Ip Term I SQP
4 pages
Computer Science U1 P2 2025
PDF
No ratings yet
Computer Science U1 P2 2025
15 pages
CBSE Class 11 Computer Science Sample Paper 2018
PDF
No ratings yet
CBSE Class 11 Computer Science Sample Paper 2018
6 pages
Pgdca CRC - Jan 2021
PDF
No ratings yet
Pgdca CRC - Jan 2021
10 pages
CS Year 10 Practical June 2023
PDF
No ratings yet
CS Year 10 Practical June 2023
13 pages
CSEC ENGLISH A Paper 1 2021 June
PDF
No ratings yet
CSEC ENGLISH A Paper 1 2021 June
17 pages
CompSci U1 P1 2019
PDF
No ratings yet
CompSci U1 P1 2019
13 pages
PDS Endsem 2019A Question
PDF
No ratings yet
PDS Endsem 2019A Question
16 pages
HIHS AL CSC Paper 2 2024
PDF
No ratings yet
HIHS AL CSC Paper 2 2024
4 pages
CAPE Computer Science P2
PDF
No ratings yet
CAPE Computer Science P2
7 pages
Al 0795 CSC 2 Mock Hihs 2023
PDF
No ratings yet
Al 0795 CSC 2 Mock Hihs 2023
5 pages
Computer Science SSC-II Solution of 2nd Set Model Paper
PDF
No ratings yet
Computer Science SSC-II Solution of 2nd Set Model Paper
10 pages
CompSci U1 P2 2015
PDF
No ratings yet
CompSci U1 P2 2015
10 pages
Cambridge International General Certificate of Secondary Education
PDF
No ratings yet
Cambridge International General Certificate of Secondary Education
12 pages
Full Paper Jan 25
PDF
No ratings yet
Full Paper Jan 25
14 pages
Pgdca CRC - Jan 2021-Assignment
PDF
No ratings yet
Pgdca CRC - Jan 2021-Assignment
10 pages
BIT100 Assignment 1 - Feb 2019 Semester
PDF
100% (1)
BIT100 Assignment 1 - Feb 2019 Semester
6 pages
Pgdca CRC - Jan 2021-Assignment
PDF
No ratings yet
Pgdca CRC - Jan 2021-Assignment
10 pages
Computer Science Cape 2010
PDF
No ratings yet
Computer Science Cape 2010
7 pages
CAPE ComputerScienceUnit1 2010exam
PDF
No ratings yet
CAPE ComputerScienceUnit1 2010exam
7 pages
CompSci U1 P1 2020
PDF
No ratings yet
CompSci U1 P1 2020
12 pages
Heq Oct23 Cert SD
PDF
No ratings yet
Heq Oct23 Cert SD
4 pages
MidtermExam F15
PDF
No ratings yet
MidtermExam F15
14 pages
I Semester
PDF
No ratings yet
I Semester
19 pages
Information Technology Paper 02 MAY 1999
PDF
No ratings yet
Information Technology Paper 02 MAY 1999
4 pages
Computer Science Ssc-Ii: Answer Sheet No.
PDF
No ratings yet
Computer Science Ssc-Ii: Answer Sheet No.
8 pages
XI CS - II TERM QP
PDF
No ratings yet
XI CS - II TERM QP
4 pages
Mcoa011 Main Exam Paper 2017
PDF
No ratings yet
Mcoa011 Main Exam Paper 2017
10 pages
FinalExam Question
PDF
No ratings yet
FinalExam Question
9 pages
CAPE 2009 Computer Science Unit 1 Paper 2
PDF
No ratings yet
CAPE 2009 Computer Science Unit 1 Paper 2
9 pages
Final Model Paper Computer Science SSC-II
PDF
No ratings yet
Final Model Paper Computer Science SSC-II
7 pages
PGDCA I Semester Jan 2020
PDF
No ratings yet
PGDCA I Semester Jan 2020
19 pages
Cape Computer Science Unit 1 2012 P2
PDF
No ratings yet
Cape Computer Science Unit 1 2012 P2
6 pages
CAPE Computer Science 2012 Past Paper
PDF
No ratings yet
CAPE Computer Science 2012 Past Paper
6 pages
2nd Sem Ass.2018-19 PDF
PDF
No ratings yet
2nd Sem Ass.2018-19 PDF
17 pages
CAEComputer Science Unit 2 Paper 2 2019
PDF
No ratings yet
CAEComputer Science Unit 2 Paper 2 2019
22 pages
CAPE Computer Science Unit 1 2012 Past Paper
PDF
No ratings yet
CAPE Computer Science Unit 1 2012 Past Paper
6 pages
Second Semester 2014 - 2015 Midterm Exam, Thursday April 2, 2015 Time: 120 Minutes
PDF
No ratings yet
Second Semester 2014 - 2015 Midterm Exam, Thursday April 2, 2015 Time: 120 Minutes
9 pages
CAPE Computer Science 2014 Paper 2
PDF
No ratings yet
CAPE Computer Science 2014 Paper 2
8 pages
SWR Mock 2025 0795 Computer Science P2
PDF
No ratings yet
SWR Mock 2025 0795 Computer Science P2
4 pages
Model Question Paper Class-XI Computer Science M.M.:70 Time:3 Hrs
PDF
No ratings yet
Model Question Paper Class-XI Computer Science M.M.:70 Time:3 Hrs
19 pages
CXC IT Theory 1999: Attempt ALL Questions
PDF
No ratings yet
CXC IT Theory 1999: Attempt ALL Questions
4 pages
CSEC Geography MCQ Answers
PDF
100% (1)
CSEC Geography MCQ Answers
1 page
CAPE Physics 2005 U1 P2
PDF
No ratings yet
CAPE Physics 2005 U1 P2
15 pages
CompSci U1 P1 2018 PDF
PDF
No ratings yet
CompSci U1 P1 2018 PDF
12 pages