0% found this document useful (0 votes)
9 views7 pages

XMSS 2018 P1 Solution

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)
9 views7 pages

XMSS 2018 P1 Solution

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/ 7

4E Prelim Computing Paper 1 2018

1 A computer processor carries out the instructions in a computer [5]


program. The memory is where data and instructions are stored ready
to be processed. The address bus identifies the location of data. The
data bus transports the data from one location to another.

Total [5]

2 Volatile data storage: Processor register, RAM (any one) [2]

Non-volatile data storage: ROM, Any external storage (any one)

Total [2]

3 Inputs: [6]
- 24 student names
- 24 marks for Physics

Outputs:
- Name of the student with the lowest score
- score for that student

Processes required:
- Store input data in arrays/lists
- Search for the student with the lowest mark/sort the arrays in mark
order

Total [6]

4 Step 1: If Number is less than Divisor, proceed to Step 3. Otherwise, [3]


proceed to Step 2.

Step 2: Subtract Divisor from Number and then proceed to Step 1.

Step 3: Output Number as the final answer.

Total [3]

1
5 [5]
num sum n rem OUTPUT
371
0 371
1
1
37
7
344
3
3
371
0
TRUE

Total [5]

6 a constant: A name with an associated value that usually cannot be [1]


changed while the program is running.

a variable: A name with an associated value that can be changed while [1]
the program is running.

an array: Sequence where all the items have the same size and are [1]
arranged consecutively in memory.
Total [3]

7 a = int(input("Please enter an integer: ")) [9]


b = int(input("Please enter another integer: "))
total = a + b
if a == b:
print("Twice the sum:", 2*total)
else:
print("Sum:", total)

Total [9]

8 length check: Process of ensuring that input data is not too long or too [1]
short.

range check: Process of ensuring that input data is within the required [1]
range of values.

Total [2]

2
9 Error 1: Total = 500 [1]

Correction: Total = 0 [1]

Error 2: WHILE Counter > 11 DO [1]

Correction: WHILE Counter < 11 DO [1]

Error 3: Total = Total – Number[Counter] [1]

Correction: Total = Total + Number[Counter] [1]


[1]
Error 4: Average = Total / Counter
[1]
Correction: Average = Total / 10

Total [8]

10 [5]

Total [5]

11 B16 = 1110 = 10112


a
C16 = 1210 = 11002
Binary number = 1011 1100

3
11 2 401 = 200R1
b
2 200 = 100R0

2 100 = 50R0

2 50 = 25R0

2 25 = 12R1

2 12 = 6R0

2 6 = 3R0

2 3 = 1R1

2 1 = 0R1

Binary number = 110010001

11 16 11001 = 687R9
c
16 687 = 42RF

16 42 = 2RA

16 2 = 0R2

Hexadecimal number = 2AF9

Total [6]

12 [6]

Total [6]

4
13 =B5/C5 [1]
a

13 = (D2 + D3 + D4 + D5 + D6)/5 OR [1]


b = AVERAGE(D2:D6) OR
= SUM(D2:D6)/5

13 [4]
c

Total [6]

14 A network allows a group of computers to make use of shared [2]


a resources such as printers or files.
Depending on the network’s configuration, every user who logs on to the
network may have access to the Internet.
Software can be stored on the central server of a network and deployed
to other computers over a network.
Data files can be stored on a central server for ease of access and
backup purposes.
Computers in the same network are often able to share instant
messages and emails for communication.

14 - counts the number of ones in each byte of data [4]


b
- parity bit is set so there are an even/odd number of ones before the
data is transmitted.
- If the number of ones is not even/odd when the data has been
transmitted
- then an error has occurred

Total [6]

5
15 Flowchart [8]
START

number = []

negative = 0

positive = 0

index = 0

No
Is index <
20?

Yes

INPUT number[index]

Is number[index] <
50?
Yes
No
OUTPUT index

Is number[index] <
0?

Yes
No

negative = negative + 1 positive = positive + 1

index = index + 1

OUTPUT negative

OUTPUT positive *Refer to pseudo-code


marks allocation.

END

6
15 Pseudo-code [8]

number = []
negative = 0
positive = 0
index = 0
WHILE index < 20
INPUT number[index]
IF number[index] < 50
OUTPUT index
ENDIF
IF number[index] < 0
negative = negative + 1
ELSE
positive = positive + 1
ENDIF
index = index + 1
ENDWHILE
OUTPUT “Number of negative numbers: “ + negative
OUTPUT “Number of positive numbers: “ + positive

Total [8]

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy