XMSS 2018 P1
XMSS 2018 P1
For
1 Insert five of the following words about computer architecture in the correct place Examiner’s
in the text below. Use
3 A school wants to use a computer program to find out which student has achieved
the lowest score in a Physics class. There are 24 students in the class and all the
students’ scores are different.
State the inputs, the outputs and the processes required to find the name and the
score of the student with the lowest score.
Inputs ……………………………………………………………………………………….
………………………………………………………………………………………………..
………………………………………………………………………………………………..
Outputs ……………………………………………………………………………………..
………………………………………………………………………………………………..
………………………………………………………………………………………………..
………………………………………………………………………………………………..
……………………………………………………………………………………………….. [6]
Input Output
• Number: a positive whole number • Remainder when Number is divided
by 4
Input Output
• Number: a positive whole number • Remainder when Number is divided
• Divisor: a positive whole number by Divisor.
Write down the solution to the second problem by generalising the first solution.
………………………………………………………………………..……………………….
………………………………………………………………………………..……………….
……………………………………………………………………………………..………….
…………………………………………………………………………………..…………….
………………………………………………………………………………..……………….
………………………………………………………………………………..……………….
………………………………………………………………………………..………………. [3]
START
INPUT num
sum = 0
n = num
Is n >= No
1?
Yes
rem = n MOD 10
n = n//10
No Is num
= sum?
Yes
OUTPUT TRUE
OUTPUT
FALSE
END
Fig. 5
371
Trace table
[5]
a constant …………………………………………………………………………………..
………………………………………………………………………………………………..
a variable ……………………………………………………………………………………
………………………………………………………………………………………………..
an array ……………………………………………………………………………………...
……………………………………………………………………………………………….. [3]
………………………………………………………………………………………………..
………………………………………………………………………………………………..
………………………………………………………………………………………………..
………………………………………………………………………………………………..
………………………………………………………………………………………………..
………………………………………………………………………………………………..
………………………………………………………………………………………………..
………………………………………………………………………………………………..
………………………………………………………………………………………………..
………………………………………………………………………………………………..
……………………………………………………………………………………………….. [9]
8 Length check and range check are common checks that are performed in data
validation.
………………………………………………………………………………………………..
……………………………………………………………………………………………….. [2]
Total = 500
Counter = 1
WHILE Counter > 11 DO
Total = Total – Number[Counter]
Counter = Counter + 1
ENDWHILE
Average = Total / Counter
There are four errors in this pseudo-code. Locate the errors and state the correct
pseudo-code.
Error 1 ……………………………………………………………………………………….
Correction …………………………………………………………………………………...
………………………………………………………………………………………………..
Error 2 ……………………………………………………………………………………….
Correction …………………………………………………………………………………...
………………………………………………………………………………………………..
Error 3 ……………………………………………………………………………………….
Correction …………………………………………………………………………………...
………………………………………………………………………………………………..
Error 4 ……………………………………………………………………………………….
Correction …………………………………………………………………………………...
……………………………………………………………………………………………….. [8]
………………………………………………………………………………………….
………………………………………………………………………………………….
………………………………………………………………………………………….
………………………………………………………………………………………….
………………………………………………………………………………………….
…………………………………………………………………………………………. [2]
(b) Convert the denary number 401 into a binary number. Show your working.
………………………………………………………………………………………….
………………………………………………………………………………………….
………………………………………………………………………………………….
………………………………………………………………………………………….
………………………………………………………………………………………….
…………………………………………………………………………………………. [2]
(c) Convert the denary number 11001 into a hexadecimal number. Show your
working.
………………………………………………………………………………………….
………………………………………………………………………………………….
………………………………………………………………………………………….
………………………………………………………………………………………….
………………………………………………………………………………………….
…………………………………………………………………………………………. [2]
The output, X, of a logic circuit that drives the alarm must have a value of 1 only if:
either pressure < 5 bar and revs > 8000 rpm
or revs <= 8000 and temp > 120 ˚C
[6]
A B C D
1 NAME OF FRUIT NORMAL PRICE VOLUME OF COST PER
JUICE PER BOTTLE ($) BOTTLE (LITRES) LITRE ($)
2 Apple 3.50 1.0 3.50
3 Orange 2.80 1.0 2.80
4 Pomegranate 4.55 0.7 6.50
5 Caju 2.00 2.0 1.00
6 Mango 1.05 0.7 1.50
7 Average cost: 3.06
(a) What formula is in cell D5 to calculate the cost of Caju juice per litre?
…………………………………………………………………………………………. [1]
(b) What formula is in cell D7 to calculate the average cost of fruit juice per litre?
…………………………………………………………………………………………. [1]
Complete the spreadsheet below by showing the formulas that are needed to
be placed in cells F2 to F6 and G2 to G6.
E F G
Percentage Discounted price per
1 Discount amount ($)
discount (%) bottle ($)
2 10
3 20
4 15
5 10
6 5
[4]
1. ……………………………………………………………………………………….
………………………………………………………………………………………….
………………………………………………………………………………………….
2. ……………………………………………………………………………………….
………………………………………………………………………………………….
…………………………………………………………………………………………. [2]
………………………………………………………………………………………….
………………………………………………………………………………………….
………………………………………………………………………………………….
………………………………………………………………………………………….
………………………………………………………………………………………….
………………………………………………………………………………………….
………………………………………………………………………………………….
………………………………………………………………………………………….
…………………………………………………………………………………………. [4]
………………………………………………………………………………………………..
………………………………………………………………………………………………..
………………………………………………………………………………………………..
………………………………………………………………………………………………..
………………………………………………………………………………………………..
………………………………………………………………………………………………..
………………………………………………………………………………………………..
………………………………………………………………………………………………..
………………………………………………………………………………………………..
………………………………………………………………………………………………..
………………………………………………………………………………………………..
………………………………………………………………………………………………..
………………………………………………………………………………………………..
………………………………………………………………………………………………..
………………………………………………………………………………………………..
………………………………………………………………………………………………..
………………………………………………………………………………………………..
………………………………………………………………………………………………..
………………………………………………………………………………………………..
………………………………………………………………………………………………..
………………………………………………………………………………………………..
………………………………………………………………………………………………..
……………………………………………………………………………………………….. [8]
End of paper