0% found this document useful (0 votes)
12 views14 pages

BLSS 2019 P1

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)
12 views14 pages

BLSS 2019 P1

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
You are on page 1/ 14

BOON LAY SECONDARY SCHOOL

PRELIMNARY EXAMINATION
2019

Name [ ]
CCA

Subject : COMPUTING
Paper No : 1
Subject Code : 7155/01
Level : SECONDARY FOUR EXPRESS
Date/Day : 17 SEPTEMBER 2019 / TUESDAY
Time : 1030 - 1230
Duration : 2 HOURS

Candidates answer on the Question Paper.


No Additional Materials are required.

READ THESE INSTRUCTIONS FIRST

Before you start your exam, check that you have received the correct paper and the number
of printed pages are correct.

Write your name, index number, and CCA in the spaces at the top of this page.
Write in dark blue or black pen.
You may use an HB pencil for any diagrams or graphs or rough working.
Do not use staples, paper clips, glue or correction fluid.

Approved calculators are allowed.

Answer all questions.

The number of marks is given in brackets [ ] at the end of each question or part question.
You should show all your working.
The total number of marks for this paper is 80.
2

This document consists of 13 printed pages.

1 (a) Denary numbers are stored as binary numbers inside a computer.

(i) Convert the denary number 168 into 8-bit binary. Show your working.

…………………………………………………………………………………………………….

………………………………………………………………………………………………….[1]

(ii) Convert the positive whole binary number 11010011 into a denary number. Show your
working.

…………………………………………………………………………………………………….

………………………………………………………………………………………………….[1]

(iii Convert the hexadecimal number AC into its binary representation. Show your working.
)

…………………………………………………………………………………………………….

………………………………………………………………………………………………….[1]

(b) Hexadecimal numbers are commonly used in file compression techniques and in
Media Access Control (MAC) addresses.

(i) Identify and calculate the largest denary value that can be stored by the following
numbers. Show your working.

A 4-character binary number

…………………………………………………………………………………………………….

………………………………………………………………………………………………….[1]

A 4-character hexadecimal number

…………………………………………………………………………………………………….

………………………………………………………………………………………………….[1]

BLS/EYE/2019/4E/COMP/7155/01
3

(ii) State and describe one other use of the hexadecimal number system.

…………………………………………………………………………………………………….

………………………………………………………………………………………………….[2]

2 A computer network is a system of two or more computers that are connected together by a
transmission medium for the exchange of data.

(a) The diagram below shows how a home network is connected to the Metropolitan Area Network
(MAN).

(i) Complete the diagram by filling in the appropriate networking devices for the three
parts labelled i., ii., and iii.

Networking devices:

Router, Modem, Bridge, Network Interface Card

MAN Home network

i.
iii.

Server ii. Home terminal

iii.

Mobile devices

i. …………………………………………………………………………………………………

ii. …………………………………………………………………………………………………

iii. ………………………………………………………………………………………………[2]

(ii) Explain the functions of the following networking devices:

Router

…………………………………………………………………………………………………….
BLS/EYE/2019/4E/COMP/7155/01
4

…………………………………………………………………………………………………….

…………………………………………………………………………………………………[2]

Network Interface Card (NIC)

…………………………………………………………………………………………………….

…………………………………………………………………………………………………….

…………………………………………………………………………………………………[2]

(b) (i) Compare the difference in purpose and functionality between a client-server network
and a peer-to-peer network. You may use an example to aid your answer.

…………………………………………………………………………………………………….

…………………………………………………………………………………………………….

…………………………………………………………………………………………………….

…………………………………………………………………………………………………….

………………………………………………………………………………………………….[3]

(ii) With reference to the transfer of information to terminals on a network, explain one
difference between a bus and a star network.

…………………………………………………………………………………………………….

…………………………………………………………………………………………………….

………………………………………………………………………………………………….[2]

(iii Explain what are parity bits and benefits of using parity bits in data communication.
) Include the working principle of either odd or even parity bits.

…………………………………………………………………………………………………….

…………………………………………………………………………………………………….

…………………………………………………………………………………………………….

…………………………………………………………………………………………………….
BLS/EYE/2019/4E/COMP/7155/01
5

…………………………………………………………………………………………………….

…………………………………………………………………………………………………….

………………………………………………………………………………………………….[4]

3 Consider the following algorithm.

1 x = 0
2 y = 0
3 while True:
4 num = input("Key in an integer: ")
5 out = 0
6 for i in range (len(num)):
7 out += int(num[i])*i
8 if out % 5 == 0:
9 x += 1
10 else:
11 y += 1
12 print("X: {}, Y: {}".format(x,y))
13 if (input("Try another number? (Y/N)").upper() != 'Y'):
14 break

(a) (i) Complete the trace table for the algorithm.

Use the data 1522, Y, 66733, Y, 23452, y, 35323, y, 1234, n, 8572, Y

x y out

[5]

(ii) State the purpose of the algorithm. Assume only valid inputs are keyed in.

…………………………………………………………………………………………………….

…………………………………………………………………………………………………….
BLS/EYE/2019/4E/COMP/7155/01
6

………………………………………………………………………………………………….[2]

(b) (i) Explain a benefit of including input validation checks in a computer program.

…………………………………………………………………………………………………….

…………………………………………………………………………………………………[1]

(ii) Write a validation check for the user input in the program above using pseudo code.

…………………………………………………………………………………………………….

…………………………………………………………………………………………………….

…………………………………………………………………………………………………….

…………………………………………………………………………………………………[3]

4 State the function and describe one difference for each of the following

(a) (i) Data and address buses

Function: …..…………………………………………………………………………………….

…………………………………………………………………………………………………….

Difference: ……………………………………………………………………………………….

………………………………………………………………………………………………….[3]

(ii) Memory and external storage

Function: …..…………………………………………………………………………………….

…………………………………………………………………………………………………….

Difference: ……………………………………………………………………………………….

………………………………………………………………………………………………….[3]

(b) Complete the truth tables for the gates shown below:

NAND gate NOR gate

Input 1 Input 2 Output Input 1 Input 2 Output

0 0 0 0
BLS/EYE/2019/4E/COMP/7155/01
7

0 1 0 1

1 0 1 0

1 1 1 1

[2]

5 (a) Draw the logic circuit to represent the following Boolean statement. Do not simplify the
statement.

X = (A OR B) AND (NOT (A) OR C)

A
-

B X
- -

C
-

[4]

(b) Complete the truth table for the Boolean statement:

X = (A OR B) AND (NOT (A) OR C)

A B C Working Space X

0 0 0

0 0 1

0 1 0

0 1 1

1 0 0

BLS/EYE/2019/4E/COMP/7155/01
8

1 0 1

1 1 0

1 1 1

[3]

6 A receptionist at a hotel wrote a program to find out how many of his guests have first or last names
that have at least 5 characters. The program also outputs the first and last names that have at least
5 characters.

You may assume that all the names in the list namelst are valid and are made up of only two
words. The first word in each name is the first name and the second word is the last name.

1 namelst=['Eryn Hobby', 'Sharie Walko', 'Corrine Rieck', 'Latina


Carns', 'Jeanetta Mertens', 'Jenae Yoshimoto', 'Geoffrey Gause',
'Elaina Pack', 'Jenelle Brickhouse', 'Nathanial Jacoby', 'Ulrike
Selleck', 'Maryellen Hurlbut', 'Mose Jenner', 'Randall Wozniak',
'China Erick', 'Annamaria Seeley', 'Reva Ryman', 'Tera Ling', 'Phil
Kellison', 'Judith Larue', 'Elfreda Kallenbach', 'Cristina Hu',
'Serafina Theis', 'Tiesha Gero', 'Maryrose Mcdermott', 'Sheena
Dawes', 'Shea Cagle', 'Luella Fortunato', 'Robyn Conlon', 'Reena
Knisley', 'Deonna Orbison', 'Louisa Barrington', 'Adrian Mcgrory',
'Fredericka Halas', 'Felipa Strausbaugh', 'Aisha Greaney', 'Ann
Weyandt', 'Dorothea Sand', 'Terry Bedford', 'Horace Lamoureaux',
'Myrna Abundis', 'Garrett Enger', 'Emma Mertz', 'Rachele Almaguer',
'Gale Delsignore', 'Neomi Traylor', 'Rosemarie Wyatt', 'Latrisha
Steinke', 'Jerri Larkey', 'Bridget Leal']
2
3 long_firstn, long_lastn = 0,0
4 long_first_name = []
5 long_last_name = []
6
7 for name in namelst:
8 first_name=name.split(' ')[1]
9 last_name=name.split(' ')[1]
10
11 if len(first_name) > 5:
12 long_first_name += [first_name]
13 long_first_name += 1
14 else len(last_name) >= 5:
15 long_last_name += [last_name]
16 long_lastn += 1
17
18 print("Long first names: {}\n{}\n\nLong last names:
{}\n{}".format(long_firstn,long_first_name,long_lastn,long_last_na
me))

The correct output of the program is shown below.

BLS/EYE/2019/4E/COMP/7155/01
9

(a) There are four errors in the given algorithm.

State each error and write the correct pseudo-code.

Error 1 …………………………………………………………………………………………………..

Correction 1...…………………………………………………………………………………………..

Error 2 …………………………………………………………………………………………………..

Correction 2...…………………………………………………………………………………………..

Error 3 …………………………………………………………………………………………………..

Correction 3...…………………………………………………………………………………………..

Error 4 …………………………………………………………………………………………………..

Correction 4...…………………………………………………………………………………………..

[8]

(b) Suggest why a list datatype is used to store the names instead of a string.

………………………………………………………………………………………………………...[1]

7 There has been a number of reports of researchers who plagiarise work.

(a) Explain plagiarism and its impact on society.

.…………..………………………………………………………………………………………….......

.…………..………………………………………………………………………………………….......

.…………..…………………………………………………………………………………………...[2]
BLS/EYE/2019/4E/COMP/7155/01
10

(b) (i) Explain the difference between phishing and pharming.

.……………………………………………………………………………………………….......

.……………………………………………………………………………………………….......

.………………………………………………………………………………………………...[2]

(ii) Describe how a researcher can prevent him/herself from falling prey to spyware.

.……………………………………………………………………………………………….......

.……………………………………………………………………………………………….......

.………………………………………………………………………………………………...[2]

(c) Explain Two Factor Authentications (2FA) in the context of account security.

Two Factor Authentication (2FA)

……………………………………………………………………………………………………….......

……………………………………………………………………………………………………….......

………………………………………………………………………………………………………...[2]

(d) Explain a benefit and a limitation of One Time Passwords (OTP) in 2FAs.

Benefit: .…………………………………………………………………………………………….......

……………………………………………………………………………………………………….......

Limitation: ………………………………………………………………………………………….......

………………………………………………………………………………………………………...[2]

BLS/EYE/2019/4E/COMP/7155/01
11

8 John wishes to buy a car that is currently worth SGD 120,000. He is able to pay SGD 50,000 upfront
and takes a loan from the bank on the remaining amount.

He has to repay the loan over a period of 5 years and the bank charges an interest of 2.68% per
annum. At the end of 5 years, he would have paid the bank SGD 79,896.42.
The table lists several financial functions that are available in a spreadsheet.

Name Function arguments

Payment =pmt(rate,nper,pv,[fv],[type])

Present value =pv(rate,nper,pmt,[fv],[type])

Future value =fv(rate,nper,pmt,[pv],[type])

Rate =rate(nper,pmt,pv,[fv],[type],[guess])

Interest payment =ipmt(rate,per,nper,pv,[fv],[type])

Principal payment =ppmt(rate,per,nper,pv,[fv],[type])

(a) Write down the formula that will allow John to verify the amount that he has to repay the bank
at the end of the loan period. Include the necessary arguments.

……………..………………………………………………………………………………………….[1]

(b) Loan repayments are made only a monthly basis. Calculate the amount that John would have
to pay each month.

Monthly repayment …………………….[1]

BLS/EYE/2019/4E/COMP/7155/01
12

(c) Explain “interest payment”

………..………………………………………………………………………………………………….

………………..……………………………………………………………………………………….[1]

9 You are now an apprentice data-scientist and have been tasked to work on the intercepted
transmission string again.

Having recently attended an encryption class, you would like to test the following magic algorithm
on the string in an attempt to make sense of the transmission.

● Letters in the upper case are shifted +2 relative to their ASCII values
● Letters in the lower case are shifted -2 to their relative ASCII values
● Digits are replaced with the result of the following formula: (x + 6) % 10, where x is each
individual digit
● Spaces are replaced with an ampersand ‘&’

A sample portion of the transmission in string is shown below:

>> print(transmission_str)

PPj14jWLFr5iq90nsb6ezSca1 kOz xP4A6MK6hTeHPM27gpol1 fwZyuSxB0SIBeA5wfG


Lceoex533Py9dUOIr6jTQY6687Luz9gavI1DdgH96eAn9yNbnMG1o7SYgkqFew4FP9VpQPLI
87OnkFNBMoPIdh9fh3ZB 9wwiVqzRR88bhuPtdhEYLeg5hxE v7eCQfVrKNEi DsmdF0Gxv
JUs7CX0ELbSwSbAE THAwVnpT2 knIOpV3j3gtkATHNu4mI VPpdNOTbHO5h5atCJWfTICmQ
vxE9nMd3LZDDh3vv7SiaBV174zQ136d0R29dUHGyx9KKLqcqyMJz2xS5Y9KgOOyfuEwXx4ZU
ly vw EjOpr

Write an algorithm, using either pseudo-code or a flowchart to process the message using the
magic algorithm. The program must process every single character, and output the new string when
it ends.

[10]

……….…………………………………………………………………………………………………………

……….…………………………………………………………………………………………………………

……….…………………………………………………………………………………………………………

……….…………………………………………………………………………………………………………

……….…………………………………………………………………………………………………………

……….…………………………………………………………………………………………………………

BLS/EYE/2019/4E/COMP/7155/01
13

……….…………………………………………………………………………………………………………

……….…………………………………………………………………………………………………………

……….…………………………………………………………………………………………………………

……….…………………………………………………………………………………………………………

……….…………………………………………………………………………………………………………

……….…………………………………………………………………………………………………………

……….…………………………………………………………………………………………………………

……….…………………………………………………………………………………………………………

……….…………………………………………………………………………………………………………

……….…………………………………………………………………………………………………………

……….…………………………………………………………………………………………………………

……….…………………………………………………………………………………………………………

……….…………………………………………………………………………………………………………

……….…………………………………………………………………………………………………………

……….…………………………………………………………………………………………………………

……….…………………………………………………………………………………………………………

……….…………………………………………………………………………………………………………

……….…………………………………………………………………………………………………………

……….…………………………………………………………………………………………………………

……….…………………………………………………………………………………………………………

……….…………………………………………………………………………………………………………

……….…………………………………………………………………………………………………………

……….…………………………………………………………………………………………………………

……….…………………………………………………………………………………………………………

……….…………………………………………………………………………………………………………

……….…………………………………………………………………………………………………………

……….…………………………………………………………………………………………………………

……….…………………………………………………………………………………………………………

BLS/EYE/2019/4E/COMP/7155/01
14

……….…………………………………………………………………………………………………………

……….…………………………………………………………………………………………………………

……….…………………………………………………………………………………………………………

……….…………………………………………………………………………………………………………

……….…………………………………………………………………………………………………………

BLS/EYE/2019/4E/COMP/7155/01

You might also like