0% found this document useful (0 votes)
16 views10 pages

October 2019 Computer Science Test

This document contains a monthly computer science test from October 2019 consisting of 5 questions. It tests students' abilities to convert between binary, decimal, and hexadecimal number systems, represent musical notes in binary notation, and answer other questions about computing concepts like data transfer rates and HTML color codes. The test is divided into two sections and spans multiple pages with space for worked solutions.

Uploaded by

Mohamed Mubarak
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views10 pages

October 2019 Computer Science Test

This document contains a monthly computer science test from October 2019 consisting of 5 questions. It tests students' abilities to convert between binary, decimal, and hexadecimal number systems, represent musical notes in binary notation, and answer other questions about computing concepts like data transfer rates and HTML color codes. The test is divided into two sections and spans multiple pages with space for worked solutions.

Uploaded by

Mohamed Mubarak
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

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

Common questions

Powered by AI

To convert the decimal number 109 into binary, you start by dividing the number by 2: 109 divided by 2 gives 54 with a remainder of 1, making the least significant bit 1. Continuing this process, divide 54 by 2 to get 27 with a remainder of 0; divide 27 by 2 to get 13 with a remainder of 1; divide 13 by 2 to get 6 with a remainder of 1; divide 6 by 2 to get 3 with a remainder of 0; divide 3 by 2 to get 1 with a remainder of 1; and finally, divide 1 by 2 to get 0 with a remainder of 1. Therefore, the binary representation is 01101101 .

To calculate the download time, convert 60MB into megabits: 60MB equals 480 megabits (1 byte = 8 bits, thus 60MB x 8 = 480 megabits). Dividing the total data size of 480 megabits by the download rate of 40 megabits per second gives 12 seconds. Hence, it takes 12 seconds to download the file .

A presence check ensures that a field is not left blank, confirming the existence of data. It's fundamental but doesn't verify the adherence to data type or constraints. In contrast, a range verification specifically checks if numerical data falls within a specified minimum and maximum range, ensuring contextual validity but not necessarily the presence of data .

The 'Student ID' is the most suitable field for a primary key because it uniquely identifies each student record. Unlike names which might be identical, an ID is typically assigned uniquely, ensuring that each record in the database is distinctive and easily referenced .

The denary equivalent of the hexadecimal number E is 14. In hexadecimal, E represents the 14th value after counting from 0 to 9 and A to F, where A is 10, B is 11, up to F which is 15 .

In HTML color codes, a darker shade of blue can be created by reducing the intensity of the blue component relative to 0000FF, which is full blue. For instance, using the hexadecimal code 0000CC reduces blue intensity, appearing darker. Varying the blue value alters shading while ensuring other RGB components remain zero, preserving hue purity .

To calculate the check digit for '4241508', multiply each digit by its position: 4x1, 2x2, 4x3, 1x4, 5x5, 0x6, 8x7. The products are 4, 4, 12, 4, 25, 0, 56. Adding them results in 105. Dividing 105 by 11 gives a remainder of 6, which is the check digit .

'Top Down Design' is a programming approach that breaks down a system into smaller subsystems. It starts with the highest-level components, progressively refining each component to more detailed levels. This method promotes understanding of the system's hierarchy and fosters modular solution development, enhancing maintainability and scalability .

Yellow, formed by combining full green and red, is represented by the hexadecimal code FFFF00 for X. Magenta combines full red and blue, represented by the hexadecimal FF00FF for Y. Cyan combines full green and blue, represented by 00FFFF for Z .

Storing musical notes in binary TAB and FRET notation offers distinct advantages, such as providing a compact and systematic representation of note positions that can be easily processed computationally. It simplifies the identification and comparison of finger positions and allows seamless conversion and manipulation in digital music applications. Additionally, this binary format supports automation in guitar learning software and can be efficiently transmitted over digital media .

You might also like