JWSS 2018 P1 Solution

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

Class Index Number

Name:

Jurong West Secondary School


Preliminary Examinations 2018 80
COMPUTING 7155/01
Secondary Four Express 27 August 2018
Paper 1 0800 – 1000
2 hours
Candidates answer on the Question Paper.
No Additional Materials are required.

MARKING
SCHEME

This document consists of 14 printed pages.


____________________________________________________________________________
_____
Setter: Mr V Surya
2

Answer all questions

1 Draw a line to match the computer parts to the correct description.

CPU Collection of wires for transporting


data from one part to another

Control Unit Stores large amount of data that will


not be lost when power is
interrupted
ALU

Part of the processor that follows


Secondary Storage instructions and decides when the
data should be stored, received or
transmitted
Bus
Part of the processor that processes
ROM data by performing basic
mathematical and logical operations

[4]

2 Cloud services allow users to run programs and access data anywhere over
the Internet without having to be at a particular physical location.

Describe two safety measures you can take to prevent unauthorised access
to your private information when using cloud services.

Safety
(a) Measures:
Safety measure 1 ………………………………………………………………..
……………………………………………………………………………………..
• Read and fully understand the privacy policy of the cloud service.
……………………………………………………………………………………..
• Do not store secret or confidential information on cloud services.
• Ensure that the traffic between your device and the cloud service is
(b) Safety measure
encrypted before2 using
………………………………………………………………..
the cloud service.
• Constantly change your cloud passwords
……………………………………………………………………………………..
…………………………………………………………………………………….. [2]

JWSS Preliminary Examinations 2018 Computing (7155/01) Secondary 4 Express


3

3 Insert five of the following words about network devices and components,
in the correct place in the text below.

client network hub router SSID


modem server network bridge port

port
The ……………..…………… number is used together with an IP address to
uniquely identify a program that is running on a network.
network hub
The ……………..…………… is a device that connects multiple devices to the
same network and transmits received packets to all connected devices.
modem
The ……………..…………… is a device that converts digital signals to analog
signals and vice-versa.
SSID
The ……………..…………… is a 32-bit string that identifies a wireless access
point and all devices connected to it.
router
The ……………..…………… is a device that forwards packets between
separate networks. [5]

4 When we use a programming language, the source code must be translated


into machine code before it can be run.

Identify two ways by which source code can be translated into machine code
and state an advantage of each method.

Using an Interpreter
Method 1 .…………………………………………………………………………….
- Changes to the source code take effect immediately.
Advantage …….……………………………………………………………….……..
- Interpreters usually offer an interactive mode, which facilitates
………………….……………………………………………………………….……..
learning and experimentation.

Using a Compiler
Method 2 ……………………………………………………………………………..
- The resulting program runs at a faster speed because all the
Advantage …….……………………………………………………………….……..
translation has been done beforehand.
…………....…….……………………………………………………………………... [4]
- The compiler is not needed to run the program after
compilation
Is complete.

JWSS Preliminary Examinations 2018 Computing (7155/01) Secondary 4 Express


4

5 A meteorologist wants to find out the day and mean temperature recorded, for
the hottest day in the month of January, which contains 31 days.

State the inputs and outputs required for this problem.

day_list: list containing all the days of the month


Inputs ………………………………………………………………………………...
temperature_list: list of mean temperatures for each day of the month
………….……………………………………………………………………………...
day of the month
Outputs ……………………………………………………………………………...
hottest mean temperature recorded
………….……………………………………………………………………………...

Identify two examples of inputs where it may not be possible to find the
hottest day in the month of January.

If the lists are empty, there will be no output


Example 1 …….……………………………………………………………….…….
………………….……………………………………………………………….…….
If there are two or more days with identical temperatures and
Example 2 …….……………………………………………………………….…….
deemed to be the hottest, there will be an erroneous output
………………….……………………………………………………………….……. [6]

6 Sequence data types allow you to store multiple values in an ordered,


organised and efficient fashion.

(a) State two sequence data types in Python.

String (str)
(i) ………...…………………….………………………………………………
List (list)
(ii) ………...…………………….……………………………………………… [2]

(b) State two non-sequence data types in Python.

Integer (int)/ Float (float)


(i) ………...…………………….………………………………………………
Boolean (bool)
(ii) ………...…………………….……………………………………………… [2]

JWSS Preliminary Examinations 2018 Computing (7155/01) Secondary 4 Express


5

7 Data can be corrupted due to a number of reasons.

(a) Describe how the following causes can contribute to data corruption and
provide a preventive measure for each cause.

When multiple users write to the same file at the same time.
(i) Human error ...…………….………………………………………………
….…………………………………………………………………………...
Preventive Measure:
Preventive Measure
- Make regular backups...……………………………………………………
of data
- Use adequate protection when transporting storage devices
….…………………………………………………………………………... [2]
- Set up rules when collaborating with multiple users

(ii) Power failure ...…………….………………………………………………


If power supply fails when data is being written to storage device.
….…………………………………………………………………………...
Preventive Measure:
Preventive Measure
- Make regular backups...……………………………………………………
of data
-….…………………………………………………………………………...
Setup backup power supply (Uninterruptible power supply – UPS) [2]

(b) To ensure integrity of data during network transmission, parity checks


are commonly used for error-checking.

(i) The word “be” was sent across the internet. Assuming an odd
parity system was used, state if there were any errors in the
transmission for each character.

Data received
ASCII character at destination Was there an error?
b 01100010 NO
…………………….……
e 01100101 YES
…………………………. [2]

(ii) -State
For instance, it is able
one limitation to detect
of parity that an error has occurred but
checks.
cannot determine where the error occurred.
….…………………………………………………………………………...
- If there is a case where more than 1 bit has changed, it will result
in correct parity even though the data is actually corrupted
….…………………………………………………………………………... [1]

JWSS Preliminary Examinations 2018 Computing (7155/01) Secondary 4 Express


6

8 A topology describes the physical layout of a network. Understanding the


topology is essential to designing a network.

(a) State three common types of network topology.


Bus, Ring, Star
………………………………………………………………………………….…
………………………………………………………………………………….… [3]

(b) A businessman intends to set up a company in town. He wants to have


a secure LAN in the office. He has about 140 staff working in the same
office while another 20 staff working from offsite locations. The staff need
to share files and be able to connect to printers. He also plans to expand
his business in the next five years.

(i) Which network topology is most suitable in this case? Why?

Star Topology
Choice .…………………….………………………………………………
Reason .……….……………………………………………………………
If a fault occurs at a computer or cable, it is easy to isolate the
….…………………………………………………………………………... [2]
fault and do a replacement without affecting the rest of the
network.
(ii) State two advantages of a client-server network over a P2P network.

Advantage 1 ………………………………………………………............
If a P2P network were to be used, the bandwidth of the network
could decrease if the number of computers were to increase.
……………………………………………………………………................
Advantage 2 ………………………………………………………............
……………………………………………………………………………….
A client-server network is best for implementing a secure system where [2]
users are required to authenticate to a network, while a P2P network
offers little to no security.

JWSS Preliminary Examinations 2018 Computing (7155/01) Secondary 4 Express


7

9 In order to locate or identify a particular component on a network, an IP


(Internet Protocol) address is used along with a MAC (Media Access Control)
address.

(a) State the difference in operation between an IP address and a MAC


address.
[B2]
As…………….…………………………………………………………………....…
the IP may change each time it connects to the Internet, it is not considered
permanent. Media Access Control (MAC) is the hardware address and is more
…………….…………………………………………………………………..…..
permanent. In some ways, an IP address is like a mailing address while a MAC
address is like a thumbprint.
…………….…………………………………………………………………..….. [2]

(b) The following is a valid IPv4 denary address.


12.97.19.155
Convert the IPv4 denary address into a 32-bit binary address.
…………….…………………………………………………………………….…
00001100. 01100001. 00010011. 10011011
…………….…………………………………………………………………….…
…………….…………………………………………………………………….…
…………….…………………………………………………………………..…... [2]

(c) The following is a valid MAC hexadecimal address.


20:17:0B:AD:C0:DE

(i) Identify the number of bits represented by the MAC address.


48 bits
……….………………………………………………………………….... [1]
(ii) Convert the MAC address to a binary address.
…….…………………………………………………………………….…
0010 0000: 0001 0111: 0000 1011:
1010 1101: 1100 0000: 1101 1110
…….…………………………………………………………………….…
……….………………………………………………………………….... [2]
(iii) Briefly explain the benefit of using the hexadecimal representation
of the MAC address compared to its binary representation.
…….…………………………………………………………………….…
Hexadecimal is more compact compared to binary as
hexadecimal system represents each byte with two characters
…….…………………………………………………………………….…
……….………………………………………………………………….... [1]

JWSS Preliminary Examinations 2018 Computing (7155/01) Secondary 4 Express


8

10 An algorithm is required to find the highest and lowest numbers based on 100
positive inputs provided by the user. Study the following pseudo-code.

highest = 0
lowest = 0
Counter = 1
WHILE Counter < 100
INPUT Number
IF Number < highest
highest = Number
ENDIF
IF Number < lowest
Number = lowest
ENDIF
Counter = Counter + 1
ENDWHILE
OUTPUT highest, lowest

There are four errors in this pseudo-code. Locate the errors and state the
correct pseudo-code.
lowest = 0
Error 1 ………………………………………………………………………………
lowest = 9999
Correction ………………………………………………………………………….
……………………………………………………………………………………….

WHILE Counter < 100


Error 2 ………………………………………………………………………………
WHILE Counter < 101 / WHILE Counter <=100
Correction ………………………………………………………………………….
……………………………………………………………………………………….

IF Number < highest


Error 3 ………………………………………………………………………………
IF Number > highest
Correction ………………………………………………………………………….
……………………………………………………………………………………….

Number = lowest
Error 4 ………………………………………………………………………………
lowest = Number
Correction ………………………………………………………………………….
………………………………………………………………………………………. [8]
JWSS Preliminary Examinations 2018 Computing (7155/01) Secondary 4 Express
9

11 (a) Identify the logic gate represented by the following truth table.

Inputs Output
X Y Q
0 0 0
0 1 1
1 0 1
1 1 1

OR Gate
…………………………………………………………………………………… [1]

(b) The following truth table is linked to a three-input logic circuit.


The output is represented by the letter X.

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

State the Boolean statement associated with the truth table.


X = (NOT A and NOT B and NOT C)
……………………………………………………………………………………1 mark for each line [3]
or (NOT A and NOT B and C)
or (A and B and C)

JWSS Preliminary Examinations 2018 Computing (7155/01) Secondary 4 Express


10

(c) A nuclear power plant has a safety system, that is controlled by a three-input
logic circuit made up of AND, OR and NOT gates only. A WARNING signal
(S = 1) is produced based on certain conditions, shown in the table below.
Input Binary Condition
T 0 Temperature ≤ 115oC
1 Temperature > 115oC
P 0 Reactor pressure ≤ 15 bar
1 Reactor pressure > 15 bar
W 0 Cooling water ≤ 120 litres/hour
1 Cooling water > 120 litres/hour

A WARNING signal (S = 1) occurs only when:


either Temperature, T > 115oC and Cooling water, W ≤ 120 litres/hour
or Temperature, T ≤ 115oC and Reactor pressure, P > 15 bar or
Cooling water ≤ 120 litres/hour

Draw the logic circuit for the system.

T
AND

W NOT
OR S

NOT
AND
OR
P

NOT

[7]

JWSS Preliminary Examinations 2018 Computing (7155/01) Secondary 4 Express


11

12 Study the following flowchart and answer the questions that follow.

START

total1 = 0
total2 = 0
x=0
y=0
count = 1

INPUT temp

YES total1 = total1 + temp


Is temp ≤ 20?
x=x+1

NO

YES total2 = total2 + temp


Is temp > 20?
y=y+1

NO

count = count + 1

YES NO avg1 = total1/x


Is count <
avg2 = total2/y
11?

OUTPUT
avg1, avg2

END

JWSS Preliminary Examinations 2018 Computing (7155/01) Secondary 4 Express


12

Draw the trace tables for the following test data


24, 16, 31, 20, 28, 21, 18, 16, 25, 25

total1 total2 x y count temp avg1 avg2 OUTPUT


0 0 0 0 1 24
24 1 2 16
16 1 3 31
55 2 4 20
36 2 5 28
83 3 6 21
104 4 7 18
54 3 8 16
70 4 9 25
129 5 10 25
154 6 11 17.5 25.7 17.5, 25.7

[7]

JWSS Preliminary Examinations 2018 Computing (7155/01) Secondary 4 Express


13

13 Write an algorithm using only pseudo-code or a program flowchart that:

• Inputs the value of 5000 houses in a town, one at a time,


• Calculates and outputs the tax amount each houseowner must pay,
based on the value of the house:
o Houses valued over $200 000 pay 2% of their value in tax;
o Houses valued over $100 000 pay 1.5% of their value in tax;
o Houses valued over $50 000 pay 1% of their value in tax;
o Houses valued $50 000 and below pay 0% of their value in tax.

JWSS Preliminary Examinations 2018 Computing (7155/01) Secondary 4 Express


14

Flowchart Solution:

INPUT
house

1 mark

OUTPUT
tax

Is count
< 5001?

JWSS Preliminary Examinations 2018 Computing (7155/01) Secondary 4 Express


15

Pseudo-code Solution:

FOR count = 1 to 5000


INPUT house 1 mark
IF house > 200 000 1 mark
then tax = house * 0.02
ELSE IF house > 100 000
then tax = house * 0.015
ELSE IF house > 50 000
then tax = house * 0.01
ELSE
tax = 0
ENDIF
OUPUT tax
NEXT
[7]

End Of Paper

JWSS Preliminary Examinations 2018 Computing (7155/01) Secondary 4 Express

You might also like