You are on page 1of 7
rest cope 02115020 FORM TP 2013163 Rt, CARIBBEAN EXAMINATIONS COUNCIL CARIBBEAN ADVANCED PROFICIENCY EXAMINATION® COMPUTER SCIENCE, FUNDAMENTALS OF COMPUTER SCIENCE MAY/UNE 2013 UNIT 1 ~ Paper 02 2 hours 30 minutes (17 Mav 2013 (am) >) This examination paper consists of THREE sections: Computer Architecture and Organization, Problem Solving with Computers, and Programming. Each section consists of2 questions The maximum mark fr each section is 50, ‘The maximum mark for this examination is 150. ‘This examination consists of 7 printed pages "READ THE FOLLOWING INSTRUCTIONS CARE 1, Do NOT open this examination paper until instructed todo so 2, Answer ALL questions from the THREE sections. l = DO NOT TURN THIS PAGE UNTIL YOU ARE TOLD TO DO SO. Copyright © 2012 Caribbean Examinations Couneil Al rights reserved (2115020CAPE 2013, 2. SECTION A COMPUTER ARCHITECTURE AND ORGANIZATION Answer BOTH questions. (@)—@)_Drawacleuty labelled block diagram of a4 10 1 Line multiplexer. [4 marks} Gi) Fourtines Ip, Lane connected tothe input lines of 4 to {line multiplexer. Explain how the multiplexer can send the signal inl, as outpet for one second followed by th signal in Is marks} (iii) Give TWO properties ofa Hip-op and state ONE use ofthis device [5 marks} () (Find the 4-bit signed magnitude representation ofS, Pemarks} (i) Find the 4-bit one's complement representation ofS Ut mark (ii) Find the 4bit o's complement representation of 5. Pe marks] (©) A-certin system represents decimal numbers by storing sign (S), mantissa (M) and exponent (E), (ne bit suse forthe sign, 3 bits forthe exponent and bis forthe mantissa, ‘What decimal numbers represented below? BOM 1 010 0101 1 marks} (8) Draw the truth tables forthe following logic gates. oO »—— 2 marks} ws 12 marks} —- wy —jy>- 2 mart} Total 25 marks GO ON TO THE NEXT PAGE (02115020:CAPE 2013 2 @ © © @ © ‘A student wishes to keep a computer system for 10 years. His teacher said that ‘port connectivity’ could be a problem in a few years. Explain, with ONE example, the erm ‘port connectivity 1imarks} Differentiate between the following items as they pertain to computer systems (ROM and EPROM 12 marks} (ii) EPROM and EEPROM [2 marks} Arrange the following in order of size from smallest to largest supercomputer, pa, laptop, microcomputer [2 marks} (©) Explain what is meant by the “insinction set of a computer. [2 marks} (i) State THREE types of instructions tha arc typically present in an instruction set and give ONE example of EACH type 6 marks} (ji) rity explain the trm iret adres marks} [Explain how the ‘fetch’, ‘decode’, execute’ eyele works in computer. [6 marks} Total 25 marks GO ON TO THE NEXT PAGE (02115020/CAPE 2013, 4 SECTION B PROBLEM SOLVING WITH COMPUTERS. Answer BOTH questions, 3 (@)__Acompany called DVDR sells used DVD movies and wishes to acquire softwareto track purchases, customer information and the quantities of movies in stock. ‘The company has contacted the services of a software company called SoftSol which writes software applications [Briefly describe any THREE stages that SotSol would generally follow when creating the software for DVDR, [6 marks} 4 (6) Accertain cellular company provides the following rates for voice calls. First 10 minutes $150 per minute Any additional minutes $0.50 per minute algorithm that reads an integer value representing the number of mines used for voice cals calculates and prints the cost of calls lo marks} (©) Construct low chart wo representa solution tothe following problem, A set of data exists for students in a class, Each line contains a stident ID number followed by the scores in 3 subjects. Data is terminated by the fictitious student ID: 9999, Sample data Mn 34 36 78 4444 67 98 99 2654 88 89 90) ‘9900 Requirements (Read the data and foreach student, calculate and print the average scored inthe 5 subjects Prin the numberof students in the class; for example, the message “There are 3 stems inthe class printed, [13 marks} ‘Total 25 marks GO,ON TO THE NEXT PAGE (02115020:CAPE 2013 - a J Ss ® © ‘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 not the following “2 \Write an algorithm to find the product o all multiples of 6 between 12 (inclu _printSymtn) pints *»“from the current cursor position for example, printSym(5) would print: rite (outputs) continues output onthe current line from the curren cursor position varices (ouput-lisy continues output on the current line an then terminates ‘output on that line. Subsequent output would therefore begin on new line begin Siz in6 printSym (J+ 1) vwrteln('*") while j>=1 begin ‘rintSym () write (@) printSym ( SIZE ~j ‘writen (1) j-j-1 cendihile end 10 [Ut marks} ) and 600 (exclusive) [8 marks} Explain THREE properties of well-designed algorithms, using an example in EACH. 02115020:CAPE 2013, 16 marks} Total 25 marks GO ON To THE NEXT PAGE . @ o © »@ SECTION C PROGRAMMING. Answer BOTH questions Explain TWO differences between compilers and interpreters. [6 marks} Write @ funetion swap that accepts an integer array and two integers pas!, pos?, representing two locations in the array. The funetion should swap the conten ofthe two locations. Assume that pos! and pos? are vali, HMmarks] Write a € program that rads a tex file “in.da” and oblains wo integers. Assume the file contains two integers separated by @ space, Next, prin out the integers in reverse ‘order, followed by their sum and product. Example Given: 10 ‘The program ouputs 10 S15 50 (7 marks} Write a program that prompts the user to enter an inteper rand prints! where at HIKED for > 0 For example 4! = (321) = 24 [8 marks} ‘Total 25 marks GO ON TO THE NEXT PAGE (02115020/CAPE 2013 “1 6. (a) Klemify and briefly describe any TWO programming paradigms. [4 marks} (©) Explain ONE reason why programming languages implementations used on mobil devices are different from those for desktop computers [2marks} 2 (6) What output would the following € program produce when executed? weap ¢ printe("i is Sd j is Sd\n"i, 3) final = final + 4 * 43 1 /wbite printf ("New 1 = 8d", ip W/tor printf("\nFinal Output: td\am, final): return 07 Himain [6 marks} (@ —@__ Write aC declaration fora struct in C that can hold the record ofa customer. Each record contains a customer ID (integer) and a customer balance (loa) [Note that balance represens the amount of money a customer has for making purchases marks} (ii) Declare two variables to represent two customers, Andrew and Jamie. Next, set, their record values as follows: 1D [Balance ‘Andrew | 1200 [1000 ‘amie [1500 [3000 [4 marks} (Gi) Assume that Andrew pays full price for any purchases made and Jamie wets a 10% discount on all purchases Write C code to read 10 values representing the. purchases of Andrew and Jamie respectively from the keyboard. Next. adjusteach customersbalance tased on the purchases TS marks) (iv) Write Ceode to interchange the records of Andrew and Jamie. [3 marks] ‘Total 25 marks END OF TEST IF YOU FINISH BEFORE TIME, CALL D, CHECK YOUR WORK ON THIS TEST. 02115020/CAPE 2013,

You might also like