Quelpr

CAPE Computer Science Unit 1 · 2013 · 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)(i)4 marksDraw a clearly labelled block diagram of a 4 to 1 line multiplexer.
  2. 1(a)(ii)4 marksFour lines, l0, l1, l2, l3, are connected to the input lines of a 4 to 1 line multiplexer. Explain how the multiplexer can send the signal in l1 as output for one second followed by the signal in l3.
  3. 1(a)(iii)3 marksGive TWO properties of a flip-flop and state ONE use of this device.
  4. 1(b)(i)2 marksFind the 4-bit signed magnitude representation of –5.
  5. 1(b)(ii)1 markFind the 4-bit one's complement representation of –5.
  6. 1(b)(iii)2 marksFind the 4-bit two's complement representation of –5.
  7. 1(c)3 marksA system represents decimal numbers using sign (S), mantissa (M) and exponent (E) with 1 bit for sign, 3 bits for exponent, and 4 bits for mantissa. Determine what decimal number is represented by: S = 1, E = 010, M =…
  8. 1(d)(i)2 marksDraw the truth table for a NOT gate.
  9. 1(d)(ii)2 marksDraw the truth table for an AND gate.
  10. 1(d)(iii)2 marksDraw the truth table for an OR gate.
  11. 2(a)3 marksExplain, with ONE example, the term 'port connectivity' in the context of maintaining a computer system for 10 years.
  12. 2(b)(i)2 marksDifferentiate between ROM and EPROM as they pertain to computer systems.
  13. 2(b)(ii)2 marksDifferentiate between EPROM and EEPROM as they pertain to computer systems.
  14. 2(c)2 marksArrange the following in order of size from smallest to largest: supercomputer, pda, laptop, microcomputer.
  15. 2(d)(i)2 marksExplain what is meant by the 'instruction set' of a computer.
  16. 2(d)(ii)6 marksState THREE types of instructions typically present in an instruction set and give ONE example of EACH type.
  17. 2(d)(iii)2 marksBriefly explain the term 'direct addressing'.
  18. 2(e)6 marksExplain how the 'fetch', 'decode', 'execute' cycle works in a computer.
  19. 3(a)6 marksBriefly describe any THREE stages that a software company would generally follow when creating software for a client.
  20. 3(b)6 marksA cellular company charges 1.50 per minute for the first 10 minutes and 0.50 per minute for any additional minutes. Write an algorithm that reads an integer value representing the number of minutes used for voice…
  21. 3(c)(i)8 marksConstruct a flowchart that reads student data (each line having a student ID followed by scores in 3 subjects, terminated by ID 9999) and, for each student, calculates and prints the average scored across the 3 subjects.
  22. 3(c)(ii)5 marksIn the same flowchart or problem solution, count and print the total number of students in the class (e.g., 'There are 3 students in the class').
  23. 4(a)11 marksTrace through the execution of the algorithm provided and draw the output exactly as generated.
  24. 4(b)8 marksWrite an algorithm to find the product of all multiples of 6 between 12 (inclusive) and 600 (exclusive).
  25. 4(c)6 marksExplain THREE properties of well-designed algorithms, using an example in EACH case.
  26. 5(a)6 marksExplain TWO differences between compilers and interpreters.
  27. 5(b)4 marksWrite a function swap that accepts an integer array and two valid integers pos1 and pos2 representing locations in the array, and swaps the contents of these two locations.
  28. 5(c)7 marksWrite a C program that reads two space-separated integers from a text file named 'in.dat', then prints them in reverse order followed by their sum and product.
  29. 5(d)8 marksWrite a program that prompts the user to enter an integer r and prints r!, where 0! = 1 and r! = r(r-1)(r-2)...1 for r > 0.
  30. 6(a)4 marksIdentify and briefly describe any TWO programming paradigms.
  31. 6(b)2 marksExplain ONE reason why programming language implementations used on mobile devices are different from those for desktop computers.
  32. 6(c)6 marksDetermine the exact output produced when the given C program is executed.
  33. 6(d)(i)3 marksWrite a C declaration for a struct to store a customer record consisting of a customer ID (integer) and customer balance (float).
  34. 6(d)(ii)4 marksDeclare two struct variables representing customers Andrew and Jamie, and initialise their fields with the values: Andrew (ID: 1200, Balance: 1000) and Jamie (ID: 1500, Balance: 3000).
  35. 6(d)(iii)3 marksWrite C code to read two values representing the purchases of Andrew and Jamie from the keyboard. Andrew pays full price while Jamie receives a 10% discount. Adjust each customer's balance according to their purchases.
  36. 6(d)(iv)3 marksWrite C code to interchange the records of Andrew and Jamie.

More CAPE Computer Science Unit 1 papers