DIPLOMA IN COMPUTER STUDIES PROGRESS TEST UNIT CODE: TIME: RM104 2 HOURS 10 MINUTES (including 10 minutes reading time) CENTRE CODE: UNIT CLASS CODE: TEST DATE: STUDENT-ID: STUDENT NAME: LECTURER: INSTRUCTIONS 1. Section A is compulsory. 2. Section B choose any 2 questions out of the 3 questions. 3. Please start every question in a new page. 4. Answers will not be marked if it is illegible. 5. Enter the question number (in the order you have attempted) in the boxes provided below: Question Number Score A Total DCS/RM104/S03/TEST/T101/MS 1
SECTION A [40 marks] Answer ALL questions in this section. A1. a) Convert the following : i) A2F Hexadecimal to Binary [1] ii) 11010110 Binary to Octal [1] iii) 23 Denary to Binary [1] i)101000101111 [1] ii)326 [1] iii)10111 [1] b) Evaluate 45 8 + 37 8 +12 8. [2] 116 8 correct working [1] correct answer [1] A2. A specialist clock-maker constructs a 24-hour clock for computer programmers which displays all it numbers in binary. For example the time 1:05 pm (i.e.13.05) would display as 1101:101. (a) What time is it when the clock reads 1110:10000? [ 1 ] 14:16 [1] (b) What time is it when the clock reads 10111:111010? [ 1 ] 23:58 [1] (c) What would the clock read if the time were 10:30 in the morning? [ 2 ] 1010:11110 [2] DCS/RM104/S03/TEST/T101/MS 2
(d) What would the clock read 25 minutes after it read 1101:101111? [ 2 ] 25 = 11001 [1] 1101:101111+11001=1110:1100 [1] {No mark for 1101:1001000} A3. A 4 bit register is used to add binary integers held in 2's complement. Show the contents when the following calculations are performed: a) 7 + 3 [2] b) 6 + (-2) [2] c) (-8) + 3 [2] d) (-5) + (-4) [2] a) 1010 [2] b) 0100 [2] c) 1011 [2] d) 0111 [2] A4. a) State two ways to store exponent. [ 2 ] 2's complement and excess form. [2] b) State two ways to store mantissa. [ 2 ] sign modulus and 2's complement [2] c) A 16-bit representation uses the first bit for the sign of the mantissa, the next 5 bits for the exponent in excess form, and the rest for the normalised mantissa. Show how this representation would store the number 25.875. [5] 25.875 = 11001.111 = 0.11001111 2 5 DCS/RM104/S03/TEST/T101/MS 3
Exponent: 5 + 2 5-1 = 5 +16 = 21 0 10101 1100111100 for sign bit [1] 5 bit exponent correct [1] putting exponent in excess form correct [1] for getting 11001.111 = 25.875 [2] A5. State which of the following statement is TRUE/FALSE? a) Inherent error exists by itself in the measurement scale. b) Overflow error occurs if the least significant value is dropout when storing a value. c) Induced error is brought in from outside by external factors. d) The difference between the true value and the reported value is known as relative error. e) Error of propagation is the spread of errors as a result of arithmetic operations on values which already have errors. f) The difference between the minimum and maximum possible reported value is known as Error Bound. [6] a) True b) False c) True d) False e) True f) True [6] DCS/RM104/S03/TEST/T101/MS 4
A6. By drawing a truth table verify that [6] (A+B). (A+C) = A + (B.C) A B C A+B A+C (A+B).(A+C) B.C A+(B.C) 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 1 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 1 1 1 0 1 1 0 1 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 [1] [1] [1] Showing correct inputs for A,B,C [1] Showing the coloumns (A+B).(A+C) = A+(B.C) [2] DCS/RM104/S03/TEST/T101/MS 5
B1. SECTION B Answer TWO questions ONLY. [60 marks] a) Distinguish between inherent and induced errors, and illustrate each one with an example [ 6 ] Inherent errors exist within the measurement of a quantity [2] e.g. height in cm is 0.5 cm [1] [or other reasonable example ] Induced errors occur due to external factors [2] e.g. pi cannot be stored exactly in a computer [1] [ or other reasonable example ] b) Explain how to calculate : (i) absolute error [ 4 ] E a = reported value - true value [2] for mentioning modulus or difference [1] for a complete, correct formula (e.g. as above) or explanation in words [1] (ii) relative error [ 4 ] E r = E a / true value [1] for taking modulus of result [1] for a complete, correct formula (e.g. as above) or explanation in words [1] for mentioning that reported value should be used if true value is unavailable [1] DCS/RM104/S03/TEST/T101/MS 6
c) i) In the Venn Diagram below, shade C B A. U B [2] A C Given that : A = {x : x is a multiple of 3} B = {x : x is a multiple of 5} C = {x : x is a multiple of 7} Where U = {x : 10 x 17 } Draw a Venn Diagram which illustrates this situation. [3] List the elements of the set: ii) A B C [2] iii) (A C) B [2] iv) (B C) A [2] i) U C B A [2] DCS/RM104/S03/TEST/T101/MS 7
A 10 15 12 14 U 11,17, 16,13, B C For a 3 circle Venn diagram in a box [1] Correct labelling for A, B, C and U (or ξ) [1] For correct placement of numbers [1] ii) { 11, 13, 16, 17} [2] iii) {15} [2] iv) {12} [2] d) A Queue is currently empty. Show how it would appear after each of the following operations has been performed in the order given: i) push 10 [1] ii) push 7 [1] iii) pop [1] iv) push 2 [1] v) push 8 [1] i) 10 [1] ii) 7 10 [1] iii) 7 [1] DCS/RM104/S03/TEST/T101/MS 8
iv) 2 7 [1] v) 8 2 7 [1] B2. a) Consider the following circuit diagram A B C D Y X State the values of X and Y ( true or false ) when : (i) A, B, C and D are full false [ 2 ] X false [1] Y true [1] (ii) A, B, C and D are all true [ 2 ] X true [1] Y false [1] (iii) A and B are false, C and D are true [ 2 ] X false [1] Y false [1] DCS/RM104/S03/TEST/T101/MS 9
b) Consider the following circuit diagram : A B C X (i) Construct an expression in Boolean algebra which describes this circuit. [ 2 ] X = ( A. C) + ( B + C) [2] (ii) Simplify the expression you constructed in part (i) [ 3 ] X = A. C + B + C = A. C + B. C = A. C + B. C = ( A + B). C [3] (iii) Represent your answer to part(ii) as a circuit diagram. [ 3 ] A B C X [3] c) Simplify the following expression A.B.C + A.B.C + A.B.C + A.B.C + A.B.C [6] A'.B'.C' + A'.B.C' + A'.B.C + A.B'.C' + A.B.C' = A'.B'.C' + A'.B(C'+ C) + A.C'(B'+ B) [1] = A'.B'.C' +A'.B +A.C' [1] = A'(B'.C' + B) + A.C' [1] = A'(B + C') + AC' [1] DCS/RM104/S03/TEST/T101/MS 10
= A'.B + C'(A' + A) [1] = A'.B + C' [1] d) If A = 2-1, B = 3 1 4 and C = 1-1, 4 5 2 0 5 0 2 4 5 perform the following calculations: a) A B [2] b) C B [3] c) C A [3] d) Pre-multiply A by 1 0 [2] 0 1 a) 4 2 3 22 4 41 (deduct 1 mk for minor error) [2] b) 1 1-1 4 0 10 22 4 41 [3] (deduct 1 mk for minor error) c) -2-6 DCS/RM104/S03/TEST/T101/MS 11
8 10 28 21 (deduct 1 mk for minor error) [3] d) 2-1 4 5 [2] (deduct 1 mk for minor error) B3. a) If 32 people, in all, use (S) preadsheet, (D) atabase and (W) ord-processing packages, 4 use ONLY (S), 2 use ONLY (D), 3 use ONLY (W), 7 use BOTH (S) and (D) but 5 use ALL THREE: i) Represent this information in a Venn Diagram; [4] ii) If the same number of people use BOTH (W) and (D) as use BOTH (W) and (S), fill in the remaining numbers in the diagram. [4] iii) How many people, in all, can use BOTH (S) and (W)? [2] iv) What is the probability that any two of the 32, met by chance, would be able to use EITHER (D) or (W) but NOT BOTH? [2] i) S 4 2 2 D 5 8 DCS/RM104/S03/TEST/T101/MS 8 12 W
[4] ii)n(w D) =n( W S) =x x = (32-(4+2+2+3+5))/2 = 8 [4] iii) 13 [2] iv) 105/496 [2] b) The weekly wages of a group of skilled workers are as follows:- Weekly wages,$ 140-160 160-180 180-200 200-220 220-240 240-260 260-280 Number of workers 18 24 32 20 8 6 2 Find the mean and standard deviation of the data(to 2DP). [12] Class Interval Class Mark F Fx Fx 2 140-160 150 18 2700 405000 160-180 170 24 4080 693600 180-200 190 32 6080 1155200 200-220 210 20 4200 882000 220-240 230 8 1840 423200 240-260 250 6 1500 375000 260-280 270 2 540 145800 f =110 fx =20940 fx 2 =4079800 Mean = fx/ f DCS/RM104/S03/TEST/T101/MS 13
= 20940/110 = 190.36 SD = fx 2 / f ( fx/ f) 2 = 4079800/110 (190.36) 2 = 852.16 = 29.19 for a class mark column with correct boundaries [1] for a frequency column [1] for a correct frequency column [1] for an fx column [1] for a correct fx column [1] for an fx2 column [1] for a correct fx2 column [1] for correct mean([1] if incorrect but correct formula) [2] for correct SD([1] if incorrect but correct formula) [2] for stating DP for mean and SD [1] c) Explain what happens to the mean and SD of a set of numbers if: i) the numbers are all multiplied by 3 [2] ii) the numbers are all added by 4 [2] iii) the numbers are all multiplied by 1 [2] i) mean will be multiplied by 3 SD will be multiplied by 3 [2] ii) mean will increase by 4 SD remain unchange [2] DCS/RM104/S03/TEST/T101/MS 14
iii) mean will change sign(multiplied by 1) SD will not change [2] DCS/RM104/S03/TEST/T101/MS 15