You are on page 1of 18

END OF YEAR EXAMINATION 2022

SUBJECT: COMPUTER SCIENCE

NAME: ……………………………………………………..

SURNAME: …………………………………………………

DATE OF EXAM: WEDNESDAY 25TH MAY 2022

PAPER: Computer systems and Algorithms, Programming and


Logic
YEAR SET: 4B-4E/CS1

TIME ALLOWED: 1 Hour and 30 minutes

READ THESE INSTRUCTIONS FIRST


• Students answer on the Question Paper.
• No Additional Materials are required.
• No calculators are allowed.
• Write in dark blue or black pen.
• You may use an HB pencil for any diagrams, graphs or rough working.
• Do not use staples, paper clips, glue or correction fluid.

Answer all questions.

No marks will be awarded for using brand names of software packages or hardware.

The number of marks is given in brackets [ ] at the end of each question or part
question.

The maximum number of marks is 100.

1
Section A
1. Benedict has a computer that is assigned an Internet Protocol (IP) address. The IP
address is:
198.167.214.0
The IP address is represented as denary values.
(a) Convert the denary values 167 and 214 from the IP address to 8-bit binary.

167

214

Working space
.......................................................................................................................................

.......................................................................................................................................

.......................................................................................................................................

.......................................................................................................................................

[2]

(b) Benedict’s computer is also assigned a Media Access Control (MAC) address.
(i) Identify one similarity between an IP address and a MAC address.
..............................................................................................................................

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

(ii) Identify two differences between an IP address and a MAC address.


Difference 1 ........................................................................................................

............................................................................................................................

............................................................................................................................

Difference 2 ........................................................................................................

............................................................................................................................

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

2
2. Julia inputs personal data into her computer.
Julia uses a USB connection to transfer data onto her USB flash memory drive.
(a) One benefit of using a USB connection is that it is a universal connection.
State two other benefits of using a USB connection.
Benefit 1 ..................................................................................................................

................................................................................................................................

Benefit 2 ..................................................................................................................

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

(b) Identify the type of data transmission used in a USB connection.

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

3. A denary value can be converted into hexadecimal and binary.

(a) Complete the table to show the hexadecimal and 8-bit binary values of the given

denary values.

[6]

Working space

................................................................................................................................

................................................................................................................................

................................................................................................................................

................................................................................................................................

................................................................................................................................

3
(b) Give two benefits, to users, of converting binary values to hexadecimal.

Benefit 1 .................................................................................................................

................................................................................................................................

Benefit 2 .................................................................................................................

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

(c) Hexadecimal is used to represent Hypertext Markup Language (HTML) colour

codes in computer science. Identify four other ways that hexadecimal is used in

computer science.

1 .............................................................................................................................

2 .............................................................................................................................

3 .............................................................................................................................

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

4. A music company has a website that allows users to stream music. The music is
stored in sound files.
(a) The sound files are compressed using lossless compression.
(i) Describe how the sound files are compressed using lossless compression.

..............................................................................................................................

..............................................................................................................................

..............................................................................................................................

..............................................................................................................................

..............................................................................................................................

..............................................................................................................................

..............................................................................................................................

..............................................................................................................................

..............................................................................................................................

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

4
(ii) State one reason why the music company would compress the sound files
using lossless, rather than lossy, compression.

...........................................................................................................................

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

(iii) Give one benefit, to the user, of the music company compressing the sound
files.

...........................................................................................................................

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

(iv) Give one drawback of the music company using lossless, rather than lossy,
compression for the sound files.

...........................................................................................................................

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

5. Four 7-bit binary values are transmitted from one computer to another. A parity bit is
added to each binary value creating 8-bit binary values. All the binary values are
transmitted and received correctly.
(a) Identify whether each 8-bit binary value has been sent using odd or even parity by
writing odd or even in the type of parity column.

[4]

5
(b) An error may not be detected when using a parity check.

Identify why an error may not be detected.

..................................................................................................................................

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

(c) The data will also be checked using a checksum.

Describe how a checksum can be used to check that the data has been
transmitted correctly.

..................................................................................................................................

..................................................................................................................................

..................................................................................................................................

..................................................................................................................................

..................................................................................................................................

..................................................................................................................................

..................................................................................................................................

..................................................................................................................................

..................................................................................................................................

.............................................................................................................................. [5]

6
(d) The data is sent using parallel half-duplex data transmission.

(i) Describe how data is sent using parallel half-duplex data transmission.

..............................................................................................................................

..............................................................................................................................

..............................................................................................................................

..............................................................................................................................

..............................................................................................................................

..............................................................................................................................

..............................................................................................................................

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

(ii) State two drawbacks of using parallel data transmission.

Drawback 1 ..........................................................................................................

.............................................................................................................................

Drawback 2 ..........................................................................................................

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

6. (a) Complete the following binary addition. Show your working.

10111011

+11010110

[2]

7
(b) Name and explain the error that occurred when you added the binary numbers in
part (a).

................................................................................................................................

................................................................................................................................

................................................................................................................................

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

7. Name 2 utility programs offered by most computer systems.

1 ....................................................................................................................................

2 ....................................................................................................................................

[2]

8
BLANK PAGE

9
Section B
8. This flowchart inputs a range of temperatures in degrees Fahrenheit.
As each temperature is input, it is compared with the previous highest temperature. If it is
higher than the current highest, it replaces the previous highest temperature and then it is
converted to degrees Celsius.
For ease of calculation, the final step of the Fahrenheit to Celsius conversion has been
approximated as division by 2.
When –1 is entered, the input process stops and the highest temperature (in both Fahrenheit
and Celsius) is output.

10
Complete the trace table for the input data:

68, 46, 50, 86, 65, 50, 40, 30, –1

[5]

9. Four pseudocode descriptions and five pseudocode statements are shown. Draw one
line to link each pseudocode description to the correct pseudocode statement. Not all
pseudocode statements will be used.

[4]

11
10. Read this section of code that inputs the ages of people entering an event. The input
sequence is ended by inputting a negative value for age. The code outputs the
number of people at the event over the age of 18.

01 Num18 = 0
02 INPUT Age
03 WHILE Age >= 0 DO
04 IF Age >= 18 THEN
05 Num18 = Num18 + Age
06 ENDIF
07 ENDWHILE
08 PRINT Num18 – Age

There are four errors in this code.

Locate these errors and suggest a correction to remove each error.

Error 1 ............................................................................................................................

Correction .......................................................................................................................

.......................................................................................................................................

Error 2 ............................................................................................................................

Correction .......................................................................................................................

.......................................................................................................................................

Error 3 ............................................................................................................................

Correction .......................................................................................................................

.......................................................................................................................................

Error 4 ............................................................................................................................

Correction .......................................................................................................................

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

12
11. For each of the four statements in the table, place a tick in the correct column to show

whether it is an example of validation or verification.

Statements Validation Verification

To automatically check the accuracy of a bar code

To check if the data input is sensible

To check if the data input matches the data that has


been supplied
To automatically check that all required data fields have
been completed
[4]

12. A linear search is performed to find a name in a class list of student names, where all

names stored are different.

Complete the pseudocode algorithm for a linear search

01 OUTPUT “Please enter name to find “


02 INPUT Name
03 Found  FALSE
04 Counter  1
05 …………………………
06 IF Name = StudentName[…………………………]
07 THEN
08 Found  ……………………………
09 ELSE
10 Counter  …………………………………………………………………
11 ENDIF
12 UNTIL Found …………… Counter > ClassSize
13 IF Found
14 THEN
15 OUTPUT Name, “ Found at position “, Counter, “ in the
list.”
16 ELSE
17 OUTPUT Name, “ not found.”
18 ………………………
[6]

13
13. (a) Algorithms usually consist of three different stages.

One stage is INPUT.

Name the other stages.

1 ................................................................................................................................

2 ............................................................................................................................ [1]

(b) A programmer uses the process of decomposition to break down a problem.

Explain the purpose of decomposition.

..................................................................................................................................

..................................................................................................................................

..................................................................................................................................

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

(c) Programming languages support different data types.

Complete the table by giving four different data types together with an example

data value for each.

Data type Example data value

[4]

14
(d) Draw lines to connect each of the following computing terms with the appropriate
description.
Term Description

A structure for the temporary


File storage of data

A method of setting the


Assignment
value of a variable

Array A structure for the


permanent storage of data

[3]

(e) A pseudocode algorithm assigns values to three variables as follows:

FlagA  TRUE

FlagB  FALSE

FlagC  TRUE

Evaluate the expressions given in the following table:

Expression Evaluates to
NOT FlagB AND FlagC
NOT (FlagB OR FlagC)
(FlagA AND FlagB) OR FlagC
NOT (FlagA AND FlagB) OR NOT FlagC
[2]

15
14. A program has been written in Python to input 50 numbers and print out the sum.

A while loop has been used.

Count=0

Sum=0

Number=int(input("Please enter a number: "))

while Count <=50:

Sum=Sum+Number

Number=int(input("Please enter a number: "))

Count=Count+1

print(Sum)

Rewrite the program in Python, using a more suitable loop structure.

.......................................................................................................................................

.......................................................................................................................................

.......................................................................................................................................

.......................................................................................................................................

.......................................................................................................................................

.......................................................................................................................................

.......................................................................................................................................

.......................................................................................................................................

.......................................................................................................................................

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

16
15. Four validation checks and four descriptions are shown.

Draw a line to connect each validation check to the correct description.

Validation Check Description

Range check Checks that some data is entered.

Presence check Checks for a maximum number of


characters in the data entered.

Length check Checks that the characters entered


are all numbers.

Type check Checks that the value entered is


between an upper and a lower value.

[3]

16. A computer file, "Message.txt", stores a line of text.

Write a program or pseudocode to display this line of text.

.......................................................................................................................................

.......................................................................................................................................

.......................................................................................................................................

.......................................................................................................................................

.......................................................................................................................................

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

17
17. REPEAT … UNTIL is one type of loop structure.
Identify and describe two other types of loop structure that you could use when writing
pseudocode.

Loop structure 1 .............................................................................................................

Description ....................................................................................................................

.......................................................................................................................................

Loop structure 2 ............................................................................................................

Description ....................................................................................................................

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

18

You might also like