0% found this document useful (0 votes)
39 views

Computer Science O Level Course Topical by Rizwan Khalid

Uploaded by

Umer Farooq
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views

Computer Science O Level Course Topical by Rizwan Khalid

Uploaded by

Umer Farooq
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

2 O-LEVELS

COMPUTER SCIENCE

2 TOPICALS
PAPER - 1 : NEW SYLLABUS

1
0
RIZWAN KHALID
Kot Sarfaraz Khan Chakwal

0543-541610
[email protected]
[email protected]
Book Title: O Level Computer Science Topical Paper 1

Syllabus Code 2210

Compiled by: RIZWAN KHALID (Myer’s College, Chakwal)

Edition: 1st Edition | 1st impression

Years Range: 2015-2020 | Mark Scheme | Examiner Report

Syllabus: for 2023 and onwards exams

Published by: 0423-5700707

Price: 50/-

COPYRIGHT
©STUDENTS RESOURCE®202
The rights of Students Resource being Publisher of this book has been asserted by him in accordance
with the Copy Right Ordinance 1962 of Pakistan.

No part of this publication may be reproduced or transmitted in any form or by any means, electronic
or mechanical, including photocopy, recording, or any information storage and retrieval system,
without permission in writing from the Students Resource or under licence from the Registrar
Copyright from Intellectual Property Organization Pakistan.

The syllabus contents and questions from past papers used herein are the property of Cambridge
Assessment International Education (CAIE). The use of syllabus and questions from past papers used
in this book does not west in the author or publisher any copyright ownership, nor does the use of
CAIE material imply any affiliation with CAIE.

Any individual or institution violating the copyrights will be prosecuted in the court of law under the
lex-fori of Pakistan at his/their expense.

No further notes and legal warning would be issued for any kind of legal activity.

Legal Advisor
SECTION 1 COMPUTER SYSTEMS

1. Data representation
1.1 Number systems…………………………………………………………………………………………………………………………….3

1.2 Text, sound and images….…………………………………………………………………………………………………………….27

1.3 Data storage and compression….………………………………………………………………………………………………….41

2. Data transmission
2.1 Types and methods of data transmission………………………………………………………………………………….…48

2.2 Methods of error detection………………………………………………………………………………………………………….60

2.3 Encryption………………………………………………………………………………………………….…………………………………70

3. Hardware
3.1 Computer architecture………………………………………………………………………………………………………………….73

3.2 Input and output devices………………………………………………………………………………………………………………83

3.3 Data storage……………………………………………………………………………………………………………………………….110

3.4 Network hardware………………………………………………………………………………………………………………………126

4. Software
4.1 Types of software and interrupts……………………………………………………………………………………………….130

4.2 Types of programming language, translators and IDEs……………………………………………………………….137

5. The internet and its uses


5.1 The internet and the world wide web….……………………………………………………………………………………151

5.2 Digital currency………………………………………………………………………………………………………………………….160

5.3 Cyber security…………………………………………………………………………………………………………………………...163

6. Automated and emerging technologies


6.1 Automated systems………………………………………………………………………………………………………………….…175

6.2 Robotics….………………………………………………………………………………………………………………………………….180

6.3 Artificial intelligence……………………………………………………………………………………………………………………191

1|Page
SECTION 2 ALGORITHMS, PROGRAMMING AND LOGIC

7. Algorithm design and problem solving


7.1 The program development life cycle……………………………………………….………………………………………….197

7.2 Computer system, subsystem and decomposition……………………………..……………………………………….200

7.3 Explaining the purpose of an algorithm ….……………………………………..…………………………………………..200

7.4 Standard methods of solution………………………………………………………….…………………………….…………..205

7.5 Validation and verification………………………………………………….…….……………………………………………….208

7.6 Test Data………………………………………………………………………………….…………………………………………………214

7.7 Trace tables to document dry runs of an algorithm…………..………………………………………………………..219

7.8 Identifying errors in a algorithm……………………………..…………………………………………………………………..248

7.9 Writing and amending algorithm…………………………………………………………………………………………………257

8. Programming
8.1 Programming concepts………………….………….……………………………………………………………………………….263

8.2 Arrays…………………………………..…………………………………………………………………………………………………….309

9. Databases
9.1 Databases……………………………………..…………………………………………………………………………………………….319

10. Boolean Logic


10.1 Standard logic gate symbols………………….….………………………………………………………………………………337

10.2 The function of the six logic gates…………………………………………………………………………………..…………337

10.3 Logic Circuits, logic expressions, truth tables and problem statements………..……………………………337

2|Page
1.1. Number Systems

3|Page
1. Give the denary (base 10) value of the byte: 1 0111110

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

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

2. Letters from the alphabet are represented in a computer by the following denary (base 10) values:

A = 97
G = 103
I = 105
L = 108
N = 110

The word “A L I G N” is stored as: 97 108 105 103 110

Convert each of the five values to binary. The first one has been done for you.

Letter Denary value

A (97): 0 1 1 0 0 0 0 1
L (108):

I (105):

G (103):

N (110):

[2]

4|Page
3. An encryption system works by shifting the binary value for a letter one place to the left.
“A” then becomes:

1 1 0 0 0 0 1 0

This binary value is then converted to hexadecimal; the hexadecimal value for “A” will be:

C2
For the two letters “L” and “G”, shift the binary values one place to the left and convert these
values into hexadecimal:

hexadecimal

L:
.............................................

G:
.............................................

[4]

5|Page
4. Each seat on a flight is uniquely identified on an LCD above the seat. For example, seat 035C
is shown as:

0 3 F C

The first three characters are digits that represent the row.

The fourth character is the seat position in that row. This is a single letter, A to F, that is stored as
a hexadecimal value.

Each of the four display characters can be stored in a 4-bit register. For example, 0 and C would
be represented as:
8 4 2 1

0: 0 0 0 0
C: 1 1 0 0

Show how the 4-bit registers would store the remaining two characters, 3 and 5.

[2]

Identify which seat is stored in the following 4-bit registers.

0 0 0 1

1 0 0 1

0 1 0 0

1 1 1 0

[2]

6|Page
5. (a) Name the following type of barcode:

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

(b) The barcode in part (a) contains the denary value 2 640

Convert this value to hexadecimal.

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

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

Write the value as a 12-bit binary number.

[4]

7|Page
6 (a) Convert the following hexadecimal number into 12-bit binary:

4AF

[3]
6(b) The 2016 Olympic Games will be held in Rio de Janeiro. A timer that counts down to the
opening of the Games is shown on a microprocessor-controlled display.

The number of hours, minutes and seconds until the Games open are held in three 8-bit
registers.
The present register values are:

0 1 1 0 1 0 0 1 105 hours

0 0 1 0 0 0 0 0 32 minutes

0 0 0 1 0 1 0 0 20 seconds

The timer will count down in seconds.


Show the values in each 8-bit register 30 seconds after the time shown above:

hours

minutes

seconds
[3]
6(c) Write the hexadecimal value of the minutes register from part (b)(i).

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

8|Page
7. The memory of a computer contains data and instructions in binary.

The following instruction is stored in a location of the memory.

0 0 1 0 1 0 0 1 1 1 1 1 1 1 0 0

Convert the instruction into hexadecimal.

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

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

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

8. Explain why a programmer might prefer to read the instruction in hexadecimal rather than in
binary.

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

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

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

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

9. Give two other uses of hexadecimal.

Use 1 ........................................................................................................................................

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

Use 2 ........................................................................................................................................

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

[2]

9|Page
10 (a) The denary number 57 is to be stored in two different computer

registers. Convert 57 from denary to binary and show your working.

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

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

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

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

11. Show the binary number from part (a) as it would be stored in the following registers.

Register 1

Register 2

[2]

12. A binary number stored in a register can have many different uses, for example an
address in main memory.

Give two other uses for a binary number stored in a register.

Use 1 ........................................................................................................................................

Use 2 ........................................................................................................................................

[2]
13. A register in a computer contains binary digits.

0 0 1 1 1 0 1 0

The contents of the register represent a binary integer.


Convert the binary integer to hexadecimal.

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

10 | P a g e
14. Jane answers an examination question about computers and data correctly.
Six different words or numbers have been removed from her answer.

Complete the sentences in Jane’s answer, using the list given. Not all items in the list need to be
used.

2
10
16
analogue
binary
denary
digital
hexadecimal

As humans, we process …………………………………… data, but a computer cannot

process this type of data. For a computer to be able to process data it needs to be

converted to …………………………………… data.

As humans, we mostly use a …………………………………… number system;

this is a base …………………………………… number system.

Computers use a …………………………………… number system;

this is a base …………………………………… number system.

[6]
15. Dheeraj identifies three hexadecimal numbers.

Write the denary number for each of the three hexadecimal numbers:

2A ....................................................................................................

101 ...................................................................................................

21E ..................................................................................................

[3]

11 | P a g e
16. A stopwatch uses six digits to display hours, minutes and

seconds. The stopwatch is stopped at:

02 31 58
Hours Minutes Seconds

An 8-bit register is used to store each pair of digits.

Write the 8-bit binary numbers that are currently stored for the Hours, Minutes and Seconds.

Hours

Minutes

Seconds

[3]

12 | P a g e
17.The stopwatch is started again and then stopped.

When the watch is stopped, the 8-bit binary registers show:

Hours 0 0 0 0 0 1 0 1

Minutes 0 0 0 1 1 0 1 0

Seconds 0 0 1 1 0 1 1 1

Write the denary values that will now be shown on the stopwatch.

Hours Minutes Seconds

[3]

18. Jafar is using the Internet when he gets the message: “D03, page is not available”
Jafar remembers that hexadecimal is often used to represent binary values in error codes.

Convert the hexadecimal number in the error message into 12-bit binary.

[3]

13 | P a g e
19.Convert the denary number 107 to binary.

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

Represent the denary number 300 as it would be stored in a 12-bit binary register.

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

Convert the denary number 179 to hexadecimal.

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

14 | P a g e
20. Characters can be represented in a computer by a numerical code.

The following list shows 16 characters with their numerical codes in denary:

a = 97 e = 101
k = 107 t = 116
b = 98 g = 103
m = 109 u = 117
c = 99 h = 104
o = 111 w = 119
d = 100 i = 105
r = 114

. = 46 (code for the full stop)

Web addresses can be written using hexadecimal rather than denary. Hexadecimal codes are
preceded by a % sign. For example, the word “c a g e” is written as:

either 99 97 103 101 (in denary)

or %63 %61 %67 %65 (in hexadecimal)

Complete the conversion of the following web address into hexadecimal:

w w w . c i e . o r g . u k

%77 %77 %77

[3]
Complete the web address from the given hexadecimal codes:

%77 %77 %77 %2E %72 %6F %63 %6B %69 %63 %74 %2E %63 %6F %6D

W W W

[3]

15 | P a g e
21.A computer uses an 8-bit register.

The 8-bit register contains binary integers.


Write the denary (base 10) value represented by:

128 64 32 16 8 4 2 1

0 1 1 1 0 0 0 0

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

All the bits in the register are shifted one place to the right as shown below.

0 1 1 1 0 0 0 0

0 0 1 1 1 0 0 0

Write the denary number that is represented after this shift.

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

State the effect the shift to the right had on the original denary number from part (a).

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

The original number in part (a) is shifted three places to the right.

Show the new binary number:

[1]
Write the equivalent denary number.

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

16 | P a g e
22. A robot arm in a factory is programmed to move products.

The binary instructions to operate the robot arm are:

Operation Binary Instruction

UP 1 1 1 1

DOWN 0 0 0 1

LEFT 1 0 0 1

RIGHT 0 1 1 0

OPEN 1 1 0 0

CLOSE 0 0 1 1

The instructions are entered as hexadecimal values.


An operator enters the values:
9 1 C 3 F
Convert the values and write down the operation (e.g. RIGHT) carried out by the robot arm.
9 .............................................................................

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

C .............................................................................

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

F .............................................................................

[5]

17 | P a g e
23. Give the 12-bit binary value of the denary value 250.

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

Working space

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

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

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

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

24.Binary can be represented as hexadecimal to make it easier to read. Give the

hexadecimal values of the 8-bit binary values:

10010011 ...........................................................................................................................

00011101 ...........................................................................................................................

[2]

25.Using two’s complement, show how the following denary numbers could be stored in an 8-bit
register:

114

- 93

[2]

18 | P a g e

You might also like