Aqa 45122 QP Jun14
Aqa 45122 QP Jun14
Surname
Other Names
Examiner’s Initials
Candidate Signature
Question Mark
1
General Certificate of Secondary Education
June 2014 2
3
Computer Science 4512/2 4
6
Thursday 12 June 2014 1.30 pm to 3.00 pm
7
You will need no other materials
You must not use a calculator. 8
9
Time allowed
1 hour 30 minutes 10
Instructions 11
Use black ink or black ball-point pen. Use pencil only for drawing.
12
A Answer all questions.
Questions 10 and 11 should be answered in continuous prose. In these
questions you will be marked on your ability to: TOTAL
use good English
organise information clearly
use specialist vocabulary where appropriate.
You must answer the questions in the spaces provided. Do not write
outside the box around each page or on blank pages.
Do all rough work in this book. Cross through any work you do not
want to be marked.
Information
The marks for questions are shown in brackets.
The maximum mark for this paper is 84.
You are reminded of the need for good English and clear presentation in
your answers.
(JUN144512/201)
M/AH/104416/Jun14/E3 4512/2
2 Do not write
outside the
box
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
1 (b) State the hexadecimal representation of the denary number 125. You must show your
working.
[2 marks]
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
1 (c) Give one reason why programmers often use hexadecimal, instead of binary, to
represent numbers.
[1 mark]
............................................................................................................................................
............................................................................................................................................
1 (d) The ASCII character set uses seven bits to encode every character.
............................................................................................................................................
............................................................................................................................................
(02)
M/Jun14/4512/2
Do not write
3 outside the
box
1 (e) Table 1 shows four stages in converting sound into a digital form.
Show the correct order for the stages by labelling them with the numbers 1 – 4
(1 being the first stage).
[3 marks]
Table 1
Stage Order (1 – 4)
1 (f) Describe how a black and white image could be represented as a bitmap in binary.
[3 marks]
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
____
11
Turn over
(03)
M/Jun14/4512/2
4 Do not write
outside the
box
2 A typical computer’s main memory consists of both volatile memory and non-volatile
memory.
............................................................................................................................................
............................................................................................................................................
2 (a) (ii) What is normally stored in the non-volatile part of a computer’s main memory?
[1 mark]
............................................................................................................................................
............................................................................................................................................
2 (b) Explain why having cache memory can improve the performance of the Central
Processing Unit (CPU).
[2 marks]
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
2 (c) State two characteristics, other than the size of cache memory, that can improve the
performance of CPUs.
[2 marks]
Characteristic 1 ...................................................................................................................
............................................................................................................................................
Characteristic 2 ...................................................................................................................
............................................................................................................................................
____
6
(04)
M/Jun14/4512/2
Do not write
5 outside the
box
Note: line numbers have been shown but are not part of the function.
Figure 1
1 FUNCTION FindHighest(arr)
2 highest ← arr[1]
3 FOR i ← 2 TO LEN(arr)
4 IF arr[i] > highest THEN
5 highest ← arr[i]
6 ENDIF
7 ENDFOR
8 RETURN highest
9 ENDFUNCTION
............................................................................................................................................
3 (b) This function uses iteration. Give the line number on which iteration starts.
[1 mark]
............................................................................................................................................
3 (c) This function uses selection. Give the line number on which selection starts.
[1 mark]
............................................................................................................................................
3 (d) This function uses variable assignment. Give the line number in the function where
variable assignment is first used.
[1 mark]
............................................................................................................................................
3 (e) The variable i in Figure 1 only has scope between lines 3 and 7. Explain with
reference to the variable i what scope means.
[1 mark]
............................................................................................................................................
____
5
Turn over
(05)
M/Jun14/4512/2
6 Do not write
outside the
box
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
4 (b) Three actions that can take place in a computer network are shown in Table 2. Tick
one box in each row of the table to show if the action would normally occur at the client
end, the server end, or at both.
[3 marks]
Table 2
Receiving messages
____
5
(06)
M/Jun14/4512/2
Do not write
7 outside the
box
Figure 2
© Thinkstock
5 (a) One characteristic of a tablet computer is that it has a number of built-in physical
devices to input data, such as a touchscreen.
State three other built-in physical devices that allow data to be input to a typical tablet
computer.
[3 marks]
1 ..........................................................................................................................................
2 ..........................................................................................................................................
3 ..........................................................................................................................................
Turn over
(07)
M/Jun14/4512/2
8 Do not write
outside the
box
5 (b) Tablet computers normally use solid state storage media instead of magnetic storage
media.
State and explain two differences, other than cost and storage capacity, that make
solid state media a better choice than magnetic media for tablet computers.
[4 marks]
Difference 1 ........................................................................................................................
Explanation 1 ......................................................................................................................
............................................................................................................................................
............................................................................................................................................
Difference 2 ........................................................................................................................
Explanation 2 ......................................................................................................................
............................................................................................................................................
............................................................................................................................................
____
7
(08)
M/Jun14/4512/2
Do not write
9 outside the
box
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
____
5
Turn over
(09)
M/Jun14/4512/2
10 Do not write
outside the
box
Figure 3
FUNCTION Compare(x,y)
IF x > y THEN
RETURN 1
ELSE
IF x < y THEN
RETURN -1
ELSE
RETURN 0
ENDIF
ENDIF
ENDFUNCTION
Explain why a Boolean return value could not have been used.
[1 mark]
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
7 (b) Each of the following expressions evaluates to an integer. Give the integer value for
each:
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
(10)
M/Jun14/4512/2
Do not write
11 outside the
box
............................................................................................................................................
............................................................................................................................................
____
4
8 (a) Six database terms are given below. For each row in Table 3, choose the letter from
A, B, C, D, E or F which best matches the description.
[4 marks]
A. Field
B. Foreign key
C. Index
D. Primary key
E. Record
F. Relationship
Table 3
Definition Letter
Turn over
(11)
M/Jun14/4512/2
12 Do not write
outside the
box
8 (b) The two tables Class and Teacher form a relational database.
Class
Teacher
8 (b) (i) The following incomplete SQL query should find the ClassID of every class taught on a
Monday or a Wednesday. The WHERE clause is missing.
SELECT ClassID
FROM Class
In Table 4 place a tick next to the correct WHERE clause to complete the query.
[1 mark]
Table 4
(12)
M/Jun14/4512/2
Do not write
13 outside the
box
8 (b) (ii) List the results of executing the following SQL query on the database shown in 8(b).
[4 marks]
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
____
9
Turn over
(13)
M/Jun14/4512/2
14 Do not write
outside the
box
9 This code is supposed to find out if a positive integer entered by a user is exactly
divisible by the number 3.
Note: line numbers have been included and are not part of the code.
Note: lines starting with a # indicate a comment.
1 # user input
2 n ← USERINPUT
3 # check if divisible by 3
4 WHILE n ≥ 0
5 n ← n – 3
6 ENDWHILE
7 IF n = 0 THEN
8 OUTPUT 'is divisible by 3'
9 ELSE
10 OUTPUT 'is not divisible by 3'
11 ENDIF
9 (a) The programmer realises there is an error because a user input of 6 incorrectly outputs
'is not divisible by 3'.
9 (a) (i) In Table 5 place a tick next to the type of error that the programmer has found.
[1 mark]
Table 5
Logical
Runtime
Syntax
9 (a) (ii) State the line number of the code containing the mistake that causes this error to occur.
[1 mark]
............................................................................................................................................
9 (a) (iii) What change needs to be made to the line of code you have identified in your answer
to 9(a)(ii) so that the program will work correctly?
[1 mark]
............................................................................................................................................
(14)
M/Jun14/4512/2
Do not write
15 outside the
box
9 (b) What type of error could occur if the user enters the value eight?
[1 mark]
............................................................................................................................................
9 (c) There are many tools that can help the programmer to reduce errors in their code when
developing a computer program. State three tools that can help to identify errors or
reduce the chance of there being errors when developing a program.
[3 marks]
Tool 1 ..................................................................................................................................
............................................................................................................................................
Tool 2 ..................................................................................................................................
............................................................................................................................................
Tool 3 ..................................................................................................................................
............................................................................................................................................
____
7
Turn over
(15)
M/Jun14/4512/2
16 Do not write
outside the
box
The programmer uses unit testing as part of the development process. Compare unit
testing with another type of testing that the programmer could use. In your answer
you should also include a description of what unit testing is.
In this question you will be marked on your ability to use good English, to organise
information clearly and to use specialist vocabulary where appropriate.
[6 marks]
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
____
6
(16)
M/Jun14/4512/2
Do not write
17 outside the
box
In this question you will be marked on your ability to use good English, to organise
information clearly and to use specialist vocabulary where appropriate.
[6 marks]
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
____
6
Turn over
(17)
M/Jun14/4512/2
18 Do not write
outside the
box
12 The following algorithm determines the number of carriages a train will need.
The array called passengers is used to store the change in the number of
passengers at each train station. For example, at the first stop the total number of
passengers increases by 100, at the second stop the total number of passengers
decreases by 20, at the third stop the total number of passengers increases by 70 and
so on.
Table 6
(18)
M/Jun14/4512/2
Do not write
19 outside the
box
12 (b) Write an algorithm (using either pseudocode or a flowchart) that calculates the
amount of fuel a train will need to complete a journey. The algorithm must:
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
____
13
END OF QUESTIONS
(19)
M/Jun14/4512/2
20 Do not write
outside the
box
(20)
M/Jun14/4512/2