Monthly Test October 2019: Computer Science 9 (Cambridge) ........

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

MONTHLY TEST ­ OCTOBER 2019

COMPUTER SCIENCE

9 (Cambridge) .........

Duration : 2 periods

Instructions to Candidates : Answer all the questions.


Calculators are not allowed.

Candidate's name : ............................................................... Admission no : ...................


1

(1) Express the denary value 109 as a binary number using an 8 ­ bit byte. Show your working.
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
[Total = 1 mark]
(2) Express the hexadecimal number F8 as a binary number stored in an 8 bit byte. Show your working.
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
[Total = 1 mark]

(3) Write down the decimal equivalent of 11010010. Show your working.
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
[Total = 1 mark]

(4) Electric guitars consist of strings and frets.

Musical notes on the guitar can be represented using the TAB notation:

Each line represents a string: the dots indicate which


strings must be held down with the fingers. These are
shown with a binary value of 1; otherwise the binary
value is 0.

contd.....to page 2
2
Grade 9 Computing contd.....from page 1

Thus, the above note would be shown as:


6 5 4 3 2 1
1 0 0 1 1 0 TAB notation

It is also important to indicate where the strings should be held down. This is shown on the
FRET. If the fingers are to be held down at the 20th FRET, this is shown in binary as:

32 16 8 4 2 1
FRET position
0 1 0 1 0 0

(Note: add up the numbers in the headings where binary 1s appear, eg: 16 + 4 = 20)
(a) A note is being played according to the TAB notation:

The strings are being held down on the 18th FRET.

Write down the binary notation for the TAB and for the FRET position:
6 5 4 3 2 1
TAB notation :

32 16 8 4 2 1
FRET position :

(2 marks)

(b) (i) Show on the diagram below which note corresponds to TAB notation: 000010.

(1 mark)

contd.....to page 3
3
Grade 9 Computer Science contd.....from page 2

(ii) What FRET position corresponds to 010011?


­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
(2 marks)
(c) Describe two advantages of storing musical notes in this format.
1. ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
2. ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­

(2 mark)
[Total = 7 marks]
(5) (a) Draw a line to connect each question to the correct answer.

Question Answer

What is the denary (bass 10) equivalent


to the hexadecimal digit E?
8

If 1GB = 2x then what is the value of X? 12

How many bits are there in one byte? 14

If the broadband data download rate is


40 megabits per second, how many
seconds will it take to download a 60MB 19
file?

What is the denary (base 10) value of


the binary number 30
00100100?
What hexadecimal value is obtained
when the two hexadecimal digits C and 36
D are added together?
(5 marks)

contd.....to page 4
4
Grade 9 Computer Science contd.....from page 3

(b) (i) The following code shows HTML 'tag' pairs on either side of the text stating the colour
that each creates.
<font color " # F F 0 0 0 0 " > RED </font>
<font color " # 0 0 F F 0 0 " > GREEN </font>
<font color " # 0 0 0 0 F F " > BLUE </font>
<font color " # X " > YELLOW </font>
<font color " # Y " > MAGENTA </font>
<font color " # Z " > CYAN </font>

Yellow is a combination of red and green, magenta a combination of red and blue and
cyan a combination of green and blue.

State what 6 ­ digit hexadecimal values should replace X, Y and Z in the above code.
X ­ ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
Y ­ ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
Z ­ ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
(3 marks)

(ii) Describe how other colours, such as a darker shade of blue, are created.
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
(2 marks)
[Total = 10 marks]

(6) Check digits are used to ensure the accuracy of entered data.
A 7 ­ digit number has an extra digit on the right, called the check digit.
digit position : 1 2 3 4 5 6 7 8
digit : – – – – – – – –
check digit

The check digit is calculated as follows:


• each digit in the number is multiplied by its digit position
• the seven results are then added together.
• this total is divided by 11
• the remainder gives the check digit (if the remainder = 10, the check digit is X)

contd.....to page 5
5
Grade 9 Computer Science contd.....from page 4

(a) Calculate the check digit for the following number. Show all your working.
4 2 4 1 5 0 8 ...
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
check digit ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
(2 marks)
(b) An operator has just keyed in the following number:
3 2 4 0 0 4 5 X
Circle below correct if the check digit is correct OR incorrect if the check digit is
incorrect.
correct incorrect
Explain your answer.
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
(2 marks)
[Total = 4 marks]
(7) (a) For each of the four statements in the table, place a tick in the correct column to show
whether it is an example of validation or verification.
Statements Validation Verification
To automatically check the accuracy of a bar code
To check if the data input is sensible
To check if the data input matches the data that has
been supplied
To automatically check that all required data fields
have been completed
(4 marks)
(b) A hospital holds records of its patients in a database. Four of the fields are:
• date of visit (dd/mm/yyyy)
• patient's height (m)
• 8 ­ digit patient ID
• contact telephone number
The presence check is one possible type of validation check on the data. For each field,
give another validation check that can be performed.
contd.....to page 6
6
Grade 9 Computer Science contd.....from page 5
Give an example of data which would fail your named validation check. A different validation
check needs to be given for each field.

field name name of validation check example of data which would


fail the validation check

date of visit

patient's height

patient ID

Contact telephone
number
(4 marks)
[Total = 8 marks]

(8) (a) Explain the term 'Top Down Design'


­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
(1 mark)
(b) Describe the two terms 'sub routine' and 'library routine'.

sub routine ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­


­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
library routine ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
(2 marks)
(c) Explain the difference between 'normal', 'abnormal' and 'extreme' data using an example
data set.
example data set (3 data values for the condition: a test mark out of 100):
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­

normal data ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­


­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
abnormal data ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
extreme data ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
(3 marks)
[Total = 6 marks]

contd.....to page 7
7
Grade 9 Computer Science contd.....from page 6
(9) The flowchart below inputs the height of children who want to ride on a rollercoaster.
Children under 1.2 metres are rejected. The ride starts when eight children have been
accepted.
START

Riders ← 0
Reject ← 0

INPUT
Height

Is
Height Yes Reject ← Reject + 1
<1.2?

No
Riders ← Riders + 1

OUTPUT
No Riders Yes 'Ready to go', Reject
= 8?

END
Complete the trace table for the input data:
1.4, 1.3, 1.1, 1.3, 1.0, 1.5, 1.2, 1.3, 1.4, 1.3, 0.9, 1.5, 1.6, 1.0
Riders Reject Height OUTPUT

[Total = 4 marks]
contd.....to page 8
8
Grade 9 Computer Science contd.....from page 7

(10). A database, MARKS, was set up to record the test results for a class of students. Part of the
database is shown below.
Student Name Class ID Maths English Science History Geography
Paul Smith 0017 70 55 65 62 59
Ravi Gupta 0009 29 34 38 41 44
Chin Hwee 0010 43 47 50 45 52
John Jones 0013 37 67 21 28 35
Diana Abur 0001 92 88 95 89 78
Rosana King 0016 21 13 11 27 15

(a) Give the number of fields that are in each record.


­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
(1 mark)
(b) State which field you would choose for the primary key.
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
(1 mark)
Give a reason for choosing this field.
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
(1 mark)

(c) The query ­ by ­ example grid below selects all students with more than 60 marks in History
or more than 60 marks in Geography.

Field : Student Name History Geography


Table : MARKS MARKS MARKS
Sort : Ascending
Show : 
Criteria : >60

or : >60

Show what would be output.

­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­

­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­

(2 marks)

contd.....to page 9
9
Grade 9 Computer Science contd.....from page 8

(d) Complete the query­by­example grid below to select and show the student names only of all
students with less than 40 marks in both Maths and English.

Field :

Table :

Sort :

Show :

Criteria :

or :

(3 marks)
[Total = 8 marks]

END

Ref: CJ

You might also like