Quelpr

CAPE Computer Science Unit 1 · 2014 · Paper 2

36 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)5 marksDraw a clearly labelled block diagram of a 2 to 1 line multiplexer.
  2. 1(b)2 marksExplain what is meant by the term 'logic gate'.
  3. 1(c)4 marksWrite the truth table for the circuit shown in Figure 1 by listing all possible input bit patterns and their corresponding outputs.
  4. 1(d)2 marksState which of the following terms are associated with a single output value: Decoder, Flip-flop, Multiplexor.
  5. 1(e)(i)2 marksIf there are three bits needed to display a digit, calculate how many digits this decoder can display.
  6. 1(e)(ii)5 marksList the letters of the segments that must be switched on to display the number 5.
  7. 1(f)2 marksFind the 4-bit two's complement of -7.
  8. 1(g)3 marksCalculate the decimal representation of 001110110.
  9. 2(a)5 marksDescribe the THREE main activities that take place in an instruction cycle, stating the correct order.
  10. 2(b)(i)2 marksGive ONE similarity and ONE difference between RAM and hard disks as used in computer systems.
  11. 2(b)(ii)4 marksGive TWO reasons why registers are included in the CPU of a computer.
  12. 2(c)(i)2 marksSupercomputer
  13. 2(c)(ii)2 marksPDA
  14. 2(c)(iii)2 marksMainframe
  15. 2(d)2 marksDescribe the kind of information that is typically stored in the ROM of a computer.
  16. 2(e)6 marksDiscuss TWO reasons why current computers may not be able to work efficiently with new storage devices developed ten years from now.
  17. 3(a)(i)2 marksSequence
  18. 3(a)(ii)2 marksSelection
  19. 3(a)(iii)2 marksIteration
  20. 3(b)(i)5 marksThe number of students that voted for EACH of the subjects: Mathematics, English, Spanish.
  21. 3(b)(ii)5 marksThe TOTAL number of students that voted for Mathematics, English or Spanish.
  22. 3(c)9 marksWrite an algorithm that uses iteration to find the sum of all multiples of six and all multiples of seven between 100 and 250 exclusive. Use one variable, for example, sumMult, to accumulate the sum of the multiples of…
  23. 4(a)(i)6 marksConstruct an algorithm to print the product name, the discount for that product followed by the new price.
  24. 4(a)(ii)6 marksConstruct an algorithm to print the TOTAL amount of product discounts overall. If the total amount of discounts is greater than $500, print "Discounts exceeded."
  25. 4(b)6 marksConstruct a flow chart to represent the algorithm given in 4(a) above.
  26. 4(c)7 marksWhat would the algorithm print given the line of input data below? (Clearly show how you arrived at your answer.) 5 3 2 6 12 4
  27. 5(a)(i)1 markA stream of characters making up the source program is read from left to right and grouped into tokens.
  28. 5(a)(ii)1 markA piece of code is transformed to make it more efficient without changing its output or side effects.
  29. 5(b)2 marksExplain the role of a 'watch' in programming.
  30. 5(c)6 marksWrite a C function which accepts an integer array and an integer variable indicating the size of the array. The function should return a count of the numbers in the array that are LESS THAN 20.
  31. 5(d)15 marksWrite a C program that determines and outputs to a file, "funds.txt", the total funds raised and how many donations were made. (You may not use arrays in your solution.)
  32. 6(a)2 marksExplain why indentation is important in programming.
  33. 6(b)2 marksWhy is it recommended that comments be used in programming code?
  34. 6(c)11 marksWhat output is produced by the following C program? (For the output state the values of i and j at each stage.)
  35. 6(d)6 marksWrite a C program that accepts two values, price and tax (both of type float). The program applies tax to price and prints the old price and the new price in an appropriate message. Note that tax is given as a…
  36. 6(e)4 marksWrite C code to read four integers and print their average. (Do not write an entire program.)

More CAPE Computer Science Unit 1 papers