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)
169 views
9 pages
CAPE 2009 Computer Science Unit 1 Paper 2
computer science
Uploaded by
Romario Bennett
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 CAPE 2009 Computer Science Unit 1 Paper 2 For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
169 views
9 pages
CAPE 2009 Computer Science Unit 1 Paper 2
computer science
Uploaded by
Romario Bennett
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 CAPE 2009 Computer Science Unit 1 Paper 2 For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save CAPE 2009 Computer Science Unit 1 Paper 2 For Later
You are on page 1
/ 9
Search
Fullscreen
test cope 02115020 FORM TP 2009166 MAY/JUNE 2009 CARIBBEAN EXAMINATIONS COUNCIL ADVANCED PROFICIENCY EXAMINATION COMPUTER SCIENCE UNIT 1 — FUNDAMENTALS OF COMPUTER SCIENCE PAPER 02 24 hours ee 15 MAY 2009 (a.m.) INSTRUCTIONS TO CANDIDATES 1. Do NOT open this examination paper until instructed to do so. 2. Answer ALL questions from the THREE sections. ‘Copyright © 2008 Caribbean Examinations Couneil © All rights reserved. 02115020/CAPE 2009i) (b) ©) @ eae SECTION A COMPUTER ARCHITECTURE AND ORGANISATION Answer BOTH questions. Draw the symbol and give the corresponding truth table for THREE primary logic gates. [6 marks] The following is the truth table for an exclusive-OR gate: Xesew rong zi 0 1 1 0 Using the primary logic gates from (a) above, design and draw a circuit which, behaves exactly like an exclusive-OR gate. [6 marks} Draw a clearly labelled block diagram of a4 x 1 multiplexer (4 inputs, 1 output) [6 marks} (@ — Caleulate the decimal equivalent of 00011011, [1 mark} (ii) Determine if the result of 0111 + 1110 can be stored as a 4 bit binary number. [2 marks] (iii) Showing all working, find the largest and smallest integers that can be represented using 4 bits signed magnitude. Hint: the leftmost bit is to be used for the sign and the other bits are used for representing the integer itself. [2 marks} (iv) Find the 4 bit two’s complement of -5. [2 marks] ‘Total 25 marks GO ON TO THE NEXT PAGE. 02115020/CAPE 2009ae 2, (a) _—_ Explain what is meant by EACH of the following terms: (Word size (ii) Cache memory (iii) Clock speed 16 marks} (b) Distinguish between EACH of the following pairs of terms as they pertain to computer memory: (@ ROM and RAM (ii) Access speed and access method (iii) Volatility and capacity [6 marks] (© @__ Define the terms, ‘instruction set” and ‘instruction format’ [2 marks] (ii) State THREE types of instructions that are typically included in an instruction set. [3 marks] (ii) Suppose 16 bits are used for representing instructions in a certain computer. Using a diagram, explain how a 2-address instruction can be formatted using the 16 bits ~ available. [3 marks] (iv) Describe what happens in a typical instruction cycle, assuming that direct addressing 02115020/CAPE 2009 is used, [5 marks] Total 25 marks GOON TO THE NEXT PAGESECTION B PROBLEM SOLVING WITH COMPUTERS Answer BOTH questions. 3. (a) What is an algorithm? [2 marks] (b) Name THREE basic control constructs used in structured programming, [3 marks] (©) The algorithm below is designed to generate, print and count the odd numbers between (inclusive) to 99 (inclusive). However there are errors. ai) (iii) 02115020/CAPE 2009 while (j = 99) print j grpt2 e=et] endwhile print (°c = print (j end +o) ‘What are the final values in the variables c and / when the algorithm terminates? ~ [2 marks} By referring to the specific line numbers: Identify and correct the errors in the algorithm. [6 marks] Using the corrected algorithm, give the value of variable c at the end of execution. [1 mark } GO ON TO THE NEXT PAGE(4) Construct a flowchart to represent the following algorithm. begin read name ifmame = ‘enddata’ print ‘no data supplied” else while name <> ‘enddata’ read amount read quantity sale = amount * quantity print ‘This sale = ° , sale read name endwhile endif end [11 marks} Total 25 marks GO ON TO THE NEXT PAGE 02115020/CAPE 20094. (a) __ BuyLo is a grocery. Management has decided that it needs to track all the goods that are sold on a daily basis by using a computer-based solution. Discuss what the ‘Identifying and evaluating possible solutions’ stage of problem solving, would involve for BuyLo. [6 marks} (6) Trace through the execution of the following algorithm and draw the output in your answer booklet exactly as it would be generated by the algorithm. You should carefully note the following: + printSpaces(n) prints n spaces from the current cursor position, use a dash ‘ ~* to indicate a space + print continues output on the current line from the current cursor position + printin continues output on the current line from the current cursor position but any subsequent output begins on a new line SIZE = 10 begin while j begin printSpaces( j +1) se ( print (**") rintSpaces ( 8— j) ne Aes Si i endwhile zal Sud we GMS - for j = 1 to (SIZE + 1) do A yait ie is coh. elo print(‘*") OG ins i rib, end for printin () end [11 marks] (©) Write an algorithm that uses repetition to find the sum of all multiples of 7 between 14 (inclusive) and 126 (inclusive). [8 marks] ‘Total 25 marks GO ON TO THE NEXT PAGE 02115020/CAPE 2009(a) () ©) SECTION C PROGRAMMING Answer BOTH questions. Describe the “lexical analysis’ and ‘semantic analysis’ stages of the translation process. [6 marks] Write a C function which accepts two integer parameters, a and b, and retums the larger of the two, Assume the integers are different, [4 marks] Write a C program with the following functionality. The steps MUST be followed exactly as stated. Accept 10 integers from the user and place them in a text file *in.dat’, one integer per line. Assume all integers are valid. Close the file ‘in.dat’, reopen it, ead the data and find and print the average of the integers stored in the file. Print an appropriate message if the file cannot be found. [Note: You cannot use arrays to solve this problem.] [15 marks] ‘Total 25 marks GO ON TO THE NEXT PAGE 02115020/CAPE 20096. (a) (b) (c) eg Briefly describe EACH of the following classifications of programming languages: @ Declarative (ii) Imperative (procedural) (iii) Scripting [6 marks] Distinguish between ‘syntax’ and ‘semantics’ as used in computer programming. [3 marks] You are given the following declarations in a C program: struct payRec { long int id; float totalPay; int numDays; Be Void main () // start of main function { int empld; float pay, rate; int hrs; struct payRec Smith, Jones, Singh: } The declaration is used to create records to manipulate data on three employees Smith, Jones and Singh, working for a small company. ‘id’ represent the identification number of the employee, ‘totalPay” the amount of money he earns, ‘numDays’ the number of days worked and ‘rate’ the hourly rate of pay. Assume that Smith’s id is 1000, Jones’ id is 1001 and Singh’s id is 1002 and all numDays fields are set to 0 initially. Using the C program declaration, complete the main program by = reading input data (explained later) and updating the totalPay and numDays fields for each employee. = prompting the user for id, hrs and rate, Calculate the salary by multiplying hrs by rate for the employee and adding that result to the totalPay. NOTE: Anemployee can have more than one set of data, where each set corresponds to a day worked by the employee. Data are terminated by the sentinel id of 999. At the end, print each employee id, total pay and number of days worked. GO ON TO THE NEXT PAGE 02115020/CAPE 2009Sample screen: Please enter ID: 1000 Enter hours worked: 10 Enter rate of pay: 10.50 Please enter ID: 1000 Enter hours worked: 3 Enter rate of pay: 10.50 Please enter ID: 1001 Enter hours worked: 5 Enter rate of pay: 5.50 Please enter ID: 1002 Enter hours worked: 10 Enter rate of pay: 10.50 Please enter ID: 999 NAME ID TOTALPAY —_ DAYS WORKED Smith 1000 136.50 2 Jones 1001 27.50 1 Singh 1002 105.00 1 [16 marks} Total 25 marks END OF TEST 02115020/CAPE 2009
You might also like
CompSci U1 P2 2024
PDF
No ratings yet
CompSci U1 P2 2024
16 pages
Ok Al CSC P2
PDF
No ratings yet
Ok Al CSC P2
5 pages
Computer Science U1 P2 2009
PDF
No ratings yet
Computer Science U1 P2 2009
9 pages
TSP Lab Record With Solutions
PDF
No ratings yet
TSP Lab Record With Solutions
89 pages
C Previous Year Qps
PDF
No ratings yet
C Previous Year Qps
34 pages
Screenshot 2025-05-13 at 20.01.55
PDF
No ratings yet
Screenshot 2025-05-13 at 20.01.55
17 pages
2.1 Flowchart Workbook by Inqilab Patel
PDF
No ratings yet
2.1 Flowchart Workbook by Inqilab Patel
87 pages
Class - Xi - Computer Science - MS - Final Term Examination
PDF
No ratings yet
Class - Xi - Computer Science - MS - Final Term Examination
5 pages
Ip Aat-1
PDF
No ratings yet
Ip Aat-1
14 pages
CPL Lab Manual With Cover Page Jan2021
PDF
No ratings yet
CPL Lab Manual With Cover Page Jan2021
71 pages
0795 CSC Al P2 Soremex 2025
PDF
No ratings yet
0795 CSC Al P2 Soremex 2025
6 pages
PWC - Question Bank
PDF
No ratings yet
PWC - Question Bank
4 pages
CAPE Computer Science P2
PDF
No ratings yet
CAPE Computer Science P2
7 pages
C Lab
PDF
No ratings yet
C Lab
52 pages
PPS - Unit 1 Quesstion Bank
PDF
No ratings yet
PPS - Unit 1 Quesstion Bank
4 pages
WWW - Manaresults.Co - In: Computer Programming
PDF
No ratings yet
WWW - Manaresults.Co - In: Computer Programming
5 pages
23escs11 Lab Mannual
PDF
No ratings yet
23escs11 Lab Mannual
40 pages
Structured Programing Module20001
PDF
No ratings yet
Structured Programing Module20001
4 pages
23ES1111 - Problem Solving Using C Programming Lab
PDF
No ratings yet
23ES1111 - Problem Solving Using C Programming Lab
3 pages
Bca 2 Sem C Note 2023-24
PDF
No ratings yet
Bca 2 Sem C Note 2023-24
66 pages
RRRRRRRRRRRRRRRRRRRRRRR
PDF
No ratings yet
RRRRRRRRRRRRRRRRRRRRRRR
22 pages
SRM Institute of Science and Technology College of Engineering and Technology
PDF
No ratings yet
SRM Institute of Science and Technology College of Engineering and Technology
5 pages
112
PDF
No ratings yet
112
13 pages
Structured Program Exams
PDF
No ratings yet
Structured Program Exams
3 pages
COS1082B Lab On C Programming
PDF
No ratings yet
COS1082B Lab On C Programming
47 pages
SSC-II Final Model Paper Computer Science
PDF
No ratings yet
SSC-II Final Model Paper Computer Science
8 pages
CompSci U1 P1 2020
PDF
No ratings yet
CompSci U1 P1 2020
12 pages
CIT 3102 Past Papers
PDF
No ratings yet
CIT 3102 Past Papers
5 pages
CIT 3102 Programming Supp Town
PDF
No ratings yet
CIT 3102 Programming Supp Town
2 pages
Lab Mannual
PDF
No ratings yet
Lab Mannual
47 pages
Cape Caribbean Studies Unit 2 P2 - 2009
PDF
No ratings yet
Cape Caribbean Studies Unit 2 P2 - 2009
5 pages
Mcoa011 Main Exam Paper 2017
PDF
No ratings yet
Mcoa011 Main Exam Paper 2017
10 pages
Computer Science U1 P2 2025
PDF
No ratings yet
Computer Science U1 P2 2025
15 pages
CompSci U1 P2 2015
PDF
No ratings yet
CompSci U1 P2 2015
10 pages
CompSci U1 P1 2019
PDF
No ratings yet
CompSci U1 P1 2019
13 pages
Heq Oct23 Cert SD
PDF
No ratings yet
Heq Oct23 Cert SD
4 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
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
MidtermExam F15
PDF
No ratings yet
MidtermExam F15
14 pages
Mid+ CS100F17V1
PDF
No ratings yet
Mid+ CS100F17V1
13 pages
Final Model Paper Computer Science SSC-II
PDF
No ratings yet
Final Model Paper Computer Science SSC-II
7 pages
RCA Y1 T1 CAT FOP 2023 2024 Marking Guide
PDF
No ratings yet
RCA Y1 T1 CAT FOP 2023 2024 Marking Guide
9 pages
CompSci U1 P2 2019
PDF
No ratings yet
CompSci U1 P2 2019
26 pages
CAEComputer Science Unit 2 Paper 2 2019
PDF
No ratings yet
CAEComputer Science Unit 2 Paper 2 2019
22 pages
Programming For Problem Solving
PDF
No ratings yet
Programming For Problem Solving
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
Computer Science Ssc-Ii: Answer Sheet No.
PDF
No ratings yet
Computer Science Ssc-Ii: Answer Sheet No.
8 pages
CSEC Information Technology June 2009 P01
PDF
No ratings yet
CSEC Information Technology June 2009 P01
10 pages
CAPE Computer Science 2012 Past Paper
PDF
No ratings yet
CAPE Computer Science 2012 Past Paper
6 pages
Cape Computer Science Unit 1 2012 P2
PDF
No ratings yet
Cape Computer Science Unit 1 2012 P2
6 pages
The Bcs Higher Education Qualifications BCS Level 4 Certificate in IT
PDF
No ratings yet
The Bcs Higher Education Qualifications BCS Level 4 Certificate in IT
5 pages
CAPE Computer Science Unit 1 2012 Past Paper
PDF
No ratings yet
CAPE Computer Science Unit 1 2012 Past Paper
6 pages
CAPE Computer Science 2014 Paper 2
PDF
No ratings yet
CAPE Computer Science 2014 Paper 2
8 pages
QP Iyear Isem 2011 C Programming
PDF
No ratings yet
QP Iyear Isem 2011 C Programming
4 pages
CAPE ComputerScienceUnit1 2010exam
PDF
No ratings yet
CAPE ComputerScienceUnit1 2010exam
7 pages
Bcs Higher Education Qualifications BCS Level 4 Certificate in IT
PDF
No ratings yet
Bcs Higher Education Qualifications BCS Level 4 Certificate in IT
6 pages
Computer Science Cape 2010
PDF
No ratings yet
Computer Science Cape 2010
7 pages