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

DEPARTMENT FOR CURRICULUM,

LIFELONG LEARNING AND EMPLOYABILITY


Directorate for Learning and Assessment Programmes
Educational Assessment Unit

Annual Examinations for Secondary Schools 2022

YEAR 10 COMPUTING TIME: 1h 30min

Directions to candidates:
Answer ALL questions on this paper.
The use of a flow chart template is permitted.
Calculators are NOT allowed.

Good English and orderly presentation are important.

For office use only:

Paper Course
QUES 1 2 3 4 5 6 7 8 Final Mark
Total Work

MAX 6 13 10 8 8 12 14 14 85% 15% 100%

MARK

Computing – Year 10 – 2022 Page 1 of 12


1. Portable, internet-connected devices such as tablets have facilitated the
increased use of social media and other applications for leisure.

a. Besides, social media, mention TWO ways in which technology has


offered new opportunities for home leisure.

[2]

b. Air-conditioning systems have made our homes more comfortable.


They implement a process control mechanism to keep a steady
temperature. Tick the correct component used to:

i. Read user input of desired temperature:

 Temperature sensor  Buttons on remote control  Processor [1]

ii Read room temperature:

 Temperature sensor  Buttons on remote control  Processor [1]

iii. Decide whether to activate cooling or heating mechanism:

 Temperature sensor  Buttons on remote control  Processor [1]

c. Dedicated systems and process control are also key in the


manufacturing industry. Briefly explain ONE advantage of their use in
manufacture.

[1]

2. A university provides a private social media platform for its


students and staff. It is however replacing it with a new platform
called instatok@uni. The early stages of the development for this
new system involve the following activities:

New System Problem Current System Feasibility


Design Definition Analysis Study

a. In which order are the above-mentioned activities carried out?

Step 1: [1]
Step 2: [1]
Step 3: [1]
Step 4: [1]

Page 2 of 12 Computing – Year 10 – 2022


b. After the system is coded, there is a testing phase. Do the options
mentioned below help improve the testing process? Mark True or False.

Having a test plan including valid, invalid, and extreme test data. [1]
Having a direct changeover from the old to the new system. [1]
Having the same people who developed the program testing it. [1]
Dry running the program with the help of a trace table. [1]

c. Considering that the new system is ready for distribution, is the software
developer right in concluding that there are no syntax errors left in the
code? Explain.

[1]

d. Once the system is up and running the team will engage in the Control
and Review stage. Are the below processes part of this stage? Tick the
correct statement/s.

 System maintenance is done to implement new features.


[1]
The analyst checks how the actual performance compares to the

planned performance in the design stage. [1]
The system is implemented, and a suitable changeover procedure

is used. [1]
The system is checked for any previously undetected errors that

crop up. [1]

3. The university plans to implement software procedures that will


automatically alert group administrators about inappropriate
posts on the instatok@uni social platform.

The application will have a list of words, such as ‘stupid’ and


‘idiotic’, that will automatically keep the new post pending until
it is reviewed by the group administrators.

a. This feature requires an array that contains a list of unacceptable words,


such as String[]alarmWords = new String[200];

i. What is the name of this array? [1]


What is the maximum number of
ii.
words that this array can hold? [1]
iii. What is the data type of this array? [1]

Computing – Year 10 – 2022 Page 3 of 12


b. Instatok@uni includes a method called enterPost() which allows the user to
enter a new post. The post is checked for alarm words and then the system
outputs ‘Post Accepted’ or ‘Post Not Accepted’ as shown in the flowchart below:

The above flowchart has an:

- instructions with an incorrect symbol, and


- incomplete decision (missing ‘YES’ and ‘NO’).

Re-draw the flowchart without these errors.

[Flowchart here]

[3]

c. The below JAVA program snippet shows the method enterPost():

Line 1 void inputChoice(){


Line 2 System.out.println ("Enter post: ");
Line 3 String post = Keyboard.readString();
Line 4 if (validatePost(post) == false)
Line 5 ________________________________________
Line 6 else
Line 7 ________________________________________
Line 8 }

Page 4 of 12 Computing – Year 10 – 2022


i. Complete the missing parts of the code above.

Line 5: [1]

Line 7: [1]

ii. What is happening in line 4?

[1]

iii. The ‘if’ condition is calling method validatePost(). Tick the correct
method declaration for validatePost(). [1]

 boolean validatePost(String postToCheck)

 void validatePost(post)

 String validatePost(String post)

4. A Computing class is creating a robotic mascot for


their school’s gymnastics team. At the heart of their
mascot is a Micro:Bit single board computer as that
shown on the right.

a. Students are using an online CAD software called


Tinkercad to design their prototype. What is the
advantage of using CAD software rather than
producing their designs on paper?

[1]

b. Once they are happy with their design, which output device from the
ones listed below would students use to physically produce their mascot
in plastic?

 Laser printer  3D Printer  Plotter [1]

c. The students programmed the mascot to display “Welcome to our


Computing Class” in a randomly selected colour from a set of 10 different
colours. Is the mascot software an off-the-shelf or a tailor-made
software? Explain.

[2]

Computing – Year 10 – 2022 Page 5 of 12


d. The mascot software is coded in Java. The line of code below is part of
the entire code used to randomly select the text colour.

int x = (int)(Math.random() * 10) + 1;

i. What method in class Math is being used?


[1]

ii. Explain the function of (int) in the above line of code.

[1]

iii. Explain why (int) in the above line of code is needed.

[1]

iv. Explain the function of this line of code.

[1]

5. The processor is at the heart of a computer system. The table below


compares the processor of a Micro:Bit board system and two other
processors used in desktop computers.

Micro:Bit Processor Processor A Processor B

Wordlength 32-bit 64-bit 64-bit

CPU Speed 64MHz 2.1GHz 3.8GHz

a. Briefly explain how the wordlength contributes to system performance.

[1]

b. The wordlength is also equivalent to the number of lines on the address


bus for each of these processors.

i. What is the address space of:


Micro:Bit processor: [1]
Processor A: [1]

Page 6 of 12 Computing – Year 10 – 2022


ii. How does the difference in address space between that of the
Micro:Bit processor and that of Processor A impact system
performance?

[1]

c. Which processor do you suggest using for a school clerk’s computer?


Explain.

[2]

d. The CPU makes use of several registers. Briefly explain the role of the
following registers:

i. Program Counter:
[1]

ii. Instruction Register:


[1]

6. An instruction set is a list of all the instructions that a processor can execute.
Some of these instructions include:
- arithmetic operations, such as add and subtract, and
- logical operations such as AND, OR and NOT.

a. The accumulator in an 8-bit processor currently holds the value


101110002.

i. Find the value of the accumulator in decimal. Show your working.

Working here.

[1]

ii. Show the contents of the Accumulator after a shifted right operation.

Working here.

[1]
Computing – Year 10 – 2022 Page 7 of 12
iii. Convert your answer in (ii) to decimal. Show your working.

Working here.

[1]

iv. Hence, what does an Arithmetic Right Shift operation do?


[1]

v. What would happen if the value 101110002 is shifted left? Explain.

[2]

b. 101110002 is passed through a NOT gate.

i. Give the resulting output pattern.


[1]

ii. Is your answer in part b(i) above the One’s Complement or Two’s
Complement of 101110002?
[1]

c. What is the equivalent of 101010102 in decimal if this is stored in an 8-


bit Two’s Complement register? Show your working.

Working here.

[1]

d. Subtract 4310 from 9210 using 8-bit two’s complement register. Show
your working.

Working here.

[3]
Page 8 of 12 Computing – Year 10 – 2022
7. A logic gate is a device that acts as a building block for digital circuits.

a. Match the following gates with their symbol and truth table.

Gates Symbol Truth Table


i. AND [1]
ii. OR [1]
iii. NOT [1]

Symbol A Symbol B Symbol C

Truth Table A Truth Table B Truth Table C

A X A B X A B X
0 1 0 0 0 0 0 0
1 0 0 1 0 0 1 1
1 0 0 1 0 1
1 1 1 1 1 1

b. Circuits enable computers to do more complex operations than they


could accomplish with just a single gate.

i. Complete the incomplete truth table for the circuit shown below.

A B C X
0 0
0 1
1 0
1 1 [2]

ii. Give the Boolean expression for the above circuit.


[1]

Computing – Year 10 – 2022 Page 9 of 12


c. There are more logic gates besides the AND, OR
and NOT gate. For example, the XNOR gate
gives a 1 when both inputs are the same. The
symbol of the XNOR gate is shown on the right.

Complete the below truth table for the XNOR gate.

A B out
0 0
0 1
1 0
1 1 [1]

d. Consider the logic circuit shown below and answer the questions that follow.

i. Underline the correct answer for the below statements.

- This circuit has [1, 2, 3, 4, 5] inputs.


- This circuit has [1, 2, 3, 4, 5] outputs.
- This circuit has [1, 2, 3, 4, 5 ] logic gates.
[3]

ii. Which gate will give a 1 if A = B? [1]

iii. Which gate will give a 1 if A > B? [1]

iv. Which gate will give a 1 if A < B? [1]

v. According to your answers in part ii, iii, and iv above, suggest the
function of the above logic circuit.

[1]

Page 10 of 12 Computing – Year 10 – 2022


8. A Physics student created an app to study acceleration according to gravity and
Newton’s Laws of Motion.

a. The app includes the methods mainMenu(),


enterData(), outputGravity() and exit().

Method mainMenu() displays a menu with the options


as shown in the screenshot on the right. The menu
loops until the user chooses option 3 to exit, and each
chosen option calls the relevant method.

Complete the flowchart for method mainMenu().

i. Symbol 1: [1]

ii. Symbol 2: [1]

iii. Symbol 3: [1]

iv. Symbol 4: [1]

v. Symbol 5: [1]

b. Method enterData() asks the user to enter five readings for the height
and five readings for the time it takes for an object to fall. Analyse the
incomplete code shown below, and complete the code for method
enterData() in the space provided on the next page.

int[] heights = new int[5]; //height in mm


int[] times = new int[5]; //time in milliseconds

void enterData(){

Computing – Year 10 – 2022 Page 11 of 12


Code for method enterData() here.

[3]

c. Method outputGravity() calculates and displays the average value for


gravity using the formula:

average gravity = (average height) * 2 / (average time)2

Line 1: void outputGravity(){


Line 2: int totalHeight = 0;
Line 3: int totalTime = 0;
Line 4:
Line 5: for(int i=0; i<5; i++){
Line 6: totalHeight = totalHeight + heights[i]
Line 7: totalTime = ________________________________
Line 8: }
Line 9:
Line 10: double avgHeights = _________________________________
Line 11: double avgTime = totalTime/5;
Line 12:
Line 13: double avgGravity = ___________________________________
Line 14:
Line 15: System.out.println ("Gravity: "+ gravity);
Line 16: }

i. Complete the code for this method.


Line 7: [1]
Line 10: [1]
Line 13: [1]

ii. Include comments in lines 4, 10 and 12 to make the code more readable.
Line 4: [1]
Line 9: [1]
Line 12: [1]

--- END OF PAPER --


Page 12 of 12 Computing – Year 10 – 2022

You might also like