Quelpr

CAPE Computer Science Unit 1 · 2010 · Paper 2

31 questions and parts from this paper. Open one to see it in full, then practise it on Quelpr and get it marked against the mark scheme.

  1. 1(a)3 marksGive the truth tables of the THREE primary logic gates, appropriately labelled.
  2. 1(b)4 marksExplain how a 4-bit binary counter works, specifying the range of values counted.
  3. 1(c)(i)3 marksDraw a clearly labelled block diagram of a 2-to-4 line decoder.
  4. 1(c)(ii)2 marksGive the truth table of a 2-to-4 line decoder.
  5. 1(c)(iii)6 marksDraw a clearly labelled circuit of a 2-to-4 line decoder constructed from one or more of the primary logic gates.
  6. 1(d)(i)1 markCalculate the decimal equivalent of 00101001_2.
  7. 1(d)(ii)2 marksDetermine if the result of 0110 + 0101 can be stored as a 4-bit binary number.
  8. 1(d)(iii)2 marksShowing all working, find the largest and smallest integers that can be represented using 6 bits if signed magnitude is used (leftmost bit for sign, other bits for the integer itself).
  9. 1(d)(iv)2 marksFind the 4-bit two's complement representation of -4.
  10. 2(a)6 marksCompare ROM, RAM, hard disk, and CD-RW in terms of storage capacity and access speed.
  11. 2(b)(i)2 marksExplain how cache memory works.
  12. 2(b)(ii)2 marksExplain ONE benefit of cache memory.
  13. 2(c)(i)2 marksExplain what is meant by the 'instruction set' of a central processing unit.
  14. 2(c)(ii)3 marksState THREE types of instructions that are typically included in an instruction set.
  15. 2(c)(iii)6 marksUsing a diagram in EACH case, describe THREE typical instruction formats that differ in the number of addresses contained.
  16. 2(c)(iv)4 marksDescribe the MAIN activities that take place in an instruction cycle.
  17. 3(a)3 marksState THREE basic control structures.
  18. 3(b)6 marksUsing the algorithm in Figure 1, give an explanation of EACH control structure stated in (a).
  19. 3(c)7 marksProvide a graphical representation (flowchart) of the algorithm in Figure 1.
  20. 3(d)9 marksAmend the algorithm in Figure 1 to include an additional choice 'cherry' and keep a count of errors made (incorrectly spelt or not one of the three choices), displaying the error counter just before the algorithm…
  21. 4(a)11 marksTrace through the execution of the given algorithm and draw the exact output generated.
  22. 4(b)8 marksWrite an algorithm that uses iteration to find the sum of all multiples of 3 and all multiples of 4 between 3 (inclusive) and 150 (exclusive).
  23. 4(c)6 marksA video club has purchased tracking software for DVD rentals, stock, and new titles to be used on two computers at one site. Briefly explain what the 'Implementation and Review' stage of the problem-solving process…
  24. 5(a)4 marksExplain TWO ways in which a programming language for a mobile device would differ from a programming language for a desktop computer.
  25. 5(b)2 marksHow does a character variable differ from a string variable?
  26. 5(c)19 marksWrite a C program that reads employee records from 'salary.dat' (surname up to 30 characters, hours worked, hourly rate, deductions; ending with sentinel 'ENDDATA'), and calculates and prints the gross salary for each…
  27. 6(a)6 marksDescribe THREE different ways in which the programming style of the given code snippet can be improved, using line numbers in your response.
  28. 6(b)2 marksWhat is the purpose of a 'struct' in C?
  29. 6(c)(i)6 marksWrite a function which accepts two unique integers, x and y, and returns the larger of the two. Show how your function would be called.
  30. 6(c)(ii)6 marksWrite a function which accepts a character, ch, and returns 1 if the character is a letter of the alphabet or 0 otherwise. Show how your function would be called.
  31. 6(c)(iii)5 marksWrite a function which accepts a character, ch, and returns 1 if the character is present in the string 'CAPECOMPUTERSCIENCE', or 0 if ch is not present.

More CAPE Computer Science Unit 1 papers