You are on page 1of 256

O-Level

Computer Science Notes and Past Papers

Computer Science
2210

M. Shoaib Ishtiaq
The City School
DHA Campus
Index

Section 1:

Unit 1 Binary and Hexadecimal

Unit 2 Communication and Internet technology

Unit 3 Logic Gates and logic circuits

Unit 4 Operating Systems and computer architecture

Unit 5 Input and Output devices

Unit 6 Memory and data storage

Unit 7 High and low-level languages

Unit 8 Security and ethics


Unit 1 Binary systems and hexadecimal V2019

Unit 1
Chapter 1 Binary systems and hexadecimal

1.1 Introduction
1.2 The binary system
1.3 Measurement of the size of computer memories
1.4 Example use of binary
1.5 The hexadecimal system
1.6 Use of the hexadecimal system
Data representation
Candidates should be able to:

Binary systems
• recognize the use of binary numbers in computer systems
• convert positive denary integers into binary and positive binary integers into
denary (a maximum of 16 bits will be used)
• show understanding of the concept of a byte and how the byte is used to
measure memory size
• Use binary in computer registers for a given application (such as in robotics,
digital instruments and counting systems)

Hexadecimal
• represent positive numbers in hexadecimal notation
• show understanding of the reasons for choosing hexadecimal notation to
represent numbers
• convert positive hexadecimal integers to and from denary (a maximum of
four hexadecimal digits will be required)
• convert positive hexadecimal integers to and from binary (a maximum of 16
bit binary numbers will be required)
• represent numbers stored in registers and main memory as hexadecimal
• identify current uses of hexadecimal numbers in computing, such as defining
colours in Hypertext Markup Language (HTML), Media Access Control (MAC)
addresses, assembly languages and machine code, debugging

The City School DHA Campus 1 M Shoaib Ishtiaq(Computer Science)


Unit 1 Binary systems and hexadecimal V2019

Scheme of Work
Numbers, processors and operating systems
Recommended prior knowledge
In order to understand the role of an operating system, learners should have had practical
experience of using at least one operating system with a Graphical User Interface (GUI). It is also
recommended that learners should have studied Unit 1 before starting this unit.
Context
This unit looks at the way in which numbers are represented within a computer system, the
structure of the central processing unit and its functions, and the role of the operating system in
managing the components of a computer system and interactions with the user.
Outline
This unit starts with binary and hexadecimal representation of numbers, leading to the von
Neumann model of a computer system and the concept of a computer. This is illustrated practically by
learner use of the Little Man Computer (LMC). The role of operating systems is then considered,
including control of peripherals and the user interface. Learners will not be expected to know detail of
any specific operating system.
Suggested teaching time
Based on a total time allocation of 130 contact hours for this Cambridge O Level Computer
Science course, it is recommended that this unit should take about 10 hours.

Syllabus Learning objectives Suggested teaching activities


ref
1.1.1 Convert positive denary integers Teacher presentation to introduce the concepts
into binary and positive binary of binary notation, e.g. using an automatic binary
integers into denary counter; binary number cards available (with
worksheets etc.). (W)
Learners convert denary numbers into binary and
binary numbers into denary. (I)
Reinforce with a game such as the Cisco binary
game. This provides formative assessment of
understanding. (G)
Learners answer previous exam/textbook
questions on binary representation. (I)
1.1.1 Recognise the use of binary Teacher presents the concept of the byte; class
numbers in computer systems discussion about how the byte is used to
measure memory size by introducing the concept
of kb, Mb, Gb, Tb. (W)

Class brainstorm to reflect on capacity of


Show understanding of the commonly found elements of computer systems
concept of a byte and how the such as hard disk drives, RAM, DVD, USB flash
byte is used to measure memory drives etc. (refer back to Unit 1 – types of
size memory). (G)

1.1.2 Represent integers as Teacher presentation on hexadecimal notation


hexadecimal numbers and its relationship to binary notation.
Show understanding of the Demonstration of the conversion of binary and
reasons for choosing hexadecimal denary to hexadecimal. (W)
to represent numbers Learners convert positive hexadecimal integers
Convert positive hexadecimal to and from binary and to and from denary. (I)
integers to and from denary Class brainstorm to show understanding of the
Convert positive hexadecimal reasons for choosing hexadecimal to represent
integers to and from binary numbers, e.g. those stored in registers and main
Represent numbers stored in memory. (W)
registers and main memory as Learners answer previous exam/textbook
hexadecimal questions on hexadecimal representation. (I)

The City School DHA Campus 2 M Shoaib Ishtiaq(Computer Science)


Unit 1 Binary systems and hexadecimal V2019

Key Notes
Measurement of the size of computer memories
A binary digit is commonly referred to as a BIT; 8 bits are usually referred to as a
BYTE.
The byte is the smallest unit of memory in a computer. Some computers use larger
Bytes but they are always multiples of 8 (e.g. 16-bit systems and 32-bit systems).
One byte of memory wouldn’t allow you to store very much information; therefore
Memory size is measured in the following multiples:

(Note: 1024 × 1024 = 1048576 and so on.)


To give some idea of the scale of these numbers, a typical data transfer rate using
the internet is 32 megabits (i.e. 4 MB) per second (so a 40 MB file would take 10
seconds to transfer). Most hard disk systems in computers are 1 or 2 TB in size (so a
2 TB memory could store over half a million 4 MB photos, for example).

It should be pointed out here that there is some confusion in the naming of memory
sizes. The IEC convention is now adopted by some organisations. Manufacturers of
storage devices often use the denary system to measure storage size. For example,

1 kilobyte = 1000 byte


1 megabyte = 1000000 bytes
1 gigabyte = 1000000000 bytes
1 terabyte = 1000000000000 bytes and so on.
The IEC convention for computer internal memories (including RAM) becomes:
1 kibibyte (1 KiB) = 1024 bytes
1 mebibyte (1 MiB) = 1048576 bytes
1 gibibyte (1 GiB) = 1073741824 bytes
1 tebibyte (1 TiB) = 1099511627776 bytes and so on.

However, the IEC terms are not universally used and this textbook will use the more
conventional terms shown in Table. This also ties up with the Cambridge
International Examinations computer science syllabus which uses the same
terminology as in Table.

The City School DHA Campus 3 M Shoaib Ishtiaq(Computer Science)


Unit 1 Binary systems and hexadecimal V2019

Converting from binary to denary


It is fairly straightforward to change a binary number into a denary number. Each time a 1 appears in
a column, the column value is added to the total.

Method 1
For example, the binary number 1 1 1 0 1 1 1 0

Put all binary numbers in 8 bits format


128 64 32 16 8 4 2 1
1 1 1 0 1 1 1 0
7 6 5 4 3 2 1 0

Above mentioned are the values of each bit and below are the positions of each bit
Add all those values which are 1
128 + 64 + 32 + 8 + 4 + 2 = 238 (denary)

The 0 values are simply ignored.

Method 2
Using Formula

Binary Value x (Base)Position


128 64 32 16 8 4 2 1
1 1 1 0 1 1 1 0
7 6 5 4 3 2 1 0
Note: Base of a binary number is 2

Hence

1 x 27 + 1 x 26 + 1 x 25 + 0 x 24 + 1 x 23 + 1 x 22 + 1 x 21 + 0 x 20

Note: Any number raised to power 0 is 1 e.g: 20 = 1

128 + 64 + 32 + 0 + 8 + 4 + 2 + 0
=238 (denary)

The City School DHA Campus 4 M Shoaib Ishtiaq(Computer Science)


Unit 1 Binary systems and hexadecimal V2019

Practice Questions

The City School DHA Campus 5 M Shoaib Ishtiaq(Computer Science)


Unit 1 Binary systems and hexadecimal V2019

The City School DHA Campus 6 M Shoaib Ishtiaq(Computer Science)


Unit 1 Binary systems and hexadecimal V2019

Converting from denary to binary


The reverse operation, converting from denary to binary, is slightly more complex.
There are two basic ways of doing this. The first method is ‘trial and error’ and the second method
is more methodical and involves repetitive division.

Method 1
Consider the conversion of the denary number, 107, into binary. This method involves placing 1s in
the appropriate position so that the total equates to 107:

Method 2
This method involves successive division by 2. The remainders are then read from
BOTTOM to TOP to give the binary value. Again using 107, we get:

OR
Take LCM of denary number by 2

2 107

2 53 1 First bit
2 26 1

2 13 0

2 6 1

2 3 0

1 1
Last bit

1 1 0 1 0 1 1
If last bit is empty you may put 0 is it hence

0 1 1 0 1 0 1 1

The City School DHA Campus 7 M Shoaib Ishtiaq(Computer Science)


Unit 1 Binary systems and hexadecimal V2019

The City School DHA Campus 8 M Shoaib Ishtiaq(Computer Science)


Unit 1 Binary systems and hexadecimal V2019

The City School DHA Campus 9 M Shoaib Ishtiaq(Computer Science)


Unit 1 Binary systems and hexadecimal V2019

Activity 1.3
When computers (or microprocessors) are used to control devices (such as robots),
registers are used as part of the control system. The following example describes
how registers can be used in controlling a simple device.
A robot vacuum cleaner has three wheels, A, B and C. A rotates on a spindle to
allow for direction changes (as well as forward and backward movement); B and C
are fixed to revolve around their axles to provide only forward and backward
movement, and have an electric motor attached:

The City School DHA Campus 10 M Shoaib Ishtiaq(Computer Science)


Unit 1 Binary systems and hexadecimal V2019

The City School DHA Campus 11 M Shoaib Ishtiaq(Computer Science)


Unit 1 Binary systems and hexadecimal V2019

The hexadecimal system

Converting from binary to hexadecimal


Example 1
101111100001

First split this up into groups of 4 bits:


1011 1110 0001

Then, using Table, find the equivalent hexadecimal digits:


BE1
Example 2
10000111111101

First split this up into groups of 4 bits:


10000111111101

The left group only contains 2 bits, so add in two 0s:


0010 0001 1111 1101

Now use Table to find the equivalent hexadecimal digits:


21FD
The City School DHA Campus 12 M Shoaib Ishtiaq(Computer Science)
Unit 1 Binary systems and hexadecimal V2019

The City School DHA Campus 13 M Shoaib Ishtiaq(Computer Science)


Unit 1 Binary systems and hexadecimal V2019

Converting from hexadecimal to binary


Example 3
45A
Using Table, find the 4-bit code for each digit:
010001011010
Put the groups together to form the binary number:
010001011010

Example 4
BF08
Again just use Table 1.2:
1011111100001000
Then put all the digits together:
1011111100001000

The City School DHA Campus 14 M Shoaib Ishtiaq(Computer Science)


Unit 1 Binary systems and hexadecimal V2019

Converting from hexadecimal to denary


Example 1
45A
First multiply each digit by its value:

Add the totals together: denary number = 1 1 1 4

The City School DHA Campus 15 M Shoaib Ishtiaq(Computer Science)


Unit 1 Binary systems and hexadecimal V2019

Converting from denary to hexadecimal


Method 1
Consider the conversion of the denary number, 2004, into hexadecimal. This method
involves placing hexadecimal digits in the appropriate position so that the total
equates to 2004:

A quick check shows that: (7 × 256) + (13 × 16) + (4 × 1) gives 2004.

Method 2
This method involves successive division by 16. The remainders are then read from
BOTTOM to TOP to give the hexadecimal value. Again using 2004, we get:

The City School DHA Campus 16 M Shoaib Ishtiaq(Computer Science)


Unit 1 Binary systems and hexadecimal V2019

The City School DHA Campus 17 M Shoaib Ishtiaq(Computer Science)


Unit 1 Binary systems and hexadecimal V2019

Use of the hexadecimal system


1. Memory dumps

2. Hypertext Mark-up Language (HTML)


Color codes in HTML 0 is minimum value and F is maximum

• # FF 00 00 represents primary color red


• # 00 FF 00 represents primary color green
• # 00 00 FF represents primary color blue
• # FF 00 FF represents fuchsia
• # FF 80 00 represents orange
• # B1 89 04 represents tan

The City School DHA Campus 18 M Shoaib Ishtiaq(Computer Science)


Unit 1 Binary systems and hexadecimal V2019

The City School DHA Campus 19 M Shoaib Ishtiaq(Computer Science)


Unit 1 Binary systems and hexadecimal V2019

3. Media Access Control (MAC)


A MAC address is usually made up of 48 bits which are shown as six groups of
hexadecimal digits (although 64-bit addresses are also known):
NN – NN – NN – DD – DD – DD
or
NN:NN:NN:DD:DD:DD
where the first half (NN – NN – NN) is the identity number of the manufacturer of the
device and the second half (DD – DD – DD) is the serial number of the device. For
example: 00 – 1C – B3 – 4F – 25 – FE is the MAC address of a device produced by
the Apple Corporation (code: 001CB3) with a serial number of 4F25FE. Sometimes
lower case hexadecimal letters are used in the MAC address: 00-1c-b3-4f-25-fe.

Other manufacturer identity numbers include:


• 00 – 14 – 22 which identifies devices made by Dell
• 00 – 40 – 96 which identifies devices made by Cisco

Types of MAC address


 UNIVERSALLY ADMINISTERED MAC ADDRESS (UAA)
 LOCALLY ADMINISTERED MAC ADDRESS (LAA).
4. Web addresses
Each character used on a keyboard has what is known as an ASCII CODE
(AMERICAN STANDARD CODE FOR INFORMATION INTERCHANGE).
The City School DHA Campus 20 M Shoaib Ishtiaq(Computer Science)
Unit 1 Binary systems and hexadecimal V2019

These codes can be represented using hexadecimal values or decimal values.


Below Table shows part of an ASCII table.
Hexa-Decimal Table:

A good example of the use of ASCII codes is the representation of a web address (or
URL, which stands for uniform resource locator) such as www.hodder.co.uk which
becomes (using hexadecimal values):

The City School DHA Campus 21 M Shoaib Ishtiaq(Computer Science)


Unit 1 Binary systems and hexadecimal V2019

Table

The City School DHA Campus 22 M Shoaib Ishtiaq(Computer Science)


Unit 1 Binary systems and hexadecimal V2019

5. Assembly code and machine code


Computer memory can be referred to directly using machine code or assembly code.
This can have many advantages to program developers or when carrying out
troubleshooting.

The City School DHA Campus 23 M Shoaib Ishtiaq(Computer Science)


Unit 1 Binary systems and hexadecimal V2019

Past Paper Questions


Paper 1 Theory

The City School DHA Campus 24 M Shoaib Ishtiaq(Computer Science)


Unit 1 Binary systems and hexadecimal V2019

Q2 Two 7 segment displays are used on a car dashboard to give information to the driver.
Each segment is numbered as shown.

For example, the information shown above is represented by:

Bit 0 is always zero


What is being displayed to the driver if bytes (1) and (2) are showing?

What bit patterns must be used to show the information ?

Most of the other information on the dashboard is in analogue form.

State advantage of displaying information in analogue form.

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

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

State disadvantage of displaying information in analogue form.

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

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

The City School DHA Campus 25 M Shoaib Ishtiaq(Computer Science)


Unit 1 Binary systems and hexadecimal V2019

May/June 2018 Paper 11

The City School DHA Campus 26 M Shoaib Ishtiaq(Computer Science)


Unit 1 Binary systems and hexadecimal V2019

May/June 2018 Paper 12


Different units of data can be used to represent the size of a file, as it changes in
size.
Fill in the missing units of data, using the list given:
• byte
• gigabyte (GB)
• megabyte (MB)
• nibble
The units of data increase in size from smallest to largest.

The City School DHA Campus 27 M Shoaib Ishtiaq(Computer Science)


Unit 1 Binary systems and hexadecimal V2019

Nov/Dec 2018 Paper 12


1 Computers use a character set to convert text into binary.
One character set that can be used is ASCII.
Each letter in ASCII can also be represented as a denary value.
(a) The word BUS has the denary values:

The City School DHA Campus 28 M Shoaib Ishtiaq(Computer Science)


Unit 1 Binary systems and hexadecimal V2019

The City School DHA Campus 29 M Shoaib Ishtiaq(Computer Science)


Unit 1 Binary systems and hexadecimal V2019

Nov/Dec 2018 Paper 13

Oct/Nov 2017 Paper 12


A robot arm in a factory is programmed to move products.
The binary instructions to operate the robot arm are:

The instructions are entered as hexadecimal values.


An operator enters the values:

Convert the values and write down the operation (e.g. RIGHT) carried out by the robot arm.
9 .............................................................................
1 .............................................................................
C .............................................................................
3 .............................................................................
F ............................................................................. [5]
The City School DHA Campus 30 M Shoaib Ishtiaq(Computer Science)
Unit 1 Binary systems and hexadecimal V2019

[5]
Oct/Nov 2017 Paper 12
A washing machine has a small display screen built into it.
One use of the display screen is to show an error code when a problem has occurred with a
washing cycle.

State whether the display screen is an , or .

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

The display screen shows a hexadecimal error code:


E04
This error code means that the water will not empty out of the washing machine.
Convert this error code to binary.

State why hexadecimal is used to display the error code.


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

The City School DHA Campus 31 M Shoaib Ishtiaq(Computer Science)


Unit 1 Binary systems and hexadecimal V2019

Paper 1 Theory

The City School DHA Campus 32 M Shoaib Ishtiaq(Computer Science)


Unit 1 Binary systems and hexadecimal V2019

Paper 1 Theory

Computers use a character set to convert text into binary.


One character set that can be used is ASCII.
Each letter in ASCII can also be represented as a denary value.
The word BUS has the denary values:

Each letter in ASCII can also be represented as a hexadecimal value.


The word KEY has the 8-bit binary values:

Convert the three 8-bit binary values into hexadecimal.


01001011 ...............................................
01000101 ...............................................
01011001 ............................................... [3]
The City School DHA Campus 33 M Shoaib Ishtiaq(Computer Science)
Unit 1 Binary systems and hexadecimal V2019

Paper 1 Theory

Paper 1 Theory

The City School DHA Campus 34 M Shoaib Ishtiaq(Computer Science)


Unit 1 Binary systems and hexadecimal V2019

Paper 1 Theory

Paper 1 Theory

The City School DHA Campus 35 M Shoaib Ishtiaq(Computer Science)


Unit 1 Binary systems and hexadecimal V2019

Paper 1 Theory

The City School DHA Campus 36 M Shoaib Ishtiaq(Computer Science)


Unit 1 Binary systems and hexadecimal V2019

The City School DHA Campus 37 M Shoaib Ishtiaq(Computer Science)


Unit 1 Binary systems and hexadecimal V2019

The City School DHA Campus 38 M Shoaib Ishtiaq(Computer Science)


Unit 1 Binary systems and hexadecimal V2019

Q1. Electric guitars consist of strings and frets.

Musical notes on the guitar can be represented using the TAB notation:

Each line represents a string; the dots indicate which


strings must be held down with the fingers. These are
shown with a binary value of 1; otherwise the binary
value is 0.

Thus, the above note would be shown as:

It is also important to indicate where the strings should be held down. This is shown on the
FRET. If the fingers are to be held down at the 20th FRET, this is shown in binary as:

(NOTE: add up the numbers in the headings where binary 1s appear, i.e. 16 + 4 = 20)

(a) A note is being played according to the TAB notation:

The City School DHA Campus 39 M Shoaib Ishtiaq(Computer Science)


Unit 1 Binary systems and hexadecimal V2019

The City School DHA Campus 40 M Shoaib Ishtiaq(Computer Science)


Unit 1 Binary systems and hexadecimal V2019

The City School DHA Campus 41 M Shoaib Ishtiaq(Computer Science)


Unit 2 Communication and Internet technologies V2019

Unit 2
Communication and Internet technologies
1.2.1 Data transmission
1.2.2 Security aspects
1.2.3 Internet principles of operation

Scheme of Work

Data communications and networking

Recommended prior knowledge


Learners should have had some experience of using the internet and of using a local area
network (LAN) in school.

Context
Data transmission between a processor and its peripherals, and between computers in a
network, is a central element in everyday life; the internet has become an unconscious way of life for
many people today. This unit looks at the principles underpinning data transmission in these contexts.

Outline
Learners find out about data transmission and the differences between serial and parallel data
transmission. The concepts, advantages and problems associated with computer networks are
introduced. Learners design a simple web page using HTML, and consider ways in which the internet
can be misused for criminal purposes. Strategies for addressing these issues are then considered,
including a practical approach to cryptography.

Suggested teaching time


Based on a total time allocation of 130 contact hours for this Cambridge O Level Computer
Science course, it is recommended that this unit should take about 12–15 hours.

The City School DHA Campus 1 M Shoaib Ishtiaq(Computer Science)


Unit 2 Communication and Internet technologies V2019

Syllabus ref Learning objectives Suggested teaching activities


1.2.1 Show an understanding of what is meant Teacher leads discussion of what is
by transmission of data meant by transmission of data; the
Distinguish between serial and parallel need to check for errors; differences
data transmission between serial and parallel data
Distinguish between simplex, duplex and transmission. (W)
half-duplex data transmission Learners complete short case study
Show understanding of the reasons for scenario questions on the need to
choosing serial or parallel data check for errors. (I)
transmission In pairs, learners identify current uses
Show understanding of the need to check of serial and parallel data transmission
for errors e.g. Integrated Circuits (IC), Universal
Explain how parity bits are used Serial Bus (USB); reasons for choosing
for error detection serial or parallel data transmission. (P)
Show understanding of the use of serial and
parallel data transmission, in Universal Serial
Bus (USB) and Integrated Circuit (IC)

1.2.3 Show understanding of the role of the What is a network? Class brainstorms
1.1.2 browser and internet server the concepts of local area network
Show understanding of the concepts of (LAN), wide area network (WAN),
MAC address, Internet Protocol (IP) shared resources, communications.
address, Uniform Resource Locator (URL) (W)
and cookies Learners construct a virtual network.
Show understanding of what is meant by (G)
hypertext transfer protocol (http and https) Teacher presentation of the Royal
and HTML Institution Christmas Lecture
Distinguish between HTML structure and ‘Untangling the Web’ – about 35
presentation minutes (W) plus time for questions
Identify current uses of hexadecimal during pauses.
numbers in computing, such as defining Class brainstorm/ teacher input to
colours in Hypertext enable learners to:
Markup Language (HTML), Media Access
Control (MAC) addresses, assembly languages as a worldwide collection of computer
and machine code, debugging networks.

connect to the internet including


modems, routers etc.

of resources on the Internet and how


this can be facilitated by the role of
Domain Name System (DNS) servers;
Media Access Control (MAC)
address; cookies.

and its derivatives as a standard for


the creation of web pages. (W)

1.1.3 Show understanding that sound (music), Brainstorm to identify common file
pictures, video, text and numbers are standards associated with the internet
stored in different such as JPG, GIF, PDF, MP3, MPEG.
Formats Also address other file types
Identify and describe methods of error mentioned in syllabus such as
detection and correction, such as parity Musical Instrument Digital Interface
checks, check (MIDI). (W)
digits, checksums and Automatic Repeat Teacher summarises these, then
reQuests (ARQ) looks at issues of error detection and
correction.

The City School DHA Campus 2 M Shoaib Ishtiaq(Computer Science)


Unit 2 Communication and Internet technologies V2019

Show understanding of the concept of Teacher presentation to explain the


Musical Instrument Digital Interface (MIDI) importance of compressing files that
files, JPEG files, MP3 and MP4 files are transmitted via the internet:
Show understanding of the principles of
data compression (lossless and lossy lossy and lossless compression
compression
algorithms) applied to and correction e.g. parity checks,
music/video, photos and text files check digits, checksums, Automatic
Repeat reQuests (ARQ). (W)

Learners complete a multiple-choice


quiz. (I)
1.2.3 Show understanding of the role of the Examination of browser screen to
browser and internet server identify key components; comparison
Distinguish between HTML structure and of two or more browsers. (G)
presentation Learner individual work – design a
simple web page/website to
distinguish between HTML structure
and presentation. (I)
Extension work:
Learners could create a mini website
with several linked pages, including
hyperlinks to external websites.
Learners could also write Flash
animations or write Java scripts.
(G)/(I)

The City School DHA Campus 3 M Shoaib Ishtiaq(Computer Science)


Unit 2 Communication and Internet technologies V2019

Key Notes

Introduction
When data is sent from one device to another, it is important to consider how that data is transmitted.
It is also important to ensure that the data hasn’t been changed in any way.
The internet has now become an integral part of all of our lives. This chapter will consider some of the
important technologies going on in the background which support the internet.

Data transmission
Data transmission can be either over a short distance (for example, from computer to printer) or over
longer distances (0031 when transmitting data (each factor has to be agreed by both sender and
receiver for this to work without error):

• the direction of the data transmission (i.e. in one direction only or in both directions)
• the method of transmission (how many bits are sent at the same time)
• the method of synchronization between the two devices.

Transmission Modes is a mechanism in which data (or information) is transmitted from one device to
another device which is connected over a network.
Different types of transmission modes in computer network is as follow.

1. Simplex Mode
2. Half duplex Mode
3. Full duplex Mode

1. Simplex

One way transmission only one can send other can receive. We cannot send a message back to the
sender.
One of the best example of simplex transmission mode is television broadcasting also loudspeakers
broadcasting is an example of simplex transmission mode which is one way communication.

The City School DHA Campus 4 M Shoaib Ishtiaq(Computer Science)


Unit 2 Communication and Internet technologies V2019

2. Half duplex

Both way transmission but one way at one time.

Example walkie- talkie in which one can communicate after another done but communication take
place from both side.

3. Full duplex

We can send data in both the directions that is sending and receiving data at same time.

Telephone uses full duplex communication mode in which both sender and receiver can communicate
at the same time.

Also local area network where all device are communicating simultaneously.

Full duplex system uses two line for sending and receiving data.

The City School DHA Campus 5 M Shoaib Ishtiaq(Computer Science)


Unit 2 Communication and Internet technologies V2019

Practice Questions

The City School DHA Campus 6 M Shoaib Ishtiaq(Computer Science)


Unit 2 Communication and Internet technologies V2019

SERIAL DATA TRANSMISSION is when data is sent, one bit at a time, over a single wire or channel
(bits are sent one after the other in a single stream).

(Note: bits can be transmitted as simplex, half-duplex or full-duplex.)

PARALLEL DATA TRANSMISSION is when several bits of data (usually 1 byte) are sent down
several wires or channels at the same time; one wire or channel is used to transmit each bit.

(Note: bits can be transmitted as simplex, half-duplex or full-duplex.)

An example of its use is when sending data to a printer from a computer using a ribbon connector.

The City School DHA Campus 7 M Shoaib Ishtiaq(Computer Science)


Unit 2 Communication and Internet technologies V2019

Practice Questions

The City School DHA Campus 8 M Shoaib Ishtiaq(Computer Science)


Unit 2 Communication and Internet technologies V2019

Asynchronous and synchronous data Transmission


ASYNCHRONOUS DATA TRANSMISSION refers to data being transmitted in an agreed
bit pattern. Data bits (1s and 0s) are grouped together and sent with CONTROL BITS:

This means that the receiver of the data knows when the data starts and when it ends.

Start Bit Stop Bit

SYNCHRONOUS DATA TRANSMISSION is a continuous stream of data (unlike asynchronous data


which is sent in discrete groups). The data is accompanied by timing signals generated by an internal
clock. This ensures that the sender and receiver are synchronised with each other.

The receiver counts how many bits (1s and 0s) were sent and then reassembles them into bytes of
data. The timing must be very accurate here since there are no control bits sent in this type of data
transmission. However, it is a faster data transfer method than asynchronous and is therefore used
where this is an important issue (for example, in network communications).

Universal Serial Bus (USB)


Universal Serial Bus (USB) is a type of connector commonly used for asynchronous serial data
transmission between a computer and attached devices.

A USB cable consists of a shielded casing containing two wires for power and earth, plus two wires
for data transmission.

USB allows for the automatic detection of plugged in devices, and the automatic loading the device
drivers if available.

USB has become the industry standard connection type and therefore widely available and used.

They are easy to work with as they cannot be connected incorrectly as the plug only fits in one way.

The City School DHA Campus 9 M Shoaib Ishtiaq(Computer Science)


Unit 2 Communication and Internet technologies V2019

When a device is plugged into a computer using one of the USB ports:

• the computer automatically detects that a device is present (this is due to a small change in the
voltage level on the data signal wires in the cable)

• the device is automatically recognised, and the appropriate DEVICE DRIVER is loaded up so that
computer and device can communicate effectively

• if a new device is detected, the computer will look for the device driver which matches the device; if
this is not available, the user is prompted to download the appropriate software.

The City School DHA Campus 10 M Shoaib Ishtiaq(Computer Science)


Unit 2 Communication and Internet technologies V2019

Error-checking methods
There is always the chance that data has been corrupted (changed in some way) during transmission.

This is true regardless of the distance of transmission.

To avoid having corrupted data it is really important that computers check for errors and correct them
wherever possible.

There are several methods of error checking, with some being more effective than others.

 parity checking
 automatic repeat request (ARQ)
 checksum
 echo checking.

Parity checking
An extra bit (parity bit) added to a string of binary code to ensure the number of 1-bits are either even
or odd, depending upon the parity check system used.

Method

1. The sending and receiving computers agree the protocol to be used (even or odd)
2. The sending computer adds the correct parity bit to the binary data (either an extra 1 or 0)
3. The sending computer sends the binary data, including the parity bit
4. The receiving computer checks to make sure the overall parity of the data received is as
agreed (an even or odd number of 1 bits)
5. If the parity of the data is incorrect, the receiving computer will request that the data is
transmitted again

Drawbacks of parity checks

 If two bits are transposed (change places) then the computer could be fooled into thinking the
data is correct and not corrupted
 If two random bits change state then the system could also be fooled

8 bits including parity


7 bits of data (count of 1-bits)
even odd

0000000 0 00000000 10000000

1010001 3 11010001 01010001


1101001 4 01101001 11101001
1111111 7 11111111 01111111

The City School DHA Campus 11 M Shoaib Ishtiaq(Computer Science)


Unit 2 Communication and Internet technologies V2019

Practice Questions

The City School DHA Campus 12 M Shoaib Ishtiaq(Computer Science)


Unit 2 Communication and Internet technologies V2019

If a byte has been transmitted from ‘A’ to ‘B’, and even parity is used, an error would be flagged if the
byte now had an odd number of 1-bits at the receiver’s end.

In this case, the receiver’s byte has three 1-bits, which means it now has odd parity whilst the byte
from the sender had even parity (four 1-bits). This clearly means an error has occurred during the
transmission of the data.
The error is detected by the computer recalculating the parity of the byte sent. If even parity has been
agreed between sender and receiver, then a change of parity in the received byte indicates that a
transmission error has occurred.

Practice Questions

The City School DHA Campus 13 M Shoaib Ishtiaq(Computer Science)


Unit 2 Communication and Internet technologies V2019

Automatic Repeat ReQuests (ARQ)


This form of error detection uses a system of acknowledgements and timeouts. Automatic Repeat
Requests are often used to ensure reliable transmissions over an unreliable service.

Method

1. The sending computer transmits a block of data


2. The sending computer waits a period of time to see if the receiving computer acknowledges
receipt of the data
3. After a set period of time, a timeout occurs which triggers the data to be automatically resent
by the sending computer
4. This will continue until the receiving computer acknowledges the data has been received

Checksum
A block of data is sent alongside a calculated checksum value. The receiving computer also
calculates what it believes should be the checksum. The checksum values are then compared to see
if an error has occurred during transmission.

Method

1. The sending computer uses the block of data to be sent, and a predefined
mathematical algorithm, to calculate a checksum value
2. The sending computer sends the data, plus the checksum value
3. The receiving computer uses the data it receives to also calculate what it believes should be
the checksum, using the same mathematical algorithm
4. The two checksum values are compared by the receiving computer
5. Due to the nature of the algorithm, it is highly unlikely that corruption has occurred if the
checksum values match
6. If the checksum values don’t match, the receiving computer requests that the data is
transmitted again

The City School DHA Campus 14 M Shoaib Ishtiaq(Computer Science)


Unit 2 Communication and Internet technologies V2019

Example 3
If the sum of all the bytes in the transmitted block of data is <= 255, then the checksum is this value.
However, if the sum of all the bytes in the data block > 255, then the checksum is found using the
simple algorithm in

Suppose the value of X is 1185, then tracing through the algorithm, we get:

X = 1185

1. 1185/256 = 4.629

2. Rounding down to nearest whole number gives Y = 4

3. Multiplying by 256 gives Z = Y * 256 = 1024

4. The difference (X – Z) gives the checksum: (1185 – 1024) = 161

5. This gives the checksum = 161

When a block of data is about to be transmitted, the checksum for the bytes is first of all calculated.
This value is then transmitted with the block of data. At the receiving end, the checksum is
recalculated from the block of data received. This calculated value is then compared to the checksum
transmitted. If they are the same value, then the data was transmitted without any errors; if the values
are different, then a request is sent for the data to be retransmitted.

The City School DHA Campus 15 M Shoaib Ishtiaq(Computer Science)


Unit 2 Communication and Internet technologies V2019

Practice Questions

The City School DHA Campus 16 M Shoaib Ishtiaq(Computer Science)


Unit 2 Communication and Internet technologies V2019

Echo Check
With an echo check, the receiving computer sends a copy of the data immediately back to the
sending computer for comparison. The sending computer compares the two sets of data to check if
any errors occurred during the transmission process. If an error has occurred, the data will be
transmitted again.

Drawback of echo checks

 If the two sets of data are different you will have no way of knowing whether the error
occurred when originally sent, or when it was sent back
 Echo checks require a lot of extra data to be transmitted

Internet technologies
The internet is a world-wide system of computer networks and computers. All computers attached to
the internet can communicate with each other providing a number of rules and protocols are adhered
to.

Internet Service Provider


An Internet Service Provider (ISP) is a company that provides users with access to the internet.

IP address
An IP address is a unique number given to every device on the internet. It signifies the location of the
device, allowing devices to communicate with each other.
IP addresses are issued by a network or ISP. Most addresses are dynamic, meaning they could
change over time. Static IP addresses however will never change.

This is a 32-bit number which is usually written in the form: 109.108.158.1

An IP address can be used instead of typing in the full URL. For example: http://109.108.158.1 would
take you straight to the device corresponding to this address.

IP addresses and MAC addresses


A Media Access Control address (MAC address) is a unique number given to every device that
connects to the internet or a network. It identifies the actual device.

People often get confused trying to understand the difference between IP and MAC addresses.

An IP address is the location of your device on the internet, whilst a MAC address identifies the actual
device.

You can think of the IP address as the address of the house you live in (it will have some unique way
of identifying it, such as a post or zip code). Using this example, the MAC address can be thought of
as a way of uniquely identifying each person living in that house. It is possible to move house (so your
IP address will change) but the same people will be living in the new house (so their MAC addresses
will remain unchanged).

The City School DHA Campus 17 M Shoaib Ishtiaq(Computer Science)


Unit 2 Communication and Internet technologies V2019

Hypertext Markup Language [HTML]


HTML is a language used to create web pages. It is responsible for the content and structure of a
page. HTML takes its styling instructions from another language called CSS (Cascading Style Sheet).

HTML Structure and Presentation

Web pages are typically created using three components, HTML, CSS and JavaScript.

HTML Provides the content and structure of each page

A presentation language used to style the HTML


CSS
content

A scripting language used to provide


JavaScript additional functionality, interactivity and
behaviours

There is a special relationship between HTML and CSS. HTML can exist without CSS, but CSS is
pointless without any HTML to style.

Hypertext Transfer Protocol (HTTP)


HTTP is a protocol (set of rules) used when transmitting files (data) over the World Wide Web.
When you browse the WWW using a web browser, you are using the HTTP protocol.
Often, you will now see the HTTPS protocol used instead of HTTP.
HTTPS is an encrypted and secure version of HTTP.

Web Browser
A web browser is a software program which allows the user to retrieve and display web pages (and
other resources) from the World Wide Web.
Web browsers interpret the HTML code from websites and present it to the user in a format we can
understand.

Typical features of a web browser


 Bookmarks – to save the address of your favourite websites
 Back button – to go back to the previous page you viewed
 History – to access a list of pages you historically visited
 Multiple tabs/windows – the ability to view multiple pages at once in different tabs
 Page refresh – make the page refresh by reloading it
 Home page – the ability to choose the initial website that loads when you open the browser
 Address bar – a place to directly type in the URL, if you know it

The City School DHA Campus 18 M Shoaib Ishtiaq(Computer Science)


Unit 2 Communication and Internet technologies V2019

Examples of web browser software


 Google Chrome
 Microsoft Edge
 Mozilla Firefox
 Opera
 Safari
 Internet Explorer

Uniform Resource Locator (URL)


A uniform resource locator (URL) is the address that is used in the web browser to request a resource
(web page) from the world wide web.

E.g. http://www.bbc.co.uk/index.html

It can be broken down into three mains parts:

Access Protocol http://

Domain Name
www.bbc.co.uk
(Web Server)

Filename /index.html

The City School DHA Campus 19 M Shoaib Ishtiaq(Computer Science)


Unit 2 Communication and Internet technologies V2019

Past Paper Questions


Paper 1 Theory

The City School DHA Campus 20 M Shoaib Ishtiaq(Computer Science)


Unit 2 Communication and Internet technologies V2019

Paper 1 Theory

Paper 1 Theory

The City School DHA Campus 21 M Shoaib Ishtiaq(Computer Science)


Unit 2 Communication and Internet technologies V2019

Paper 1 Theory

[6]

The City School DHA Campus 22 M Shoaib Ishtiaq(Computer Science)


Unit 2 Communication and Internet technologies V2019

Paper 1 Theory

Paper 1 Theory

The City School DHA Campus 23 M Shoaib Ishtiaq(Computer Science)


Unit 2 Communication and Internet technologies V2019

Paper 1 Theory

The City School DHA Campus 24 M Shoaib Ishtiaq(Computer Science)


Unit 2 Communication and Internet technologies V2019

Paper 1 Theory

The City School DHA Campus 25 M Shoaib Ishtiaq(Computer Science)


Unit 2 Communication and Internet technologies V2019

Paper 1 Theory

Paper 1 Theory

The City School DHA Campus 26 M Shoaib Ishtiaq(Computer Science)


Unit 2 Communication and Internet technologies V2019

Paper 1 Theory

The City School DHA Campus 27 M Shoaib Ishtiaq(Computer Science)


Unit 2 Communication and Internet technologies V2019

The City School DHA Campus 28 M Shoaib Ishtiaq(Computer Science)


Unit 2 Communication and Internet technologies V2019

Paper 1 Theory

[5]

Paper 1 Theory Oct

5.

The City School DHA Campus 29 M Shoaib Ishtiaq(Computer Science)


Unit 2 Communication and Internet technologies V2019

The City School DHA Campus 30 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

Unit 3
Logic gates and logic circuits

3.1 Introduction
3.2 Logic gates
3.3 Truth tables
3.4 The function of the six logic gates
3.5 Logic circuits
3.6 Logic circuits in the real world

Candidates should be able to:

• use logic gates to create electronic circuits


• understand and define the functions of NOT, AND, OR, NAND, NOR and XOR (EOR)
gates,
• including the binary output produced from all the possible binary inputs (all gates, except
the NOT
• gate, will have 2 inputs only)
• draw truth tables and recognize a logic gate from its truth table
• Recognize and use the following standard symbols used to represent logic gates:

• produce truth tables for given logic circuits, for example:

• Produce a logic circuit to solve a given problem or to implement a given written logic
statement.

Recommended prior knowledge


No prior knowledge is needed to start this unit.

The City School DHA Campus 1 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

Context
This unit introduces logic gates, which are the building blocks for the relatively complex memory and
processor circuits found in computers. At this level, to achieve a more concrete grasp of their
fundamental properties, they are treated only as components in relatively simple, stand-alone logic
circuits. For this unit, together with Units 6 and 7, Computer Studies Support Booklet – Part 3
(http://teachers.cie.org.uk/docs/dynamic/31798.pdf) provides notes and practice problems (with
answers in Computer Studies Support Booklet – Answers
(http://teachers.cie.org.uk/docs/dynamic/31801.pdf).

Outline

This unit introduces truth tables and symbols for one-input NOT, and for two-input AND, OR,
NAND, NOR and XOR (EOR) logic gates. This is developed to look at truth tables for more complex
given logic circuits (with a maximum of 3 inputs and 6 gates). Learners will produce a simple logic
circuit from a written design brief.

WARNING: Practical work with logic gate chips can be relatively cheap to perform and very
rewarding, but is hazardous if teachers and learners are not properly aware of the risks from
connecting modules or electronic components in ways for which they are not intended. For example, if
a LED is connected directly across a power supply without a current-limiting series resistor, it is liable
to explode in a way that could cause permanent damage to an unprotected eye. See, for example,
www.youtube.com/watch?v=L85UNTW4lgU. Practical work can be performed quite adequately with
free logic simulation software.

Suggested teaching time


Based on a total time allocation of 130 contact hours for this Cambridge O Level Computer
Science course, it is recommended that this unit should take about 15 hours.

Syllabus ref Learning objectives Suggested teaching activities


1.3.1 Understand and define the functions Teacher introduces the concepts of
of NOT, AND, OR, NAND, NOR and OR and AND by careful use of English
XOR (EOR) gates, including the in logical statement; linking TRUE and
binary output produced from all the FALSE to binary states (1 and 0). (W)
possible binary inputs (all gates, Teacher demonstrates OR gate and
except the NOT gate, will have 2 AND gate by use of electrical model,
inputs only) projector presentation of simulation, or
Draw truth tables and recognise a similar. Teacher develops the concept
logic gate from its truth table of truth table for OR gate; learners
Recognise and use the following develop truth table for AND gate.
standard symbols used to represent Teacher introduces the standard symbols
logic gates: for both gates. (W)
Learners use appropriate hardware or
simulation software to develop
understanding of the functions of the
NOT, NAND, NOR and XOR (EOR)
logic gates.
Learners can observe the output
produced from all possible
combinations of inputs to construct
each gate’s truth table. (P)/(I)
Extension work:
Learners work out the simple logic circuits
required to create NAND and NOR gates
using AND, OR and NOT gates and test
them. (P)/(I)

The City School DHA Campus 2 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

1.3.1 Produce truth tables for given logic Learners should perform a range of
circuits graded practical exercises, using
Produce a logic circuit to solve a additional columns for intermediate
given problem or to implement a outputs, to produce truth tables for
given written logic statement, given logic circuits (maximum of three
such as IF (switch A is NOT on) OR inputs and 6 gates). (G)/(I)
(switch B is on AND switch C is NOT Learners should perform practical
on) then alarm, X, exercises to design, build and test a
sounds simple logic circuit from a given written
Use logic gates to create electronic statement (e.g. if A OR B are on AND
circuits (please see warning in the outline if C is on, then the lights will be on).
for this unit) (G)/(I)
Extension work:
Some learners may be able to work
algebraically, as would be necessary for
circuit simplification beyond the scope of
this syllabus.

Work out how to create NOT, AND and


OR gates using only NAND gates and
test the solutions.

and OR gates using only NOR gates


and test the solutions. (P)/(I)

The City School DHA Campus 3 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

Introduction
Logic gates are the basic building blocks of any digital system. It is an electronic circuit
having one or more than one input and only one output. The relationship between the input and the
output is based on a certain logic. Based on this, logic gates are named as AND gate, OR gate,
NOT gate etc.

Basic logic gates


There are seven basic logic gates: AND, OR, XOR, NOT, NAND, NOR

1. AND Logic Gate


AND is a type of logic gate.
Both inputs have to be positive (1) before the output is also positive (1).

How to write this:


X = A AND B (logic notation)
X = a . b (Boolean algebra)
AND gate truth table

Input Input Output


A B Z
0 0 0
0 1 0
1 0 0
1 1 1
2. OR Logic Gate
OR is a type of logic gate.
In an OR gate, at least one input has to be positive (1) to give a positive output (1 or ON). Both inputs
could also be positive.

How to write this:


X = A OR B (logic notation)
X = a + b (Boolean algebra)

OR gate truth table

Input Input Output


A B Z
0 0 0

0 1 1

1 0 1

1 1 1

The City School DHA Campus 4 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

3. NOT Logic Gate


NOT is a type of logic gate.
A NOT gate inverses the current output, therefore positive (1 or ON) becomes negative (0 or OFF),
whilst negative (0 or OFF) would become positive (1 or ON).

How to write this:


X = NOT A (logic notation)
X = ā (Boolean algebra)

NOT gate truth table

Input Output
A Z

0 1

1 0
4. NAND Logic Gate
NAND is a type of logic gate.
NOT AND. The same as AND, but then inverse (NOT) the outcome. So, perform AND first, then
apply a NOT to the output.

How to write this:


X = A NAND B (logic notation)
X= a . b (Boolean algebra)

NAND gate truth table

Input Input Output


A B Z

0 0 1

0 1 1

1 0 1

1 1 0

The City School DHA Campus 5 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

5. NOR Logic Gate


NOR is a type of logic gate.
NOT OR. The same as OR, but then inverse (NOT) the outcome. So, perform OR first, then
apply a NOT to the output.

How to write this:


X = A NOR B (logic notation)
X = a + b (Boolean algebra)

NOR gate truth table

Input Input Output


A B Z

0 0 1

0 1 0

1 0 0

1 1 0

6. XOR Logic Gate


XOR is a type of logic gate.
Exclusive OR. Only one input is allowed to be positive (1 or ON) to give a positive output
(1). If both inputs are same then there is a negative outcome (0, or OFF).

How to write this:


X = A XOR B (logic notation)
(Boolean algebra)
(Note: this is sometimes written as:

XOR gate truth table

Input A Input B Output Z

0 0 0

0 1 1

1 0 1

1 1 0

The City School DHA Campus 6 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

Truth tables for two, three and four inputs

The City School DHA Campus 7 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

Practice Question
Complete the following truth table (Use Blue Ink)

AND gate OR gate

Input 1 Input 2 Output Input 1 Input 2 Output


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

XOR gate NAND gate


Input 1 Input 2 Output Input 1 Input 2 Output
0 1
1 1 0 1
1 0 1 1
1 1 1

NOR gate NOT gate


Input 1 Input 2 Output
0 1 Input Output

1 1

1 1

The City School DHA Campus 8 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

Introduction to Logic Gates


• We will introduce Boolean algebra and logic gates
• Logic gates are the building blocks of digital circuits

Logic Variables
• Different names for the same thing – Logic variables – Binary
variables – Boolean variables
• Can only take on 2 values, e.g., – TRUE or False – ON or OFF –
1 or 0

Logic Variables
• In electronic circuits the two values can be represented by e.g., –
High voltage for a 1 – Low voltage for a 0

Logic Gates
• Basic logic circuits with one or more inputs and one output are
known as gates
• Gates are used as the building blocks in the design of more
complex digital logic circuits

The City School DHA Campus 9 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

Representing Logic Functions


• There are several ways of representing logic functions:
– Symbols to represent the gates
– Truth tables
– Boolean algebra
• We will now describe commonly used gates

The City School DHA Campus 10 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

The City School DHA Campus 11 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

Uses of Simple Logic

• Example – Heating Boiler

– If chimney is not blocked and the house is cold and the pilot light is lit, then
open the main fuel valve to start boiler.
b = chimney blocked
c = house is cold
p = pilot light lit
v = open fuel valve
– So in terms of a logical (Boolean) expression

v = (NOT b) AND c AND p

Example
Produce truth tables for each of the following logic circuits

1 1
1
1

1
1
0

1
1 0
1 1
1
Only taking the example when A=1 and B=1
A B Output X
1 1 1

Logical (Boolean) expression

X = (A and B) or (Not (A or B))


Or
X = (A.B) + (A+B)

The City School DHA Campus 12 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

Practice Questions
Produce truth tables for each of the following logic circuits

A B X
0 0
0 1
1 0
1 1
Q2.

A B C X
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
The City School DHA Campus 13 M Shoaib Ishtiaq(Computer Science)
Unit 3 Logic gates V2019

Q3.

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

The City School DHA Campus 14 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

Example
A safety system uses three inputs to a logic circuit. An alarm, X, sounds if
input A represents ON and input B represents OFF; or if input B represents ON and
input C represents OFF.
Produce a logic circuit and truth table to show the conditions which cause the
output X to be 1.
The first thing to do is to write down the logic statement representing the
scenario in this example. To do this, it is necessary to recall that ON = 1 and OFF =
0 and also that 0 is usually considered to be NOT 1.
So we get the following logic statement:

Note: this statement can also be written in Boolean algebra as:

The logic circuit is made up of three parts as shown in the logic statement. We will
produce the logic gate for the first part and the third part. Then join both parts
together with the OR gate.

Now Combining both parts with OR gate give us:

The City School DHA Campus 15 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

There are two ways to produce the truth table:


• trace through the logic circuit using the method described in Example 1
• produce the truth table using the original logic statement; this second method has
the advantage that it allows you to check that your logic circuit is correct.

We will use the second method in this example:

(Note: it is optional to leave in the intermediate values or to remove them giving a


four-column truth table with headings: A, B, C, X.)

Practice Questions

The City School DHA Campus 16 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

The City School DHA Campus 17 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

Logic circuits in the real world

Another Example:

The City School DHA Campus 18 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

Another Example

Another Example

The City School DHA Campus 19 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

The City School DHA Campus 20 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

Using logic ‘building blocks’


One very common ‘building block’ is the NAND gate. It is possible to build up any logic
gate, and therefore any logic circuit, by simply linking together a number of
NAND gates. For example, the AND, OR and NOT gates can be built from these gates as
shown below:

The City School DHA Campus 21 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

The City School DHA Campus 22 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

The City School DHA Campus 23 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

The City School DHA Campus 24 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

Simplification of logic circuits


The second method involves the simplification of logic circuits. By reducing the
number of components, the cost of production can be less. This can also improve
reliability and make it easier to trace faults if they occur.

The following example can be simplified to a single gate. You are asked to show how
this can be done in Activity 3.8.

The City School DHA Campus 25 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

The City School DHA Campus 26 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

Past Paper Questions

Paper 1 Theory

The City School DHA Campus 27 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

Paper 1 Theory

The City School DHA Campus 28 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

Paper 1 Theory

Paper 1 Theory

The City School DHA Campus 29 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

Paper 1 Theory February/March 2018

The City School DHA Campus 30 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

The City School DHA Campus 31 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

The City School DHA Campus 32 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

The City School DHA Campus 33 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

Paper 1 Theory

The City School DHA Campus 34 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

Paper 1 Theory

Paper 1 Theory

The City School DHA Campus 35 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

Paper 1 Theory

The City School DHA Campus 36 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

Paper 1 Theory

The City School DHA Campus 37 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

Paper 1 Theory

The City School DHA Campus 38 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

Paper 1 Theory

The City School DHA Campus 39 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

Q2.

The alarm, Y, returns a value of 1 if:


either temperature >= 120UC AND stirrer bar is OFF
or acidity > 5 AND temperature < 120UC
(a) Draw the logic circuit for the above system using these logic gates.

The City School DHA Campus 40 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

The City School DHA Campus 41 M Shoaib Ishtiaq(Computer Science)


Unit 3 Logic gates V2019

The City School DHA Campus 42 M Shoaib Ishtiaq(Computer Science)


Unit 4 Operating systems and computer architecture V2019

Unit 4
Operating systems and computer architecture
4.1 Introduction
4.2 Operating systems
4.3 Interrupts
4.4 Computer architecture
4.5 The fetch–execute cycle
Candidates should be able to:

Operating systems
• describe the purpose of an operating system (Candidates will be required to understand the
purpose and function of an operating system and why it is needed. They will not be required
to understand how operating systems work.)
• show understanding of the need for interrupts

Computer architecture and the fetch-execute cycle


• show understanding of the basic Von Neumann model for a computer system and the stored
program concept (program instructions and data are stored in main memory and instructions
are fetched and executed one after another)
• describe the stages of the fetch-execute cycle, including the use of registers and buses

Scheme of work
Recommended prior knowledge
In order to understand the role of an operating system, learners should have had practical experience
of using at least one operating system with a Graphical User Interface (GUI). It is also recommended
that learners should have studied Unit 1 before starting this unit.
Context
This unit looks at the way in which numbers are represented within a computer system, the structure
of the central processing unit and its functions, and the role of the operating system in managing the
components of a computer system and interactions with the user.
Outline
This unit starts with binary and hexadecimal representation of numbers, leading to the von Neumann
model of a computer system and the concept of a computer. This is illustrated practically by learner
use of the Little Man Computer (LMC). The role of operating systems is then considered, including
control of peripherals and the user interface. Learners will not be expected to know detail of any
specific operating system.
Suggested teaching time
Based on a total time allocation of 130 contact hours for this Cambridge O Level Computer Science
course, it is recommended that this unit should take about 10 hours.

Syllabus Learning objectives Suggested teaching activities


ref
1.3.6 Describe the purpose of an Teacher presentation to include:
operating system the idea of system software as
Show understanding of the need different from applications software
for interrupts general tasks and facilities of an
operating system – for processor
management, it is helpful to
demonstrate Windows Task Manager
the role of the operating system (OS)
in file management
how peripheral devices, such as
keyboards and printers, must be
controlled and responded to by the
operating system

The City School DHA Campus 1 M Shoaib Ishtiaq(Computer Science)


Unit 4 Operating systems and computer architecture V2019

how communication between the


computer and peripherals must be
controlled and errors detected. (W)
Learners (paired/grouped) to
research:

Learners use their findings to create a


short role play activity that
demonstrates how each of these
works (G/P).
Learners need to make their own
notes on each of these after they
have been acted out. (I)
Class brainstorm to review learners’
previous experience of operating
systems with graphical user
interfaces (GUI), and introduce the
idea of a command line interface. (W)
Discuss the main differences between
command line interfaces and GUIs
and their respective advantages and
disadvantages. (G/P)
Pairs of learners devise their own quiz
questions (and answers) on this unit
(P).
Teacher selects one or two quizzes to
test understanding of operating
systems and their function. (W)
1.3.2 Show understanding of the basic Teacher presents basic concepts of
1.1.1 Von Neumann model for a computer architecture, including
computer system and the stored registers, and the fetch-execute cycle
program concept (program followed by demonstration via
instructions and data are stored projector of the LMC. (W)
in main memory and instructions Learners carry out simple low level
are fetched and executed one tasks using LMC software – paired
after another) work is probably most effective. (P)
Describe the stages of the fetch- Differentiation can be achieved by
execute cycle, including the use giving able learners more challenging
of registers tasks (examples available in quoted
Use binary in computer registers resources and by searching for the
for a given application (such as LMC tasks using e.g. Google).
in robotics, digital instruments
and counting systems)

The City School DHA Campus 2 M Shoaib Ishtiaq(Computer Science)


Unit 4 Operating systems and computer architecture V2019

Operating system

An operating system is a powerful, and usually large, program that controls and
manages the hardware and other software on a computer.

All computers and computer-like devices require operating systems, including your
laptop, tablet, desktop, smartphone, smartwatch, and router.

Examples of Operating Systems


Laptops, tablets, and desktop computers all run operating systems that you've probably
heard of.

Some examples include versions of Microsoft Windows (like Windows 10, Windows
8, Windows 7, Windows Vista, and Windows XP), Apple's macOS (formerly OS X), Chrome
OS, BlackBerry Tablet OS, and flavors of the open source operating system Linux.

Types of an Operating System

1. Graphical-line interface: It interacts with of visual environment to communicate with the


computer. It uses windows, icons, menus and other graphical objects to issues
commands.

2. Command-line interface: it provides an interface to communicate with the computer by


typing commands.

The City School DHA Campus 3 M Shoaib Ishtiaq(Computer Science)


Unit 4 Operating systems and computer architecture V2019

Functions of Operating System


Operating system performs the following functions;

1. Booting
Booting is a process of starting the computer operating system starts the computer to work. It checks
the computer and makes it ready to work.

2. Memory Management
It is also an important function of operating system. The memory cannot be managed without
operating system. Different programs and data execute in memory at one time. if there is no operating
system, the programs may mix with each other. The system will not work properly.

3. Loading and Execution


A program is loaded in the memory before it can be executed. Operating system provides the facility
to load programs in memory easily and then execute it.

4. Data Security
Data is an important part of computer system. The operating system protects the data stored on the
computer from illegal use, modification or deletion.

5. Disk Management
Operating system manages the disk space. It manages the stored files and folders in a proper way.

6. Process Management
CPU can perform one task at one time. if there are many tasks, operating system decides which task
should get the CPU.

7. Device Controlling

Operating system also controls all devices attached to computer. The hardware devices are controlled
with the help of small software called device drivers.

8. Printing Controlling
Operating system also controls printing function. It a user issues two print commands at a time, it
does not mix data of these files and prints them separately.

9. Providing Interface
It is used in order that user interface acts with a computer mutually. User interface controls how you
input data and instruction and how information is displayed on screen. The operating system offers
two types of the interface to the user;

The City School DHA Campus 4 M Shoaib Ishtiaq(Computer Science)


Unit 4 Operating systems and computer architecture V2019

The City School DHA Campus 5 M Shoaib Ishtiaq(Computer Science)


Unit 4 Operating systems and computer architecture V2019

Interrupts and buffers


An interrupt is a signal sent from a device attached to the computer or from a software that
the computer is running, which causes the operating system to temporarily stop what it is
doing and service the interrupt. Interrupts can occur when, for example:

– an error has occurred, such as a paper jam in the printer

– the user interrupts the current process, e.g. the <CTRL><ALT><DELETE> keys have been
pressed simultaneously

– a software error has occurred

Interrupts allow computers to multitask, carrying out many tasks or having several windows
open at the same time. Operating systems have some code called an ‘interrupt handler’,
which prioritises the interrupts and saves them in a queue.

Buffers are used in computers as a temporary memory area, and they are essential in
modern computers because hardware devices operate at much slower speeds than the
processor. A buffer accepts a stream of data at a certain rate, stores it temporarily, and
then streams it out again at a different rate. Buffers are used for example, when streaming a
video from the Internet. This ensure that the video playback does not keep stopping to wait
for data from the Internet. In the same way, many other processes taking place inside the
computer may output and leave data through a buffer, which enables each process to be
performed at its own rate.

Buffers and interrupts are often used together to allow standard computer functions to be
performed.

https://www.youtube.com/watch?v=Uw2bUe-v0zU

Computer architecture
Very early computers were fed data whilst the machines were actually running. They weren’t
able to store programs; consequently, they weren’t able to run without human intervention. In
about 1945, John von Neumann developed the idea of a stored program computer, often
referred to as the VON NEUMANN ARCHITECTURE concept.

His idea was to hold programs and data in a memory. Data would then move between the
memory unit and the processor.

There are many diagrams which show von Neumann architecture.

The City School DHA Campus 6 M Shoaib Ishtiaq(Computer Science)


Unit 4 Operating systems and computer architecture V2019

Von Neumann Architecture

Von Neumann architecture was first published by John von Neumann in 1945.

His computer architecture design consists of a Control Unit, Arithmetic and Logic Unit (ALU), Memory
Unit, Registers and Inputs/Outputs.

Von Neumann architecture is based on the stored-program computer concept, where instruction data
and program data are stored in the same memory. This design is still used in most computers
produced today.

More Detailed Diagram

The City School DHA Campus 7 M Shoaib Ishtiaq(Computer Science)


Unit 4 Operating systems and computer architecture V2019

Central Processing Unit (CPU)


The Central Processing Unit (CPU) is the electronic circuit responsible for executing the
instructions of a computer program.
It is sometimes referred to as the microprocessor or processor.
The CPU contains the ALU, CU and a variety of registers.

Registers
Registers are high speed storage areas in the CPU. All data must be stored in
a register before it can be processed.
MAR Memory Address Register Holds the memory location of data that needs to be accessed

MDR Memory Data Register Holds data that is being transferred to or from memory

AC Accumulator Where intermediate arithmetic and logic results are stored

PC Program Counter Contains the address of the next instruction to be executed

CIR Current Instruction Register Contains the current instruction during processing

Arithmetic and Logic Unit (ALU)


The ALU allows arithmetic (add, subtract etc) and logic (AND, OR, NOT etc) operations to
be carried out.

Control Unit (CU)


The control unit controls the operation of the computer’s ALU, memory and input/output
devices, telling them how to respond to the program instructions it has just read and
interpreted from the memory unit.
The control unit also provides the timing and control signals required by other computer
components.

Buses
Buses are the means by which data is transmitted from one part of a computer to another,
connecting all major internal components to the CPU and memory.

A standard CPU system bus is comprised of a control bus, data bus and address bus.

Carries the addresses of data (but not the data) between the processor and
Address Bus
memory

Carries data between the processor, the memory unit and the input/output
Data Bus
devices

Carries control signals/commands from the CPU (and status signals from
Control Bus other devices) in order to control and coordinate all the activities within the
computer

The City School DHA Campus 8 M Shoaib Ishtiaq(Computer Science)


Unit 4 Operating systems and computer architecture V2019

Memory Unit
The memory unit consists of RAM, sometimes referred to as primary or main
memory. Unlike a hard drive (secondary memory), this memory is fast and also directly
accessible by the CPU.
RAM is split into partitions. Each partition consists of an address and its contents (both
in binary form).
The address will uniquely identify every location in the memory.
Loading data from permanent memory (hard drive), into the faster and directly accessible
temporary memory (RAM), allows the CPU to operate much quicker.
The example shown here uses 8 bits for each address and 8 bits for the content. In a real
computer memory, the address and its contents are actually much larger than this.
The address will uniquely identify every LOCATION in the memory and the contents will be
the binary.

Table 4.2
Let us now consider how the two registers (MAR and MDR) shown in the memory unit are
used.
Consider the READ operation. We will use the memory section shown in Table
4.2. Suppose we want to read the contents of memory location 1111 0001; the two registers
are used as follows:
• The address of location 1111 0001 to be read from its first written into the MAR
(Memory address register):

A ‘read signal’ is sent to the computer memory using the control bus.
• The contents of memory location 1111 0001 are then put into the MDR (memory
data register):
The City School DHA Campus 9 M Shoaib Ishtiaq(Computer Science)
Unit 4 Operating systems and computer architecture V2019

(Look at Table 4.2 to confirm this.)

Now let us consider the WRITE operation. Again we will use the memory section
shown in Table 4.2. Suppose this time we want to show how the value 1001 0101
was written into memory location 1111 1101.
• The data to be stored is first written into the MDR (memory data register):

This data has to be written into the memory location with the address 1111 1101;
so this address is now written into the MAR:

Finally, a ‘write signal’ is sent to the computer memory using the control bus and
this value will then be written into the correct memory location.
(Again confirm this by looking at Table 4.2.)

The City School DHA Campus 10 M Shoaib Ishtiaq(Computer Science)


Unit 4 Operating systems and computer architecture V2019

This diagram shows a slightly more detailed diagram of the von Neumann architecture.
It brings to our attention another new concept in this computer model – the idea of
ADDRESSES and REGISTERS. Addresses indicate where the data is stored and registers
are needed so that data can be manipulated within the computer.

An address is the location of where data can be found in a computer memory. Each
address in the memory is unique. The addresses aren’t actually shown in diagram but they
are contained in the part of the diagram labelled memory unit.

You will notice a number of items shown in the diagram known as registers: MAR,
MDR, ALU, PC and CIR. These are a little more complex and their function will be fully
described in the following pages. But essentially a register is simply a high-speed storage
area within the computer. All data must be represented in a register before it can be
processed. For example, if two numbers are to be added, both numbers must be stored in
registers and the result of the addition must also be stored in a register.

Activity 4.5
Draw up a summary table that shows how buses, registers and addresses are all connected
together. This can be done by doing a desk-top exercise:

• Use a sheet of A0 (flipchart size) paper and draw a large outline of the
FIVE main components shown in above diagram

The City School DHA Campus 11 M Shoaib Ishtiaq(Computer Science)


Unit 4 Operating systems and computer architecture V2019

The fetch-decode-execute cycle


A standard process describes the steps needed for processing to take place. It is
called the Fetch - Decode - Execute cycle or sometimes simply called the Fetch-Execute
Cycle.
First of all, both the data and the program that acts upon that data are loaded into main
memory (RAM) by the operating system. The CPU is now ready to do some work.

1. FETCH
The first step the CPU carries out is to fetch some data and instructions (program) from main
memory then store them in its own internal temporary memory areas. These memory areas
are called 'registers'.
This is called the 'fetch' part of the cycle.
For this to happen, the CPU makes use of a vital hardware path called the 'address bus'.
The CPU places the address of the next item to be fetched on to the address bus.
Data from this address then moves from main memory into the CPU by travelling along
another hardware path called the 'data bus'.
You could imagine that it is a bit like a boat attendant at a lake calling in customers when
their time is up -- "Boat number 3, time to come in!" The 'address' of the boat is 3 and the
'data' is its content. The boat is parked at a pier, which is like the internal register of the
CPU.

2. DECODE
The next step is for the CPU to make sense of the instruction it has just fetched.
This process is called 'decode'.
The CPU is designed to understand a specific set of commands. These are called the
'instruction set' of the CPU. Each make of CPU has a different instruction set.
The CPU decodes the instruction and prepares various areas within the chip in readiness of
the next step.

3. EXECUTE
This is the part of the cycle when data processing actually takes place. The instruction is
carried out upon the data (executed). The result of this processing is stored in yet another
register.
Once the execute stage is complete, the CPU sets itself up to begin another cycle once
more.

The City School DHA Campus 12 M Shoaib Ishtiaq(Computer Science)


Unit 4 Operating systems and computer architecture V2019

Shows the actual stages that take place during the fetch–execute cycle, showing how each
of the registers and buses are used in the process (the first five boxes are part of the fetch
cycle and the last box is part of the execute cycle).

The City School DHA Campus 13 M Shoaib Ishtiaq(Computer Science)


Unit 4 Operating systems and computer architecture V2019

Past Paper Questions

Paper 1 Theory

The City School DHA Campus 14 M Shoaib Ishtiaq(Computer Science)


Unit 4 Operating systems and computer architecture V2019

Paper 1 Theory October/November 2017

Paper 1 Theory

The City School DHA Campus 15 M Shoaib Ishtiaq(Computer Science)


Unit 4 Operating systems and computer architecture V2019

Paper 1 Theory October/November 2018

Paper 1 Theory

The City School DHA Campus 16 M Shoaib Ishtiaq(Computer Science)


Unit 4 Operating systems and computer architecture V2019

Paper 1 Theory

The City School DHA Campus 17 M Shoaib Ishtiaq(Computer Science)


Unit 4 Operating systems and computer architecture V2019

Paper 1 Theory

Paper 1 Theory February/March 2017

The City School DHA Campus 18 M Shoaib Ishtiaq(Computer Science)


Unit 4 Operating systems and computer architecture V2019

Paper 1 Theory

Paper 1 Theory

The City School DHA Campus 19 M Shoaib Ishtiaq(Computer Science)


Unit 4 Operating systems and computer architecture V2019

The City School DHA Campus 20 M Shoaib Ishtiaq(Computer Science)


Unit 4 Operating systems and computer architecture V2019

The City School DHA Campus 21 M Shoaib Ishtiaq(Computer Science)


Unit 4 Operating systems and computer architecture V2019

The City School DHA Campus 22 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

Unit 5-6
Input and output devices
5.1 Introduction
5.2 Input devices
5.3 Output devices
Memory and data storage
6.1 Introduction
6.2 File formats
6.3 Lossless and lossy file compression
6.4 Memory and storage
6.5 How to estimate the size of a file

Candidates should be able to:

1.3.3 Input devices


• describe the principles of operation (how each device works) of these input devices: 2D and 3D
scanners, barcode readers, Quick Response (QR) code readers, digital cameras, keyboards, mice,
touch screens, interactive whiteboard, microphones
• describe how these principles are applied to real-life scenarios, for example: scanning of passports
at airports, barcode readers at supermarket checkouts, and touch screens on mobile devices
• describe how a range of sensors can be used to input data into a computer system, including\ light,
temperature, magnetic field, gas, pressure, moisture, humidity, pH and motion
• describe how these sensors are used in real-life scenarios, for example: street lights, security
devices, pollution control, games, and household and industrial applications

1.3.4 Output devices


• describe the principles of operation of the following output devices: inkjet, laser and 3D printers;
2D and 3D cutters; speakers and headphones; actuators; flat-panel display screens, such as Liquid
Crystal Display (LCD) and Light-Emitting Diodes (LED) display; LCD projectors and Digital Light
Projectors (DLP)
• describe how these principles are applied to real-life scenarios, for example: printing single items on
demand or in large volumes; use of small screens on mobile devices

1.3.5 Memory, storage devices and media


• Show understanding of the difference between: primary, secondary and off-line storage and provide
examples of each, such as: primary: Read Only Memory (ROM), and Random Access Memory (RAM)
secondary: hard disk drive (HDD) and Solid State Drive (SSD) off-line: Digital Versatile Disc (DVD),
Compact Disc (CD), Blu-ray disc, USB flash memory and removable HDD
• describe the principles of operation of a range of types of storage device and media including
magnetic, optical and solid state
• describe how these principles are applied to currently available storage solutions, such as SSDs,
HDDs, USB flash memory, DVDs, CDs and Blu-ray discs
• calculate the storage requirement of a file

Syllabus ref Learning objectives Suggested teaching activities


1.3.3 Describe the principles of Start with a class discussion about
operation (how each device what learners already know. What
works) of these input devices: 2D computer systems do they know about
and 3D scanners, barcode and where are they used? Write ideas
readers, Quick Response (QR) on the whiteboard and expand with
code readers, digital cameras, more examples. (W)
keyboards, mice, touch screens, Show a video of computer systems
interactive whiteboard, from the early days to modern-day
microphones devices so that learners can see the
difference e.g. in size, application of
computer science and portability
The City School DHA Campus 1 M Shoaib Ishtiaq(Computer Science)
Unit 5-6 Input, Output and Storage devices V2019

Describe how these principles are (History of computers video lasts about
applied to real-life scenarios, for five minutes). (W)
example: scanning of Ask learners to work in pairs to identify
passports at airports, barcode as many parts of a computer system
readers at supermarket checkouts, that they can (P) Write up on board
and touch screens on mobile devices and then add to that list. (W)
Develop this list into categories by
brainstorming:

touch screens, scanners, etc.)

power-hungry in supercomputers to
small, low power consumption in smart
phones and microcontrollers)

(RAM), backing storage such as HDD


and DVD, etc.)

plotters, etc.). (W)

Use a quiz or match the definitions


activity to match the basic parts and
functions of a computer system.
(W)/(G)
Discuss the need to communicate with a
computer and physical ways of doing this.
Ask learners to identify common features
of input, processing, data storage and
output by completing a gapped handout.
(G)/(P)
Specialist devices such as sensors
and actuators used in monitoring and
control systems and those designed
for disabled people, devices for
interfacing with virtual reality systems,
etc. this needs to be explained by the
teacher. (W)
Learners are divided into small groups;
each group investigates one specific
input device and produces a
report/poster/leaflet on:

its advantages and limitations.

Reports/posters/leaflets to be prepared
using software such as DTP,
presentation software, intranet/internet
pages etc. Each group gives a five-
minute presentation on their device.
(G)
Each group prints enough copies of
their reports to provide a copy for each
learner. If learner work is stored on an
intranet, copy files into each learner
account.
1.3.3 Describe how a range of sensors Teacher introduction explaining the
can be used to input data into a distinction between:
computer system, including
The City School DHA Campus 2 M Shoaib Ishtiaq(Computer Science)
Unit 5-6 Input, Output and Storage devices V2019

light, temperature, magnetic field, monitoring, in which system acquires


gas, pressure, moisture, humidity, data at intervals from sensors and,
pH and motion where necessary, analogue-to-digital
Describe how these sensors are converters (ADCs), and how software
used in real-life scenarios, for processes the input data to provide the
example: street lights, security user with information for monitoring
devices, pollution control, games, physical or chemical quantities (such
and household and industrial as temperature, flow rate or oxygen
applications concentration), and warning signals if
stored limits are exceeded

be used as

feedback from a system being


controlled so that software can
compare feedback with stored set-
points or upper and lower limits to
decisions about the outputs required
to, where necessary, digital-to-
analogue converters (DACs) and
actuators, such as heaters or
motorised valves. (W)

Learners work in groups; each group


investigates one specific sensor and
produces a report/poster/leaflet on:

its advantages and limitations.

Reports/posters/leaflets to be prepared
using software such as DTP,
presentation software, intranet/internet
pages etc. Each group gives a five-
minute presentation on their device.
(G)
Each group prints enough copies of
their reports to provide a copy for each
learner. If learner work is stored on an
intranet, copy files into each learner
account.

1.3.4 Describe the principles of Learners work in groups to investigate


operation of the following output one specific output device and produce
devices: inkjet, laser and 3D a report/poster/leaflet on:
printers; 2D and 3D cutters;
speakers and headphones;
actuators; flat-panel display
screens, including Liquid Crystal its advantages and limitations.
Display (LCD) and Light-Emitting
Diodes (LED) display; LCD Reports/posters/leaflets to be prepared
projectors and Digital using software such as DTP,
Light Projectors (DLP) presentation software, intranet/internet
Describe how these principles are pages etc. Each group gives a five-
applied to real-life scenarios, for minute presentation on their device.
example: printing single items (G)
on demand or in large volumes; Each group prints enough copies of
use of small screens on mobile their reports to provide a copy for each
devices learner. If learner work is stored on an
The City School DHA Campus 3 M Shoaib Ishtiaq(Computer Science)
Unit 5-6 Input, Output and Storage devices V2019

intranet, copy files into each learner


account.

1.3.5 Show understanding of the Class brainstorms the difference


difference between: primary, between primary (e.g. RAM, ROM),
secondary and off-line storage secondary (e.g. hard disks, SSD) and
and provide examples of each, offline (e.g. removable storage media
such as: primary: Read Only such as CD, USB flash memory)
Memory (ROM), and Random memory, storage devices and media.
Access Memory (RAM) (W)
secondary: hard disk drive (HDD) Learners complete a gapped handout,
and Solid State Drive (SSD); off- requiring them to insert the correct
line: Digital Versatile Disc (DVD), class of memory device to match a
Compact Disc (CD), Blu-ray disc, definition or application. (I)
USB flash memory and Teacher gives a short presentation to
removable HDD explain and clarify the principles and
Describe the principles of differences between magnetic, optical
operation of a range of types of and solid state memory. (W)
storage device and media Learners work in groups to describe
including magnetic, optical and the ways in which different types of
solid state memory are used in a typical day in
Describe how these principles are their life (e.g. DVD/ Blu-ray to watch a
applied to currently available film, USB flash memory to carry data
storage solutions, such as SSDs, to and from school, CD to play music,
HDDs, USB flash memory, DVDs, use of mobile, MP3 player etc.). Use
CDs and Blu-ray discs an appropriate way to keep notes on
Calculate the storage requirement their work. (G)
of a file
1.3.3 Formative assessment activities Learner progress could be assessed
1.3.4 using specimen/past paper
1.3.5 examination questions/multiple-choice
test/short case study and questions.

Learning objectives
Using this document should help you guide learners in the following syllabus learning
objectives:
• identify hardware devices used for input, output, and secondary storage
• Show understanding of the basic internal operation of the following specific types of device:



 trackerball










 3D printer

• show understanding of the need for secondary (including removable) storage


The City School DHA Campus 4 M Shoaib Ishtiaq(Computer Science)
Unit 5-6 Input, Output and Storage devices V2019

Word/phrase Meaning
3D printer: An output device that can generate a three-dimensional (3D) physical object

Hard disk: A magnetic secondary storage device

Inkjet printer: An output device for printing pages using ink cartridges

Keyboard: An input device that allows text characters and symbols to be entered into a computer
system

Laser printer: An output device for printing pages that uses toner cartridges

Microphone: An input device that allows sound to be entered into a computer system

Optical discs: Secondary storage devices

Optical mouse: An input device that is used to move a pointer on a screen

Scanner: An input device that takes physical printed information and converts it into a digitised
format

Speakers: Output devices that produce sound

Solid state (flash) memory: A secondary storage device that has no moving parts

Touchscreen: Both an input and an output device: the display outputs an image; it can receive inputs
by being touched by either a finger or a stylus

Trackerball: An input device that moves a pointer on a screen when a ball on the device is rolled or
moved

What are input, output and storage devices?


All computing systems can be broken down into a basic input, processing, output and storage model:

Hardware input devices such as keyboards, scanners or microphones, are used to input data that is
processed by software programs (such as editing applications); hardware output devices such as
printers or screens are used to output the processed data. External storage devices are used to
provide additional memory, backup, or security for the long-term storage of data such as files,
photos, videos

The City School DHA Campus 5 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

Input Devices
What is an input device?
Input devices are peripherals used to provide data and control signals to a computer.
Input devices allow us to enter raw data for processing.
There are many examples of input devices, each with their own benefits and drawbacks.

Mouse

What is a mouse?
A mouse is an input device that allows you to control the
coordinates and movement of the onscreen
cursor/pointer by simply moving the mouse across a flat
surface with your hand.
Items can be selected or moved using the left mouse
button, whilst the right button usually displays additional
menus.
Most mice are now optical which means they use a laser
to detect and track movement across the surface.
Mice can be wired or wireless.

Typical applications for a mouse


 Used in everyday computing to control the pointer in GUIs.
Benefits of a mouse
 Simple and easy to use
 Efficient way to navigate
Drawbacks of a mouse
 Requires a flat surface
 Requires space to operate

Trackball

What is a trackball?
A trackball is an input device used to control a
pointer/cursor. Unlike a mouse, the device stays
stationary whilst the user moves the ball within its
socket.
Trackballs can be stand-alone devices or combined into
a keyboard or control panel.
Some people prefer using a trackball over a mouse as
they believe it gives them a finer degree of control over
the pointer. They are also handy for people with limited
hand motor skills as they are less demanding then a
mouse.

Typical applications for trackballs


 Computer Aided Design (CAD) for fine control
 Situations when space is limited
 Disabled people with limited motor skills
Benefits of trackballs
 Needs little desk space
 Fine control over the pointer
 Can be integrated into a keyboard
Drawbacks of trackballs
 May take some getting used to

The City School DHA Campus 6 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

Keyboard

What is a keyboard?

Keyboards are input devices that allow the entry of data


and commands by simply pressing down keys on the
keyboard.

Keyboards are a common place input device, often used


alongside a mouse. They can be wired or wireless.

Typical applications for keyboards


 Used in everyday computing to manually enter data and commands, e.g. writing a report in a
word processor

Benefits of keyboards
 Simple and easy to use
 Potentially a fast way to enter data

Drawbacks of keyboards
 A slow way to enter lots of data if not a trained typist
 Mistakes can be made if not careful

Concept Keyboard
What is a concept keyboard?

A concept keyboard is an input device similar to a traditional keyboard but each key/button is
identified by an image.

The images are chosen to symbolise the command/option each key represents. E.g. In a fast food
restaurant, the concept keyboard belonging to the cashier’s till may use images to represent each
type of meal available to purchase, or each size of drink that can be chosen.

Traditional ‘overlay’ concept keyboards are now being replaced with virtual concept keyboards
using touchscreens.

Typical applications for concept keyboards


 Cashier tills, e.g. fast food restaurant

Benefits of concept keyboards


 Reduces the training required as they are easy to use
 Ideal when options/choices are few
 May speed up data entry

Drawbacks of concept keyboards


 Not suitable for large amount of options/choices
 Not suitable for all tasks

The City School DHA Campus 7 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

Microphone

What is a microphone?
Microphones are input devices that take analogue
sound waves and converts them into electrical signals, suitable
for a computer to understand.

Microphones play an important role in speech


recognition, a technology that is gaining in popularity and
usage.

Typical applications for microphones


 Mobile phones, e.g. for traditional phone calls or VoIP
 Tablets and laptops, e.g. for video conferencing or VoIP
 Voice recognition systems, e.g. to input data and commands
using spoken words

Benefits of microphones
 Allows disabled users to give instructions to a computer
 Enables the use speech recognition software
 Allows voice calls and the audio in video calls (VoIP)

Drawbacks of microphones
 Speech recognition accuracy can sometimes be hit and miss

Digital Camera

What is a digital camera?


Digital cameras are input devices that capture
images (and sometimes video) digitally.

Digital cameras use an image sensor chip to capture


the image, rather than the film used by a traditional
camera.

The images recorded on a digital camera are stored on


memory cards, although some may have a limited
amount of external memory of its own.

Digital cameras feature an LCD screen which allow you to preview and review your images, plus
change menu settings.

Typical applications for digital cameras


 Professional photography, using DSLRs
 Amateur photography
 Speed cameras, e.g. using OCR software to read registration plates
Benefits of digital cameras
 Images can be reviewed immediately via the screen
 Images can be copied or edited easily on a computer
 Images can be automatically added to sharing sites
Drawbacks of digital cameras
 A good camera is needed to match the quality of traditional film
 Large capacity memory cards are needed if shooting lots of photos

The City School DHA Campus 8 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

2D Scanners

What is a 2D scanner?

2D scanners perform the task of turning a 2D document


or image into a digital file.

They come in two varieties, flatbed or handheld. Some


printers have inbuilt flatbed scanners.

The functionality of 2D scanners is enhanced when


combined with OMR and OCR software. For example,
OCR software can convert scanned in text into a
computer readable form.

Typical applications for 2D scanners


 Converting a hard copy of a document into an
electronic / digital form for storage, sending or editing
 Reading passports

Benefits of 2D scanners
 Can produce high quality digital copies of a document
 Digital copies of documents can be sent electronically, stored securely, or edited on the
computer

Drawbacks of 2D scanners
 Scanned documents use a lot of computer storage space

3D Scanners

What is a 3D scanner?

A 3D scanner is an input device that creates a 3D model


of the object scanned.
Scanning can be achieved either by using lasers, light,
radio waves or x-rays.
Typical applications for 3D scanners
 Security screenings to check for weapons or
restricted objects
 Creating a computer model ready for 3D printing
 Biometric devices
 Turning real people into gaming characters

Benefits of 3D scanners
 The technology can scan through clothing and other
materials
 3D scanning provides accurate 3D computer models

Drawbacks of 3D scanners
 Repeated exposure to x-rays can be harmful

The City School DHA Campus 9 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

Interactive Whiteboard

What is an interactive whiteboard?


Developed long before touchscreens became
affordable, interactive whiteboards combine a large
touch sensitive board with a projection screen.
Interactive whiteboards are versatile input devices,
allowing navigation and drawing/writing via your finger
or special dummy pens.
Typical applications for interactive whiteboards
 Classrooms
 Business board rooms and training centres

Benefits of interactive whiteboards


 Large display allowing multiple people to view at once
 Interactivity helps learning and presentations
 Very versatile
 Text and drawings made using the special pen can be captured and stored for later use

Drawbacks of interactive whiteboards


 Requires the interactive board, a projector and a computer
 Difficult to complete tasks that require precision accuracy
 Can be difficult to view in bright light

Touchscreens

What is a touchscreen?
A touchscreen is an electronic visual display that also
incorporates an input device that responds to
touch. This allows users to select options from a screen
by simply touching them.
There are three main types of touchscreen technology,
all of which are outlined below.
Typical applications for touchscreens
 Smartphones and tablet computers, e.g. easy input
of data and selection of apps/icons
 Ticket / Information kiosks, e.g. allows limited options
that can be selected easily
Benefits of touchscreens
 Save space as both input and output are combined
 Simple and easy to use
 Works well with icons, allowing options to be selected easily
Drawbacks of touchscreens
 Difficult to complete tasks that require precision accuracy
 Difficult to use if damaged
Capacitive touchscreens

Electrical current is sent from the four corners of the screen.


When your finger (or stylus) touches the screen, the current changes.
This allows the location of the touch to be calculated.
Benefits Drawbacks

Good visibility in sunlight Glass screen can shatter/break on impact

Very durable surface Cannot use wearing standard gloves

Allows multi-touch

The City School DHA Campus 10 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

Resistive touchscreens
Resistive touchscreens use multiple layers of material that transmit electrical currents.
When the top layer of the screen is pushed/touched into the bottom layer the electrical current
changes.
This allows the location of the touch to be found.
Benefits Drawbacks

Inexpensive to manufacture Poor visibility in sunlight

Can use stylus, finger, gloved finger or pen to


Vulnerable to scratching
operate

Wears through time

Does not allow multi-touch

Infra-red touchscreens
Infra-red touchscreens use a pattern of LED infra-red beams to form an ‘invisible’ grid on the screen.
Sensors detect where the screen has been touched by detecting a break in the infra-red beams.
The position of touch is then calculated.
Benefits Drawbacks

Good durability Expensive to manufacture

Allows multi-touch Glass screen can shatter/break on impact

Can use stylus, finger, gloved finger or pen to


Sensitive to dust and dirt
operate

Barcode Reader

What is a barcode?
A barcode is a machine readable code represented by
an image consisting of black and white lines. The lines
in a barcode relate to numbers 0 to 9.

Black and white surfaces reflect light differently, this is


how the scanner is able to identify the corresponding
digits from the lines.
Scanning a barcode is easier and faster than typing in
the series of numbers by hand.
A barcode identifies an item, it does not store any
further information relating to it, this is achieved by
looking up the value in a database.
When used in retail, you no longer need to trust sales
staff to remember or key in the prices of products.
Accurate receipts can be given to customers whilst the business benefits from reliable sales and stock
reports.
Prices can be changed immediately without changing any barcodes.
Typical applications for barcodes
 Tracking/identifying items in warehouses and factories
 Retail checkouts, e.g. to find product prices and descriptions, allowing automatic stock control
 Airports, e.g. tracking luggage
 Library systems, e.g. tracking books and borrowers

Benefits of barcodes
 Quick and easy to identify products

The City School DHA Campus 11 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

 Additional information can be easily retrieved from a database


 Allows the use of automated stock control and sales reports
 Related information (e.g. product price) is changed in the database, meaning the barcode
always remains the same
Drawbacks of barcodes
 Difficult to use if damaged
 Requires expertise to setup a database

QR Code Reader

What is a QR code?
A QR code is a computer generated pattern capable of
holding a modest amount of data.
This data is accessed when the QR code is read by a
QR scanner.
We often see a smartphone used as the scanning
device although this doesn’t have to be the case.
QR codes often store simple data such as a URL
address, contact information, calendar entries and
product details (in factories and warehouses etc).
Typical applications for QR codes
 Packaging
 Promotional materials
 Warehouses
Benefits of QR codes
 Data is stored within the pattern, so no need for a connected database
 Simple and quick way to store and retrieve information
 Can store a variety of information
Drawbacks of QR codes
 Changing the data alters the pattern, so not suitable for information that changes regularly,
e.g. prices.
 People need a device (and software) that can read the QR code

Graphics Tablet

What is a graphics tablet?


A graphics tablet is an input device that uses a special
pen like stylus to allow the user to “hand draw” images
into a computer system.
This allows artists to draw in a similar way to how they
naturally would using pen and paper; something difficult
to achieve with a mouse.
Graphics tablets can also be used for day to day data
input and are especially useful for capturing handwritten
signatures.
Some graphic tablets also incorporate an LCD screen
for a more realistic experience.
Typical applications for graphics tablets
 Graphic design and drawing
 Digital signatures
Benefits of graphics tablets
 Allows artists to draw in a fashion close to how they naturally would, giving them finer control
 Some models are pressure sensitive (which mice are not)
 Can be used for signatures and other general computing tasks
 Come in a range of sizes and suitable for many budgets
Drawbacks of graphics tablets
 High end versions can be expensive

The City School DHA Campus 12 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

Sensors
Sensors are input devices that record data about the physical environment around it.
Sensors send data to a microprocessor (computer). They do not make judgements, decisions or
control any output devices.
There are many types of sensors used in a variety of household, commercial and industrial
applications.
Advantages of using computer sensors
 Sensors are reliable
 Sensors are accurate
 Sensors don’t get tired
 Sensors work well in places where humans would rather not be

Common sensors and their applications


Magnetic Field Sensor
Detect changes in magnetic fields.
Can measure the strength and direction of a magnetic field.
 Mobile phones
 Anti-lock braking
 Detection of cars at traffic lights
 Reading magnetic ink characters on cheques

Motion (infra-red) Sensor


Detects movement / heat from objects.
 Automatic doors
 Burglar alarm systems
 Gaming systems, inc accelerometer
 Counting, e.g. people or cars

Temperature Sensor
Measures heat generated by an object or system. By measuring the change in heat, the sensorcan
detect changes in temperature.
 Chemical process or reaction
 Central heating (thermostat) / air-con
 Greenhouses
 Ovens, refrigerators and freezers

Sound Sensor
Measures the presence of sound.
 Burglar alarm systems
 Leak detection system

Moisture / Humidity Sensor


Moisture sensors measures the amount of moisture in a certain material whilst humidity sensors
measure the amount of moisture in the air, along with its temperature.
 Clothes dryer
 Environmental control / greenhouse, air-con

Pressure Sensor
Measures pressure.
 Burglar alarm systems
 Traffic light controls
 Chemical processes
 Liquid through pipes

Gas Sensor
Detects the presence of gas in a certain area.
 Pollution monitoring (river)
 Greenhouse environments

The City School DHA Campus 13 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

 Confined areas (space craft, aircraft)


 Fish tanks / aquariums
 Carbon monoxide alarms

Light Sensor
Can detect the ambient light level, meaning how bright or dark it is.
 Controlling street lighting
 Burglar alarms (beams of light)
 Automatic doors
 Greenhouse

pH Sensor
Measures how acidic or alkaline a material is.
 Water treatment plants
 Pollution monitoring (river)
 Aquariums
 Greenhouse

Control Systems
A control system is a set of devices that work together to regulate an environment or achieve some
set objectives. This is achieved through a control loop.

Examples of control systems:

 Maintaining healthy conditions in a fish tank


 Automatic shop doors
 Automatic street or security lighting
 Burglar alarms
 Automated greenhouses
 Heating and cooling systems

How does a control system work?

To understand how a control system works, it helps to remember how a computer system is
structured (see diagram below).

1. Input devices, usually sensors, send data readings to the microprocessor (computer) at set
intervals
2. To be understood, this data may have to be converted using an ADC (analogue to digital
converter)
3. The microprocessor compares the data readings against pre-set values that it has stored
(using a control program)
4. The microprocessor then makes a decision as to whether any action is needed (e.g. is more
heat needed to maintain the pre-set value?)
5. If needed, the microprocessor will send a signal to instruct an output device to do something
(e.g. turn on heater, turn off oxygen pump etc)
6. This may involve an actuator (e.g. a motor to open the gates or shop doors)
7. This process repeats in a continuous loop

The City School DHA Campus 14 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

Important:

At no point does an input device directly communicate with an output device, or make any judgement
calls. Because of this, a statement such as the following is completely wrong:

“When it gets dark, the light sensor turns on the light bulb”

The computer system diagram above confirms this cannot happen.

Benefits of control systems

 Computers are quick to respond to change and can process data very quickly
 Can run all day every day, without wages or needing a break
 Can operate in places dangerous to humans
 Consistent and error free

The City School DHA Campus 15 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

Output Devices
What is an output device?

Output devices are pieces of computer hardware used to communicate the results of data processing
performed by a computer.

The objective of output devices is to turn computer information into a human friendly/readable form.

There are many examples of output devices, each with their own benefits and drawbacks.

LCD & LED Flat Display Screens

What is a display screen?


Display screens are amongst the most common types
of output device.
Thanks to the development of LCD technology, display
screens now require less power and are lighter and
thinner than their obsolete CRT ancestors.
LCD screens produce sharp high resolution images.
Most display screens are either LCD or LED. Details of
these can be found below.
Typical applications for display screens
 Phone and tablets
 Laptops and computer screens
 Televisions
 Gaming devices
 Cameras
 Household appliances
Benefits of display screens
 Low power consumption means that displays can be placed on battery powered devices
 Screens are now lighter and thinner – meaning they can be used in a variety of places
 Sharp high resolution images
 Vivid colours with good contrasts
 Reach maximum brightness quickly
 Reliable and long lasting
Drawbacks of display screens
 Keeping up with the absolute latest screen technology can be expensive

LCD Screens
LCD screens are made from millions of tiny blocks called pixels.
Each pixel contains a red, green and blue light filter which can be individually adjusted to create any
colour when combined.
This is possible because the liquid crystals found in each pixel can be manipulated to allow all, some
or none of the fluorescent tube back light through to the individual RGB filters at the front of the
screen.

LED Screens
LED screens work in a similar way to LCD screens but with one major difference, the light source.
Small LED bulbs are used to provide light to the LCD pixels, not fluorescent tubes.
These LED bulbs either fill the entire back of the display unit, or on thinner models are just arranged
around the edges.
A fully back lit LED display allows for localised diming of the screen, producing deeper blacks
in parts of the screen where no light is needed.
Edge lit LED displays allow the screens to become even thinner than standard LCD displays.
In some situations LED screens are more power efficient than LCD.

The City School DHA Campus 16 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

LCD & DLP Data Projectors

What is a data projector?


Data projectors are output devices used to project the
digital output from a computer device on to a large
screen or wall.
The user can usually choose whether the
projector mirrors their computer screen, extends it, or
replaces it.
Projectors are ideal when training or presenting
information to a large audience.
Prices are very reasonable for basic projectors,
however, a data projector capable of showing cinema
films or sports footage in a bar are far more expensive.
Data projectors come in two mains types, 3LCD and DLP.
The differences between these are detailed below.
Typical applications for projectors
 Presenting to a large audience
 Education and training environments
 Boardrooms
 Cinemas and bars
Benefits of projectors
 Projected content can be seen easily be a large audience
 Allow a wide range of media and ideas to be shared with others
 Entry level projectors are affordable
Drawbacks of projectors
 Top quality projectors are very expensive
 Some projectors do not work very well in natural light

LCD Projectors
The lamp light is split from white into red, green and blue using dichroic mirrors.
The RGB light channels are passed through separate monochrome LCD screens, one for each of the
three colours.
The RGB light is then reassembled into a single light beam and magnified out of the projector using
lenses.
It is the three LCD screens that therefore control how much red, green and blue is present in the final
image.

DLP Projectors
DLP projectors work in a different way to LCD projectors.
Most affordable DLP projectors use a fast spinning colour wheel filter to sequentially split the lamp
light into red, green and blue light.
The projected image is created by a bank (chip) of thousands of microscopic mirrors. Each mirror
represents one pixel.
These tiny mirrors are carefully in sync with the colour wheel, turning towards or away from the RGB
light as and when it is needed, thousands of times per second. So, if part of the projected image
requires no red light, they face away from the light when the colour wheel filter is allowing red light
through.
The reflected image from the mirrors is then magnified out of the projector using lenses.

The City School DHA Campus 17 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

Inkjet Printer

What is an inkjet printer?


Inkjet printers are output devices usually used in a home
or small office for low volume printing.

A moving print head sprays ink droplets on to the paper


from a cartridge filled with liquid ink. Thermal bubble
technology is used to fire these microscopic ink droplets
from the cartridge.
Because the bulk of the action happens in the high-tech
ink cartridges, they are priced quite highly in relation to
the price of the actual printers (which are often very
affordable).
Inkjet printers are now commonly combined with a
flatbed scanner to create an all in one solution.
Typical applications for inkjet printers
 Low volume printing where speed isn’t critical
 High quality photographic documents
 Home and small office
 Printing on heat sensitive stationary, such as labels
Benefits of inkjet printers
 Entry model printers are very affordable
 Excellent photographic quality
 Can print on a variety of stationary as no heat is applied
Drawbacks of inkjet printers
 Generally slower at printing than compared to laser printers
 Ink cartridges can be expensive
 Printed text is nice and clear but laser printed text is still superior

Laser Printer

What is a laser printer?

Laser printers are output devices usually found in


businesses and organisations.

Using static electricity, the way they work is completely


different to inkjet printers.

Laser printers are ideal for high volume printing because


they produce very high quality documents at fast
speeds.

Laser printers use a powdered ink/toner cartridge, not liquid ink.

1. The rotating printing drum is given a positive charge.


2. A laser removes the positive charge from certain areas of the drum as it scans across it,
creating a negatively charged copy of the text/image to be printed.
3. On an ink roller, the toner is given a positive charge which attracts it to only the negatively
charged areas on the printing drum.
4. The toner then transfers from the negatively charged areas of the drum to some positively
charged paper.
5. A fuser is used to heat the document and permanently melt the toner on to the page.

The City School DHA Campus 18 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

Typical applications for laser printers

 High volume printing where speed is critical


 Shared printer for several users
 Predominantly text based documents
 Found in businesses and offices

Benefits of laser printers

 Very good at producing sharp text


 Fast high volume printing
 Large input trays to hold more paper
 Cost per page is generally lower than inkjet

Drawbacks of laser printers

 Good quality images, but inkjet images are superior


 Initial cost for printer can be expensive
 Heavy and bulky
 Toner is expensive but is replaced infrequently

3D Printer

What is a 3D printer?

3D printers are output devices used to create three


dimensional objects from a 3D computer model.

The computer model can be created by using a 3D


scanner, or by hand using CAD modeling software.

Using a method called additive manufacturing, 3D


objects are created by layering a material, layer by
layer, from the ground up until the object is completed.

Typical applications for 3D printers


 Home and commercial use
 Prototyping parts and solutions
 Human prosthetics
 Medical aids

Benefits of 3D printers
 Prototype objects can be created at a fraction of the cost of a factory
 A variety of intricate and “impossible” objects can be printed in a variety of materials
 Computer designs can be shared and printed by others

Drawbacks of 3D printers
 Expensive to buy although entry models are becoming more affordable

The City School DHA Campus 19 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

Wide-Format Printer

What is a wide-format printer?

A wide-format printer is an output device capable of


large scale printing.

Most wide-format printers work in a similar way to inkjet


printers, allowing for some flexibility with the materials
that can be used.

Wide-format printing is economical when printing a


larger item in small volumes as setting up a traditional
print run can be expensive.

Typical applications for wide-format printers


 Banners, posters, murals
 Vehicle image wraps
 Architectural drawings and construction plans
 Theatre and TV studio backdrops
 Signage

Benefits of wide-format printers


 Economical for small volume printing
 Can print in a variety of larger sizes, using continuous rolls of paper

Drawbacks of wide-format printers


 Initial cost is expensive

2D Cutter

What is a 2D cutter?

A 2D cutter is an output device capable of cutting holes


or shapes into a flat 2D surface.

Examples range from inexpensive paper/card cutting


machines used by craft enthusiasts, to industrial models
used in manufacturing to cut through metal.

Typical applications for 2D cutters


 Manufacturing (laser cutters)
 Craft projects (paper and card blade cutters)

Benefits of 2D cutters
 Fast and consistently accurate cuts can be made all day long

Drawbacks of 2D cutters
 Some industrial models can be expensive to setup and maintain
 Output is only as good as a the computer 2D model

The City School DHA Campus 20 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

3D Cutter

What is a 3D cutter?

A 3D cutter is similar to a 2D cutter except it is capable


of rotating and cutting at many angles. This means that
3D objects can have cuts made to all of its surfaces,
unlike 2D cutters that can only cut into a flat 2D surface.

3D cutters come in many varieties, some of which do


not use lasers.

Typical applications for 3D cutters


 Manufacturing

Benefits of 3D cutters
 Fast and consistently accurate cuts can be made all day long
 All sides of an object can be cut into

Drawbacks of 3D cutters
 Can be expensive to setup and maintain
 Output is only as good as a the computer 3D model

Speakers and Headphones

What are speakers and headphones?

Speakers and headphone are the output devices


responsible for producing sounds.

Speakers and headphones convert digital signals into


analogue sound waves that are audible to our human
ear drums.

Speakers come as standard is most portable computing


devices. Desktop computers usually require the
purchase of separate speakers.

Speakers and headphones aren’t just for music, they also allow us to hear computer warning signals
and other people when communicating via voice or video calls.

Typical applications for speakers and headphones

 Headphones keep sound personal so as not to disturb others


 Speakers allow for sound that can fill the room
 Music
 Communications (phones, tablets, laptops)

The City School DHA Campus 21 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

Actuators

What is an actuator?

Actuators are the output devices responsible for creating


real world movement. This could range from physically
opening automatic shop doors to lowering the landing
gears on a plane.

They are often used in a computerised control system,


acting upon a signal sent by the
microprocessor. Actuators include electric motors,
pistons and pumps.

Typical applications for actuators

 Robotics
 Control Systems

The City School DHA Campus 22 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

Memory and Storage


Computer memory / storage can be classified in three ways; primary, secondary and off-line.

Primary
Primary memory is the computer’s main memory, which is directly accessible by the CPU and often
much faster than secondary storage.
RAM will hold the loaded operating system, plus all running applications and files.
Examples of primary memory / storage:
 Random Access Memory (RAM) – solid state
 Read Only Memory (ROM) – solid state

Secondary
Secondary storage is a non-volatile medium that holds data until it is deleted or overwritten.
It is sometimes referred to as external memory and auxiliary storage. Secondary storage is where
programs and data are kept on a long-term basis.
Examples of secondary memory / storage:
 Hard Disk Drive (HDD) – magnetic storage
 Solid State Drive (SSD) – solid state

Off-line
Off-line refers to non-volatile storage that can be easily removed from the computer. This is often
used to transport data and keep backups for protection.
Examples of off-line memory / storage:
 CD, DVD, Blu-ray – optical storage
 USB Flash Drive – solid state
 Removable HDD / SSD

The City School DHA Campus 23 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

Storage Devices
What is a storage device?
Storage devices are the computer hardware used to remember/store data.
There are many types of storage devices, each with their own benefits and drawbacks.
Below are explanations about different storage devices.

Hard Disk Drive (HDD)

What is a hard disk drive?

Hard disk drives are non-volatile magnetic


storage devices capable of remembering vast amounts
of data.

An electromagnet in the read/write head charges the


disk’s surface with either a positive or negative charge,
this is how binary 1 or 0 is represented.

The read/write head is then capable of detecting the


magnetic charges left on the disk’s surface, this is how
data is read.

The disk surface is divided into concentric circles


(tracks) and sectors (wedges). Dividing the surface in
this way provides physical addresses to remember
where data is saved.

A circuit board carefully co-ordinates the rotating disk and swinging actuator arm to allow the
read/write head to access any location very quickly.
Typical HDD capacities are measured in Terabytes (TB).

They can be installed inside a computer or purchased in a portable (external) format.


Typical applications for hard disk drives
 Desktop computers
 Laptop computers
 TV and satellite recorders
 Servers and mainframes
 Portable (external) drives are sometimes used to backup home computers or transfer
large files

Benefits of hard disk drives


 Capable of holding vast amounts of data at affordable prices
 Fast read and write speeds
 Reliable technology
 Relatively small in size

Drawbacks of hard disk drives


 Due to the nature of its moving parts, they will eventually wear and break
 Although very fast, waiting for the moving parts means it will never perform as fast as solid
state drives
 More fragile and less robust than a solid state drive
 Higher power consumption than a SSD
 Some noise is created by the moving parts

The City School DHA Campus 24 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

Solid State Drive (SSD)

What is a solid state drive?

Solid state drives are non-volatile storage devices


capable of holding large amounts of data.

They use NAND flash memories (millions of transistors


wired in a series on a circuit board), giving them the
advantage of having no mechanical moving parts and
therefore immediate access to the data.

Solid state drives perform faster then traditional hard disk drives, however they are significantly more
expensive.

This expense means that typical capacities are usually measured in Gigabytes (GB).

They can be installed inside a computer or purchased in a portable (external) format.

Until we reach a point were large capacity SSDs are affordable, a compromise is to run two disk
drives inside a computer. An SSD as the primary drive for your important programs and operating
system, and a traditional HDD to store music, documents and pictures (which don’t need the faster
access times).

The lack of moving parts in an SSD makes it very robust and reliable, ideal for a portable device.

Typical applications for solid state drives

 Smartphones
 Tablet computers
 High-end laptops
 Two drive desktop solutions
 Portable drives are sometimes used in HD video cameras

Benefits of solid state drives

 Extremely fast read/write speeds


 Small in physical size and very light, ideal for portable devices
 No moving parts to wear, fail or get damaged – ideal for making portable computers and
devices more reliable and durable
 Uses less power than a HDD, increasing battery life time
 Very quiet
 Generates less heat

Drawbacks of solid state drives

 Expensive to buy (per GB)


 Limited in capacity due to the expense
 Limited amount of writes

The City School DHA Campus 25 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

Random Access Memory (RAM)

What is RAM?
RAM is a computer’s primary memory. It is a very fast
solid state storage medium that is directly accessible by
the CPU.
Any open programs or files on a computer are
temporarily stored in RAM whilst being used.
Being volatile, any data stored in RAM will be
lost when power is removed. This makes RAM totally
unsuitable for the long term permanent storage of data –
that is the role of a HDD or SSD instead.
Data is copied from secondary storage (HDD,
SSD) to RAM as and when it is needed. This is
because using a HDD as the primary memory would
cause a computer to perform much slower (a HDD or SSD is not directly accessible to the CPU, and
isn’t as fast as RAM).

RAM is a relatively expensive storage device and typical capacities are measured in Gigabytes (GB).

Computers operating with a capacity of RAM above the recommended minimum will benefit from
better performance and multitasking.

There are two types of RAM (SRAM and DRAM), each with their own advantages and disadvantages.

Typical applications of RAM


 The fast and directly accessible temporary (working) memory needed by a computer

Benefits of RAM
 Directly accessible to the CPU, making processing data faster
 Fast solid state storage, making processing data faster

Drawbacks of RAM
 Relatively expensive memory
 Volatile – any data stored in RAM is lost when power is removed

Static RAM (SRAM)


Data on SRAM does not require refreshing.
However, the technology is bulkier meaning less memory per chip.

 More expensive than DRAM


 Much faster than DRAM
 Consumes less power
 Commonly used in cache memory

Dynamic RAM (DRAM)


The most common type of RAM in use.
The data needs to be continually refreshed otherwise it fades away.

Continually refreshing the data takes time and reduces performance speeds.

 Cheaper than SRAM


 Commonly used in main memory

The City School DHA Campus 26 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

CD, DVD and Blu-Ray Discs

What are optical storage discs?


CD, DVD and Blu-Ray drives are optical
storage devices.
Binary data is stored as changes to the texture of the
disc’s surface, sometimes thought of as microscopic pits
and bumps.
These ‘bumps’ are located on a continuous
spiral track, starting at the centre of the disc.
Whilst the disc is rotating at a constant speed, a
laser is pointed at the spiral track of ‘bumps’.
The laser will reflect/bounce off the disc surface
in different directions depending upon whether a 1 or 0
has been read.
Disc capacities
In the pursuit of larger optical storage capacities, DVDs were created, followed by Blu-Ray.
CD DVD Blu-Ray

700 MB 4.7 GB 25 GB – 128 GB


Typical applications for optical media

 CD – Audio and small amounts of data


 DVD – Standard definition movies and data
 Blu-Ray – HD video and large amounts of data

DVD
Despite being the same physical size, a DVD can hold more data than a CD.

To achieve this, a more tightly packed spiral track is used to store the data on the disc.

To accurately access the smaller ‘bumps’, a finer red laser is used in a DVD drive than that found in a
standard CD drive.
To increase capacity further, DVDs are also capable of dual layering.

Blu-Ray
Blu-Ray technology squashes even more data into the same size disc as a CD or DVD.

The spiral data tracks on a Blu-Ray disc are so small a special blue (violet) laser has to be used to
read the ‘bumps’.

Like a DVD, Blu-Ray discs are capable of storing data on multiple layers.

Recordable Optical Media


CD-ROM, DVD-ROM, Blu-Ray-ROM

Read only – the data is permanently written to the disc at the point of manufacture.
CD-R, DVD-R, BD-R

Recordable – blank discs that can be burnt (written to) once.


CD-RW, DVD-RW, BD-RE

Re-writable – blank discs that can be burnt (written to) over and over again (can be erased and
reused many times).

The City School DHA Campus 27 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

DVD-RAM

What is DVD-RAM?
DVD-RAM is an optical media storage device.
It differs from a traditional DVD in that data is stored in
concentric tracks (like a HDD) which allows read and
write operations to be carried out at the same time.

This means, for example, that when used in a


personal video recorder you can record one television
programme whilst watching a recording of another.

This allows handy features such as ‘time slip’ to be possible.

When used within a CCTV system you could review footage whilst still recording your cameras.
The capacity of DVD-RAM is 4.7 GB, or 9.4 GB for double-sided discs.

Typical applications for DVD-RAM


 Personal and digital video recorders
 High-end CCTV

Benefits of DVD-RAM
 Read and write at the same time
 Can be rewritten to many more times than a traditional DVD-RW
 Has write-protect tabs to prevent accidental deletion when used in an optional cartridge
 Data is retained for an estimated 30 years. This long life is great for archiving data
 Reliable writing of discs because the verification done by the hardware, not by software

Drawbacks of DVD-RAM
 Disc speeds higher than 5x are less common
 Less compatibility than DVD-RW

ROM

What is ROM?

ROM is a non-volatile memory chip whose contents


cannot be altered.

It is often used to store the startup routines in


a computer (e.g. the BIOS).

Typical applications for ROM

 Storing the computer’s start up routine

The City School DHA Campus 28 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

USB Flash Memory

What is USB Flash Memory?

Flash are non-volatile solid state storage devices


which use NAND flash memories to store data (millions
of transistors).

USB refers to the USB connection that allows users to


plug the device into the USB port of a computer.

Other types of flash storage include the memory cards used in digital cameras.

Flash memory comes in a variety of capacities to suit most budgets and requirements.

Typical applications for flash memory

 USB memory sticks – saving and transferring documents etc


 Memory cards in digital cameras

Benefits of flash memory

 Portable, small and lightweight


 Durability, flash has no moving parts to damage
 Range of capacities available
 Fast speeds, with no moving parts of boot up time

Drawbacks of flash memory

 Limited (but huge) number of write cycles possible


 Really high capacities are uncommon
 In relative terms, an expensive storage option compared to a HDD

The City School DHA Campus 29 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

File Format
Different types of files are stored in different ways (formats). For example, the format of an image file
(.jpg) is not the same as an audio file (.mp3).

Sound (music), pictures, video, text and numbers are all stored in different file formats.

At the end of a computer filename is the filename extension. The filename extension identifies the
file’s format and its characteristics.

E.g. the .doc in notes.doc indicates this is a text document.

File Type File Format

Sound .mp3 .wav .mid .flac .aif

Text .doc .docx .rtf .txt .pdf

Pictures .jpeg .gif .png .bmp

Video .mp4 .flv .wmv

Proprietary file formats


Proprietary file formats are file types that belong to specific software programs or companies. The
encoding methods of these file types are often kept private, or restricted through licences.

The encoding methods of open format file types are published and free to be used by everybody.

Data Compression
Compression is used to reduce file sizes – something which is essential in an era of online video
streaming and media sharing.
Without compression, we would:

 Fit less music, videos or photos onto your smart phone or computer
 Struggle to stream or download videos from the internet
 Struggle to upload media to the internet
 Find browsing websites a slower experience
Compression can be categorised as either lossy or lossless.

Lossless compression
Lossless compression reduces the size of a file without any damage to the file or reduction in quality.
The file can be decompressed to its original state, with all the data bits reconstructed.
Lossless compression is ideal for compressing text or numeric files where a loss of data is
unacceptable. It is also used in PNG, GIF and ZIP files.
How does lossless compression work?
 Lossless compression takes advantage of repetition and patterns.
 A compression algorithm is used to find and index repeated words or patterns (or sections of
words) within the data.
 Wherever they occur in the data, the indexed words/patterns are replaced with numerical
values.
 The index will need to be stored with the data to allow decompression with no loss of data.

The City School DHA Campus 30 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

Lossy compression
To get low file sizes, lossy compression permanently removes data from the file that the
computer believes you can do without (redundant data).

Often we can hardly notice the difference, but if you get too greedy (aggressive) with lossy
compression you will notice the file quality deteriorates significantly.

It is impossible to get the file back to its original state and quality.

Lossy compression is best at creating really small file sizes – ideal for downloads or
streaming.
File formats that use lossy compression include MP3, MP4 and JPG.

Data Storage Capacity


Data storage capacity is the measurement of how much data can be stored in a storage device.

Bits and bytes


Data storage capacities are measured in bytes, where each byte is actually a pattern of 8 bits.

1 byte = 8 bits (e.g. 10011011)

Each bit is represented by either a 1 or a 0 (on or off), also known as binary code.

1 byte can hold 1 character of data, e.g. “p” is 1 byte.

As technology improves, it is becoming cheaper to achieve higher data storage capacities.

Data storage capacities


Name Bytes Context

1 kilobyte (1 KB) 2^10 (or 1 024) A few paragraphs of text

2^20 (or 1 048


1 megabyte (1 MB) 4 books of text
576)

2^30 (or 1 073


1 gigabyte (1 GB) 4,400 books, or 256 MP3 audio files
741 824)

2^40 (or 1 099


1 terabyte (1 TB) 233 DVDs, or 260,000 MP3 audio files
511 627 776)

2^50 (or 1 125


40,000 Blu-ray discs, or 268,400,000 MP3 audio
1 petabyte (1 PB) 899 906 842
files
624)

Each unit of measurement is 1024 times bigger than the unit before it.

The City School DHA Campus 31 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

MIDI

MIDI stands for Musical Instrument Digital Interface.

It is an agreed protocol from the early 80s that allows computers, digital musical instruments and
other hardware to communicate musical instructions, regardless of manufacturer.

Unlike other audio formats that transmit representations of musical sounds, MIDI only stores or
transmits commands about the music (the notes etc), and not audio signals.

Notes (events) are instructions such as:

 Key ON and OFF (when the key is pressed/released)


 Pitches or notes played
 Volume
 Velocity (how hard and fast the key is pressed)
 Panning
 Aftertouch (how hard the key is held down)
 Tempo
 Modulations

A MIDI controller is a piece of hardware or software that creates and transmits MIDI data to other
MIDI devices.

To record or edit a MIDI project, a sequencer is also needed. A sequencer will send playback
instructions (data) to any connected and compatible output components, such as a MIDI instrument,
sound module, synthesizer or software synthesizer.

Because MIDI is a recording of data events, and not actual audio, it can be edited easily and played
back to sound like any instrument.

Since MIDI only represents the playback information, and not audio, when stored it has a very small
file size.

The City School DHA Campus 32 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

MP3 Audio Compression

MP3s are audio files compressed using lossy compression.

The lossy compression allows great savings in file size, with the average MP3 file being 90% smaller
than an equivalent uncompressed audio file.

Like all lossy compressed files, savings in size are made by deleting data that the computer believes
is redundant and will not be missed by the user.

MP3 audio compression reduces a file size through:

 Perceptual music shaping


 Reducing the audio bitrate

Perceptual Music Shaping

Perceptual music shaping refers to the process of removing inaudible sounds in order to make a file
size smaller.

Inaudible sounds may include:

 Noises at frequencies that humans cannot hear


 Quiet sounds that cannot be heard over louder sounds

Bitrate

In audio files, the bitrate is the number of bits that need to be processed every second. This is
measured in kilobits per second.

The bitrate is calculated by multiplying the sample rate by the bit depth and number of audio
channels.

The bigger the bitrate, the better the sound quality, but the larger the file size.

Sample Rate

The sample rate (measured in Hz or kHz) is the number of samples (snapshots in time) of sound that
are recorded to represent an audio performance.

Taking more samples per second will result in a more accurate and better sounding audio
file. However, increasing the sample rate increases the file size.

The City School DHA Campus 33 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

Bit Depth

Bit depth is the number of bits of information recorded in each sample.

MP3s with a high bit depth will contain a wider spectrum of frequencies, giving a more accurate
recording of the audio performance. However, the higher the bit depth, the greater the file size.

MP4 Video Compression

MP4s are video files (with audio) compressed using lossy compression.
The lossy compression gives huge savings in file size, needed to:
 Make video streaming services practical (e.g. YouTube, Vimeo, NowTV, on demand TV)
 Let us record and store lots of video files on devices with only modest capacities
How are MP4 files compressed?

Like all lossy compressed files, savings in size are made by deleting data that the computer believes
is redundant and will not be missed by the user.

MP4 video compression reduces a file size by spiting the image in each video frame into small blocks
of pixels, then:

 Only store data for blocks that have changed from one frame to the next (if a block remains
unchanged, all that needs storing is a note to say “nothing has changed”)
 Recognising where a block of pixels has moved location but remains the same (and apply
some maths accordingly)
 Reducing the level of detail in a pixel block (blending similar colours into one or smoothing out
textures etc)

When compressing a video file it is important to strike the right balance between the overall file size
and the video quality.

The more aggressively you compress the file to make it smaller, the poorer the video quality will be.
This decision is taken out of your hands when uploading to some video streaming websites.

The City School DHA Campus 34 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

What is a JPEG file?

A JPEG file is an image saved in a compressed graphic format standardized by the Joint Photographic
Experts Group (JPEG). It supports up to 24-bit color and is compressed using lossy compression, which
may noticeably reduce the image quality if high amounts of compression are used. JPEG files are
commonly used for storing digital photos and web graphics.

JPEG file open in Microsoft Windows Photos


A JPEG file also contains metadata that describes the contents of its file, such as the color space, color
profile, and image dimension information. Image files saved in the JPEG format are more commonly
appended with the .JPG extension than the JPEG extension.

If you come across a JPEG file on your computer you can open it with any program that supports
images. There are a large amount of free and commercial image editors available for desktop and
mobile platforms. You can also view it in a web browser by dragging and dropping it in the browser
window.

File Size Calculation


1 Byte = 8 Bit
1 Kilobyte = 1,024 Bytes
1 Megabyte = 1,048,576 Bytes
1 Gigabyte = 1,073,741,824 Bytes

Step 1: Multiply the detectors number of horizontal pixels by the number of vertical pixels to get the
total number of pixels of the detector.

Step 2: Multiply total number of pixels by the bit depth of the detector (16 bit, 14 bit etc.) to get the
total number of bits of data.

Step 3: Dividing the total number of bits by 8 equals the file size in bytes.

Step 4: Divide the number of bytes by 1024 to get the file size in kilobytes. Divide by 1024 again and
get the file size in megabytes.

Examples:
Perkin Elmer 1621: 2048 x 2048 = 4,194,304 (4.2 megapixel Detector)

4,194,304 pixels X 16 bit = 67,108,864 ÷ 8bits = 8,388,608 Bytes ÷1024 = 8,192 Kilobytes ÷ 1024 = 8
Megabytes

VARIAN 2520: 1,920 x 1536 = 2949120 (2.95 Megapixel Detector)


2,949,120 X 16 bit = 47185920 ÷ 8bits = 5,898,240 Bytes 5,760 Kilobytes ÷ 1024 = 5.625 Megabytes)

In Sumary:
# Of Pixels X Bit Depth ÷ 8 ÷ 1024 ÷ 1024 = File Size in Megabytes (MB)

The City School DHA Campus 35 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

Text and number file formats


Text and numbers can be stored in a number of formats. Text is usually stored in an
ASCII format

When using spreadsheets or databases, for example, numbers can be stored in a number of different
formats:

• real, e.g. 2.71678


• integer, e.g. 3
• date, e.g. 12/08/2016
• time, e.g. 19:45:50
• currency, e.g. R$ 15.50

It is important that the correct format is chosen if some form of processing is to be done. If number
files undergo any form of file compression, then it tends to be lossless. Since it very important that
none of the information/data is lost.

If ASCII format is used to store text on a file, then ASCII table is used to store each of the characters.
For example, the word COMPUTER would be stored as either:

67 79 77 80 85 84 69 82 or %43 %4F %4D %50 %55 %54 %45 %52

(the first code is in denary and the second in hexadecimal).

Text files can also undergo file compression. These use complex algorithms that work on redundancy
or repeated sections of words (e.g. OU in yOUr, cOUntry or mOUntain). The following section shows,
in very simple terms, how this could work:

The phrase ‘THIS SECTION SHOWS YOU HOW THIS WOULD WORK’ consists of 35 memory units
(ignoring spaces). Repeated words, such as ‘THIS’ could be put into a data dictionary and be
replaced by ‘1’. Repeated word sections, such as ‘HOW’ and ‘OU’ could be replaced by the numbers
‘2’ and ‘3’. Our phrase then becomes ‘1 SECTION S2S Y3 2 1 W3LD WORK’.

Again, ignoring spaces, this compressed form now uses only 23 memory units.

This is about a 33% saving in file size. Obviously if whole pages are to be stored, then repeated
words and word sections become even more numerous. Compression algorithms take many things
into account when creating these compressed files – but this is outside the scope of this textbook.
This is clearly an example of lossless compression since the original phrase can be reformed if
necessary using the data dictionary and compressed file.

The City School DHA Campus 36 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

Past Paper Questions: Paper 1 Theory

The City School DHA Campus 37 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

The City School DHA Campus 38 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

Paper 1 Theory

The City School DHA Campus 39 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

Paper 1 Theory

[6]
The City School DHA Campus 40 M Shoaib Ishtiaq(Computer Science)
Unit 5-6 Input, Output and Storage devices V2019

The City School DHA Campus 41 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

The City School DHA Campus 42 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

Paper 1 Theory

The City School DHA Campus 43 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

The City School DHA Campus 44 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

Paper 1 Theory

The City School DHA Campus 45 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

The City School DHA Campus 46 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

Paper 1 Theory

The City School DHA Campus 47 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

Paper 1 Theory

The City School DHA Campus 48 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

The City School DHA Campus 49 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

Paper 1 Theory

The City School DHA Campus 50 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

The City School DHA Campus 51 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

The City School DHA Campus 52 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

Paper 1 Theory

The City School DHA Campus 53 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

The City School DHA Campus 54 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

The City School DHA Campus 55 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

Paper 1 Theory

The City School DHA Campus 56 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

The City School DHA Campus 57 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

The City School DHA Campus 58 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

Paper 1 Theory

The City School DHA Campus 59 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

The City School DHA Campus 60 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

The City School DHA Campus 61 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

The City School DHA Campus 62 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

Paper 1 Theory

The City School DHA Campus 63 M Shoaib Ishtiaq(Computer Science)


Unit 5-6 Input, Output and Storage devices V2019

The City School DHA Campus 64 M Shoaib Ishtiaq(Computer Science)


Unit 7 High- and low-level language V2019

Unit 7
High- and low-level languages
7.1 Programming languages
7.2 Translators
7.3 What happens when things go wrong?

Candidates should be able to:


High- and low-level languages and their translators

• show understanding of the need for both high-level and low-level languages

• show understanding of the need for compilers when translating programs


written in a high-level language

• show understanding of the use of interpreters with high-level language


programs

• show understanding of the need for assemblers when translating programs


written in assembly language
Scheme of Work

Programming concepts
Recommended prior knowledge
Learners need to have studied Units 6 and 7 before starting this unit.

Context
This unit completes the process of converting an algorithm from an abstract idea to a working
computer program. A range of different types of programming languages exist; this unit looks at the
different levels of language and the processes for translation into machine code. It also provides
learners with opportunities to convert algorithms into functional programs. Candidates are not
expected to have expertise in any specific computer language, but to understand the basic principles
of syntax.
It is essential that learners have the opportunity of writing programs using a high-level
programming language, such as Visual Basic, Delphi/Pascal or Python. Scratch and a control
programming language could be used during the early stages of the delivery of this unit in order to
introduce learners to programming concepts and routines. References to programming languages are
given in the resource lists below.

Outline
Following consideration of the concepts of sequence, selection and repetition, writing an
algorithm as a flowchart and in pseudocode, and identifying and correcting errors in pseudocode, this
unit looks at the need for high-level and low-level languages. It considers the use of assemblers,
interpreters and compilers for translation of the code written by a programmer into machine code that
can be used by the processor.
Learners have the opportunity of using a number of different high-level languages to produce
working programs. They will be able to develop their programming skills, of iteration by the use of
FOR…NEXT, REPEAT…UNTIL and WHILE…DO loops and to incorporate the use of arrays into their
programming.

Suggested teaching time


Based on a total time allocation of 130 contact hours for this Cambridge O Level Computer Science
course, it is recommended that this unit should take about 12 hours.

The City School DHA Campus 1 M Shoaib Ishtiaq(Computer Science)


Unit 7 High- and low-level language V2019

Syllabus ref Learning objectives Suggested teaching activities


1.3.7 Show understanding of the need for Whole class brainstorms the nature
both high-level and low-level of a program and its requirements
languages (data input and output; manipulation
Show understanding of the need for of data of various types and
assemblers when translating structures; sequence, selection,
programs written in assembly repetition and subprogram
language intercommunication; the concepts of
totals and counting). (W)
Teacher introduces learners to
different types of programming
languages by considering:

programming in machine-specific
types of language (machine
language and assembly language)

languages

translation program for assembly


language
they are still used for certain
applications. (W)

1.3.7 Show understanding of the need for Learners research the characteristics
compilers when translating programs of high-level languages; the need for
written in a high-level compiler and/or interpreter
language translation programs for these
Show understanding of the use of languages; why they are preferred
interpreters with high-level language for many applications. (G)/(I)
programs

In this unit you will learn about:


• programming languages
• high-level languages
• low-level languages

• translators
• compilers
• interpreters
• assemblers.

The City School DHA Campus 2 M Shoaib Ishtiaq(Computer Science)


Unit 7 High- and low-level language V2019

Programming language
A programming language is a vocabulary and set of grammatical rules for instructing a
computer or computing device to perform specific tasks. The term programming language usually
refers to high-level languages, such as Scratch. BASIC, C, C++, COBOL, Java, FORTRAN, Ada, and
Pascal.

An Example of a Scratch Program

A Computer Program is a list of instructions that enable a computer to perform a specific task.
Computer programs can be written in high and low level languages, depending on the task and the
hardware being used.
So, what’s the difference between high level language and low level language?

High-level languages
When we think about computer programmers, we are probably thinking about people who write
in high-level programming languages.
High level languages are written in a form that is close to our human language, enabling to
programmer to just focus on the problem being solved.
No particular knowledge of the hardware is needed as high level languages create programs that are
portable and not tied to a particular computer or microchip.
These programmer friendly languages are called ‘high level’ as they are far removed from
the machine code instructions understood by the computer.
Examples include: C++, Java, Pascal, Python, and Visual Basic.
Advantages
 Easier to modify as it uses English like statements
 Easier/faster to write code as it uses English like statements
 Easier to debug during development due to English like statements
 Portable code – not designed to run on just one type of machine

The City School DHA Campus 3 M Shoaib Ishtiaq(Computer Science)


Unit 7 High- and low-level language V2019

Low-level languages
Low level languages are used to write programs that relate to the specific architecture and hardware
of a particular type of computer.

They are closer to the native language of a computer (binary), making them harder for programmers
to understand.

Low level refers to:

 Assembly Language
 Machine Code

Assembly Language
Few programmers write programs in low level assembly language, but it is still used for developing
code for specialist hardware, such as device drivers.
It is easy distinguishable from a high level language as it contains few recognisable human words but
plenty of mnemonic code.

Advantages

 Can make use of special hardware or special machine-dependent instructions (e.g. on the
specific chip)
 Translated program requires less memory
 Write code that can be executed faster
 Total control over the code
 Can work directly on memory locations

Machine Code

Programmers rarely write in machine code (binary) as it is difficult to understand.

The City School DHA Campus 4 M Shoaib Ishtiaq(Computer Science)


Unit 7 High- and low-level language V2019

Translators
Computers only understand machine code (binary), this is an issue because programmers prefer to
use a variety of high and low-level programming languages instead.

To get around the issue, the high-level and low-level program code (source code) needs to pass
through a translator.

A translator will convert the source code into machine code (object code).

There are several types of translator programs, each able to perform different tasks.
Compiler

Compilers are used to translate a program written in a high-level language into machine code (object
code).

Once compiled (all in one go), the translated program file can then be directly used by the computer
and is independently executable.

Compiling may take some time but the translated program can be used again and again without the
need for recompilation.

An error report is often produced after the full program has been translated. Errors in the program
code may cause a computer to crash. These errors can only be fixed by changing the original source
code and compiling the program again.

Interpreter

Interpreter programs are able to read, translate and execute one statement at a time from a high-level
language program.

The interpreter stops when a line of code is reached that contains an error.

Interpreters are often used during the development of a program. They make debugging easier as
each line of code is analysed and checked before execution.

Interpreted programs will launch immediately, but your program may run slower than a complied file.

No executable file is produced. The program is interpreted again from scratch every time you launch
it.

The City School DHA Campus 5 M Shoaib Ishtiaq(Computer Science)


Unit 7 High- and low-level language V2019

Assembler

Assemblers are used to translate a program written in a low-level assembly language into a machine
code (object code) file so it can be used and executed by the computer.

Once assembled, the program file can be used again and again without re-assembly.

Summary of translators
Compiler Interpreter Assembler

Temporarily executes high-level Translates low-level


Translates high-level languages
languages, one statement at a assembly code into
into machine code
time machine code

No executable file of machine An executable file of


An executable file of machine code
code is produced (no object machine code is produced
is produced (object code)
code) (object code)

Compiled programs no longer Interpreted programs cannot be Assembled programs no


need the compiler used without the interpreter longer need the assembler

One low-level language


Error report produced once entire Error message produced
statement is usually
program is compiled. These errors immediately (and
translated into one
may cause your program to crash program stops at that point)
machine code instruction

Interpreted code is run through


Compiling may be slow, but the
the interpreter (IDE), so it may
resulting program code will run
be slow, e.g. to execute
quick (directly on the processor)
program loops

One high-level language statement


may be several lines of machine
code when compiled

Syntax Error
A syntax error is an error in the source code of a program. Since computer programs must follow
strict syntax to compile correctly, any aspects of the code that do not conform to the syntax of
the programming language will produce a syntax error.
Unlike logic errors, which are errors in the flow or logic of a program, syntax errors are small
grammatical mistakes, sometimes limited to a single character. For example, a missing semicolon at
the end of a line or an extra bracket at the end of a function may produce a syntax error. In
the PHP code below, the second closed bracket would result in a syntax error since there is only one
open bracket in the function.

Function testFunction()
{
echo "Just testing.";
}}

The City School DHA Campus 6 M Shoaib Ishtiaq(Computer Science)


Unit 7 High- and low-level language V2019

Logic Error

A logic error (or logical error) is a mistake in a program's source code that results in incorrect or
unexpected behavior. It is a type of runtime error that may simply produce the wrong output or may
cause a program to crash while running. Many different types of programming mistakes can cause
logic errors. For example, assigning a value to the wrong variable may cause a series of unexpected
program errors. Multiplying two numbers instead of adding them together may also produce unwanted
results. Even small typos that do not produce syntax errors may cause logic errors. In the PHP code
example below, the if statement may cause a logic error since the single equal sign (=) should be a
double equal sign (==).

Incorrect: if ($i=1) { ... }

Correct: if ($i==1) { ... }


In PHP, "==" means "is equal to," while "=" means "becomes." Therefore, the incorrect if statement
always returns TRUE, since assigning 1 to the variable $i returns a TRUE value. In the correct code,
the if statement only returns TRUE if $i is equal to 1. However, since the syntax of the incorrect code
is acceptable, it will not produce a syntax error and the code will compile successfully. The logic error
might only be noticed during runtime. Because logic errors are often hidden in the source code, they
are typically harder to find and debug than syntax errors.

The City School DHA Campus 7 M Shoaib Ishtiaq(Computer Science)


Unit 7 High- and low-level language V2019

Past Paper Questions:

Paper 1 Theory
Annie writes a paragraph of text as an answer to an examination question about
programming languages.
Using the list given, complete Annie’s answer by inserting the correct missing terms. Not
all terms will be used.
• Assembly
• Converter
• Denary
• Hexadecimal
• High-level language
• Low-level language
• Machine Code
• Source Code
• Syntax
• Translator
The structure of language statements in a computer program is called the
....................................................................... . A programming language that uses natural
language statements is called a ....................................................................... . When
programs are written in this type of language they need a
....................................................................... to convert them into
....................................................................... .
A programming language that is written using mnemonic codes is called
....................................................................... language. This is an example of a
....................................................................... . [6]

Paper 1 Theory

The City School DHA Campus 8 M Shoaib Ishtiaq(Computer Science)


Unit 7 High- and low-level language V2019

Paper 1 Theory

The City School DHA Campus 9 M Shoaib Ishtiaq(Computer Science)


Unit 7 High- and low-level language V2019

Paper 1 Theory

The City School DHA Campus 10 M Shoaib Ishtiaq(Computer Science)


Unit 7 High- and low-level language V2019

Paper 1 Theory

The City School DHA Campus 11 M Shoaib Ishtiaq(Computer Science)


Unit 7 High- and low-level language V2019

Paper 1 Theory

Paper 1 Theory
Three programmers are working on different projects:
• Alice is developing a program written in a low-level language
• Akbar is developing a program written in a high-level language
• Alex is preparing a program written in a high-level language for sale
State, with reasons, which type of translator each programmer should use. Each
programmer should be using a different type of translator.

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

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

..................................................................................................................................................
...................................................................................................................................................
[6]

The City School DHA Campus 12 M Shoaib Ishtiaq(Computer Science)


Unit 7 High- and low-level language V2019

Paper 1 Theory

2.

The City School DHA Campus 13 M Shoaib Ishtiaq(Computer Science)


Unit 7 High- and low-level language V2019

The City School DHA Campus 14 M Shoaib Ishtiaq(Computer Science)


Unit 8 Security and ethics V2019

Unit 8
Security and ethics
8.1 Introduction
8.2 Security and data integrity
8.3 Cookies
8.4 Loss of data and data corruption
8.5 Firewalls and proxy servers
8.6 Security protocols
8.7 Encryption
8.8 Applications
8.9 Computer ethics
8.10 Free software, freeware and shareware
Candidates should be able to:

1.2.2 Security aspects


• Show understanding of the security aspects of using the Internet and understand what methods are
available to help minimize the risks
• Show understanding of the Internet risks associated with malware, including viruses, spyware and
hacking
• Explain how anti-virus and other protection software helps to protect the user from security risks

• Show understanding of the need to keep data safe from accidental damage, including corruption and
human errors
• Show understanding of the need to keep data safe from malicious actions, including unauthorized
viewing, deleting, copying and corruption
1.4.2
• Show understanding of how data are kept safe when stored and transmitted, including:
–– use of passwords, both entered at a keyboard and biometric
–– use of firewalls, both software and hardware, including proxy servers
–– use of security protocols such as Secure Socket Layer (SSL) and Transport Layer Security
(TLS)
–– use of symmetric encryption (plain text, cypher text and use of a key) showing
understanding that increasing the length of a key increases the strength of the encryption

1.4.3
• show understanding of the need to keep online systems safe from attacks including denial of service
attacks, phishing, pharming
1.4.4
• describe how the knowledge from 1.4.1, 1.4.2 and 1.4.3 can be applied to real-life scenarios
including, for example, online banking, and shopping
Ethics
Candidates should be able to:
• Show understanding of computer ethics, including copyright issues and plagiarism
• Distinguish between free software, freeware and shareware
• Show understanding of the ethical issues raised by the spread of electronic communication and
computer systems, including hacking, cracking and production of malware

The City School DHA Campus 1 M Shoaib Ishtiaq(Computer Science)


Unit 8 Security and ethics V2019

Data integrity and security


Recommended prior knowledge
This unit builds upon the concepts addressed in Unit 3 (Data communications and networking).

Context
With increased use of, and dependence on, computer systems in almost every aspect of modern life,
the importance of ensuring accuracy and integrity of information has become paramount. It is possible
for data to be corrupted as it is transferred from one system to another – whether between computer
systems or when entering data into a computer system. As the value of information held in and
transferred between computer systems has increased, there has been a tendency for criminal activity
such as hacking to increase at the same time.
Concepts covered in this unit will be used in practical activities in Units 6, 7 and 8.

Outline
The possible causes of loss of data integrity and security are considered, followed by a discussion of
preventative measures. The ethical and legal issues surrounding the use of computer systems are
also addressed. Note that learners are not required to know details of specific viruses and will not
gain credit for doing so.

Suggested teaching time


Based on a total time allocation of 130 contact hours for this Cambridge O Level Computer Science
course, it is recommended that this unit should take about 10 hours.

Syllabus Learning objectives Suggested teaching activities


ref
1.2.2 Show understanding of the security Learners work in groups to research and
1.4.2 aspects of using the Internet and create a leaflet/web pages on internet
understand what methods are available safety, addressing:
to help minimise the risks -ware and hacking and report
Show understanding of the Internet risks the internet risks associated with these
associated with malware, including
viruses, spyware and minimise the risks
Hacking -virus and other protection
Show understanding of how data are kept software help to protect the user from
safe when stored and transmitted, security risks
including: s, both entered at a
Use of passwords, both entered at a keyboard and biometric. (G)
keyboard and biometric
Use of firewalls, both software and Teacher input to describe technical/practical
hardware, including proxy servers issues around use of firewalls both software
Use of security protocols such as Secure and hardware, including proxy servers; use
Socket Layer (SSL) and Transport Layer of Secure Socket Layer (SSL). (W)
Security Learners carry out coding and decoding
(TLS) activities in pairs (P):
Use of symmetric encryption (plain text, use of symmetric encryption (plain text,
cypher text and use of a key) showing cypher text, use of a key) – differentiation by
understanding task will make this more challenging where
that increasing the length of a key necessary.
increases the strength of the encryption Learners attempt to decode some encrypted
messages from the Central Intelligence
Agency (CIA). (G)
Class brainstorm code-breaking and relative
ease of breaking each method. (W)
1.4.3 Show understanding of the need to keep In pairs or individually, learners research
online systems safe from attacks and create posters to explain safety from
including denial of phishing and pharming; other security issues
service attacks, phishing, that are down to user carelessness. (P)/(I)
pharming
1.2.1 Formative assessment activities Pairs of learners devise their own quiz
1.2.3 questions (and answers) on this unit (P)
The City School DHA Campus 2 M Shoaib Ishtiaq(Computer Science)
Unit 8 Security and ethics V2019

1.4.2 Teacher selects one or two quizzes to test


1.4.3 understanding. (W)
1.4.1 Show understanding of the need to keep Brainstorm ideas such as corruption of data
2.1.1 data safe from accidental damage, (reflect back on data transmission) and
including corruption human error (verification) to raise a range of
and human errors issues. (W)
Understand the need for validation and Learners then follow this with internet-based
verification checks to be made on input research to produce their own notes. (I)
data (validation could include range Teacher provides list of common
checks, length checks, type checks and applications (e.g. car registrations, test
check digits) marks, learner names, temperatures,
salaries) and learners identify possible
validation rules (P).
Teacher adds those that the class has not
identified (need to cover range checks,
length checks, type checks and check
digits). (W)
Calculation of check digits using ISBN (for
example) by teacher demonstration and
learner completion of a worksheet with a
selection of graded problems – both
calculating check digit and checking given
ISBN codes for validity. (I)
Class brainstorm and reflect the importance
of verification when data is transferred
between media and discuss possible
strategies for verifying input. (W)
1.4.1 Show understanding of the need to keep Brainstorm possible malicious actions
1.5 data safe from malicious actions, (including unauthorised viewing, deleting,
including unauthorised copying and corruption). (W)
viewing, deleting, copying and corruption Each group of learners researches one of
Show understanding of the ethical issues the issues and does a short presentation to
raised by the spread of electronic explain the implications and ways of
communication and computer systems, preventing each issue. No knowledge of any
including hacking, specific virus (name, action, etc.) is needed.
cracking and production (G)
of malware
1.4.3 Show understanding of the need to keep If learners have already worked through Unit
1.4.4 online systems safe from attacks 3, this will be revision in pairs or individually.
including denial of service attacks, (P)/(I)
phishing, pharming Learners research and create posters to
Describe how the knowledge from 1.4.1, explain safety from phishing and pharming;
1.4.2 and 1.4.3 can be applied to real-life other security issues that are down to user
scenarios carelessness. (G)
including, for example, online Teacher sets real-life scenarios to allow
banking, shopping each group of learners to investigate a
unique scenario. This leads to the
production of a poster/ leaflet/ presentation
covering ways in which real-life scenarios
can be compromised and how the issues
can be addressed. (G)
If Unit 3 has not been covered yet, the
activity above (phishing and pharming) can
be incorporated here. (P)/(I)
1.5 Show understanding of computer ethics, Teacher introduces issues of copyright and
including copyright issues and plagiarism plagiarism. Class brainstorms these issues
Distinguish between free software, leading to short notes. (W)
freeware and shareware Quizzes/tests to assess understanding of
the issues raised in Unit.4. (W)/(I)

The City School DHA Campus 3 M Shoaib Ishtiaq(Computer Science)


Unit 8 Security and ethics V2019

Security and data integrity


Data security refers to the protection of data against unauthorized access or corruption and is
necessary to ensure data integrity. That said, data integrity is a desired result of data security, but
the term data integrity refers only to the validity and accuracy of data rather than the act of protecting
data.
Data is threatened by malicious software, hackers or accidental damage. This section covers a
number of different security risks and considers ways to overcome or minimize them.

Data security
 Data security is the protection of data from unauthorized users.
 Only the authorized users are allowed to access the data
 Most of the users are allowed to access a part of the database i.e., the data that is related
to them or related to their department.
 Mostly, the DBA or head of department can access all the data in the database.
 Some users may be permitted only to retrieve data, whereas others are allowed to retrieve
as well as to update data.
 The database access is controlled by the DBA.
 He/she creates the accounts of users and gives rights to access the database.
 Users or group of users are given usernames protected by passwords.
 The user enters his/her account number (or user name) and password to access the data
from the database.
 For example, if you have an account in the “yahoo.com”, then you have to give your
correct username and password to access your account or e-mail.
 Similarly, when you insert your ATM card into the Automated Teller Machine (ATM), the
machine reads your ID number printed on the card and then asks you to enter your pin
code (or password). In this way, you can access your account.

Data Integrity

 Data integrity means that the data contained in the database is both correct and
consistent. For this purpose, the data stored in the database must satisfy certain types of
constraints (rules)
 For example, a balance for any account must not be less than zero. Such constraints are
enforced in the system by adding appropriate code in application programs. But, when
new constraints are added, such as balance should not be less than Rs. 5000, application
programs need to be changed. But, it is not an easy task to change programs whenever
required.
 Data in a database must be correct and consistent.
 So, data stored in the database must satisfy certain types of constraints (rules).
 DBMS provides different ways to implement such type of constraints (rules).
 This improves data integrity in a database.

The City School DHA Campus 4 M Shoaib Ishtiaq(Computer Science)


Unit 8 Security and ethics V2019

Security Integrity

Data security defines the prevention of data Data integrity defines the quality of data, which
corruption through the use of controlled access guarantees the data is complete and has a whole
mechanisms. structure.

Data security deals with the protection of data Data integrity deals with the validity of data

Data security is making sure only the people Data integrity is making sure the data is correct
who should have access to the data are the and not corrupt.
only ones who can access the data.

Data security refers to making sure that data is Data integrity refers to the structure of the data
accessed by its intended users, thus and how it matches the schema of the
ensuring the privacy and protection of data. database.

Authentication/authorization, encryptions and Backing up, designing a suitable user interface


masking are some of the popular means of and error detection/correction in data are some of
data security. the means to preserve integrity.

The Need for Security


Whether it be personal or commercial, data is really valuable so it is important to keep it safe.
Data is sometimes deleted or corrupted accidentally, but this can also happen as the result of
malicious actions. Either way, there are measures we can take to reduce the risk of this happening.
Deliberate unauthorised actions intended to cause damage by
Malicious Actions
viewing, deleting, copying or corrupting data

Unintended corruption, deletion or damage to data that is usually


Accidental Damage
caused by human error

Data corruption refers to errors in computer data that happen during


Data Corruption writing, reading, storage, transmission, or processing, which
create unintended changes to the original data

Reducing the risk of accidental damage or malicious actions on a local level


 Setting suitable access rights/user permissions, e.g. only allow staff to read/edit/delete the
files that are required for their job
 Password protecting individual files
 Running regular backups, to another device or the cloud
 Quality staff training
 Monitoring of staff computer activity
 Locking workstations when unattended
 Sensible naming of files
 Limiting the use of USB ports and email attachments
 Saving work on a regular basis in case of unexpected shutdown
 Use correct shutdown and start up procedures
 Keep storage devices in a safe place
 Set data to read only to prevent accidental editing
The City School DHA Campus 5 M Shoaib Ishtiaq(Computer Science)
Unit 8 Security and ethics V2019

The internet and security


The internet has created many additional opportunities for malicious damage to occur to our data or
the online systems we use. This is not surprising due to our reliance on the internet and the amount
of data we disclose over it.
These additional wider threats include:
 Hacking
 Malware (viruses and spyware)
 Phishing
 Pharming
 DOS Attacks

Hacking
Hacking is the illegal access to a computer system without the owner’s consent or knowledge.

In an age of networks that never sleep, hacking can be done remotely from anywhere.

Hacking poses a real threat to people and organizations,


damage can include:

 Loss of personal information, which could lead


to identity theft
 Wide scale loss of customer information
 Deleted or corrupted data

Ways to reduce the risk of hacking

 Use anti-hacking software


 Use of strong passwords and none obvious user ids
 Firewalls

Malware
Malware is any malicious software, but it is more commonly know as viruses and spyware.
A program or code that replicates itself; designed to amend, delete or
Viruses copy data or files on a user’s computer; often causes the computer to
crash or run slowly

Software that gathers information by monitoring key presses on a


Spyware
user’s keyboard; the data is sent back to the originator of the software
Malware damage can include:
 Unresponsive or slow computer performance
 Computer stops functioning properly or crashes
 Poor battery life
 Deleted files/data
 Corrupted files/data
 Unauthorized changes to settings
 Additional spyware downloaded
 Pop ups
 Access to all data entered, including passwords

The City School DHA Campus 6 M Shoaib Ishtiaq(Computer Science)


Unit 8 Security and ethics V2019

Ways to reduce the risk of malware


 Use anti-malware/anti-virus software
 Keep all software, including operating system, up to date
 Don’t download from unknown websites
 Be careful when opening email attachments
 Don’t click on pop ups
 Keep web browser security level medium or higher

Phishing
Phishing is the attempt to gain personal and sensitive information (usernames, passwords, financial
details) for a malicious purpose.

Phishing scams usually involve the receipt of a spoof


email where the criminal impersonates a trustworthy
and reputable business or organization such as a
bank, online store or social media website.

In the fake email, the criminal will try to trick the


victim into clicking on a link that will take them to a
website that is either infected with malware or to a
convincing clone of a real website where they freely
give their private details away without realising.

How to spot a phishing scam email

 Hover over ALL the links on the email and look at the URL. Are any misleading? (e.g.
apple.strangedomain.com)
 Poor spelling and grammar
 The message asks for personal information
 Generic greeting – the message doesn’t contain your name (e.g. dear valued customer)
 You didn’t initiate any action to cause the email
 You are asked for money
 The message makes threats (e.g. account closure if you don’t act now)
 The message says urgent action is required
 Unofficial ‘from’ address
 Attachments by email

Finally
Don’t be fooled just because a website looks realistic and contains official company logos. If
something doesn’t feel right, it probably isn’t.

Pharming
Pharming is a term used to describe a cyber scam where malicious code redirects a user to a fake
website without their knowledge.
Unlike phishing, pharming scams do not occur as a result of the user clicking a suspicious link or
opening an email attachment.
Pharming can lead to the loss of personal data, resulting in fraud and identity theft.
Stopping a pharming threat
 Be for clues that you have been redirected to a fake website
 Some anti-spyware can detect and remove pharming code

The City School DHA Campus 7 M Shoaib Ishtiaq(Computer Science)


Unit 8 Security and ethics V2019

Practice Questions:

1. Question
Complete the sentence.

 is a term used to describe a cyber scam where malicious code redirects a user

to a fake without their knowledge. Unlike , scams

do not occur as a result of the user a suspicious link or opening an email


attachment.

2. Question
Which of these are methods of spotting a potential phishing scam?

 You are asked for money

 Poor spelling and grammar

 The email is quite short

 You didn’t initiate any action to cause the email


3. Question
Which of these are potential methods of spotting a phishing scam?

 Email is sent overnight

 The message says urgent action is required

 Email does not contain a logo

 Generic greeting used


4. Question
Complete the sentence.

 Phishing scams usually involve the receipt of a spoof where the criminal
impersonates a trustworthy and reputable business or organization such as a bank, online
store or social media website. In the fake email, the criminal will try to trick the victim

into on a that will take them to a that is either


infected with malware or to a convincing clone of a real website where they freely give their
private details away without realising.

5. Question
Involves the receipt of a spoof email.

 Pharming

 Phishing

The City School DHA Campus 8 M Shoaib Ishtiaq(Computer Science)


Unit 8 Security and ethics V2019

Answers
1. Question
Complete the sentence.

o (Pharming) is a term used to describe a cyber scam where malicious

code redirects a user to a fake (website) without their knowledge.

Unlike , (Phishing, Pharming) scams do not occur as a

result of the user (clicking) a suspicious link or opening an email


attachment.
2. Question

Which of these are methods of spotting a potential phishing scam?

o You are asked for money

o Poor spelling and grammar

o The email is quite short

o You didn’t initiate any action to cause the email


3. Question

Which of these are potential methods of spotting a phishing scam?

o Email is sent overnight

o The message says urgent action is required

o Email does not contain a logo

o Generic greeting used


4. Question

Complete the sentence.

o Phishing scams usually involve the receipt of a spoof (email) where the
criminal impersonates a trustworthy and reputable business or organization such as a
bank, online store or social media website. In the fake email, the criminal will try to

trick the victim into (clicking) on a (link) that will take

them to a (website) that is either infected with malware or to a


convincing clone of a real website where they freely give their private details away
without realizing.
5. Question
Involves the receipt of a spoof email.

o Pharming

o Phishing

The City School DHA Campus 9 M Shoaib Ishtiaq(Computer Science)


Unit 8 Security and ethics V2019

Wardriving
Wardriving is the act of searching for Wi-Fi networks from a
moving vehicle. It involves slowly driving around an area with
the goal of locating Wi-Fi signals. This may be accomplished
by an individual or by two or more people, with one person
driving and others searching for wireless networks.

Wardriving may be as simple as searching for free Wi-Fi using


a smartphone inside an automobile. However, the definition
usually applies to a hardware and software configuration
specifically designed for locating and recording Wi-Fi networks.
Wardriving equipment typically includes:

1. A car or other automobile


2. A laptop
3. A Wi-Fi antenna
4. A GPS device
5. Wardriving software
Ways to reduce the risk of hacking
 Turn off your wireless network when you’re not home: This will minimize the chance of a
hacker accessing your network.
 Change the administrator’s password on your router: Router manufacturers usually
assign a default user name and password allowing you to setup and configure the router.
However, hackers often know these default logins, so it’s important to change the password
to something more difficult to crack.
 Enable encryption: You can set your router to allow access only to those users who enter
the correct password. These passwords are encrypted (scrambled) when they are transmitted
so that hackers who try to intercept your connection can’t read the information.
 Use a firewall: Firewalls can greatly reduce the chance of outsiders penetrating your network
since they monitor attempts to access your system and block communications from
unapproved sources. So, make sure to use the firewall that comes with your security software
to provide an extra layer of defense.

Cookies
Cookies are text files. They are stored on a user’s
computer by a web browser, at the request of the web
server.
A cookie is limited to a small amount of data and can
only be read by the website that created it.
To avoid the size limitations of cookies, some websites
will store a unique identification code in a cookie, and
the remainder of the data in their own databases.
Cookies are generally used to:
 Store and maintain user preferences on a website
 Track user behavior (analytics)
 Store items in shopping baskets
 Help advertisers show relevant website adverts
Cookies are not programs. They cannot perform any operations, they are not viruses or malware.
Cookies can be disabled in your browser settings, however this could make some websites unusable
(e.g. e-commerce).

The City School DHA Campus 10 M Shoaib Ishtiaq(Computer Science)


Unit 8 Security and ethics V2019

Loss of data and data corruption


Data corruption refers to errors in computer data that occur during writing, reading, storage,
transmission, or processing, which introduce unintended changes to the original data. Computer,
transmission, and storage systems use a number of measures to provide end-to-end data integrity, or
lack of errors.
The following are possible causes of data corruption:
1. Bad program exits
2. Malware/virus infections
3. Sudden loss of power--shutdown
4. Voltage spikes
5. Physical hardware issues
6. Any interruption in normal computer processes
7. Too Large of a database size
8. Connected to the network via wireless router

Firewalls and proxy servers


Firewalls
Firewalls are security systems designed to prevent unauthorized access to or from your computer or
private network. Firewalls can be implemented in hardware, software or a combination of both.

Firewalls sit between the user’s computer and the external network, examining the traffic and filtering
out any data that doesn’t meet a given set of criteria.
Firewall software will warn/ask the user when unknown or new software tries to access external data
sources. In short, firewalls are an essential tool in the fight to stop hackers and malware.

Proxy Servers
Proxy servers act as an intermediary between a user and a web server.

Proxy servers have the following main functions:


 Using cache, they can speed up access to a website by storing the pages after the first visit.
On later visits, the cache versions are used instead of the web server.
 Keep your identity (IP address) secret, accessing the internet via the proxy identity.
 Can serve as an additional firewall, providing greater protection from online threats.
 Allows internet traffic to be filtered, enabling the blocking of individual websites.

The City School DHA Campus 11 M Shoaib Ishtiaq(Computer Science)


Unit 8 Security and ethics V2019

Security protocols
Secure Sockets Layer
Secure Sockets Layer (SSL) uses authentication and encryption to create a widely used online
security protocol. SSL allows data to be sent and received securely over the internet.

SSL consists of a digital certificate, hosted on the web server, which:

 Your browser checks against a third party certificate authority to authenticate that the web
server is genuine and can be trusted
 Provides a public encryption key that is needed for the encryption of data to and from the web
server

You can tell that your connection to a website has been secured using SSL because:

 You will see HTTPS before the website URL


 There may be a padlock in the browser address bar
 The browser address bar may turn green

It is not necessary to use SSL to secure a website


unless you intend to deal with the transmission of
passwords, personal or financial information.

The stages when accessing a secure website:

1. The web browser attempts to connect to a web site which is secured by SSL
2. The web browser requests the web server to identify itself
3. The web server sends the web browser a copy of its SSL certificate
4. The web browser checks whether the SSL certificate is trustworthy; if it is then a message is
sent back to the web server to confirm this
5. The web server will then send back some form of acknowledgement to allow the
SSL encrypted session to begin
6. The encrypted data is then shared securely between the web browser and the web server

Transport Layer Security (TLS)

This more recent protocol is similar to SSL but with some improvements. TLS allows for session
caching, a method of resuming an existing secure connection rather than establishing a new one.

The TLS protocol comprises two layers: the TLS record protocol and the TLS handshake protocol.

 The handshake protocol is used to exchange all the information needed by both computers in
order to establish a secure SSL/TLS connection
 The record protocol handles the actual data and it’s encryption

The City School DHA Campus 12 M Shoaib Ishtiaq(Computer Science)


Unit 8 Security and ethics V2019

Encryption
What is encryption?
Encryption is the conversion of data (plain text) into a
form that is unreadable (cipher text).
Encryption allows us to protect data during transmission
and make it useless if hacked from a server.
The process of encryption involves secret
encryption/decryption keys and an encryption algorithm.
Encryption keys consist of a combination of letters and
numbers.
The longer the key, the harder it is to figure out, e.g. a
256 bit key is more secure than a 128 bit key.

Symmetric encryption
Symmetric encryption uses the same secret key to encrypt and decrypt the data.
Drawback
Using the same key to encrypt and decrypt creates a problem known as the key distribution problem.
In order to decrypt your ciphertext data, the receiver will need a copy of your secret key.
Sending the secret key over the internet causes a serious security risk – a hacker could intercept the
key and decrypt the ciphertext data too!
Other than physically transporting the key yourself, there is a solution to the key distribution problem.
It’s called asymmetric (or public key) encryption.

Asymmetric Encryption
Asymmetric encryption (sometimes called public key encryption) is a form of encryption where a pair
of keys are responsible for encrypting and decrypting data.
This is different to symmetric encryption where the same key is used to encrypt and decrypt.
Asymmetric encryption uses a special pairing of keys:
 Public key – anyone can ask for a copy
 Private key – remains private on the computer, never sent
 Both needed to decrypt
 Only public key is needed to encrypt
Because both keys are needed to decrypt, it doesn’t matter who sees the public key – all they can do
is encrypt data with it!
SSL uses a combination of symmetric and asymmetric encryption where:

 Asymmetric encryption resolves the key distribution problem, so that


 Data can be transmitted using symmetric encryption

Example process:

1. A symmetric key is encrypted by the sending computer using the public key sent by the
receiving computer (usually via SSL certificate)
2. The encrypted symmetric key is sent to the receiving computer (unreadable if intercepted)
3. Using the stored private key, and the readily available public key, the receiving computer
decrypts the symmetic key
4. Now, both computers have the same symmetric key ready for secure encrypted data
transmission
The City School DHA Campus 13 M Shoaib Ishtiaq(Computer Science)
Unit 8 Security and ethics V2019

Practice Questions:
1. Question
The part of an asymmetric encryption key that must remain secret. Needed to decrypt data.

 Private Key

 Public Key
2. Question
The same key is used to both encrypt and decrypt data

 Symmetric Encryption

 Asymmetric Encryption
3. Question
A 256 bit encryption key is more secure than a 128 bit key?

 True

 False
4. Question
The part of an asymmetric encryption key freely given to other computers to allow them to encrypt
data.

 Private Key

 Public Key
5. Question
Complete the sentence:

 Using the key to encrypt and decrypt creates a problem known as the

key problem. In order to decrypt your ciphertext data, the receiver will need a

copy of your secret . Sending the secret key over the causes a
serious security risk.

6. Question
Data that has been encrypted

 Binary

 Plain Text

 Ciphertext
7. Question
A form of encryption where a pair of keys are responsible for encrypting and decrypting data

 Symmetric Encryption

 Asymmetric Encryption
8. Question
Data that has not been encrypted

 Algorithm

 Plain Text

 Ciphertext

The City School DHA Campus 14 M Shoaib Ishtiaq(Computer Science)


Unit 8 Security and ethics V2019

Answers

1. Question
The part of an asymmetric encryption key that must remain secret. Needed to decrypt data.

o Private Key

o Public Key
2. Question
The same key is used to both encrypt and decrypt data

o Symmetric Encryption

o Asymmetric Encryption
3. Question
A 256 bit encryption key is more secure than a 128 bit key?

o True

o False
4. Question
The part of an asymmetric encryption key freely given to other computers to allow them to
encrypt data.

o Private Key

o Public Key
5. Question
Complete the sentence:

o Using the (same) key to encrypt and decrypt creates a problem known

as the key (distribution) problem. In order to decrypt your ciphertext

data, the receiver will need a copy of your secret (key). Sending the

secret key over the (internet) causes a serious security risk.


6. Question
Data that has been encrypted

o Binary

o Plain Text

o Ciphertext
7. Question
A form of encryption where a pair of keys are responsible for encrypting and decrypting data

o Symmetric Encryption

o Asymmetric Encryption
8. Question
Data that has not been encrypted

o Algorithm

o Plain Text

o Ciphertext

The City School DHA Campus 15 M Shoaib Ishtiaq(Computer Science)


Unit 8 Security and ethics V2019

Authentication
Authentication is the process of a user proving they are who they say they are, their identity.
This is often achieved by a username and password, however more recently biometrics are now being
used.
Biometrics

Biometrics is a term given to the calculation and use of


the measurable physical characteristics of a human.

Biometrics is becoming an increasingly popular form


of authentication to gain access to restricted computer
systems.

To achieve this, a person is uniquely identified by


examining one or more biological traits or behavioural
characteristics.

This can be instead of, or in conjunction with, a traditional password or pin.


Characteristics for biometric authentication can include:
 Fingerprints
 Facial recognition
 Retina or Iris patterns
 Voice recognition
 DNA
 Pulse / ECG
 Gestures / tap pattern (behavioural)

The Identification Process

1. A person’s unique characteristic is captured and stored in a database


2. When authentication is needed, a new record is captured
3. The new record is compared to the stored record in the database
4. If the data matches, the identity is confirmed

DOS (Denial of service) Attacks


Denial of service attacks (DOS attack) are carried out with the intention of stopping legitimate users
from accessing a web server or network.
The denial of service is achieved by flooding a network or server with so much useless traffic
that it can no longer cope, preventing everyone from accessing the websites or services stored upon
it.
The useless traffic flooding the server is often caused by many compromised systems (a botnet)
under the control of the attacker.
DOS attacks are usually temporary but can be very damaging during that time.
Victims can range from large companies through to individuals.
Although large companies are a bigger target, they are also often best placed to deal with
such an attack.

The City School DHA Campus 16 M Shoaib Ishtiaq(Computer Science)


Unit 8 Security and ethics V2019

Computer Ethics

Computer ethics refers to a set of principles to regulate the use of computers.

Ethics has become an important consideration due to the spread of computerized systems and
electronic communications.

Computer ethics can be broken down into the following main areas of consideration:

Intellectual Property Rights

 Copyright
 Plagiarism
 Cracking
 Software Licences

Privacy Issues

 Data Protection
 Anonymity
 Security (hacking, malware)

Effects on Society

 Jobs
 Environmental Impact
 Social Impact

The City School DHA Campus 17 M Shoaib Ishtiaq(Computer Science)


Unit 8 Security and ethics V2019

Free Software, Freeware and Shareware


Computer software is subject to copyright laws in order to protect its authors and provide them with
fair compensation for their hard work.
Without payment, there would be no incentive for programmers to spend years creating or maintaining
their software.
Some software is distributed free of charge, with this in mind it is important to understand the different
licenses connected to computer software.

Traditional Licence

Traditional software licences are easy to understand, you pay the author for the privilege of using their
software on a specified number of computers.

This does not give you any ownership of the software, or the right to modify and redistribute it to
others.

Free Software
The word ‘free’ in free software refers to the freedom to modify the source code and redistribute the
software.
The software may not actually be free of charge to download and purchase.

Freeware
Freeware is software that is distributed free of charge.
It is usually fully functional with no expiry date.
The author retains the copyright to the program.

Shareware
Shareware is software that is initially distributed free of charge, but may later require a payment to
unlock or keep functionality.
Allowing users to try your software in this way creates an interest in your program and allows people
to try before they buy.
Overview

Cost Modify source code? Fully functional? Expires?

Modification
Free There may be
and redistribution Yes No
Software a charge
allowed

Not allowed,
Freeware No charge developer retains Usually No
copyright

No initial Depends, some Program may only


Not
charge, there features may be work for a short
Shareware allowed, developer
may be a disabled until you duration, e.g. 30
retains copyright
charge later purchase days

The City School DHA Campus 18 M Shoaib Ishtiaq(Computer Science)


Unit 8 Security and ethics V2019

Practice Questions:
1. Question 7. Question
Software with no charge Free Software has an expiry date?
____________________
 False
2. Question  True
There may be a charge
 Freeware 8. Question
No initial charge, there may be a charge later
 Free Software
 Freeware
 Shareware
 Shareware
3. Question  Free Software
Redistribution is allowed, without needing
permission 9. Question
__________________ Comes with the source code?

4. Question  Free Software


Developer retains the copyright  Shareware
 Free Software  Freeware
 Freeware
10. Question
 Shareware Shareware is always fully functional

5. Question  False
The word ‘free’ in free software refers to…  True
 the lack of any charge
11. Question
 freedom to modify the source Allowed to modify the source code?
code
 Shareware
6. Question  Free Software
Software that may expire
 Freeware
 Free Software
 Freeware
 Shareware

The City School DHA Campus 19 M Shoaib Ishtiaq(Computer Science)


Unit 8 Security and ethics V2019

Answers
1. Question 7. Question
Software with no charge Free Software has an expirary date?
False

2. Question True
There may be a charge 8. Question
No initial charge, there may be a charge later
Freeware
Freeware
Free Software
Shareware
Shareware
Free Software
3. Question
Redistribution is allowed, without needing 9. Question
permission Comes with the source code?
Free Software
Shareware
4. Question
Developer retains the copyright Freeware
Free Software
10. Question
Freeware Shareware is always fully functional
Shareware False
True
5. Question
The word ‘free’ in free software refers to…
11. Question
the lack of any charge Allowed to modify the source code?
freedom to modify the source code Shareware
Free Software
6. Question
Software that may expire Freeware
Free Software
Freeware
Shareware

The City School DHA Campus 20 M Shoaib Ishtiaq(Computer Science)


Unit 8 Security and ethics V2019

Paper 1 Theory

The City School DHA Campus 21 M Shoaib Ishtiaq(Computer Science)


Unit 8 Security and ethics V2019

Paper 1 Theory

The City School DHA Campus 22 M Shoaib Ishtiaq(Computer Science)


Unit 8 Security and ethics V2019

The City School DHA Campus 23 M Shoaib Ishtiaq(Computer Science)


Unit 8 Security and ethics V2019

Paper 1 Theory

The City School DHA Campus 24 M Shoaib Ishtiaq(Computer Science)


Unit 8 Security and ethics V2019

The City School DHA Campus 25 M Shoaib Ishtiaq(Computer Science)


Unit 8 Security and ethics V2019

Paper 1 Theory

The City School DHA Campus 26 M Shoaib Ishtiaq(Computer Science)


Unit 8 Security and ethics V2019

Paper 1 Theory

Paper 1 Theory

The City School DHA Campus 27 M Shoaib Ishtiaq(Computer Science)


Unit 8 Security and ethics V2019

Paper 1 Theory

The City School DHA Campus 28 M Shoaib Ishtiaq(Computer Science)


Unit 8 Security and ethics V2019

The City School DHA Campus 29 M Shoaib Ishtiaq(Computer Science)


Unit 8 Security and ethics V2019

The City School DHA Campus 30 M Shoaib Ishtiaq(Computer Science)


Unit 8 Security and ethics V2019

Paper 1 Theory

The City School DHA Campus 31 M Shoaib Ishtiaq(Computer Science)


Unit 8 Security and ethics V2019

Paper 1 Theory

The City School DHA Campus 32 M Shoaib Ishtiaq(Computer Science)


Unit 8 Security and ethics V2019

Paper 1 Theory

0478/13 Paper 1 Theory October/November 2015

The City School DHA Campus 33 M Shoaib Ishtiaq(Computer Science)


Unit 8 Security and ethics V2019

2210/11 Paper 1 Theory May/June 2015


4 Choose six correct terms from the following list to complete the spaces in the paragraphs
below:
• encryption
• file name
• firewall
• HTML tags/text
• IP address
• protocol
• proxy server
• SSL certificate
• web server name
A user enters a URL. The web browser breaks up the URL into three components:
1 ........................................................

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

3 ........................................................
The web server returns the selected web page.
The web browser reads the ............................................................ from the selected page
and shows the correctly formatted page on the user’s screen. A
............................................................ is used between the user’s computer and the network
to examine the data traffic to make sure it meets certain criteria.
To speed up the access to the web pages next time, a ............................................................
is used between the computer and web server; this device uses a cache to store the website
home page after it has been accessed for the first time. [6]

The City School DHA Campus 34 M Shoaib Ishtiaq(Computer Science)


Unit 8 Security and ethics V2019

Viruses, pharming and phishing are all examples of potential Internet security issues.
Explain what is meant by each of these terms.
Virus .........................................................................................................................................
...................................................................................................................................................

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

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

Pharming ..................................................................................................................................
...................................................................................................................................................

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

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

Phishing ....................................................................................................................................
...................................................................................................................................................

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

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

[6]

The City School DHA Campus 35 M Shoaib Ishtiaq(Computer Science)


Unit 8 Security and ethics V2019

An online bank requires a client to supply an 8-digit code each time they wish to access
their account on the bank’s website.

Rather than ask the client to use a keyboard, they are requested to use an on-screen
keypad (shown on the right) to input the 8-digit code.

The position of the digits on the keypad can change each time the website is visited.

The client uses a mouse or touch screen to select each of the 8 digits.

Explain why the bank has chosen to use this method of entering the 8 digits.
...........................................................................................................................................

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

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

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

[2]

Name and describe measure that the bank could introduce to improve the
security of their website.

Name .................................................................................................................................

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

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

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

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

[2]

The City School DHA Campus 36 M Shoaib Ishtiaq(Computer Science)


Unit 8 Security and ethics V2019

The City School DHA Campus 37 M Shoaib Ishtiaq(Computer Science)


Unit 8 Security and ethics V2019

The City School DHA Campus 38 M Shoaib Ishtiaq(Computer Science)


INDEX

Sr# Date Topic Unit # Page # T.S P.S


Sr# Date Topic Unit # Page # T.S P.S
INDEX

(1st Term)

Sr# Date Description Marks T.S P.S

Teacher’s signature
Parent’s signature

(2nd Term)

Sr# Date Description Marks T.S P.S

Teacher’s signature
Parent’s signature

You might also like