You are on page 1of 128

O Level & IGCSE

Computer Science
Hardware & Software
Workbooks

59 riq
04 Ta
4
92 z
00 ba
03 ah
Sh

Compiled by
Seyyed Shahbaz Tariq
Contents
Syllabus content & assessment at a glance ............................................................................................3
1.3 Hardware and software ............................................................................................................................5
1.3.1 Logic Gates .........................................................................................................................................5
Examination Questions ...........................................................................................................................9

1.3.2 Computer architecture and the fetch-execute cycle ...................................................................... 20


Examination Questions ........................................................................................................................ 25

1.3.3 & 4 Input & Output Devices ............................................................................................................ 31


Examination Questions ........................................................................................................................ 45

1.3.5 Memory, storage devices and media.................................................................................................. 60


Examination Questions ........................................................................................................................ 74

59 riq
1.3.6 Operating systems ........................................................................................................................ 101
04 Ta
Examination Questions ...................................................................................................................... 104

4
1.3.7 High- and low-level languages and their translators .................................................................... 107
1.2.2 ........................................................................................................................................................... 109
92 z
00 ba
03 ah
Sh

Computer Science with Syed Shahbaz Tariq Page 2


Syllabus content & assessment at a glance
Sections Topics
Section 1 Theory of Computer Science
1.1 Data representation
1.1.1 Binary systems
1.1.2 Hexadecimal 1.1.3
Data storage
1.2 Communication and Internet technologies
1.2.1 Data transmission
1.2.2 Security aspects
1.2.3 Internet principles of operation
1.3 Hardware and software
1.3.1 Logic gates
1.3.2Computer architecture and the fetch-execute cycle
1.3.3 Input devices

59 riq
1.3.4 Output devices
1.3.5 Memory, storage devices and media
1.3.6 Operating systems
04 Ta
1.3.7High- and low-level languages and their

4
translators
1.4 Security
1.5 Ethics
92 z

Section 2 Practical Problem-solving and


00 ba

Programming
2.1 Algorithm design and problem-solving
2.1.1 Problem-solving and design 2.1.2
03 ah

Pseudocode and flowcharts


2.2 Programming
Sh

2.2.1 Programming concepts 2.2.2


Data structures; arrays
2.3 Databases
Assessment at a glance
Components Weighting
Paper 1 Theory 1 hour 45 minutes 60%
This written paper contains short-answer and structured questions. All
questions are compulsory.
No calculators are permitted in this paper. 75 marks
Externally assessed.
Paper 2 Problem-solving and Programming 1 hour 45 minutes 40%
This written paper contains short-answer and structured questions. All
questions are compulsory. 20 of the marks for this paper are from questions
set on the pre-release material. 1
No calculators are permitted in this paper. 50 marks
Externally assessed.

Computer Science with Syed Shahbaz Tariq Page 3


Paper 1
59 riq
04 Ta
4 Theory of Computer Science
92 z
00 ba
03 ah
Sh

Computer Science with Syed Shahbaz Tariq Page 4


1.3 Hardware and software
1.3.1 Logic Gates
Many electronic circuits have to make decisions. They look at two or more inputs and
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 recognise a logic gate from its truth table
• Recognise and use the following standard symbols used to represent logic
gates:

59 riq
• Produce truth tables for given logic circuits, for example:
04 Ta
a b c output

4
000
001
010
92 z

011
00 ba

100
101
110
03 ah

111
• Produce a logic circuit to solve a given problem or to implement a given
written logic statement, such as IF (switch A is NOT on) OR (switch B is on
Sh

use theAND switcehrmineNOT on)pthenfalarm, X, circuit. The process of doing this uses
se to det C is the out uts rom the sounds
electronic logic, which is based on digital switches called Logical Gates.
Logic gates are devices that can combine multiple inputs at independent logic levels and
come up with an output accordingly. They are used by implementing Boolean algebra.
Logic gates have two or more input and one output except NOT Gate which has one input
and one output.
The most common Logical Gates are given below:

For example, The most obvious use is for simple control. Imagine designing a washing
machine so that the water only turns on when the washing is loaded (logic-1), the door is
closed (logic-1) but the clothes are not yet wet (logic-0). This can be done by ANDing the first
two conditions, and inverting the third. Now, AND these together, and you get a high only
when all three conditions are satisfied.

Computer Science with Syed Shahbaz Tariq Page 5


Two or more logic gates can be connected to produce a logic circuit with one or more
outputs from two or more inputs.

Truth Tables:
"A truth table is used to show the output of a logic gate or circuit for all possible
combinations of input values."
Usually the binary values are used , 1 and 0, as shorthand for True and False.
The truth table for a two-input gate needs four rows (22=4) while for 3-input gate needs
eight rows (23=16).

1) NOT Gate (Inverter):


A NOT gate or an inverter is the simplest kind of logic gate. Its function is to give the
opposite output to its input - if it gets a high(1), it gives a low (0), and vice versa. This is
equivalent to saying that the output is not the input.

59 riq
NOT Gate
Input A Output A
0
04 Ta
1

4
1 0
92 z

The output (called X) is true (i.e. 1 or ON) when the INPUT A is NOT TRUE (i.e. 0 or OFF).
00 ba

2) AND Gate
An AND gate gives an output 1 only when both inputs are 1. If one or more inputs are 0,
then the output is also 0.
03 ah
Sh

AND Gate
Input A Input B Output x
0 0 000
0 1 1
1 0
1 1
The output (called X) is only true (i.e. 1 or ON) if the (INPUT A AND INPUT B) are both
true (i.e. 1 or ON).
3) OR Gate
An OR gate gives a high (1) output if any input is high (1). If all inputs are low (0), then the
output is low (0).
OR Gate
Input Input Output x

Computer Science with Syed Shahbaz Tariq 0300 9204594


A B
0 0 0
0 1 1
1 0 1
1 1 1

The output (called X) is true (i.e. 1 or ON) if the (INPUT A OR INPUT B) are true (i.e. 1 or
ON).
4) AND Gate
This NOT AND combination is shortened to just NAND. A NAND gate gives a 0 output only
when both inputs are 1. If one or more inputs is 0, then the output is 1.

NAND Gate
Input A Input A AND B OUTPUT X

59 riq
B
The output (called X) is true (i.e. 1 or ON) if 0 0 0 1
04 Ta
(INPUT A AND INPUT B) are NOT both true 0 1 0

4
1(i.e. 1 or ON). 1 0
0 1
92 z

1 1 1 0
00 ba

5) NOR Gate
This NOT OR combination is shortened to just NOR. A NOR gate gives a 1 output only if
no inputs are 1. If an input is 0, then the output is 0.
03 ah

NOR Gate
Input Input A OR B OUTPUT
Sh

A B X
0 0 0 1000
0 1 1
1 0 1
1 1 1

6) XOR Gate
The 'Exclusive-OR' gate is a circuit which will give a 1 output if either, but not both, of
its two inputs are 1. If both inputs are same then output will be 0 else output will be 1

XOR Gate
Input Input Output x
A B
0 0 00
1 1

Computer Science with Syed Shahbaz Tariq Page 7


1 0 1
1 1 0

Truth tables
A truth table is used to show the output of a logic gate or circuit for all possible
combinations of input values; we usually use the binary values, 1 and 0, as shorthand for
True and False.
The truth table for a two-input gate needs four rows.
Combinational logic circuits with two inputs

59 riq
Two or more logic gates can be connected to produce a logic circuit with one or more
outputs from two or more inputs. A logic circuit can process logical expressions and binary
numbers.
04 Ta
When producing a truth table for a logic circuit:

4
• it is helpful to add a column for each intermediate output as well as for the final output
• as for a single logic gate with two inputs, a logic circuit with two inputs needs four rows.
92 z

Combinational logic circuits with three inputs


00 ba

We only need to be able to produce a truth table for a logic circuit with a maximum of three
inputs and six gates.
The truth table for a three-input logic circuit needs eight rows.
03 ah

Designing simple logic circuits


Sometimes, it is cheaper to design and hard-wire a logic circuit for a simple automated
system that only requires a fixed pattern of output depending on the current values of the
Sh

inputs, than to program a microcontroller or computer.


We can use the words AND, OR, NOT, NAND and NAND as operators in a logical
equation, such as L = (A AND B) OR NOT B. We use brackets to indicate that the logical
operation within the brackets takes priority.
We can design a logic circuit to solve a written statement of a logical problem. First, we
rewrite the statement using brackets to clarify the binary value of each variable and the
priority of the logical operations. Then we can write the logical equation. From the logical
equation, if not an earlier stage in the rewriting process, it should be possible to draw the
required logic circuit and a truth table to confirm that it has the required behaviour.
Testing logic circuits
We have seen how to use a truth table to check whether a logic circuit has solved a given
problem, rather as we use a trace table for dry running a fl owchart or pseudocode
algorithm. We can also check that a logic circuit solves the problem by building the circuit
using logic simulation soft ware or electronic circuitry, with appropriate attention to safety.

Computer Science with Syed Shahbaz Tariq Page 8


Examination Questions
Q1) Identify each of the following gates from truth table:
INPUT 1 INPUT 2 OUTPUT
0 0 0 INPUT 1 INPUT 2 OUTPUT
0 1 11 0 0 0
1 0 1 0 1 00
1 1 1 0 1
1 1
INPUT OUTPUT
INPUT 1 2
0 0 1
0 1 0

59 riq
1 0 0
1 1 0
INPUT 1 INPUT 2 OUTPUT
04 Ta
0 0 11

4
INPUT OUTPUT
0 1 10
0 1
1 0
92 z

1 0
1 1
00 ba

Q2) Complete the following truth table


03 ah

INPUT 1 INPUT 2 OUTPUT


0 0
Sh

0 1
1 0
1 1

INPUT 1 INPUT 2 OUTPUT


0 0
0 1
1 0
1 1

Computer Science with Syed Shahbaz Tariq Page 9


Q3) Draw the logic circuit required to fulfil the following statements:
a Output C = (NOT(A AND B)) AND (A OR B)

b Light (L) is on if Switch A is on OR (Switch B is on AND Input C is off.

59 riq
04 Ta
4
92 z

Q4)Copy and complete the truth tables for the following logic circuits:
00 ba

INPUT 1 INPUT 2 OUTPUT


0 0
03 ah

0 1
1 0
Sh

1 1

INPUT 1 INPUT 2 OUTPUT


0 0
0 1
1 0
1 1

Computer Science with Syed Shahbaz Tariq Page 10


INPUT 1 INPUT 2 OUTPUT
0 0
0 1
1 0
1 1

59 riq
Q5) Specimen 2015 P1 (Q3)
An alarm, Y, sends a signal (Y = 1) when certain fault conditions in a chemical process
04 Ta
are detected. The inputs are:

4
92 z
00 ba
03 ah
Sh

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


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

A T S Y
1 1 1
1 1 0
1 0 1
1 0 0
0 1 1
0 1 0
0 0 1
0 0 0

Computer Science with Syed Shahbaz Tariq Page 11


(b)Complete the truth table for this alarm system. [4]
Q6) Winter 2014 P12-13
13 (a) Complete the truth table for the following logic circuit:

A B C Working 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

(b) Re-draw the logic circuit shown opposite, using NAND and NOR gates only

59 riq
04 Ta
4
92 z

(c) Write a logic statement that describes the following logic circuit:
00 ba
03 ah
Sh

...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[3]
(c) Write a logic statement that describes the following logic circuit:
A B C Working 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

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

Computer Science with Syed Shahbaz Tariq Page 12


Q7) Summer 2014 P11 (Q7)
(a) Draw the logic circuit for the logic statement:
X = 1 if (L is NOT 1 AND F = 1) OR (F is NOT 1 AND A is 1) [5]

(b) Complete the truth table for the above system [4]
L F A Working X
0 0 0

59 riq
0 0 1
0 1 0
0 1 1
04 Ta
1 0 0

4
1 0 1
1 1 0
92 z

1 1 1
00 ba

Q8) Summer 2014 P12 (Q17)


17 (a) Complete the truth table for the following logic circuit: [4]
03 ah
Sh

ABC Working X
000
001
010
011
100 101
110 111
(b) Write the logic statement to describe the following logic circuit: [3]

Computer Science with Syed Shahbaz Tariq Page 13


Q9) Winter 2013 P12 (Q10)

59 riq
(a) (i) Complete the truth table for the following logic circuit which is made up of NOR gates
only.
04 Ta
4
92 z
00 ba
03 ah

A B Working X
0 0
Sh

0 1
1 0
1 1

(ii) What single logic gate has the same function as the above circuit? [1]

(b) Complete the truth table for the following logic circuit.

Computer Science with Syed Shahbaz Tariq Page 14


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

Q10) Summer 2013 P11 (Q10)


(a) (i) Complete the truth table for the logic circuit which is made up of NAND gates
only.

59 riq
A
04 Ta
B Working X

4
1 1
1 0
0 1
92 z

0 0
00 ba

(ii) What single logic gate has the same function as the above logic circuit? [1]
(b) (i) Complete the truth table for the logic circuit.
03 ah
Sh

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

Computer Science with Syed Shahbaz Tariq Page 15


(ii) What could replace the whole logic circuit?
..........................................................................................................................................................
.................................................................................................................................................... [1]

Q11) Summer 2013 P12 (Q15)


(a) Draw the logic circuit represented by the logic statement:
X = 1 if (B is NOT 1 AND S is NOT 1) OR (P is NOT 1 AND S is 1)
[6]

59 riq
04 Ta
4
b) Complete the truth table for the above logic statement.
[4]
92 z
00 ba
03 ah
Sh

Q12) Winter 2012 P12 (Q11)


An alarm sounds when certain conditions occur in a nuclear reactor.
The output, X, of a logic circuit that drives the alarm must have a value of 1 if:
either carbon dioxide pressure too low and temperature < = 300°C
or water pressure > 10 bar and temperature > 300°C
The inputs to the system are:

Computer Science with Syed Shahbaz Tariq Page 16


(a) Draw the required logic circuit using AND, OR and NOT gates only.

[5]
(b) Complete the truth table for the above system. [4]
PTW X

59 riq
111
110
101 04 Ta
100
011

4
010 001
000
92 z
00 ba

Q13) Winter 2012 P13 (Q15)


15 (a) Complete the truth table for the following
logic circuit: [4]
03 ah

A B C X
1 1 1
Sh

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

(b) The above logic circuit uses AND, OR and NOT gates.
Name another logic gate and complete its truth table. [3]
Name : _______________________________________________

Computer Science with Syed Shahbaz Tariq Page 17


Q14) Summer 2012 P11 (Q12)
(a) (i) Complete the truth table for the following logic circuit, which is made up of NAND
gates:

(ii) What single logic gate has the same function as the above logic circuit?

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

59 riq
b) Complete the truth table for the following logic circuit:
04 Ta
A B C X

4
1 1 1
1 1 0
1 0 1
92 z

1 0 0
00 ba

0 1 1
0 1 0
0 0 1
03 ah

0 0 0
Sh

Q15) Specimen 2011 P1 (Q11)


Draw the truth table for the following logic network: [4]

A B CX
1 1 1
1 1 0
1 0 1
1 0 0
0 1 1
0 1 0
0 0 1
0 0 0

Computer Science with Syed Shahbaz Tariq Page 18


Q16) Specimen 2011 P1 (Q12)
Draw a logic network and truth table for the following logic problem:
"A sprinkler (S) is ON if
either temperature alarm (T) is ON and cooler alarm (C) is ON
or vent alarm (V) is OFF and cooler alarm (C) is ON" [9]
Working:
____________________________________________________________________
___________________________________________________________________ [2]
Logic Network:

59 riq
04 Ta
Truth Table:
4
92 z

T C V S
00 ba

1 1 1
1 1 0
1 0 1
03 ah

1 0 0
0 1 1
0 1 0
Sh

0 0 1
0 0 0

Computer Science with Syed Shahbaz Tariq Page 19


1.3.2 Computer architecture and the fetch-execute cycle

1.3.2 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
Courtesy to http://web.eecs.utk.edu/research/cs100modules/module1/index.html
Von Neumann Architecture
The idea about how computers should be built was proposed by John von Neumann in
1945. This idea is called the von Neumann Architecture or Model. This is still the basis
for computers today. Using these four components, a von Neumann computer will
execute a series of instructions, called a program, which are stored in the computer's

59 riq
memory. This is called the "stored program concept".
The components of von Neumann Architecture is:
04 Ta
1. Input/Output (I/O)

4
2. Memory
3. A Control Unit
4. An Arithmetic Logic Unit (ALU)
92 z

Input/Output (I/O) Devices


00 ba

The Input/Output (I/O) components of a computer are hardware


devices that are responsible for getting data from the computer to the
03 ah

user or from the user to the computer.


Data going from the user to the computer is called "input." The two
main input devices are the mouse and the keyboard.
Sh

Output devices are used to transmit data from the computer's


memory to the user. The two output devices almost every
computer system has are the monitor and the printer.
Memory Unit
Computer has several types of memory. Memory unit in the Von Neumann model is the
main memory, also called RAM or Random Access Memory.
Main memory is used by the computer for storing a program and its data while the
program is running. What distinguishes a computer from a calculator is the ability to run a
stored program; main memory allows the computer to do that.
RAM can be thought of as a sequence of boxes, called cells, each of which can hold a
certain amount of data.
The remaining three components of the von Neumann model of a computer are found
inside the Processor.

Computer Science with Syed Shahbaz Tariq Page 20


Control Unit
The control unit controls the sequencing and timing of all operations. It contains a "clock,"
that is actually a quartz crystal that vibrates million times per second. The clock emits an
electronic signal for each vibration. Each separate operation is synchronized to the clock
signal. For example 1st pc operates at 4.7 MHz means 4.7 million instructions per second.
The functions of CU are given below:
 Interprets and carries out instruction of program.
 Selects program statements from memory.
 Moves these instructions to instruction registers
 Carries out instructions
 Directs flow of data between components of CPU and to and from other
devices.
Arithmetic & Logic Unit (ALU)
Arithmetic unit perform arithmetical operations like

59 riq
+, -, *, and / while logical unit are to compare two
quantities. Logical operations are important in
computer programming.
04 Ta
ALU can be thought of as being similar to a

4
calculator, except that, in addition to normal math, it can
also do logical (true/false) operations.
92 z

The functions of ALU are given below:


00 ba

 The arithmetic unit carries out arithmetic like


addition, division.
 The logic unit enables the processor to make
03 ah

comparison like =, <, > and logical decisions like


AND, OR, NOT.
Sh

 The arithmetic logic unit carries out


communication with peripheral devices.
 It also carries out bit shifting operation.
Register:
Registers are Immediate Access Store (IAS) located on the CPU, and used temporarily
for storing data. Because the registers are close to the ALU, they are made out of fast
memory, efficiently speeding up calculations.
There are 14 registers. Some examples are

a) Program Counter (PC) - an incrementing counter that keeps track of the next
memory address of the instruction that is to be executed once the execution of the
current instruction is completed.
b) Memory Address Register (MAR) - the address in main memory that is currently
being read or written

Computer Science with Syed Shahbaz Tariq Page 21


c) Memory Buffer/Data Register (MBR/MBR) - a two-way register that holds data
fetched from memory (and ready for the CPU to process) or data waiting to be stored
in memory
d) Current Instruction register (CIR) - a temporary holding ground for the instruction
that has just been fetched from memory
e) Accumulator Register (AC) is used for storing data for ALU to process and the
results those are produced by the ALU.

Buses: ''The set of wires used to travel signals to and from CPU and different
components of computer is called Bus.''
Bus is a group of parallel wires that is used as a communication path. As a wire
transmits a single bit so 8-bits bus can transfer 8 bits (1 byte) at a time and 16-bits bus can
transfer 16 bits (2 bytes) and so on. There are three types of buses according to
three types of signals, these are:
a) Data Bus: ''The buses which are used to transmit data between CPU, memory and

59 riq
peripherals are called Data Bus.''
b) Address Bus: ''The buses which are connecting the CPU with main memory and
04 Ta
used to identify particular locations (address) in main memory where data is stored

4
are called Address Buses.''
c) Control Bus: The wires which are used to transmit the control signals (instructions)
92 z

generated by Control Unit to the relevant component of the computer.


Fetch-Execute Cycle:
00 ba

At its core, all the computer ever does is, execute one instruction in memory after
another, over and over. Although there are many different
03 ah

possible (assembly language) instructions that the


computer can execute, the basic steps involved in
executing an instruction are always the same, and they
Sh

are called the instruction cycle.


1. Fetch the instruction (transfer the instruction from
main memory to the decoder)
2. Decode the instruction (from machine language)
3. Execute the instruction (e.g., add, divide, load,
store...)
4.Store the result (for instructions like ADD, place
the 'answer' in the specified register.)

The control unit guides the computer's components through this cycle to execute one
instruction.
When that instruction is done, the cycle starts all over again with the next instruction.

Computer Science with Syed Shahbaz Tariq Page 22


Registers/circuits involved

The circuits used in the CPU during the cycle are:

59 riq
 Program Counter (PC) - an incrementing counter that keeps track of the next
memory address of the instruction that is to be executed once the execution of the
04 Ta
current instruction is completed.

4
 Memory Address Register (MAR) - the address in main memory that is currently
being read or written
92 z

 Memory Buffer Register (MBR) - a two-way register that holds data fetched from
00 ba

memory (and ready for the CPU to process) or data waiting to be stored in
memory
 Current Instruction register (CIR) - a temporary holding ground for the
03 ah

instruction that has just been fetched from memory


 Accumulator Register (AC) is used for storing data for ALU to process and the
Sh

results those are produced by the ALU.


 Control Unit (CU) - decodes the program instruction in the CIR, selecting
machine resources such as a data source register and a particular arithmetic
operation, and coordinates activation of those resources
 Arithmetic logic unit (ALU) - performs mathematical and logical operations

Register notation
To describe the cycle we can use register notation. This is a very simple way of noting all
the steps involved. In all cases where you see brackets e.g. [PC], this means that the
contents of the thing inside the brackets is loaded. In the case of the first line, the
contents of the program counter is loaded into the Memory Address Register.
MAR [PC]
MBR [Memory] ; PC [PC] +1 (Increment the PC for next cycle at the same time)
CIR [MBR]
CIR executes

Computer Science with Syed Shahbaz Tariq Page 23


Detailed description of Fetch-Decode-Execute Cycle
To better understand what is is going on at each stage we'll now
look ak at a detailed description:

The contents of the Program


Program Counter, the address of the next instructio
ruction to be executed,
is placed into the Memory Address Register
Re

59 riq
04 Ta
4
92 z
00 ba
03 ah

The address is sent from the MAR M along the address bus to the Ma
Mainin Memory. The
instruction at that address
ess is found
f and returned along the
Sh

Register. At the same time e tthe contents of the Program Counter is in


increased by 1, to
reference the next instructio
nstruction to be executed.

The MBR loads the Curren


entt Instruction Register with the instruction to b
be executed.
The instruction is decoded and executed
e using the ALU if necessary.
cessary.
The Cycle starts again!
Activity
grams showing each step of the fetch dec
Complete the following diagram ecode execute cycle:

59 riq
04 Ta
4
92 z
00 ba
03 ah
Sh

Examination Questions
Q1) Describe what differs rs a computer with a calculator
.... .............. ........................................................................................
.. ..........................
.................................. .....................................
.. ......................................................... [1]

Q2) Differentiate an ALU with it a calculator.


.... .............. ........................................................................................
.. ..........................
.................................. .........................................................................
.. ..................... [1]
Sh
03 ah
00 ba
92 z
04 Ta
59 riq
4
Sh
03 ah
00 ba
92 z
04 Ta
59 riq
4
Q3) Von Neumann gave the idea how computer should be built.
a) Describe the purpose of each of the following parts of a processor:
(i) Control unit
.... .............. ................................................................................................................
.................................. ............................................................................................ [1]

(ii) Arithmetic & Logic unit


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

(iii) Register
.... .............. ................................................................................................................
.................................. ............................................................................................ [1]

59 riq
b) Draw and label the diagram of von Neumann architecture.
04 Ta
4
92 z
00 ba
03 ah

Q4) Draw the diagram and describe the stages of fetch-execute cycle.
Sh

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

Computer Science with Syed Shahbaz Tariq Page 26


Q5) Jo buys a notebook computer which has a 3MHz quad-core central processing unit
(CPU).

(a) State the purpose of the CPU.


.... .............. ................................................................................................................
.................................. ............................................................................................ [1]
(b) Describe what is meant by
3MHz CPU
.......................................................................................................................................

59 riq
.......................................................................................................................................
.......................................................................................................................................
................................................................................................................................ [2]
quad-core CPU
04 Ta
4
.......................................................................................................................................
.......................................................................................................................................
92 z

.......................................................................................................................................
00 ba

................................................................................................................................. [2]
Q6) (9693_13w_q12)
There are 4 processor component terms on the left and 10 descriptions of functions on
03 ah

the right. Draw a line connecting each description to the correct component.
Sh

Computer Science with Syed Shahbaz Tariq Page 27


59 riq
04 Ta
4
92 z
00 ba
03 ah
Sh

Computer Science with Syed Shahbaz Tariq Page 28


Q 7) Name 3 registers involved in the Fetch Execute Cycle and describe what each
does:
1. ........................................................................................................................................
........................................................................................................................................ 2.
........................................................................................................................................
........................................................................................................................................ 3.
........................................................................................................................................
................................................................................................................................... [3]
Q8) Describe the purpose of the following registers in a processor:
(i) Program Counter (Sequence Control Register).
.............................................................................................................................................
........................................................................................................................................ [1] (ii)
Current Instruction Register.

59 riq
.............................................................................................................................................
........................................................................................................................................ [1]
04 Ta
(iii) Memory Address Register.

4
.............................................................................................................................................
........................................................................................................................................ [1]
92 z
00 ba

(iv) Memory Data Register.


.............................................................................................................................................
03 ah

........................................................................................................................................ [1]
(v) Accumulator
Sh

.............................................................................................................................................
........................................................................................................................................ [1]
Q9) Describe two stages of the fetch/execute cycle which would change the contents of
the MAR. State clearly, in each case, what the MAR contains.
.............................................................................................................................................
.............................................................................................................................................
....................................................................................................................................... [2]

Q10) (i) State what is held in the Program Counter (PC) during the fetch/execute cycle.
.............................................................................................................................................
...................................................................................................................................... [1]
(ii) Explain how the contents of the PC change during the fetch/execute cycle.

Computer Science with Syed Shahbaz Tariq Page 29


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

Q11) (b) At a particular point in a program, the program counter (PC) contains the value
200. State the expected value contained in the PC after the instruction held at location
200 has been fetched. Explain your answer.
.............................................................................................................................................
...................................................................................................................................... [1]

Marking Scheme
Q5)
a) To carry out the processing on the
computer/To (fetch and) execute instructions'

59 riq
b) 3MHz. Two from
3MHz is the clock speed / how fast the
04 Ta
processor is
Indicates how many instructions may be

4
processed in each second
Indicates how many clock cycles per
92 z

second
00 ba

c) Quad core
The computer has 4 cores...
…which are independent processors within the CPU ..
03 ah

... working simultaneously / can perform


multiple tasks
Q6)
Sh

Computer Science with Syed Shahbaz Tariq Page 30


1.3.3 & 4 Input & Output Devices
1.3.3 Input devices
• describe the principles of operation (how each device works) of a range of input devices
including 2D and 3D scanners, barcode readers, digital cameras, keyboards, mice, touch screens,
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/acidity/alkalinity and
motion/infra-red
• 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 a range of output devices, including: inkjet, laser and 3D
printers; 2D and 3D cutters; speakers and headphones; actuators; flat-panel display screens,

There are two different categories of input device. They are:

59 riq
 Manual Input Devices : With a manual input device the user must enter data into
the computer by hand. e.g. mouse, keyboard, scanner.
04 Ta
 Direct Data Entry (DDE) Devices : A direct data entry device can transfer

4
information automatically from a source document such as a form or barcode into
the computer. The user does not need to manually enter the information. e.g.
92 z

optical mark recognition, smart cards.


00 ba

There are many different input devices available. Each input device is suitable for a
different purpose. Below you will find descriptions of the most common manual input and
direct data entry devices.
03 ah

Manual Input Devices


With a manual input device the user must enter data into the computer by hand. e.g.
Sh

mouse, keyboard, scanner.


Keyboard
Almost all computers are supplied
with a keyboard. A keyboard has
over 100 keys on it. When you press
a key a number (code) is sent to the
computer to tell it which key you
have pressed. The keys are
arranged in four groups :

The keys on a keyboard are usually arranged in the same order as those on a typewriter.
This layout of keys is called QWERTY because Q-W-E-R-T-Y is the order in which the
letters occur on the top row of the keyboard. Some newer designs have the letters
Sh
03 ah
00 ba
92 z
04 Ta
59 riq
4
arranged in a different order. Most people find the QWERTY arrangement best as they
have had some practice using it, but users trained on the new keyboards can type faster
than the fastest typists can on QWERTY keyboards.
Advantages of using keyboards for data input include
Entering data and instructions with keyboards is generally faster than with pointing
devices.
Disadvantages of using keyboards for data input include
It takes a lot of time to practice in order to type quickly and accurately.
Typing speeds are still very slow when compared with computer speeds.
Concept Keyboard
A concept keyboard is a flat board which contains a
grid of switches. Each switch can be programmed to do
whatever you want. An overlay image is placed on top of
the grid so that the user can tell what pressing on

59 riq
different areas (switches) will do.
Example uses of concept keyboards include :
 Games for young children : The overlay
04 Ta
image could be a picture of a farmyard. Pressing

4
on an animal would cause the
computer to make the noise the animal does.
92 z

 Tills in restaurants/pubs : The overlay


00 ba

contains a list of all the meals that can be


sold. Instead of typing in prices the waiter
simply presses the keyboard where the
03 ah

meals/drinks he is serving are listed.


Concept keyboards are particularly useful for people
Sh

who would find using an ordinary keyboard difficult


and in locations where an ordinary keyboard might
be damaged, e.g. by spillage or dust.
Touch Sensitive Screens
These screens do a similar job to concept keyboards.
A grid of light beams or fine wires criss-cross the
computer screen. When you touch the screen the
computer senses where you have pressed. Touch
screens can be used to choose options which are
displayed on the screen. Touch screens are not used
very often as they are not very accurate, tiring to use for a long period and are more
expensive than alternatives like a mouse. The main applications for which touch screens
are used is the provision of public information systems. Touch screen operated

Computer Science with Syed Shahbaz Tariq Page 32


computers can be found in places such as travel agents and airports.
Advantages of a touch screen include
No extra peripherals are needed except the monitor.
A touch screen allows easy access to commands, which are usually identified by words or
symbols on the screen.
Disadvantages of a touch screen include
Touch screens are not suitable for inputting a large amount of data because they require a
lot of arm movements.
Only items already on the screen can be selected.
Light Pen
A light pen is a special pen which you can point at any computer monitor. When the pen
is pointed at the screen the computer can work out where the pen is pointing. Light pens
can be used to "draw" on the screen or to select options from menus presented on the
screen. Light pens are extremely poor input devices. They are very inaccurate and tiring to

59 riq
use. Light pens are hardly ever used today.
Mouse
A mouse is the most common pointing device. You move the mouse around on a mat
04 Ta
and a small cursor called a pointer follows your movements on the computer screen. By

4
pressing a button on the mouse (most mice have 1,2 or 3 buttons) you can select options
using icons or menus on the screen. Mice can also be used to "draw" onto the
92 z

screen. They are particularly useful if your computer has a graphical user interface.
00 ba

Most mice use a small ball located underneath them to calculate the direction that you are
moving the mouse in. As you move the mouse this ball rotates. The mouse monitors how far
the ball turns and in what direction and sends this information to the computer to move the
03 ah

pointer.
Advantages of using a mouse include
Sh

A mouse is user-friendly for computer beginners.


A mouse is easy and convenient to use with a graphical user interface.
Using a mouse to select items or move to a particular position on the screen is faster
than using a keyboard.
Disadvantages of using a mouse include
It is not easy and convenient to input text with a mouse.
Issuing commands by using a mouse is slower than by using a keyboard. A
mouse is not accurate enough for drawings that require high precision. A
mouse usually requires a flat surface to operate.
A mouse needs more desk space to operate when compared with a trackball.
Tracker Ball
A tracker ball (or trackball) is an alternative to a mouse. It works in the same way as a
mouse except that the ball is on top. Turning the ball with your hand moves the pointer on
the screen. Tracker balls are used mainly when there is not enough space for a mouse.
e.g. in portable computers.

Computer Science with Syed Shahbaz Tariq Page 33


Advantages
A trackball is good for limited desk space because the user does not have to move the
entire device.
Disadvantages
A trackball is usually not as accurate as a mouse.
The ball mechanism of trackballs also requires more frequent cleaning than a mouse.
Joystick
Joysticks are used to play computer games. You can move a standard joystick in any
one of eight directions. The joystick tells the computer in which direction it is being pulled and
the computer uses this information to e.g. move a spaceship on screen. A joystick may
also have several buttons which can be pressed to trigger actions such as firing a missile.
The best joysticks, called analogue joysticks measure how far the joystick is being moved
in the direction it is being pulled. This information is used to set how quickly the object on
the screen moves. The further you push the joystick the faster the object moves.

59 riq
Small joysticks called trackpoint devices are sometimes built into the keyboards of
portable computers and used instead of a mouse.
Advantages
04 Ta
A joystick allows fast interactions required in most games.

4
Disadvantages
It is difficult to use a joystick to select objects accurately on the screen.
92 z

Graphics Tablet
00 ba

Graphics tablets are used mainly by professional graphics designers. Using a graphics
tablet a designer can produce much more accurate drawings on the screen than he could
with a mouse or other pointing device. A graphics tablet consists of a flat pad (the tablet) on
03 ah

which the user "draws" with a special pen called a stylus. As the user "draws" on the pad
the image is created on the screen. The pad on which the user draws can be any size from
Sh

A5 to A1 (eight times as large as an A4 page). Drawings created using a graphics tablet


can be accurate to withing hundredths of an inch.
The stylus that the user draws with may have a button on it which will act like a mouse
button. Sometimes instead of a stylus a highly accurate mouse-like device called a puck is
used to draw on the tablet.
Scanner
A scanner can be used to input printed images such as photographs or pages of text
directly into the computer. A scanner works by shining a light at the image being scanned
and measuring how much light is reflected back using an optical sensor. The amount of
light that is reflected back tells the computer how light or dark the image is at each point. The
light and optical sensor reads information about one line of the image at a time. They must
be moved down the picture to input the whole image. There are two different
types of scanner :

Computer Science with Syed Shahbaz Tariq Page 34


 Flatbed Scanner : You place
the image on top of the scanner. The
scanner moves the light and sensor
itself and scans the whole image
automatically. Most flatbed scanners
are A4 size.
 Handheld Scanner : You must
manually push the light/sensor along
the image. Handheld
scanners are usually 5 inches wide.

Flatbed scanners are better as they can scan larger images and are more accurate than
handheld scanners. On the other hand handheld scanners are cheaper and more
portable. The price of flatbed scanners has fallen so much in recent years that handheld

59 riq
scanners are rarely sold now. A colour flatbed scanner can be purchased for around £100.
Optical Character Recognition (OCR) software can be used to read printed text from an
image that has been scanned and store it as text rather than an image. You can then edit the
04 Ta
text using a word processor or desktop publisher. OCR software is not yet sophisticated

4
enough to read hand-written text accurately.
Advantages of a scanner include
92 z

A scanner with appropriate OCR software can work as an OCR


00 ba

system.
Disadvantages of a scanner include
A scanner is best for two-dimensional objects only, difficult to scan 3-D
03 ah

objects
Scanned images usually take up a lot of storage space.
Sh

Digital Cameras
Digital cameras are used in the same way as standard photographic
cameras. Most digital cameras look just like ordinary cameras. Unlike
photographic cameras digital cameras do not use film. Inside a digital
camera is an array of light sensors. When a picture is taken the array
of sensors is used to input the image. The image can then be stored either in the camera's
RAM or on a floppy disk. Later the pictures can be transferred onto a computer for editing
using a graphics package.

Some digital cameras are available relatively cheaply, for about £300. However these
cameras do not take very good pictures. More expensive cameras can take higher quality
pictures but these are still not quite as good as standard photographs. Digital cameras are
extremely useful for tasks such as producing newsletters.
Video Digitiser

Computer Science with Syed Shahbaz Tariq Page 35


A video digitiser takes an image from a video camera or television and converts it so that
it can used by and stored on a computer. Almost all video digitisers now work in colour.
Unlike scanners video digitisers can capture moving video sequences as well as still
images. When a video sequence is captured the computer stores this as a sequence of still
images called frames. These images are displayed quickly one after the other (rather like
a flick-book) to create the illusion of a moving picture.
When you want to capture a video sequence you must tell the computer :
 Size : How big you want the image you capture to be. e.g. should it take up the
whole screen, 1/2 the screen, 1/8th of the screen ... ?
 Frame Rate : How frequently the frames should be captured from the video.
If you want to capture large images you may have to settle for a slow frame rate which will
make the captured video film look jittery. If you want a fast frame rate you may only be able
to capture a small image size. Video sequences captured using a video digitiser are often
used in multimedia presentations.

59 riq
Voice Recognition
Voice recognition systems listen to what people are saying and carry out the instructions
given to them when people speak. A microphone is used to provide input for a voice
04 Ta
recognition system. Currently these systems are not very sophisticated and are used only

4
for certain applications. Existing voice recognition systems come in two different
types :
92 z

 Systems which recognise only a few words but can understand most peoples
00 ba

voices. e.g. telephone banking computers.


 Systems which recognise a wide vocabulary but need to be trained to understand
each different voice. e.g. automatic dictation systems.
03 ah

In the last few years a number of voice dictation packages have been developed. These
packages let the user dictate text into a computer to appear in a word processed
Sh

document. Dictating like this can be much quicker than typing but the computer still makes
some mistakes especially with short words.

Computer Science with Syed Shahbaz Tariq Page 36


Direct Data Capture Devices
Direct data entry devices are used when large volumes of data must be entered into the
computer quickly. Consider how long it would take for the cashier to add up the cost of your
shopping if she had to enter the price of every item you purchased. Nowadays barcode
systems make this task much quicker. There are a variety of different direct data
entry devices available. Different devices are suitable for different applications (tasks).
Bar Code Readers
Bar codes are often printed on products that we buy and are used by shops to produce
bills for customers. A bar code is made up of a
sequence of bars of different widths. Different
groups of bars are used to represent different
numbers. A printed bar code is therefore simply a
way of representing a number. The number is often
printed above or below the bar code so that humans

59 riq
can read it.
Bar codes are read into the computer using a wand or a fixed scanner. Bar codes are not
easily damaged and can normally still be read if they are creased or not stuck onto a flat
04 Ta
surface. They can be printed using a normal printer and ink and so are cheap to produce.

4
The information normally included on a bar code for a product is country of origin,
manufacturer and item code. The price is not included in the bar code.
92 z
00 ba

A scanner can read a barcode number incorrectly. A check digit is included in the barcode
number to reduce the likelihood of this happening.
Advantages
03 ah

Provides stock management system.


The process of data entry is fast and accurate.
Sh

Bar codes can be printed by normal printing methods.


No need to write down or key in the name of the item or its actual price.
Disadvantages
A bar code reader may misread a bar code if there is any dirt or mark on the code.
Only numbers can be coded.
Magnetic Stripe Codes
Magnetic stripes are built into many plastic cards such as
cheque guarantee or credit cards. Magnetic stripes look like
this :

The strip can contain up to 60 characters (numbers or digits) of


information which is stored magnetically. Usually the information
is put onto the stripe when the card is made and is
never changed. Magnetic stripe codes can also sometimes be found on the back of railway
tickets.

Computer Science with Syed Shahbaz Tariq Page 37


To be read the card is swipeped through a machine which quickly and d accurately reads the
pattern of magnetism. The e information stored on the card can be destroyed by exposure
to magnetic fields, by scratchin
tching or by coming into contact with som
me liquids.
Smart Cards
Smart cards are often called ed input devices. In fact they
are actually simple storag age devices. A smart card
contains a small RAM chip. When the card is put into a
machine data can be read d from the card or written onto
it. A smart card can store much more data than a
magnetic stripe can. A popular
po card in use at the
moment can store 8k (about (a 8000 characters) of
information.
Petrol companies and sup permarkets
er use smart cards
to store information aboutut points
poin that customers earn when they buy goods. Every time

59 riq
the customer buys someth hing
in the number of points stored on the card is increased. The
customer can then spend
04 Ta d these
th points to buy goods.
Satellite television compani
anies also use smart cards in their receiver
ceivers. The smart card

4
stores a code which is needed
eded to let the receiver decode and displaay the pictures coming
from the satellite. The gov vernment is currently considering introducin
ducing an identity card
which could be based on a smart card. Many people are worried ab about this as people
92 z

would not be able to tell what


hat information was stored about them.
00 ba

A new generation of smartt cards


car is now appearing which contain a sm small microprocessor
as well as memory. These cards
c are practically a complete compute
er ssystem on a card.
03 ah

Magnetic Ink Character Recognition


ec (MICR)
The MICR system reads characters
cha printed in a special magnetic ink into the computer.
The main users of MICR are ar banks. They use it to read information
ation from cheques into
Sh

their computers so that the cheques can be cashed. Here is some in information stored on
a cheque using MICR :

The information printed on the


t cheque using MICR is :
 A unique number forr the chcheque.
 A code that identifies
es the bank and branch that issued the che
cheque.
 The number of the account
cc that the cheque relates to.
MICR readers can only rea ead one special font which can represent nt only numbers and a
few punctuation marks. Thehey can read characters very quickly and d with 100% accuracy.
Information printed in magn
gnetic ink is also very secure. It is not po
ossible to change the
information by writing overr it with a pen and the printed numberss are not damaged by
folding (as often happens with cheques). Both the reader used by MICR and the special
ink are expensive.
Advantages
MICR is difficult to forge.
Documents can still be read when folded or written on.
Disadvantages
MICR readers and encoders are very expensive.
The system can only accept a few different character sets.
Optical Character Recognition (OCR)
An optical character recognition system consists of a scanner and some software. The
scanner is used to scan an image of a page of text to be read into the computer. The
software then examines the page and extracts the text from it, storing it in a form that
can be processed.
OCR systems can now recognise a wide variety of computer fonts and read letters with
over 95% accuracy. Some systems will recognise hand-written text reasonably well as
long as it is written very neatly and usually put into boxes on a pre-printed form.
Advantages

59 riq
Written data and printed data can be read at the same time.
Hard copies of documents can be read directly into a computer without retyping.
04 Ta
The characters converted can later be edited by word processing software.

4
Disadvantages
OCR readers often do not work well with handwritten characters or those in unusual
fonts.
92 z

Optical Mark Recognition (OMR)


00 ba

An optical mark reader reads marks made by pencil on a printed form into the computer.
OMR systems are used by examination boards to collect the answers to multiple choice
03 ah

examinations and to purchase lottery tickets. Here is an example answer grid for an
examination :
Sh

The student answers each question by drawing a line in pencil in the box that he/she
thinks is the correct one. The answer grid is printed in a special coloured ink called that
the OMR system will ignore. Marks down the side of the form are used to automatically
line the form up in the reader so that it can be read. The reader detects where the marks
are placed by shining a light at the page and measuring the amount of light reflected.
Less light is reflected where the marks have been made. A pile of forms collected at the
end of an examination can be put into a tray (called a bin). The reader will go through
each form in turn and record the candidates marks.
Input using OMR is accurate and very fast. Problems can occur if the OMR forms get

Computer Science with


Page 38
MICR is difficult to forge.
Documents can still be read when folded or written on.
Disadvantages
MICR readers and encoders are very expensive.
The system can only accept a few different character sets.
Optical Character Recognition (OCR)
An optical character recognition system consists of a scanner and some software. The
scanner is used to scan an image of a page of text to be read into the computer. The
software then examines the page and extracts the text from it, storing it in a form that can
be processed.
OCR systems can now recognise a wide variety of computer fonts and read letters with
over 95% accuracy. Some systems will recognise hand-written text reasonably well as
long as it is written very neatly and usually put into boxes on a pre-printed form.
Advantages

59 riq
Written data and printed data can be read at the same time.
Hard copies of documents can be read directly into a computer without retyping. The
characters converted can later be edited by word processing software.
04 Ta
Disadvantages

4
OCR readers often do not work well with handwritten characters or those in unusual
fonts.
92 z

Optical Mark Recognition (OMR)


00 ba

An optical mark reader reads marks made by pencil on a printed form into the computer.
OMR systems are used by examination boards to collect the answers to multiple choice
examinations and to purchase lottery tickets. Here is an example answer grid for an
03 ah

examination :
Sh

The student answers each question by drawing a line in pencil in the box that he/she thinks
is the correct one. The answer grid is printed in a special coloured ink called that the OMR
system will ignore. Marks down the side of the form are used to automatically line the form
up in the reader so that it can be read. The reader detects where the marks are placed by
shining a light at the page and measuring the amount of light reflected. Less light is
reflected where the marks have been made. A pile of forms collected at the end of an
examination can be put into a tray (called a bin). The reader will go through each form in
turn and record the candidates marks.
Input using OMR is accurate and very fast. Problems can occur if the OMR forms get

Computer Science with Syed Shahbaz Tariq Page 39


creased as the reader may jam.
Advantages
OMR has a better recognition rate than OCR because fewer mistakes are made by
machines to read marks than by reading handwritten characters.
Large volumes of data can be collected quickly and easily without the need for specially
trained staff.
The cost of inputting data and the chance of data input errors could be reduced because it is
not necessary to type the details for data entry.
Disadvantages
The OMR reader needs to be reprogrammed for each new document design.
OMR readers are relatively slow.
The person putting marks on the documents must follow the instructions precisely.
Any folding or dirt on a form may prevent the form from being read correctly.
Turnaround Documents

59 riq
Optical mark recognition and optical character recognition are often used together in a
turnaround document. A turnaround document is a document which :
 Has some information printed onto it by a computer. 
04 Ta
Has more information added to it by a human.

4
 Is fed back into a computer to transfer the added information into the computer.
Here is a turnaround document that a gas company could use to record meter readings.
92 z
00 ba
03 ah
Sh

The document is printed by a computer. The name, address and customer number of the
person that the meter reader should visit is printed on the form. The customer's last meter
reading is also included.
The meter reader takes the document and visits the customer's house. He then marks the
current meter reading onto the OMR grid on the form. In the example the meter
reader has marked the reading as 4605. The form is then returned to the gas company.
At the gas company the form is fed into a special reader. Optical character recognition is
used to read the customer's number from the form. Optical mark recognition is used to read
the meter reading that has been added. All of the information can be read into the
computer automatically. A bill can be produced and posted to the customer without any

Computer Science with Syed Shahbaz Tariq Page 40


need for human interven ntion. Turnaround documents allow ch cheap, fast input of
information into a computer er system
s
The turnaround document ument does not contain any instructions beca ause the meter reader
who fills it in will complete hundreds of similar forms every day. He will h have been trained
to use the forms so printing
inting instructions on them would simply waste e space.
Sensors
Sensors can be used to measure physical quantities such as tempera temperature, light and
pressure. The measuremen ements can then be stored for later use (datta logging) or used to
control devices such ch as heate
heaters or fans (computer control).
Output Devices
An output device is any piece piece of computer hardware equipment us used
ed to communicate
the results of data processin
cessing carried out by an information processing
ssing system (such as
a computer) which converts ts the electronically generated informationn iinto human
readable form.

59 riq
Soft Copy: The output disp isplayed on screen or stored in storageage de devices is soft
copy. 04 Ta
Hard Copy: The output printed on paper is hardcopy output.

4
CRT Monitor
A monitor displays text and d image data passed to it by the
computer.
92 z

A cathode-ray tube (CRT) T) monitor is the type that has


00 ba

been around for years and i large and boxy.


d is
CRT monitors are heavy and they take up a
03 ah

space. They have largely beenbe replaced by flat-screen


monitors. However some are still used in the design
industry since the colour and brightness of
Sh

ur accuracy
acc
CRT monitors is excellent,nt, and designers need to see true-
to-life colours.
Also, CRT monitors are gengenerally cheaper than flat-screen
monitors.
Flat-Screen Monitor (TF FT or LCD)
Over the past few years, as th have come down in price,
s they
eplaced CRT monitors.
flat-screen displays have repl
light in weight and they take up
Flat-screen monitors are ligh
very little desk space.
Modern flat-screen monitors
ors haveapicture quality that is as
good as CRT monitors.
Digital / Multimedia Proje jecctor
Digital projectors are used
ed in situations
situ when a very large
viewing area is required, for
or example
e during presentations,
for advertising, or in your home
hom for watching movies.
A projector connects to a com
omputer, a DVD player or a satellite receiv
eiver just like a ordinary
monitor.

nside the
The image is produced inside t device and then projected out
through a large lens, using
ng a powerful light source.

Loudspeaker
If you want to hear music or sounds from your computer, you
will have to attach loudspeakers.
peakers. They convert electrical signals
into sound waves.

Loudspeakers are essentiall for


f applications such as music
ng, watching movies, etc.
editing, video conferencing

Dot Matrix Printer


A dot-mmatrix printer is named after the pattern
(a grid
id or ‘matrix’) of dots used when creating
the paper
pape printout.

59 riq
These e dots
do are formed by tiny pins in the
printer’ss prin
print head that hit an inked ribbon
against
ainst the
th paper leaving marks. As the print heaead moves along it
04 Ta
leaves a pattern of dots beh ehind it which can form

4
letters, images, etc.
Dot matrix printers often us se continuous stationary:
long, continuous strips of paper
pape (rather than separate
92 z

sheets of A4 like ink-jet and d laser printers use).


00 ba

After printing, the printoutt is torn


to off from the long strip.
Dot-matrix print quality is s poor, the printers are noisy, and there
are much better printing sy ystems
st available today. However, the dot-
03 ah

matrix printers are still usedd in certain situations:


 Since the pins actually
ally hit the paper, several ‘carbon-copiess’
have several duplicate pag pages, all printed in one go
Sh

 The print mechanism ism is very cheap, and the inked ribbons lastast for a long time.
So, where cheap, low-qualit ality printouts are required, dot-matrix
printers are used. An examp mple is shop receipts.

InkJet Printer
colour printing became available
Cheap, high-quality, full-c
during the 1980s due to the development of ink-jet printers.

These printers have a similar


ilar print-head mechanism to a dot-

ruknuddin.com
matrix printer. The print-hea
head passes left and right across the paper.er. However, instead of
using pins to hit inky marks
rks onto
o the paper, the ink-jet squirts tiny dro
dropletsof ink onto
the surface of the paper.r. Several
Seve coloured inks can be used to o produ
produce full-
colour printouts.

The droplets of ink come frorom tiny holes (the jets) which are tha
han the width of a
human hair in size. Each drdroplet creates a tiny dot on the paper.. Sin
Since the dots are so
ntout is excellent (1200 dots-per-inch are
small, the quality of the printou eppossible). This is
perfect for photographs.

Ink-jet printers are very quie


uiet in use. Since they have so few moving
oving parts they are
also cheap to manufacture e and thus cheap to purchase. However, ththe ink is
very expensive to buy (this s is how the printer companies make their
ir profits!) so the
printers are expensive use.
to use

59 riq
Laser Printer
Laser printers are very compl
mplex devices, and thus expensive to bu uy. However they are
very cheap to use. Thiss is because
b they produce marks on paper us using a fine dust
often last for
04 Ta
called toner which is relatively
relativ cheap to buy. A single toner cartridge
ge will

4
5,000-10,000 pages of printin
nting.
The laser printer uses a com
complex system, involving
92 z

a laser, to make
ke the toner stick
st to the required parts of
the paper. (This system is very different to a dot-matrix or
00 ba

ink-jet, and you don’t


n’t need to
t know the details.)

The laser and toner system


ystem allows
all
03 ah

very fast
printing compared to other
er printers
print (just a few seconds
per page).
Sh

Laser printers are very com


mmon in offices since they
print very quickly, are cheap
ap to
t use and are
reasonably quiet.

Plotter
Plotters create hard-copy inn a very different way to
printers. Instead of building
g up text and images from
tiny dots, plotters draw onn the paper
p using a pen.

The pens are held in an arm


m which can lift the pen up
or down, and which can move
ove across the paper. The
arm and pen create a drawwing just like a human
could, but much more accu
curately and more quickly.
Different coloured pens can be used to produce coloured line drawi
rawings.
of paper, far bigger than anything
any ith... withhuge pieces
a normal printer could work with...

Plotters are only suitable


le fo
forr producing line drawings. They
cannot produce the kind off text
t and images that an ink-jet or
laser printer could. (So you cannot
can use a plotter to produce
photos for example)
Plotters have been largely s
ly superseded by large-format ink jet
printers that can produce more detailed printouts and in full-
colour
Summary of Input Devices es
Device Use
Keyboard Entering text into a word processing document. Applications where text
te has to be
created ratherr than
tha copied
Numeric Applications where only numeric data is to be entered. Inserting
erting personal
p identification
keypad number (PIN)
IN) for Chip and PIN credit/debit cards, or when usin
singg an ATM machine to
withdraw mone ney or check a bank balance
Pointing All application
cationss which require selection from a graphical user int
interface. For example: the
devices – all selection of data
da from a set list or menu

59 riq
Mouse In most PCs
Touch pad On laptop com
04 Ta omputers
Tracker ball For use by peop
eople with limited motor skills e.g. young children
dren or people with disabilities
Remote control Using remote e control
co devices to operate TVs, video players/recocorders, DVD

4
players/recorder
ders, satellite receivers, HiFi music systems, data
ata or multimedia
m projectors
Joystick Used by a pilot to ffly an aeroplane or flight simulator. Used in car driving simulators and
92 z

for playing
g ga
game
mes
Touch screen Selecting from
m a lilimited list of options e.g. certain POS uses such
such as cafes, tourist
00 ba

information kiosk
iosks, public transport enquiries
Magnetic stripe At POS termina
minals, ATMs and in security applications
readers
03 ah

Chip readers Payment card


ds, ID cards, door control systems, public transport
ransport tickets
and PIN pads
Scanners Entering hard copy
cop images into a computer
Sh

Digital cameras Taking photogra


ographs for input to computers, for input to photo
o printers
printer
Microphones Recording of voices
v for presentation software

Sensors (general) in control and measuring applications


Temperature Automatic was ashing machines, automatic cookers, central heating
ating controllers, computer-
sensor controlled gree
reenhouses, scientific experiments and environment ental monitoring
Pressure Burglar alarmms, automatic washing machines, robotics, productionction line
sensor control, scienttific experiments and environmental monitoring
Light sensor Computer cont
controlled greenhouses, burglar alarm systems, rob botics,
oti production line
control, scienttific experiments and environmental monitoring
Graphics tablet Inputting freehand
hand drawings
draw or retouch photographs
Optical Mark Inputting pencil
cil marks
m on a form such as a school register, candi
andidate exam answers,
Reader any application
on involving input of a choice of options
Sh
03 ah
00 ba
92 z
04 Ta
59 riq
4
Sh
03 ah
00 ba
92 z
04 Ta
59 riq
4
Sh
03 ah
00 ba
92 z
04 Ta
59 riq
4
Sh
03 ah
00 ba
92 z
04 Ta
59 riq
4
Optical Inputting text to a computer ready for processing by another software package such as
Character word processors, spreadsheets, databases etc.
Reader
Bar code Inputting code numbers from products at a POS terminal, library books and membership
Reader numbers
Video camera Inputting moving pictures, often pre-recorded, into a computer
Web cam Inputting moving pictures from a fixed position into a computer
Light pen Where desktop space is limited, it is used instead of a mouse or for drawing applications
where a graphics tablet might be too big

Summary of output devices


Device Use
CRT monitor Applications where space is not a problem. Applications where more than one user may
need to view screen simultaneously such as in design use, e.g. when several designers
may need to offer suggestions on a prototype
TFT monitor A thin-film-transistor liquid-crystal display (TFTLCD) is a variant of a liquid-

59 riq
crystal display (LCD) that uses thin-film transistor (TFT) technology to
improve image qualities such as addressability and contrast.
Applications where space is limited such as small offices. Applications where only one
person needs to view the screen such as individual workstations
04 Ta
Multimedia Applications such as training presentations, advertising presentations and home cinema

4
Projector - it displays data from computers, pictures from televisions and video/DVD recorders
Laser printer Applications which require low noise and low chemical emissions, e.g. most networked
92 z

systems. Applications which require rapid, high quality and high volumes of output, e.g.
most offices and schools
00 ba

Inkjet printer Applications which require portability and low volume output, where changing cartridges
is not an issue e.g. small offices and stand alone systems. Applications which require
very high quality output and where speed is not an issue, e.g. digital camera
03 ah

applications
Dot matrix Applications where noise is not an issue and copies have to be made, e.g. industrial
printer environments (multipart forms, continuous stationery, labels etc.), car sales and repair
Sh

companies, manufacturing sites Graph plotter CAD applications, particularly where large
printouts are required such as A0
Speakers Any application which requires sound to be output such as multimedia presentations
and websites including encyclopaedias. Applications that require musical output such as
playing of music CDs and DVD films

Control devices in Control applications


Motors Automatic washing machines, automatic cookers, central heating controllers, computer-
controlled greenhouses, microwave ovens, robotics, production line control
Buzzers Automatic cookers, microwave ovens
Heaters Automatic washing machines, automatic cookers, central heating controllers, computer-
controlled greenhouses
Lights/lamps Computer-controlled greenhouses

Examination Questions
Q1) Winter 2014 P13

Computer Science with Syed Shahbaz Tariq Page 45


9 A cinema (movie theatre) uses automatic machines to allow customers to select tickets for
movie shows. Payments are made by credit or debit card.
(a) Identify two input devices which could be used by the cinema. For
each device, describe what it is used for.
input device 1 ............................................................................................................................
use....................................................................................................................................................
...........................................................................................................................................
input device 2 ............................................................................................................................
use....................................................................................................................................................
.......................................................................................................................................[4]
(b) Identify two output devices which could be used by the cinema. For
each device, describe what it is used for.
output device 1 ……………………………………………………………………………………
use....................................................................................................................................................
output device 2 .........................................................................................................................
use....................................................................................................................................................

59 riq
.......................................................................................................................................[4]
Q2) A microwave oven cooks food when the food is placed on a rotating plate and the door is
closed.
04 Ta
The oven is controlled by a microprocessor.

4
(a) Name two sensors that could be used in the microwave oven.
1 ................................................................................................................................................
92 z

2 ............................................................................................................................................[2]
00 ba

(b) Describe two items of data that the user would need to input before pressing the start button.
Describe how these data could be input.
data1.................................................................................................................................................
03 ah

....................................................................................................................................................
method of input 1
...................................................................................................................................................
Sh

...................................................................................................................................................
data2.................................................................................................................................................
.....................................................................................................................................................
method of input 2
...................................................................................................................................................
.............................................................................................................................................. [4] (c)
Describe the role of the microprocessor in the microwave oven.
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
.................................................................................................................................................... [4]
Q3) Summer 2014 P12
The following diagram shows six descriptions of automatic data capture methods and six
terms.
Draw lines to connect each description to the correct term.

Computer Science with Syed Shahbaz Tariq Page 46


59 riq
04 Ta
4
92 z
00 ba
03 ah
Sh

Q4) Winter 2013 P12


4 (a) Seven hardware items are shown on the right hand side in the diagram below. Three
applications are shown on the left in the diagram.
By drawing arrows, link each application to the appropriate hardware items (each
hardware item must be used once only):

Computer Science with Syed Shahbaz Tariq Page 47


59 riq
(b) Name one additional item of hardware used in each of the three applications named
in the above diagram.
04 Ta
CAD: ...............................................................................................................................................

4
Video conferencing: ......................................................................................................................
virtual reality : ........................................................................................................................... [3]
92 z

Q5) A shop uses an information screen linked to a computer to allow customers to order
00 ba

goods directly. The first screen shows three options:


03 ah
Sh

(a) What is the best input device to allow customers to choose one of the three options?
........................................................................................................................................... [1]

Q6) Winter 2013 P13


5 A website has been set up allowing users to access the Periodic Table. Part of the
table is shown below.

Computer Science with Syed Shahbaz Tariq Page 48


A user selects an element from the table and is then directed to another web page where
details of the chosen element can be found.
(a) (i) What would be the most suitable input device for this application?
..........................................................................................................................................................
....................................................................................................................................................[1]
(ii) Describe how your chosen input device would interact with the table.
..........................................................................................................................................................

59 riq
....................................................................................................................................................[1] (b)
Give two advantages of this system when compared to finding the same information from
books.
04 Ta
..........................................................................................................................................................

4
..................................................................................................................................................... [2]
(c) Apart from security issues, give two disadvantages of this system compared to using
92 z

books.
00 ba

..........................................................................................................................................................
.................................................................................................................................................. [2]
03 ah

Q7) Summer 2013. P12


9 Thin film technologies are becoming increasingly common. This uses material as thin as
Sh

a sheet of paper but which acts just like an LCD monitor. A microprocessor is used to
control the device and solid state memories are used to supply the data. (a) Describe two
advantages of thin film technology.
..........................................................................................................................................................
.................................................................................................................................................. [2]
(b) Describe two applications that could use thin film technology.
..........................................................................................................................................................
................................................................................................................................................... [2] Q8)
A company requests new customers who register online to give the following details:
• name
• address
• type of credit/debit card
• payment card number
All details must be entered.
(b) Other data required:

Computer Science with Syed Shahbaz Tariq Page 49


• date of birth
• male or female
• accept/decline company conditions
Describe suitable input methods for this data.
date of birth
male or female
accept/decline company conditions
..........................................................................................................................................................
..........................................................................................................................................................
.............................................................................................................................................. [3]

Q9) Summer 2013. P11


5 Name a suitable hardware device to enable automatic data capture in each of the
following applications. Each device must be different.

59 riq
04 Ta
4
92 z
00 ba
03 ah

Q10) Winter 2012 P13


You have just been appointed as the IT representative of a small engineering company.
Sh

The company needs to buy:


• external backing storage
• printers
• input devices
Choose a suitable example for each and give a reason for your choice.
1. ...................................................................................................................................................... 2.
......................................................................................................................................................
3. ............................................................................................................................................... [3]
Q11) Winter 2012. P12
3 For each of the following five groups of hardware items, write down a computer
application that would need those items.

Computer Science with Syed Shahbaz Tariq Page 50


59 riq
Q12) Summer 2012. P12
04 Ta
4 A list of four printers and four different applications which use printers is shown below (a)

4
Using arrows, link each printer to the most appropriate application.
92 z
00 ba
03 ah
Sh

(b) Give one feature of each printer which makes it appropriate for the application.
3D printer
........................................................................................................................................

Computer Science with Syed Shahbaz Tariq Page 51


Dot matrix printer: ..........................................................................................................................
Colour inkjet printer: ......................................................................................................................
Colour laser printer: ................................................................................................................. [4]
Q13) Winter 2011 P13
The following table shows three applications which require specialist output devices.For
each application, suggest one possible output device and give a reason for your choice.

59 riq
04 Ta
4
92 z
00 ba
03 ah
Sh

Q14) (b) (i) What is meant by automatic data capture?


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

Computer Science with Syed Shahbaz Tariq Page 52


(ii) Name a device used in automatic data capture and describe an application that uses
it.

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

Q15) An airport has multimedia kiosks linked to a central computer.


(a) State two input devices, other than a keyboard, which might be used at the
multimedia kiosks.
..........................................................................................................................................................
............................................................................................................................................... [2]

(b) Give two items of information that might be accessed from multimedia kiosks.
..........................................................................................................................................................

59 riq
............................................................................................................................................... [2]
(c) State one advantage and one disadvantage for the airport of providing multimedia
04 Ta
kiosks.
..........................................................................................................................................................

4
............................................................................................................................................... [2]
92 z

15 In a school, students can use laptop computers which link to the school's wireless
00 ba

network.
(a) State two advantages to students of using this system rather than desktop computers
03 ah

located in specialist computer laboratories.


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

(b) Give two disadvantages of using laptop computers rather than using desktop
computers.
..........................................................................................................................................................
............................................................................................................................................... [2]
Q16) Summer 2011 P12
The following table shows FOUR applications which require specialist INPUT devices. For
EACH application, suggest ONE possible INPUT device and give a reason for your choice.

Q17) Winter 2010 P13

Computer Science with Syed Shahbaz Tariq Page 53


6 Complete the following table by writing down the most appropriate data collection
method for the given application.

59 riq
Q18)Summer 2010 P11
6 (a) Give three different types of device that allow human beings to interface with
computer systems.
04 Ta
..........................................................................................................................................................

4
............................................................................................................................................... [3] (b)
Give three automatic data capture devices and give a suitable application for each
92 z

device
00 ba

..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
03 ah

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

Q19) Describe how a supermarket would use computer technology to carry out
automatic stockcontrol.
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
................................................................................................................................................ [3]

Q20) Summer 2010 P12


8 A supermarket makes use of barcodes on all its goods as part of its automatic stock
control system.
(a) Describe how the price is found for each item sold.
..........................................................................................................................................................
............................................................................................................................................... [2]

Computer Science with Syed Shahbaz Tariq Page 54


(b) The following are steps in the automatic stock control system.
Number the steps in the correct order.

[4]

Q21) A factory uses a computer system to store information about customers, spare

59 riq
parts and general administration.
(a) Spare parts can be identified by selecting from diagrams on a computer screen.
Describe what hardware would be needed to allow the parts to be selected in this way
04 Ta
..........................................................................................................................................................

4
............................................................................................................................................... [2]
(b) The factory needs to buy a new printer. It has decided to buy either a dot matrix
92 z

printeror an inkjet printer. Discuss the advantages and disadvantages of using both types
00 ba

ofprinter in this application.


..........................................................................................................................................................
..........................................................................................................................................................
03 ah

..........................................................................................................................................................
............................................................................................................................................... [3]
Q22) Winter 2009 P1
Sh

1. Explain, with examples where appropriate, the following five computer terms.
ROM
..........................................................................................................................................................
............................................................................................................................................... [1] 8 (a)
How could a computer simulation be used by a supermarket to reduce queuing at
checkouts?
..........................................................................................................................................................
............................................................................................................................................... [2]
(b) The supermarket has decided to fit sensors at the shop entrance to count people
coming in and leaving.
i) What type of sensor would be suitable to detect people?
..........................................................................................................................................................
............................................................................................................................................... [1]
(ii) How could the supermarket use the information obtained from these sensors?
..........................................................................................................................................................

Computer Science with Syed Shahbaz Tariq Page 55


............................................................................................................................................... [2]
(c) The supermarket has decided to fit information screens at various locations for
customer use. These information screens do not use keyboards. (i) Give one example
of a suitable input device.
.................................................................................................................................................... [1]
(ii) What information could be made available to supermarket customers?
..........................................................................................................................................................
............................................................................................................................................... [1] (iii)
Give one advantage of using this system rather than displaying signs and notices around
the supermarket.
..........................................................................................................................................................
............................................................................................................................................... [1]

Q23) Summer 2009


1 Explain, using examples where appropriate, the meaning of these computer terms.

59 riq
(a) batch processing
..........................................................................................................................................................
04 Ta
............................................................................................................................................... [2]

4
(b) data logging
..........................................................................................................................................................
............................................................................................................................................... [2]
92 z
00 ba

2 Name three devices used for automatic data capture.


..........................................................................................................................................................
03 ah

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

Q24) Summer 2008


Sh

1 Explain, using examples where appropriate, the meaning of these computer terms.
(d) laptop computer
..........................................................................................................................................................
............................................................................................................................................... [2]
(e) trackerball
..........................................................................................................................................................
............................................................................................................................................... [2]

4 Name two types of automatic data capture and give one application for each type
named.
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
................................................................................................................................................. [4]
Q26) Winter 2008 P1

Computer Science with Syed Shahbaz Tariq Page 56


6 A supermarket uses a computer system to control and order stock. All products sold
are identified with a bar code which can be read at a Point Of Sale (POS) terminal.
(a) Apart from stock control, give one advantage to the supermarket of having bar codes on
the products.
............................................................................................................................................... [1]
(b) Give one advantage to the customer of using POS technology.
..........................................................................................................................................................
............................................................................................................................................... [1] (c)
Describe how a computerised stock control system works.
..........................................................................................................................................................
............................................................................................................................................... [3]

Explain, using examples where appropriate, the meaning of these computer terms.
(a) mouse
..........................................................................................................................................................

59 riq
................................................................................................................................................ [2]
(d) RAM 04 Ta
..........................................................................................................................................................

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

Q27) Winter 2007 P1


92 z

12 A company checks its electrical equipment every three years. To help make sure that
00 ba

every item is checked at the correct time, the company has decided to put barcodes on
the equipment. The barcode contains:
• type of equipment (e.g. monitor)
03 ah

• location (e.g. Room 507)


Every time equipment is checked, the barcode is scanned and the data stored on a file. (a)
Sh

Give one other piece of information that should be on the barcodes.


................................................................................................................................................... [1] (b)
Give one example of other information that should be stored on the file itself.
.................................................................................................................................................... [1] (c)
Give two advantages of this system rather than using sticky labels on the equipment marked,
for example, "Do not use after May 2007".
..........................................................................................................................................................
............................................................................................................................................... [2]
(d) Describe another application where barcodes could be used.
......................................................................................................................................................[1]

Q28) Summer 2007 P1


3 Describe the difference between speech recognition and speech synthesis.
..........................................................................................................................................................

Computer Science with Syed Shahbaz Tariq Page 57


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

12 Describe three ways you could modify a typical input/output environment to enable
people with disabilities to use the computer system.
..........................................................................................................................................................
............................................................................................................................................... [2]

13 Items sold in supermarkets are all marked with bar codes.


(a) Customers are given an itemised bill at the checkout. Give two advantages to the
customer.
..........................................................................................................................................................
............................................................................................................................................... [2]
(b) Give two ways the information on the bar code can be input at the checkout.
..........................................................................................................................................................
............................................................................................................................................... [2]

59 riq
(c) Describe how bar codes are used in automatic stock control.
..........................................................................................................................................................
04 Ta
............................................................................................................................................... [2]

4
Q29) Summer 2006 P1
2 Name two devices used for direct data capture. Give one application for each device
92 z

named.
00 ba

Device 1: ....................................................................................................................................
Use ............................................................................................................................................ [2]
03 ah

Device 2: ....................................................................................................................................
Use ............................................................................................................................................ [2]
Marking Scheme
Sh

Q1) of each seat / payment details


(a) 1 mark for input device + 1 mark for its output device: printer
matching use use: print receipt / tickets
input device: touch screen output device: loudspeaker / beeper
use: select film / cinema seats / price use: to indicate error in input / confirmation of
input device: keyboard / keypad keys pressed [4]
use: input number of tickets / card PIN Q2) (a) 1 mark for each different sensor (max 2)
input device: magnetic stripe reader / chip and - pressure sensor
PIN reader / card reader - example of sensor to detect if door closed /
use: reading credit / debit card details open e.g. magnetic field sensor, proximity sensor
input device: scanner - moisture / humidity sensor
use: to read any promotional vouchers (etc.) [4] - temperature / infrared sensor[2]
(b) 1 mark for each different output device + 1 (b) 1 mark for each item of data (max 2):
mark for its matching use - is the food frozen / uncooked / cooked?
output device: screen / monitor - cooking time
use: show films available / seating plan / prices - start / end time

Computer Science with Syed Shahbaz Tariq Page 58


- power data / signals from sensors….
- weight - …..continuously
- type of food - if door open, (microprocessor) sends signal to
- additional cooking feature e.g. browning sound alarm / stop process
1 mark for each corresponding input method - (microprocessor) compares weight of food
(max 2): against stored values…
- turn dial to select option - …and automatically sets cooking time / power
- touch screen / buttons / concept keyboard / - cooking time controlled by (microprocessor)
keypad to select options comparing with stored values
- use of barcode readers (to read barcodes on - (microprocessor) sends signal to beeper /
food packaging which stores an automatic notify when cooking program complete [4]
cooking programme)[4]
(c) Any four from:
- (microprocessor) checks / receives readings /

59 riq
04 Ta
4
92 z
00 ba
03 ah
Sh

Computer Science with Syed Shahbaz Tariq Page 59


1.3.5 Memory, storage devices s and
a media
• show understanding of the dif iffer
ference between: primary, secondary and off-line e storage and
provide examples of each, suc ch as, primary: Read Only Memory (ROM), Random om Access Memory
(RAM) and DVD-RAM; secondarcondary: hard disk drive (HDD) and Solid State Drivesives ((SSDs); off-line:
Digital Versatile Disks (DVDs),, Compact
C Disks (CDs), Blu-ray, USB flash memoemorry and removable
disks
• describe the principles of opera
eration of a range of types of storage devices
es and m media including
magnetic, optical and solid state
state
• describe how these principles s are applied to currently available storage solutio
ionns, such as SSDs,
hard disk drives, USB flash memory,
memo DVDs, CDs and Blu-ray
• calculate the storage requireme
quirement of a file

Storage Media & Devices es


The device that actually hol
holds the
t data is known as the storage medium
edium (‘media’ is the
plural).

59 riq
The device that saves data a ffrom it, is known as
a onto the storage medium, or reads data
the storage device.
achine which stores data on storage medium
Storage Device: The machine edium.
04 Ta
Storage Media: The physica
sical material in which a devices stores da
datta.

4
Storage Devices
92 z
00 ba

Internal Memory Backing Storage


03 ah

ROM RAM Magnetic Devices Optical Devices Solid State

Internal memory and stora


orage devices and their uses
Sh

A computer holds programs


ams and data in two sorts of device:
1. Internal memory — limited
ited-capacity and rapid-access during proces
ocessing
2. Backing storage — large
ger -capacity and slower-access to keep data
data/programs for
future use.
Internal memory
Internal memory consists s of:
of
• non-volatile, read-only memory (ROM) to hold a small program to start up computer,
BIOS, firmware, perman anent
• volatile, read-write, random
dom access memory (RAM) to hold the progr
programs and data
currently being
ROM is Read-Only Memor emory.
The ROM contains the prog rogram that is used to start up the computer
er. This is also called
the boot program because the t process of starting up the computer is also called ‘booting
up’ the computer. In many dedesktop computer systems, the boot prog gram is also called
the BIOS or Basic Input Out
Output System.
ROM is not volatile and is the same even when the computer is turn ned off. Also, the
program inside the ROM is not easily deleted or changed. This meaneans the boot program
Sh
03 ah
00 ba
92 z
04 Ta
59 riq
4
will always be there when the computer is started. This is why any computer system
needs some ROM.
On a standard personal computer, the boot program does the following things:

• It performs some basic checks.


• It finds the operating system and loads it into the RAM.
• It then hands control over to the operating system.
RAM is Random Access Memory.
RAM is used to store the programs and data that the computer is currently working on. It
is the working memory of the computer. The operating system needs to be in the RAM
so that it can run. If you want to run a program or listen to a piece of music, it will need to
be loaded into the RAM first. If you type into a text file, the text file will also be in the
RAM. Any changes you make to the file will be made in the RAM until you save the file.
RAM is volatile. This means that when the power is turned off, everything that is stored in

59 riq
the RAM is lost.
The more RAM a computer has, this means that it can deal with larger programs, larger
data files and can run more programs and data files at the same time. More usually, this
04 Ta
also means that the computer can multi-task more. This means the computer is dealing

4
with several programs and files at the same time.
Measuring the size of memory
92 z

4 bits = 1 nibbles, 8 bits=1 byte,


210 Bytes = 1024 bytes= 1 Kilo Byte, 220 Bytes = 1024 KB= 1 Mega Byte,
00 ba

30
2 Bytes = 1024 MB= 1 Giga Byte, 240 Bytes = 1024 GB= Tera Byte
250 Bytes = 1024 TB= Peta Byte
03 ah

Differences between RAM and ROM ROM


Sh

RAM
What does it Operating system, programs A program used to start the
contain? and data which are currently computer called the 'boot
being used. program' or BIOS.
Can the contents Yes. No.
be changed? (Is The contents of the RAM are The contents of ROM cannot
it volatile?) How changed all the time while the normally be changed.
big is it? computer is running.
Typically 3-4Gb. Typically 1 -2Mb.
The larger the better Small because it only needs to
because this means that the store the boot program.
computer can run more
programs at the same time.

Backing storage

Computer Science with Syed Shahbaz Tariq Page 61


Backing storage has to be non-volatile and includes:
• magnetic media, such as hard disks and magnetic tape
• optical media, such as CDs, DVDs and Blu-ray discs
• solid-state storage devices, such as flash-based memory sticks •
digital storage cards.
Different storage media have different characteristics that make them suitable for
particular applications:
Magnetic storage media
Stores data magnetically on a media that moves read/write head. Head writes by
magnetising on track of surface to represent 0 and 1.
- internal hard disk drive (HDD) is very cheap per gigabyte of storage and provides very
high storage capacity with rapid direct access, which makes it suitable for a
computer's main backing storage
- lightweight, pocket-sized, external hard disk drive is more expensive, but both
removable and highly portable for safekeeping
- magnetic tape drive is very expensive, but a magnetic tape cartridge is a cheap, high
capacity, removable and highly portable storage medium, although access is very slow.

59 riq
This makes it more suitable for making backup or archive copies of the contents of an
HDD 04 Ta
Optical storage media

4
Stores data as tiny pits pressed into flat surface by laser.
- Optical discs such as CDs and DVDs have smaller capacities than HDDs or tapes and
92 z

are also more expensive per gigabyte of storage. They are also direct access media, with
rather slower access than a HDD, and are removable and highly portable. The main
00 ba

types of CD and DVD have different suffixes, as follows:


- ROM stands for 'Read-Only Memory' - these cannot be written to, and are suitable
03 ah

for the distribution of music, movies, software and encyclopaedias


- R stands for 'Recordable' - these can be written to just once and then can only be read
from, making them suitable for storing music or movies or archive copies of
Sh

documents
- RW stands for 'ReWritable' - these can be written to and read multiple times, making them
suitable for making temporary copies of data files for transfer from one computer to
another or regular backup copies
- Blu-ray discs (BD or BR) have larger storage capacities than other optical storage media
and a higher rate of data transfer. Although disks are expensive, their cost per
gigabyte of storage is nearer to that of a HDD

Solid-state storage media


- are electronic and made as integrated circuits or chips, currently using FLASH
technology which, like ROM, holds data that are non-volatile, but can be erased and
rewritten in large blocks
- also known as non-volatile memory
- devices often have multi-gibibyte capacities, are very small and portable, and are
usually more robust than HDD or optical media. They include:
- USB flash drives (memory sticks or pen drives)
- flash memory chips

Computer Science with Syed Shahbaz Tariq Page 62


- digital storage cards (DSCs)
- solid-state drives (SSDs).
SD Card
An SD Card (Secure Digital Card) is an ultra small flash memory card designed to
provide high-capacity memory in a small size. SD cards are used in many small portable
devices such as digital video camcorders, digital cameras, handheld computers, audio
players and mobile phones.

Mobile phones
Mobile phones are examples of very widely used embedded computer systems. Some
phones have a wide range of:
• Input
• Processing (including audio and video recording and playback)
• Storage
• Output
• Communication facilities.
More people own mobile phones than computers, so in some parts of the world, people are

59 riq
more likely to access the Internet using a mobile phone than a computer. Smartphones
have more flexible operating systems that can run more advanced application programs.
04 Ta
External storage systems

4
A number of different types of external memory devices are now available. Some of these
are described below (hard drives haven't been mentioned since these are usually internal;
92 z

hard drives contain much of the applications software to enable the computer to run
effectively). MP3 (MPEG-3)
00 ba

MPEG-3 uses an audio compression technology; it compresses CD-quality sound by a


factor of about 10 whilst retaining most of the quality e.g. a 60 Mbyte CD track is turned into
a 6 Mbyte MP3 file. Music data is often stored on an MP3 player which plugs into the
03 ah

computer through a USB port. The music data is downloaded to the MP3 player where it is
stored in a file. The player has its own internal battery which allows a user to listen to the
Sh

music files through personal head phones or connect the player to an external sound
amplification unit. Variations of MP3 players (e.g. I-pods) exist which use their own file
structures when storing music; these require compatible software to enable files to be
stored in the correct format.
MP4 (MPEG-4)
MPEG-4 files are in a format that can hold a mixture of multimedia objects such as audio,
video, images, animation, etc. MP4 players again use compression technology to store data
in files. They operate in much the same way as MP3 players described above.
Flash memories
These are non-volatile re-writable memories evolved from the EEPROM; they are often
connected to the USB port on the computer enabling a user to transfer files between
computers.
SD (secure digital) cards are a type of flash memory used in digital cameras and mobile
phones. XD (extreme digital) cards are also a type of flash memory used in digital
cameras and are similar to SD cards.

Computer Science with Syed Shahbaz Tariq Page 63


Compact disks (CD)
These are an optical storag
age media which have basically taken over
er ffrom the floppy disk.
Software is now usually supp
upplied on a CD (in the form of CD-R whic
ch can be read only or
CD-RW which allows readi ding
ng and writing of data).
Digital versatile disk (DVD D)
This is an optical system for storing data. It is similar to CD but ty typically can hold 4.7
Gbyte of data compared to o only 700 Mbyte of data on a CD. This is due to dual layering
and higher density of data storage.
sto
Credit cards and smart card ards
Credit cards contain a magnetic stripe on the back which is mad ade up of iron-based
particles in a plastic film.
The stripe is split up into three
thr tracks which are read by a magnetictic strip
stripe reader. Usually
only tracks 1 and 2 are used.
used The information stored usually follows
lows the following format:

track 2 track
ck 1 description
√ √ start sentinel (1 character only)
√ format code (“B”) (1 character onlly)

59 riq
√ √ account number (19 characters)
√ √ separator (1 character only)
√ √ country code (3 characters)
04 Ta
√ name (between 2 and 26 characte ers)

4
√ separator (1 character only)
√ √ haracter(s))
expiry date or separator (4 or 1 cha
√ √
92 z

service code (3 characters)


√ √ rd llength – 79)*
optional data to fill up (max record
00 ba

√ end sentinel (1 character only)


√ √ character check (1 character onlynly))
(* the optional data often co
ontains a PIN verification code or card verif
verification code)
03 ah

Smart cards are discussed d in detail in booklet 1.


Sh

Accessing Stored Data


da stored in a computer
We refer to a collection of data
system as a ‘file’. Files are
re often organised into ‘folders’.
Whenever you click ‘Save’ in i an application, burn files to
a CD-R, copy music onto your MP3 player, or drag and
drop a file onto memory stick, you are using storage
devices - devices that can ststore and retrieve data.

Serial / Sequential Access ss


A serial (or sequential) access
acce storage device is one that stores filess one-by-one in a
sequence.
A non-computer serial access device that will be familiar to you is
s a VHS videotape.
Because video is stored d on a long piece of tape, when TV shows are recorded onto the
tape, they go on one-by-on one, in order...
Sh
03 ah
00 ba
92 z
04 Ta
59 riq
4
If you want to watch a showw that you recorded earlier, you have to re
rewind / fast-forward
through all other shows unti
ntil you find it.
cessible in the same order that
The shows are only accessib
you recorded them. This tyype of one-by-one storage and
access is called serial access.
access

Systems that store thingss on tape (video, music,


computer data, etc.) are alw
lways serial access
Direct / Random Access
A direct (or ‘random’) access st
ss storage device is one that

stores files so that they


hey can be instantly
accessed - there is no need to search through
other files to get to the one you want.
An example of a direct access
acce device would be a

59 riq
DVD movie. Unlike the VHS HS videotape movie, you
can jump to any scene on a DVD.
04 Ta
All parts of the DVD are directl
rectly accessible. This

4
type of file storage is called
d
92 z

Magnetic Storage Devices es / Media


Why Magnetic?
00 ba

Magnetic storage media and


and devices store data in the form of tiny magnetised dots.
These dots are created, read and erased using magnetic fields created
eated by very tiny
03 ah

electromagnets.

In the case of magnetic tape


tap the dots are arranged along
Sh

c strip which has been coated


the length of a long plastic
with a magnetisable layerr (audio
(au and video tapes use a
similar technology).

In the case of magnetic disc


scs (e.g. floppy disc or hard-
drive), the dots are arrange
ed in
i circles on the surface of a
plastic, metal or glass disc tthat has a magnetisable
coating.
(up to 1TB).
They can be used to store e vast
va amounts of data. Hard-drives
are random access devices
vices and can be used to store all types
iles such as movies. Data access
of films, including huge files
speeds are very fast.
Data is stored inside a hard-drive
hard on rotating metal or glass
discs (called ‘platters’).
Fixed Hard Drive
A hard-drive built into the case of a computer is known as
‘fixed’. Almost every computer
compute has a fixed hard-drive.

Fixed hard-drives act as the main backing storage device for


almost all computers s since they
the provide almost instant access
to files (random access and nd high access speeds).

59 riq
Portable Hard Drive
A portable hard-drive is one e that
th is placed into a small case along with some electronics
that allow the hard-drive to be accessed
acc using a USB or
04 Ta
similar connection.

4
Portable hard-drives allow very large amounts of data to
be transported from compuomputer to computer.
92 z

Many portable music player ers (such as the iPod classic)


00 ba

contain tiny hard-drives. Thehese miniature devices are just


not much bigger than a stampamp, but can still store over 100MB of datta!
Magnetic Tape
03 ah

Magnetic tape is a large capacity, serial access medium.


e capac
Because it is a serial accessss medium, accessing individual
Sh

files on a tape is slow.

Tapes are used where large ge amounts of data need to be


stored, but where quick acce
ccess to individual files is not
required. A typical use is for
or data back-up (lots of data, but
rarely only accessed in an n emergency)
em

Tapes are also used and in some


so batch-processing
applications (e.g. to hold the
the list
li of data that will be
processed).

netic Discs
Removeable Media Magnetic
Floppy Disc
A removable, portable, cheap
heap, low-capacity (1.44MB) storage
e me
medium. Floppy discs
are random access devices
vices used for transfer small amounts of da ata between
computers, or to back-up sm
small files, etc. Access times are slow.
Almost every PC used to have
ha a floppy disc drive. These are obsole lete now, having been
replaced by higher capacity
y technology such as CD-ROMs, DVDs and USB memory
sticks.
Zip Disc
A removable and portable le storage medium, similar in appearance to a floppy disk, but
with a much higher capaci
capacity (100MB, 250MB or 750MB).

Zip discs are random accescess devices which were used for data bac
ack-up or moving
large files between compute
puters.
Another obsolete storage device,
de zip
discs were a popular replac
acement for
floppy discs for a few years,
rs, but they
never caught on fully befor
oree being
superseded by cheaperr media
medi like
CD-ROMs and CD-Rs

59 riq
Jaz Disc
A removable and portable le storage medium based on hard-
04 Ta
drive technology, with a large capacity (1GB or 2GB).

4
Jaz discs are random acce
cess devices which were used for
92 z

data back-up or moving lar


arge files between computers.
Discs were expensive to buy and not very reliable.
00 ba

Like the Zip disc, this system


stem never
n really caught on
03 ah

and was superseded by farr cheaper


ch and more reliable
and cheaper technology.
Sh

Optical Storage Devices / Media


Why 'Optical'?
Optical storage devices
s save data as patterns of dots
that can be read using light
ht. A laser beam is the usual
light source.

The data on the storagee med


medium is read by bouncing the laserr beam off the surface of
the medium. If the beam hits a dot it is reflected back differently to how it would be if
there was no dot. This differ
erence can be detected, so the data can be read.
Dots can be created using the
t laser beam (for media
that is writable such
h as CD-Rs).
CD The beam is used in
a high-power mode to actuaually mark the surface of the
medium, making a dot. Thisis process is known as
‘burning’ data onto a disc.

This is a magnified view of the dots on the surface of a CD.

The different patterns of do


dots
ts correspond to the data stored on the disc.
Read-Only Optical Discs
Read-only optical discs havve data written onto them when they are ma manufactured. This
data cannot be changed.
CD-ROM
Compact Disc - Read-Only y Memory (CD-ROM) discs can hold around round 800MB of data.

59 riq
The data cannot be altereded (non
(no -volatile), so cannot be accidently de
deleted. CD-ROMs
are random-access devices. ces.
04 Ta
CD-ROMs are used to dist ribute all sorts of data: software (e.g. of
istribut offfice applications or

4
games), music, electronic books
boo (e.g. an encyclopaedia with sound nd and video.)
92 z

DVD-ROM
00 ba

Digital Versatile Disc - Read-


Read
Only Memory (DVD-ROM)
03 ah

discs can hold around 4.7G GB of data (a dual-layer


DVD can hold twice that). t). DVD-ROMs
DVD are random-
access devices.
Sh

DVD-ROMs are used in the same way as CD-ROMs


(see above) but, since they y can
ca hold more data, they
are also used to store high--quality video.

High Capacity Optical Dis isccs


Blu-Ray
Blu-Ray disks are a recent replacement
r for DVDs. A Blu-Ray disc can
an hold 25 - 50GB of
data (a dual-layer Blu-Ray disc can
c hold twice
that). Blu-Ray discs are random-access
rando devices.
Blu-Ray discs are used in the
th same way as DVD-
ROMs (see above) but, sincence they
the can hold more
data, they are also used to store
sto very high-quality,
high-definition (HD)
The 'Blu' part of Blu-Ray ref efers to the fact that the laser used to read
d the disc uses blue
light instead of red light.. Blue light has a shorter wave-length than n rred light (used with
CDs and DVDs).

59 riq
Using a blue laser allows more
mo data to be placed closer togetherr o
onn a Blu-Ray disc, than
on a DVD or CD, so Blu-Ray ay has a much
muc higher storage capacity than these older
04 Ta
discs.

4
HD DVD
High-density DVD (HD-DVD)
DVD) discs can hold
92 z

around 15GB of data (a dual


dual-layer HD-DVD can
00 ba

hold twice that). HD-DVDs s are random-access


devices.
HD-DVD discs are used in the same way as DVD-
03 ah

ROMs (see above) but, since


nce they
the can hold more
data, they are also used to store
sto very high-quality,
Sh

high
high-definition (HD)
vide
eo.

The HD-DVD format was lau aunched at the same


time as Blu-Ray. For about a year they competed to be the 'next
ext DVD
DVD'. For various
reasons, Blu-Ray won the fight, and the HD-DVD format has been ab abandoned.
Recordable Optical Discs
Recordable optical discs can have data written onto them (‘burnt’)) by a computer user
using a special disc drive (a
a disc ‘burner’).
CD-R and DVD-R
CD-Recordable (CD-R) and d DVD-recordable (DVD-R) discs can hahavve data burnt onto
them, but not erased. You can keep adding data until the disc is ful
full, but you cannot
remove any data or re-use
se a full disc.
CD-RW and DVD-RW
CD-ReWritable (CD-RW) and DVD-ReWritable (DVD-RW) discs, unlike CD-Rs and
DVD-Rs, can have dataata burnt onto them and also erased so thatt th
the discs can be re-
used.
When CD-Rs and DVD-Rs Rs are burnt,
b the laser makes permanent ma
marks on the silver-
coloured metal layer. This
is is why these discs cannot be erased.

When CD-RWs and DVD-R RWs are burnt the laser makes marks onn the metal layer, but
in a way that can be undone.
one. So these discs can be erased.
DVD-RAM
DVD-Random Access Mem mory (DVD-RAM) discs are a type of re-w ritable DVD. They
writab

59 riq
often come in a floppy-disc
isc style
04 Ta
DVD-RAM discs have a simila
milar capacity to a normal DVD, holding 4.7G
4.7GB of data. DVD-

4
RAM discs are random-ac
ccess devices.
DVD-RAM discs are used in many
man camcorders (video recording camera
ameras).
92 z

The discs are much higher


er quality
qual than normal DVD-RWs and d can re
reliably store data for
00 ba

up to 30 years. This means


s that
th they are often used for video and data back-up and
archiving.
03 ah
Sh

Soli
d-

Storage Devices
'Solid-State'?
The term ‘solid-state’ essenti
ssentially means ‘no moving parts’.
Solid-state storage devicess are based on electronic circuits with no moving parts (no
reels of tape, no spinning discs, no
n laser beams, etc.)
Solid-state storage devicess store
sto data using a special type of memor
emory called flash
memory...
Flash Memory
Flash memory is a type of Electronically-Erasable
Electro
Programmable Read-Only Memory (EEPROM).
Flash memory is non-volat latile (like ROM) but the data stored in it ca
can also be
changed (like RAM).
ound in many data storage devices...
Flash memory can be found
You might wonder why,, since flash memory is non-volatile, normall computers
comp don’t use it
instead of RAM. If they didd we would have computers that you could d turn off, turn back
on again and no data would be lost – it would be great!
The reason is speed – saving
savin data to flash memory is very slow comp ompared to saving it to
RAM. If a computer were to o use flash
fl memory as a replacement nt for RAM it would run
very slowly.
However some portable e computers
com are starting
to use flash memory (in the e form of solid-state
‘discs’ as a replacement foror hard-drives. No
moving parts mean less to go wrong and longer
battery life.

59 riq
USB Memory Sticks
Memory sticks (or ‘thumb-dr
04 Ta drives’) have made
many other forms of portableble storage almost
obsolete (why burn a CD or DVD when you can more easily copy you your files onto a

4
memory stick?).
Memory sticks are non-vola latile, random-access storage devices.
92 z

Each of these small devices


ces has some flash memory connected to o a USB interface.
00 ba

Plug it into your computer and


an it appears as a drive. You can then n ad
add files, erase files,
etc. You can use it to move any type of file between computers.
03 ah

Flash memory used to be very expensive, but in recent years it has


as b
become much
cheaper and you can now buy bu a 16GB memory stick for just a few dollars.
Sh

Memory Cards
s ( cameras, mobile phones, MP3 players
Many of our digital devices ers, etc.) require
compact, non-volatile data ta storage. Flash memory cards provide this an
and come in a
variety of shapes and sizes.
zes.

One of the most common n for


formats used by digital cameras is the SD Card.
Ca The cards
store the digital images taken
ken by the camera.
Mobile phones contain a Subscriber
Sub Identity Module (SIM) card thatt contains the phone’s
number, the phonebook num umbers, text messages, etc.

Many phones also have ext xtra memory cards to store


music, video, photos, etc. (e.g Tiny Micro-SD cards).
Smart Cards
chip-and-pin’ cards), door entry cards, sate
Many credit cards (e.g. ‘chip atellite TV cards, etc.
have replaced the very limit
ited storage of the magnetic strip (the darrk st
strip on the back of
older cards) with flash memmory. This is more reliable and d has a much larger storage
capacity.

Cards with flash memory are called smart cards.

Backing Up Data
What is a Backup?
aking one or more
A backup simply means maki
copies
pies of your data.

59 riq
Forr example,
e if you have a
04 Ta folder
der of photos stored on
the hard-drive of your laptop,

4
you
ou might
m back them up by
cop
pying them to a CD-R.
92 z
00 ba
03 ah
Sh

Note: If you move the photos


otos from
fr the hard-drive to a CD-R, you do not have a back-up
– you still only have one cop
opy of the photos, but now they are on a CD instead of the
hard-drive.

You only have a backup if youyo have a second copy of your data.
Why Backup Your Data?
If you delete a file by accident,
acciden your computer breaks, your laptop is stolen, or your
business burns to the ground
ound, having a backup copy means that you ou have not lost your
precious data. You can reco cover your lost files and continue working..
Most businesses use comput puters to store very important
data (customer records, finan
nancial information, designs for
products, etc.) If this data is lost, the business could
possibly have to close. Backing-up
Backin business data is
essential.

How Are Backups Created? ed?


data on your hard-drive can be
Personal backups of the da
made by…

59 riq
 Burning files to a CD
CD-R
 Copying files to an external
ex hard-drive
 Copying the files to another computer on a network
04 Ta
Businesses backup essenti
ssential data by…

4
 Making copies of datata very regularly
 Using large-capacity y media such as magnetic tape
92 z

 Keeping old copies es of backups, just in case


00 ba

 Automating the system


syst so that nobody forgets to do it!
 Keeping backup med edia off-site (in case of fire or theft)
03 ah
Sh

Summary
Media Use
Magnetic backing storage medi dia
Fixed hard discs Used too store operating systems, software and working data.
da Any application
which
h re
requires very fast access to data for both reading
ing and writing to. Not for
cations which need portability. Used for online and real
application re time processes
ing
requiring direct access. Used in file servers for computer
er networks
ne
Portable hard discs Used too store very large files which need transporting from
rom one computer to
another
er a
and price is not an issue. More expensive than othe
other forms of removable
media
Magnetic tapes Any appli
plication which requires extremely large storage ca
capacity and speed of
Sh
03 ah
00 ba
92 z
04 Ta
59 riq
4
Sh
03 ah
00 ba
92 z
04 Ta
59 riq
4
Sh
03 ah
00 ba
92 z
04 Ta
59 riq
4
Sh
03 ah
00 ba
92 z
04 Ta
59 riq
4
Sh
03 ah
00 ba
92 z
04 Ta
59 riq
4
Sh
03 ah
00 ba
92 z
04 Ta
59 riq
4
Sh
03 ah
00 ba
92 z
04 Ta
59 riq
4
Sh
03 ah
00 ba
92 z
04 Ta
59 riq
4
Sh
03 ah
00 ba
92 z
04 Ta
59 riq
4
access is not an issue. Uses serial access for reading and writing. Used for
backups of file servers for computer networks. Used in a variety of batch
processing applications such as reading of bank cheques, payroll processing and
general stock control
Optical backing CDs tend to be used for large files (but smaller than 1Gb) which are too big for a
storage media such floppy disc to hold such as music and general animation. DVDs are used to hold
as CDs and DVDs very large files (several Gb) such as films. Both CDs and DVDs are portable i.e.
they can be transported from one computer to another. Both can be used to store
computer data
CD ROM/DVD ROM Applications which require the prevention of deletion of data, accidental or
otherwise. CDs used by software companies for distributing software programs
and data; by music companies for distributing music albums and by book
publishers for distributing encyclopaedias, reference books etc. DVDs used by
film distributors
CD R/DVD R Applications which require a single 'burning' of data, e.g. CDs -recording of music
downloads from the internet, recording of music from MP3 format, recording of
data for archiving or backup purposes. DVDs - recording of films and television

59 riq
programs
CD RW/DVD RW Applications which require the updating of information and ability to record over
old data. Not suitable for music recording but is very useful for keeping
04 Ta generations of files. DVDs have between five and ten times the capacity of CDs

4
DVD RAM Same properties as DVD RW but quicker access and data can be overwritten
more easily. Similar to floppies in nature but has 3000-6000 times more storage
and uses optical technology
92 z

Blu-ray Capacities of 25Gb, 50Gb and 100 Gb. Used for storing films (movies). 25Gb
00 ba

equates to 2 hrs HDTV, 13hrs standard definition TV. It is possible to playback


video on a disc while simultaneously recording HD video. (Will be) used for
storage of PC data
03 ah

Solid state backing Smallest form of memory used as removable storage. More robust than other
storage forms of storage. More expensive than other forms, but can be easily written to
and updated
Sh

Memory sticks/Pen Can store up to many Gb. Used to transport files and backup data from computer
drives to computer
Flash memory cards Used in digital cameras, palmtops, mobile phones, MP3 players

Examination Questions
Q1) Winter 2014 P3
In the diagram below, there are two types of memory shown on the left and five typical
memory features shown on the right.
Link each feature to either RAM or ROM by drawing connecting lines.

Computer Science with Syed Shahbaz Tariq Page 74


59 riq
04 Ta
4
92 z

Q2) Specimen 2015 P1 (Question 2)


00 ba

2 Kamil is setting up a new computer system to record television programmes. He wants to


be able to record, view and then erase programmes that he does not want to keep. He has
chosen to use DVD-RAM as an optical storage medium.
03 ah

Explain to Kamil why it is better to use DVD-RAM rather than DVD+RW or DVD-RW.
1 .......................................................................................................................................... 2
..................................................................................................................................... [2]
Sh

Marking Scheme:
Q3) Specimen 2015 P1 (Question 2)
Computer memories are measured in terms of the number of bytes.
(a) (i) What is meant by the term byte?
.............................................................................................................................................
........................................................................................................................................ [1]
(ii) What is meant by the term Gigabyte?
.............................................................................................................................................
........................................................................................................................................ [1]
(b) Flash memories and CD-RWs are used as backing media for computers.
Give two differences between these two media.
1 .......................................................................................................................................... 2
..................................................................................................................................... [2]
Marking Scheme:
(a) (i) Any one from:

Computer Science with Syed Shahbaz Tariq Page 75


- unit of data/memory
- 8 bits
- used to represent a character [1]
(ii) Any one from:
- 230 bytes
- 1 073 741 824 bytes - 1 048
576 kilobytes - 1024 megabytes
[1]
(b) Any two from:
Flash memory
- solid state memory
- no formatting issues
- plugs directly into the USB port
- direct transfer of data
CD-RW
- optical media
- slower access speed/flash memory has faster access speed

59 riq
- requires a separate drive
- data needs to be burnt/finalised/finished (before being used on another device) [2]
04 Ta
Q4) Summer 2013 P13 (Question 1)

4
1 Name a suitable sensor for each of the following applications.
Choose a different sensor in each application.
92 z

(i) control of a central heating system


(ii) operation of automatic doors
00 ba

(iii) detection of intruders


(iv) monitoring of a greenhouse environment
03 ah

1 .......................................................................................................................................... 2
.....................................................................................................................................
3 .......................................................................................................................................... 4
Sh

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

Q5) Summer 2013 P13 (Question 1)


You have just been appointed as the IT representative of a small engineering company.
The company need to buy:
• external backing storage
• printers
• input devices
Choose a suitable example for each and give a reason for your choice.
External storage device: ………………………………………………………………………… Reason
for choice: ………………………………………………………………………………. Printer type:
………………………………………………………………………………………. Reason for choice:
………………………………………………………………………………. Input device:
………………………………………………………………………………………

Computer Science with Syed Shahbaz Tariq Page 76


Reason for choice: …………………………………………………………………………… [6]
Q6) Summer 2013 P12 (Question 2)
Four types of data storage media and four descriptions are shown in the table below.
Tick (_) the appropriate boxes in the table to match each data storage medium to its
most suitable description.

59 riq
04 Ta
4
92 z
00 ba
03 ah
Sh

Q7) Summer 2013 P12 (Question 3)


Three common devices are listed below:
• MP3 player
• digital camera •
mobile phone
(a) Choose one of the above devices.
Describe the type of internal memory the device uses.
Describe how data is transferred from the device to a computer.
Device: ……………………………………………………………………………………….. Type of
internal memory used: ……………………………………………………………
Method of transferring data to a computer: ……………………………………………… [3]

(b) Modern mobile phones include a digital camera and an MP3 player. (i)
Give one disadvantage when compared to a dedicated MP3 player.
……………………………………………………………………………….………………………

Computer Science with Syed Shahbaz Tariq Page 77


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

(ii) Give one disadvantage when compared to a dedicated digital camera. [2]
……………………………………………………………………………….………………………
……………………………………………………….……………………………………………

Marking Scheme:

59 riq
04 Ta
(b) (i) Any one disadvantage from:

4
- memory size in mobile phone is usually much smaller
- many MP3 features (e.g. shuffle) not available on the mobile phone
92 z

- track/song can be interrupted by an incoming call on a mobile phone [1]


00 ba

(ii) Any one disadvantage from:


- poorer quality of image due to phone's inferior camera lens/fewer pixels /lower resolution
- stores fewer pictures
03 ah

- fewer photographic options [1]

Q8) Winter 2012 P12 (Question 3)


Sh

For each of the following five groups of hardware items, write down a computer
application that would need those items.

List of hardware items Application


webcam, microphone,speakers
barcode reader, POS terminal
pressure sensor, ADC,lights, siren
data gloves, data goggles
light pen, plotter, 3D printer

Q9) 9691_13W_P13 (Question 1)


1 (a) Define the terms hardware and software.
hardware: ………………………………………………………………………………………. software:
……………………………………………………………………………………. [2]
(b) A cinema allows its customers to buy tickets from an automatic dispensing machine.

Computer Science with Syed Shahbaz Tariq Page 78


Payment can be made either with cash, or by debit or credit card.
State two input and two output devices that would be needed and give reasons for
your choice of device.
Input device 1: ………………………………………………………………………………. Reason:
……………………………………………………………………………….
Input device 2: ………………………………………………………………………………. Reason:
……………………………………………………………………………….
Output device 1: ………………………………………………………………………………. Reason:
……………………………………………………………………………….
Output device 2: ……………………………………………………………………………….
Reason: ………………………………………………………………………………. [8]
Q10) 9691_13W_P13 (Question 3)
(b) The water temperature and water flow will be controlled by a microprocessor. The
user selects a temperature and sensor 1 interacts with the microprocessor to control the

59 riq
temperature of the water coming from the tap. Water flows from the tap when sensor 2
detects hand movement.
04 Ta
4
92 z
00 ba
03 ah
Sh

(i) Describe how the sensor 1 and microprocessor control the water temperature.
Include any safeguards that should be built into the system.
(ii) Describe how the sensor 2 and microprocessor start and stop the water flow.
……………………………………………………………………………….………………………
……………………………………………………….………………………………………………
……………………………….………………………………………………………………………
……….……………………………………………………………………………….……………
………………………………………………………………….……………………………………
………………………………………….……………………………………………………………
………………….……………………………………………………………………………….…
…………………………………………………………………………….…………………………
……………………………………………………………………………….………………………
……………………………………………………….………………………………………………
……………………………….………………………………………………………………………
……………………………………………………………….………………………………………

Computer Science with Syed Shahbaz Tariq Page 79


……………………………………….………………………………………………………………
……………….……………………………………………………………………………….……
………………………………………………………………………….……………………………
………………………………………………….…………………………………………… [6]
Q11) 9691_13W_P13 (Question 4)
4 Magnetic is one type of storage medium used by secondary storage devices. (a)
Name two other different types of storage medium. Give two devices that use each
type of named medium.
Medium type 1: …………………………………………………………………………………… Device 1:
………………………………………………………………………………………….. Device 2:
………………………………………………………………………………………….. Medium type 2:
…………………………………………………………………………………… Device 1:
…………………………………………………………………………………………..
Device 2: …………………………………………………………………………………….. [6]

59 riq
Q12) 9691_13W_P11 (Question 6)
6 (a) Describe the main differences between RAM and ROM.
04 Ta
……………………………………………………………………………….………………………

4
……………………………………………….………………………………………………………
……………………….…………………………………………………………………………. [3]
92 z

(b) Data logging devices contain both RAM and ROM.


00 ba

Describe the role of each type of memory in these devices.


RAM: ……………………………………………………………………………………………….
ROM: …………………………………………………………………………………………. [2]
03 ah

Q13) 9691_s13_p11
2 (a) State three different types of secondary storage media.
Sh

Explain how digital data is stored on each.


Type 1: …………………………………………………………………………………………… Type 2:
……………………………………………………………………………………………. Type 3:
……………………………………………………………………………………….. [6]
(b) A remote-controlled toy car contains both RAM and ROM. The car can be
programmed to carry out a number of manoeuvres.
(i) Describe the main differences between RAM and ROM.
……………………………………………………………………………….………………………
…………………………………………………….…………………………………………… [2]
(ii) How are the two types of memory used in the car?
…………………………………………………………………………….…………………………
…………………………………………………….……………………………………………. [2]

Computer Science with Syed Shahbaz Tariq Page 80


Q14 (a) Describe the main differences between Random Access Memory (RAM) and
Read Only Memory (ROM).
(b) Various external, removable memory devices exist. Choose which device (using a
different one in each case) you would use for the following, and give a reason for your
choice:
(i) storing multimedia files
(ii) storing music files
(iii) storing documents produced on a word processor

Application Device Reason for choice


Multimedia files MP4 or DVD Holds large amounts of data to allow audio, visual, video
and animation
Music files MP3 Compresses sound files to allow several tracks to be
stored using less memory

59 riq
Word processed CD or flash Can store files which can be taken away and used on any
document memory computer; don't normally need a huge memory capacity
therefore other devices not really needed
04 Ta
4
Q15) (a) A music file is 45 Mbyte in length. Approximately how much memory space
would this same file need if stored in MP3 format?
92 z

……………………………………………………………………………….………………………
00 ba

……………………………………………………………………….………………………………
……………………………………………………………………….……………………………… (b)
Describe how it is possible to store considerably more data on a DVD than on a CD
03 ah

even though dimensionally they are the same?


……………………………………………………………………….………………………………
Sh

……………………………………………………………………….………………………………
……………………………………………………………………….……………………………… (c)
Why have CDs and DVDs taken over from floppy disks as the main secondary
storage media on home computer systems?
………………………………………………………………………….……………………………
………………………………………………………………………….……………………………
Answer:
10(a) 90% reduction - so memory space required is ~ 4.5 Mbyte
(b) DVD features:
- dual layering
- higher density of data storage is possible
(c) Reasons for increase in usage of CDs/DVDs:
- greater capacity (can store multimedia files) - more
robust technology (harder to damage)
- longer "shelf life" if stored properly
Q16) (a) Mobile phones are communication devices. They allow communication via

Computer Science with Syed Shahbaz Tariq Page 81


speech or text messaging.
(i) Most mobile phones offer predictive texting. State
what is meant by this term.
……………………………………………………………………………….………………………
………………………………………………………………………….……………………… [1]
(ii) What two additional functions would you expect to find on a mobile phone?
1: ……………………………………………………………………………….………………… 2:
……………………………………………………………………………….……………… [2]

(b) Connecting a USB telephone to a computer allows communication using VoIP


technology.
(i) Give one advantage of using VoIP rather than other telephone systems.

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

59 riq
(ii) Give one disadvantage of using VoIP rather than other telephone systems.

……………………………………………………………………………….………………………
04 Ta
(iii) To use VoIP, there is no need to use a USB telephone.

4
What other hardware could be used to allow verbal communications?
……………………………………………………………………….……………………… [3]
92 z

Q16)A company advertises its Internet broadband speeds as follows:


• download speed of 128 megabits per second
00 ba

• upload speed of 16 megabits per second (8 bits = 1 byte)


(a) Explain what is meant by the two terms download speed and upload speed.
03 ah

download speed: ………………………………………………………….……………………… upload


speed: ……………………………………………………………………………….… [2]
(b) Give two advantages of using broadband rather than dial-up.
Sh

1: ……………………………………………………………………………….………………… 2:
…………………………………………………………………………….…………………[2]

(c) Give two different scenarios when a fast broadband connection is essential.
1
2 [2]
(d) How many 4-megabyte files could be downloaded per second using this company's
broadband? [1]

Q17)Specimen Paper 1 for 2011


Q1 State two desirable properties of processors found in laptop computers. Explain why
the selected property is desirable. ()
……………………………………………………………………………….………………………
……………………………………………………………………………….………………………

Computer Science with Syed Shahbaz Tariq Page 82


……………………………………………………………………………….………………………
Q18) Winter 2008
2 (b) Describe two special devices that are used for man-machine interaction in virtual
reality systems.
(c) Give two examples of typical output from a virtual reality system. ()
……………………………………………………………………………….………………………
……………………………………………………………………………….………………………
Q19) Winter 2009
Q12 The digital CCTV camera is connected to a computer. The computer can make the
camera move in any direction by sending out digital signals. The computer system has a
400 gigabyte hard disk.
(e) Each image size is 400 kilobytes (0.4 gigabytes).
(i) How many images can be stored before the hard disk is full?
……………………………………………………………………………….………………………

59 riq
……………………………………………………………………………….……………………… (ii)
Once the hard disk is full, how can the system ensure that the stored images are not
lost and new images can be stored?
04 Ta
……………………………………………………………………………….………………………

4
……………………………………………………………………………….………………………
Q20) Winter 2009
92 z

Q8 (b) The supermarket has decided to fit sensors at the shop entrance to count people
00 ba

coming in and leaving.


(i) What type of sensor would be suitable to detect people?
……………………………………………………………………………….………………………
03 ah

……………………………………………………………………………….………………………
(ii) How could the supermarket use the information obtained from these sensors?
Sh

(i) infra-red sensor: …………………………………………………………………………… [1]

Q21) Summer 2012 Question Paper 11


1 Video conferencing, Voice over Internet Protocol (VoIP) and instant messaging
are all used as communication methods. Certain devices are essential to enable each
of these communication methods to be used.
Tick ( ) the appropriate cells in the table below to show which one or more
devices are essential for each method. [3]
keyboard microphone Speaker w eb ca m
VoIP
video
conferencing
instant
messaging

Computer Science with Syed Shahbaz Tariq Page 83


2. Describe ways to guard against each of the following Internet security issues. (A
different method should be given in each case.)
Viruses: ……………………………………………………………………………….……………
Hacking: ……………………………………………………………………………….…………
Spyware: ……………………………………………………………………………….…………
Phishing: ……………………………………………………………………………….………
tapping into wireless networks ………………………………………………………………[5]

Q22) Jatinder uses Internet banking.


(a) Give one benefit and one drawback of using Internet banking.
Benefit: ……………………………………………………………………………….…………
Drawback: …………………………………………………………………………………… [2] She
uses a 5-digit PIN.

59 riq
(b) Every time she logs on, she is asked to give 3 random digits from the PIN. She was
asked to give her 3rd, 1st and 4th digit. This changes every time she logs on. Give a reason
for this.
04 Ta
4
……………………………………………………………………………….………………………
……………………………………………………………………………….……………… [1]
92 z

Q23) Summer 2012 (Question Paper 12)


00 ba

2 Both email and mobile phones can be used to send messages.


Give one advantage and one disadvantage of using each method when compared to each
other.
03 ah

(i) Email:
Advantage: ……………………………………………………………………………….……
Sh

Disadvantage: ……………………………………………………………………………….……
(ii) Mobile phones:
Advantage: ……………………………………………………………………………….………
Disadvantage: ……………………………………………………………………………….. [4]

Q24) A computer system is to have wireless access (Wi-Fi) to the Internet.


State five potential security issues.
1: ……………………………………………………………………………….………………… 2:
……………………………………………………………………………….………………… 3:
……………………………………………………………………………….………………… 4:
……………………………………………………………………………….…………………
5: ……………………………………………………………………………….…………… [5]

Q25) Winter 2007

Computer Science with Syed Shahbaz Tariq Page 84


1 Explain, with examples, the following five computer terms:
(a) byte [2]
(b) CD-ROM [2]

Q 26) Summer 2008


A computer system comes equipped with DVD writer/reader, hard disk drive and RAM. (a)
Give a different use for each of these forms of memory.
DVD
Hard Disk
RAM
(b) Give another example of a memory device and give one advantage of the named
device.

Q27) Summer 2009

59 riq
A company produces animation effects using computers rather than producing them
manually.
(b) Each image takes about 400 kilobytes of storage. 25 images per second are produced.
04 Ta
How much memory would be needed to store a 30-minute animation?

4
……………………………………………………………………………….………………………
……………………………………………………………………………….………………………
……………………………………………………………………………….………………………
92 z
00 ba

Q28) Winter 2010 P11 (7010)


Explain, using examples where appropriate, the following five computer terms:
03 ah

 USB flash memory


 RAM
Sh

Q29) Winter 2010 P13(7010)


1. Explain, with examples where appropriate, the following five computer terms.
(b) Optical media

3 A typical computer system contains the following four components:


_ RAM
_ ROM
_ hard disk
_ modem
Describe the function of each of these components.
……………………………………………………………………………….………………………
……………………………………………………………………………….………………………
……………………………………………………………………………….………………… [4]

Computer Science with Syed Shahbaz Tariq Page 85


Q30) Summer 2011 P12 (7010)
Name THREE different types of storage media andgive an example of each.
1: ……………………………………………………………………………….………………… 2:
……………………………………………………………………………….………………… 3:
……………………………………………………………………………….…………………

Q31) Summer 2012 P12 (7010)


7 The electronic equipment contains RAM and ROM. Give one use of each type of
memory. [2]

Q32) 12 (a) John has bought a 4 Gbyte MP3 player.


(You may assume: 1 byte = 8 bits, 1 Mbyte = 1024 kbytes and 1Gbyte = 1024 Mbytes)
(i) We can assume that each song lasts 3 minutes and is recorded at 128 kbps (kilobits per

59 riq
second).
How much memory is required per song? [2]
(ii) Using your answer in (i), how many songs can be stored on John's MP3 player? [2]
04 Ta
(b) John also bought a device for recording television programmes. It allows him to record

4
a programmeat the same time as he is watching an earlier recording. Describe how such a
system would work.
92 z

Q33) Winter 2012 P12


00 ba

The following statistics refer to a music track being recorded on a CD:


• music is sampled at 44 100 times per second
• each sample is 16 bits
03 ah

• each track requires separate sampling for left and right speakers of a stereo recording
(8 bits = 1 byte, 1 megabyte = 1 048 576 bytes)
(a) (i) How many bytes are required to represent one second of sampled music?
Sh

[2]
(ii) If a typical music track is 3 minutes long, how much memory is used on the CD to
store one track? (Give your answer in megabytes.)

Q34 ) Summer 2013 P12


Four types of data storage media and four descriptions are shown in the table below.
Tickthe appropriate boxes in the table to match each data storage medium to its
mostsuitable description.

Computer Science with Syed Shahbaz Tariq Page 86


59 riq
Three common devices are listed below:
04 Ta
• MP3 player

4
• digital camera •
mobile phone
92 z

(a) Choose one of the above devices.


00 ba

Describe the type of internal memory the device uses.


Describe how data is transferred from the device to a computer.
03 ah

Q35) Summer 2013 P12


The speed at which a CD spins in a portable music CD player is controlled by sensors and
Sh

a small microprocessor.
(a) Describe how the sensors and microprocessor are used to control the speed of the
spinning CD. [4]
(b) Sudden movements can make the CD "skip".
How can the microprocessor deal with this so that the CD operates correctly? [2]
(c) Why would an MP3 player not suffer from the same problem? [1]
Memory Size Calculation:

Q36) A company produces animation effects using computers rather than producing
them manually.
(b) Each image takes about 400 kilobytes of storage. 25 images per second are produced.
How much memory would be needed to store a 30-minute animation?

Computer Science with Syed Shahbaz Tariq Page 87


Q37) Juan uses a company which offers the following
Internet broadband transfer rates:
• 56 megabits per second DOWNLOAD
• 16 megabits per second UPLOAD

(b) If each music track is 3.5 megabytes in size, how long would it take Juan to download
his 40 tracks? (Show your working.)

59 riq
(c) He has decided to upload 36 photographs onto his social networking website. Each
04 Ta
photograph is 1.8 megabytes in size.

4
How long would it take to upload his photographs?
92 z
00 ba
03 ah

Q38) . John has bought a 4 Gbyte MP3 player.


(You may assume: 1 byte = 8 bits, 1 Mbyte = 1024 kbytes and 1Gbyte = 1024 Mbytes)
Sh

(i) We can assume that each song lasts 3 minutes and is recorded at 128 kbps (kilobits per
second).
How much memory is required per song?

Q39) A digital security camera was set up as shown in the diagram.


The digital CCTV camera is connected to a computer. The computer can make the
camera move in any direction by sending out digital signals. The computer system has a
400 gigabyte hard disk.
Each image size is 400 kilobytes (0.4 gigabytes).
(i) How many images can be stored before the hard disk is full?

Computer Science with Syed Shahbaz Tariq Page 88


Q40) Computer memories are measured in terms of the number of bytes.
(i) What is meant by the term byte?
(ii) What is meant by a Gigabyte?
(b) Flash memories and CD-RWs are used as backing media for computers.
Give two differences between these two media.

Q41) The following statistics refer to a music track being recorded on a CD:
• music is sampled at 44 100 times per second
• each sample is 16 bits
• each track requires separate sampling for left and right speakers of a stereo recording
(8 bits = 1 byte, 1 megabyte = 1 048 576 bytes)
(a) (i) How many bytes are required to represent one second of sampled music?
(ii) If a typical music track is 3 minutes long, how much memory is used on the CD to
store one track? (Give your answer in megabytes.)

59 riq
04 Ta
4
92 z
00 ba
03 ah
Sh

Computer Science with Syed Shahbaz Tariq Page 89


Monitoring & Control System
May/June 2006 P1 (7010)
8 Data-logging is used for monitoring the level of oxygen in a river.
(a) State one item of hardware that is used to collect the oxygen data. [1]
(b) Explain how the oxygen data is processed by the computer. [2]
(c) State two ways that the oxygen data could be displayed for a user to understand.
[2]
(d) Explain what the computer would do if the amount of oxygen in the water is too
high[1]
(e) Give two advantages of using data-logging for monitoring the oxygen data in a
river[2]

Oct/Nov 2006 P1 (7010)

59 riq
A computer is used to control the traffic lights at each end of a narrow bridge.

04 Ta
4
92 z
00 ba
03 ah

(a) State one type of sensor that could be used to detect a vehicle approaching the
Sh

bridge. [1]
(b) Give one reason why an analogue to digital converter (ADC) may be needed. [1]
(c) Describe how the data received from the sensors is used to control the timing of the
traffic lights. [3]
(d) If the computer controlling the traffic light system detects an error in the system, or
fails completely, what should the lights on the bridge do? [1]

May/June 2007 P1 (7010)

Modern car engines use fuel injection systems which are controlled by microprocessors
called Engine Control Units (ECUs). The fuel injection system controls the amount of fuel
that goes into the engine. Sensors monitor engine conditions and feed the data back to
theECUs.

Computer Science with Syed Shahbaz Tariq Page 90


(a) Name two types of sensors used to monitor engine conditions. [2]
(b) Describe how information from the sensors is used to control the fuel injection system
[3]
(c) Give an advantage of using automatic fuel injection systems rather than simpler
mechanical fuel devices. [1]

59 riq
(d) The fuel injection system operates in real time.
Why would batch processing not be appropriate in this application?
04 Ta [1]

4
Oct/Nov 2007 P1 (7010)

Monitoring of patients' vital signs (e.g. heartbeat) in a hospital is done automatically using
92 z

sensors and computer hardware. Readings are shown on a screen both as a graph and as
00 ba

numbers.
(a) Why are readings shown in both graphical and numerical form? [2]
03 ah

(b) When the heartbeat is being monitored, how does the system decide if the
doctor/nurse needs to be warned of an abnormal reading?
[1]
Sh

(c) Give two advantages of using this type of automatic monitoring. [2]
(d) How does this monitoring system differ from a control system?
[1]

May/June 2008 P1 (7010)

16 The washroom in a hotel uses lights controlled by a computer system. If the


washroom is unoccupied for 10 minutes, the lights go out automatically. As soon as
someone enters, the lights come on.
(a) How can the system determine if anyone is in the washroom? [2]
(b) Write down a set of instructions which would enable the computer to decide when to
turn out the lights. [3]
(c) Give one advantage of this automatic system. [1]

Oct/Nov 2008 P1 (7010)

Computer Science with Syed Shahbaz Tariq Page 91


A large city has decided to computerise totally its traffic management system. Traffic
lights and electronic road signs are now under automatic computer control.
(a) Sensors are placed around the city to gather information about traffic. Describe what
information would need to be gathered. [2]
(b) Describe two ways the information from the sensors could be sent to the central
computer which is located several miles away. [2]
(c) Give two advantages of having the traffic in the city controlled in this way. [2]

May/June 2009 P1 (7010)

15 Aeroplanes use on-board computer power to allow them to operate more efficiently and
safely.
(a) How is data during a flight collected and fed back to on-board computers? [2]
(b) Why are computer systems thought to be safer than human pilots? [2]

59 riq
(c) However, pilots are still used on all flights. Why is this? [2]
(d) What recent developments have led to more use of computer control in newly
designed aeroplanes? [1]
04 Ta
(e) Describe how the computer would know when to make course corrections during a

4
flight. [2]
(f) At the airport, baggage check-ins use bar codes which are read by computers.
92 z

(i) What information would be stored on the bar code? [1]


00 ba

(ii) Why do airports use the bar codes on baggage? [1]


03 ah

Oct/Nov 2009 P1 (7010)


How could a computer simulation be used by a supermarket to reduce queuing at
checkouts? [2]
Sh

(b) The supermarket has decided to fit sensors at the shop entrance to count people
coming in and leaving.
(i) What type of sensor would be suitable to detect people? [1]
(ii) How could the supermarket use the information obtained from these sensors? [2]
(c) The supermarket has decided to fit information screens at various locations for
customer use. These information screens do not use keyboards.
(i) Give one example of a suitable input device. [1]
(ii) What information could be made available to supermarket customers? [1]
(iii) Give one advantage of using this system rather than displaying signs and notices
around the supermarket. [1]

12 A digital security camera was set up as shown in the diagram.

Computer Science with Syed Shahbaz Tariq Page 92


The digital CCTV camera is connected to a computer. The computer can make the
camera move in any direction by sending out digital signals. The computer system has a
400 gigabyte hard disk.
(a) What hardware is needed to inform the computer that the camera needs to ove to

59 riq
capture an image? [1]
(b) Why is the DAC needed? [1]
(c) How could the computer use the camera to detect an intruder? [1]
04 Ta
(d) Give two advantages of using digital cameras. [2]

4
Oct/Nov 2010 P12 (7010)
A road system is to be operated using computer-controlled traffic lights. Sensors are used
92 z

as part of the control system.


00 ba

(a) The movement of traffic throughout the road system was first simulated on a computer.
Describe what data would need to be collected and how it would be used in the
simulation. [3]
03 ah

(b) Give two advantages of carrying out a simulation first before introducing a new
system. [2]
Sh

(c) Describe how the sensors, traffic lights and computer interact to control the traffic
flowing the new system. [2]
May/June 2011 P11 (7010)
8 Many computer-controlled systems use sensors to gather physical data. For
example,temperature sensors are used in the control of central heating systems.
(a) Name three other sensors and give a different application for each named sensor. [6] (b)
Describe how temperature sensors are used in computer-controlled central heating
systems. [3]

Oct/Nov 2011 P12 (7010)


The conditions in a fish tank are being controlled using sensors and a microprocessor. To
keep the fish healthy, the temperature must be at 25°C and the oxygen content needs to
be20 ppm (parts per million). The tank contains a heater and an oxygen inlet controlled by
a valve.

Computer Science with Syed Shahbaz Tariq Page 93


(a) Name the two sensors used in this application. [2]

59 riq
(b) Describe how the sensors and the microprocessor are used to maintain the correct
conditions in the fish tank. [4]
04 Ta
(c) What safeguards would be needed to stop the fish tank temperature rising too high?

4
[1]
92 z

Oct/Nov 2011 P13 (7010)


00 ba

A computer system is being used to monitor and control a chemical process.


03 ah
Sh

(a) Data are collected from sensors at regular intervals and compared with stored values.
(i) Describe how the computer uses this data when monitoring the chemical process.[1]

Computer Science with Syed Shahbaz Tariq Page 94


(ii) Describe how the computer uses this data when controlling the chemical process.[1]
(b) What steps are necessary for the computer to control the temperature of the chemical
process? [3]
(c) Name two other sensors and give a different application where they are used.

May/June 2010 P11 (7010)


A shower unit is controlled by sensors and a microprocessor.

59 riq
04 Ta
4
92 z
00 ba

(a) Describe how the sensors and microprocessor are used to ensure the correct water
03 ah

flow and water temperature are maintained. [4]


(b) Give one safety feature that could be built into the shower unit in case the sensors
and/or microprocessor fail. [1]
Sh

(c) What is the advantage of having microprocessor control rather than manual control of
water flow and temperature? [1]

Computer Science with Syed Shahbaz Tariq Page 95


May/June 2010 P12 (7010)

A safety system has been developed to stop vehicles getting too close to each other on the
road.

If vehicle A gets too close to vehicle B, the brakes are automatically applied by a computer
system in vehicle A.
(a) What type of sensors could be used on the vehicles? [1]
(b) Describe what the safety system does to constantly monitor how close the vehicle is

59 riq
to the vehicles in front and decide when to take action. [4]
(c) Describe two potential problems with this safety system. [2]
04 Ta
4
May/June 2011 P11 (7010)
Many computer-controlled systems use sensors to gather physical data. For example,
92 z

temperature sensors are used in the control of central heating systems.


00 ba

(a) Name three other sensors and give a different application for each named sensor.[6]

May/June 2012 P11 (7010)


03 ah

Vehicles passing over a bridge are detected automatically using sensors and a computer.
(a) What sensors could be used? [1]
(b) The graph below shows the number of vehicles counted during certain periods of the day.
Sh

This graph is produced automatically at the end of each day.

A record is created each time a vehicle is detected. These records are processed to

Computer Science with Syed Shahbaz Tariq Page 96


generate the graph and for other purposes.
What data need to be stored in each record? [2]
(c) State two other methods of automatic data capture. In each case, name an
application which would use this method. [4]
May/June 2012 P12 (7010)
A room in a house is fitted with a computerised intruder alarm system:

59 riq
(a) (i) Describe how the sensors and computer would be used to detect intruders. (ii)
Describe how the system warns that an intruder has been detected.
04 Ta [
4]

4
(b) It is decided to automatically close door and window shutters if an intruder is detected.
What additional processing and hardware would be needed? [2]
92 z

(c) Name another sensor that could have been used in this intruder alarm system.[1]
00 ba

(d) What measures could be taken to stop or minimise the number of false alarms?[2]
03 ah

Oct/Nov 2012. P12 (7010)


13 A chemical company uses pipes to transfer hazardous liquids. To protect the
workforce, each pipe is inside a protective pipe.
Sh

Sensors are used to detect the sound of any liquid dripping into the protective pipe.
Actuators operate the valves that regulate the flow of liquid through the inner pipe. This
system is controlled by a computer.
(a) Describe how the sensors, actuators, valves and computer are used to monitor and
control the liquid in the pipe. [5]

Computer Science with Syed Shahbaz Tariq Page 97


(b) Give two advantages of using this computer-controlled system rather than visual
checks by the workforce. [2]
May/June 2013 P11 (7010)

1 Name a suitable sensor for each of the following applications.


Choose a different sensor in each application.
(i) control of a central heating system
(ii) operation of automatic doors
(iii) detection of intruders
(iv) monitoring of a greenhouse environment [4]
An aeroplane uses three separate computer systems to monitor and control the flight
process while in auto pilot mode.
(a) Explain the advantages of using three computers rather than just one. [2]
(b) Sensors are used to measure air speed. The readings are sent to the three computers.

59 riq
Describe how the sensors and computers are used to control the aeroplane's speed in
auto pilot mode. [4]
04 Ta
Oct/Nov 2013. P13 (7010)

4
6 Patients in a hospital are monitored for vital signs (for example, heart beat and
temperature) by sensors and a computer system. Results are displayed on a monitor in the
92 z

form of numbers and graphs.


00 ba

(a) Describe how the sensors and computer system are used to monitor the patients and
to alert doctors and nurses of a possible problem. [3]
(b) Give two advantages of using this system rather than 24 hour monitoring by
03 ah

nurses.[2]
(c) Why is the output shown in both graphical and numerical form? [2]
Sh

Marking Scheme
Q2) - direct access because of concentric - GPS [2]
tracks (b) 1 mark for each part:
- can read and write at the same time (i) - less expensive/cheaper than other
because it has a read/write head [2] telephone systems
- can use webcams to have visual as well as
Q15) (a) (i) - as first character(s) keyed in, rest
text/speech
of word predicted /word(s) suggested according
(ii) - poor quality/drop out/echoes are very
to the letter(s) already entered [1]
common problems
(ii) Any two from (items below are only
- need to have fast broadband connection to
examples):
work effectively
- MP3 player
(iii) - microphone and speaker/headphones
- Bluetooth
- headset [3]
- wifi
- camera
- Internet surfing Q16) (a) download speed any one from:

Computer Science with Syed Shahbaz Tariq Page 98


- speed at which information/data is sound effects
transferred FROM server/Internet smells/simulated smells
movement
- speed at which information/data is
transferred TO the user's computer
upload speed any one from: Q19)
- speed at which information/data is (i) 400/0.4 = 1000 images
alternative answer 400/0.0004 = 1 000 000
transferred FROM user's computer
images approx (1 048 576 exactly)
- speed at which information/data is (ii) store images on another hard drive or on
transferred TO the Internet/server [2] DVD/CDs archive old images
(b) Any two from: Q20)(ii) any two from
- can use Internet connection and safety reasons (in case of fire, for example)
telephone at the same time how many check-outs to open
- much faster data transfer speed check on how many customers use s/market at
different times
- always "on"
feed information into simulation/model

59 riq
- charged for number of bytes/flat rate per
Q21) viruses e.g.
month rather than actual time on line
- use anti-virus software // regular virus scans
- more bandwidth [2] - don't open/use disks // don't open email
(c) Any two from:
04 Ta attachments from unknown sources

4
- when transferring large Hacking e.g.
files/attachments with emails - passwords / user IDs
- firewalls
92 z

- when streaming music/video files/bit


Spyware e.g.
00 ba

streaming - anti-spyware software


- when using VoIP/video conferencing - delete cookies at end of session
- software updates Phishing e.g.
03 ah

- online transactions - don't open emails from unknown sources


- don't divulge personal information via email /
- Using VLE (Virtual Learning
unsecure website
Sh

Environment) [2] - ensure that the site viewed has a valid security
(d) 128 Mbits/sec = 16 Mbytes/sec certificate (SSL)
Therefore, FOUR (4) files could be tapping into wireless networks e.g.
- secured wifi network (protected by passwords)
downloaded [1]
- encryption / WEP
[5]
Q17) consume little power ….
…. hence prolonging internal battery life run cool Q222)
…. (a) Any one benefit and one drawback from:
…. thus minimising problem of heat dissipation no (b) benefit:
processor fans required …. (c) - can bank at any time 24/7
…. therefore prolonging internal battery life - save money on travelling
- save time not travelling to bank
Q18) (b) Any two from: - can bank from anywhere
data gloves - can do transactions/look after account
data goggles/visors drawbacks:
special suits fitted with sensors - need computer equipment/internet -
(c) Any two from: fear of hacking , viruses, etc.
3D output of the surroundings

Computer Science with Syed Page 99


Shahbaz Tariq
- lack of one to one with bank - use of predictive texting
- creation of "ghost towns" - cheaper to buy a phone
- reduced socialising disadvantage (one from:)
- cause of redundancies - can't send large documents/files/limited
- possibility of mismanaging account number of characters
- lack of counter services (drawing out cash) [2] - phone charges for sending messages are
(b) Any one from: relatively high
- stops hackers getting all of the PIN characters - phone charges for sending messages
Q23) email overseas are high
advantages (one from:) - slow to key in messages/small keyboard
- easier to send attachments - often out of range of signal/poor signal
- easier/faster to type - smaller screens
- can format text
- cheaper to send an email Q24) Any five from:
disadvantage (one from:) - viruses
- need to buy computer equipment - hacking -
- computer equipment not as portable as mobile cookies

59 riq
phone - pharming -
- need a broadband connection/modem/Internet phishing
access - spyware
04 Ta
- need account for emails - tapping into unsecured wifi network/war driving -

4
- can send a virus shoulder surfing/over-the-shoulder observation of
mobile phones the Internet user's credentials/user name and
advantages (one from:) password
92 z

- completely portable method/can be used on


00 ba

the move
- more people have mobile phones
03 ah
Sh

Computer Science with Syed Shahbaz Tariq Page 100


1.3.6 Operating systems

1.3.6 Operating systems


• describe the purpose of an operating system • show
understanding of the need for interrupts
An operating system (OS) is software that manages computer hardware and software
resources and provides common services for computer programs.

The operating system is an essential component of the system software in a computer


system. Application programs usually require an operating system to function.

Not all computers have operating systems. The computer that controls the microwave oven
in your kitchen, for example, doesn't need an operating system. It has one set of tasks to
perform, very straightforward input to expect (a numbered keypad and a few pre-set
buttons) and simple, never-changing hardware to control. For a computer like this, an

59 riq
operating system would be unnecessary baggage, driving up the development and
manufacturing costs significantly and adding complexity where none is required. Instead,
the computer in a microwave oven simply runs a single hard-wired program all the time.
04 Ta
4
For other devices, an operating system creates the ability to:
 serve a variety of purposes
92 z

 interact with users in more complicated ways


00 ba

 keep up with needs that change over time

All desktop computers have operating systems. The most common are the Windows
03 ah

family of operating systems developed by Microsoft, the Macintosh operating systems


developed by Apple and the UNIX family of operating systems (which have been
Sh

developed by a whole history of individuals, corporations and collaborators). There are


hundreds of other operating systems available for special-purpose applications, including
specializations for mainframes, robotics, and manufacturing, real-time control systems and
so on.

In any device that has an operating system, there's usually a way to make changes to
how the device works. This is far from a happy accident; one of the reasons operating
systems are made out of portable code rather than permanent physical circuits is so that
they can be changed or modified without having to scrap the whole device.

Functions of an OS
The main functions of a computer's operating system are to:
• complete its own loading into RAM when the computer is started up using a small
firmware program stored in ROM or FLASH memory

Computer Science with Syed Shahbaz Tariq Page 101


• manage user accounts and security
• provide an interface for the user •
control the application programs
• manage the processor's time
• manage the allocation of internal memory
• control peripheral devices keyboards, printers and hard disk drives
• provide 'spooling' - temporary storage of input or output data for relatively slow
peripherals
• manage interrupt signals to the processor
• perform housekeeping tasks, such as file indexing or defragmenting a HDD drive.
Types of operating system
Types of operating system, which are not mutually exclusive, include:
• a batch OS
• a multi-tasking OS • a

59 riq
multi-access OS
• a real-time OS of which there are two types:
- a real-time transaction processing OS
04 Ta
- a real-time process control OS • a

4
network OS. User interface
A user interface, or human-computer interface (HCI), consists of all the hardware and
92 z

software through which a user provides input to a computer or receives information from
00 ba

it. Types of user interface controlled by the OS include:


 Command Line Interface
 A Graphical User Interface:
03 ah

A Command Line Interface (CLI):


A command-line interface allows the user to interact with the computer by typing in
Sh

commands. The computer displays a prompt, the user keys in the command and presses
enter.

In the early days of personal computers, all PCs used command-line interfaces.

Features of a command-line interface

Computer Science with Syed Shahbaz Tariq Page 102


 Commands must be typed correctly and in the right order or the command will not
work.
 Experienced users who know the commands can work very quickly without having
to find their way around menus.
 An advantage of command driven programs is that they do not need the memory
and processing power of the latest computer and will often run on lower spec
machines.
 Command driven programs do not need to run in Windows.
 A command-line interface can run many programs, for example a batch file could
launch half a dozen programs to do its task.
 An inexperienced user can sometimes find a command driven program difficult to
use because of the number of commands that have to be learnt.
An example of a common command driven interface is MS-DOS. The MS-DOS
command to display all files on c:\ would be: dir c:\

59 riq
A Graphical User Interface:
Graphical user interface is sometimes shortened to GUI. The user chooses an option
04 Ta
usually by pointing a mouse at an icon

4
representing that option.
Features of GUIs include:
92 z

 They are much easier to use for beginners.


00 ba

 They enable you to easily exchange


information between software using cut and paste
or 'drag and drop'.
03 ah

 They use a lot of memory and processing


power. It can be slower to use than a
command-line interface if you are an expert user.
Sh

 They can be irritating to experienced users when simple tasks require a number of
operations.
When discussing user interfaces, it is important to note that Windows XP, Windows
Vista, Apple OSX and Ubuntu all have graphical user interfaces.

Good user interfaces


A good user interface should:
 be attractive and pleasing to the eye
 allow the user to try out different options easily
 be easy to use
 use suitable colours for key areas
 use words that are easy to understand aimed at the type of user
 have help documentation

Computer Science with Syed Shahbaz Tariq Page 103


It should also consider the needs of the users. For example, young children are likely to
prefer pictures to words and people with
disabilities may benefit from particular input or output
devices.

A Menu Driven Interface:


The user is offered a simple menu from which to
choose an option. One menu often leads to a further menu. Part of the screen may have an
instruction followed by a numbered list of options to choose from.

File management
A file is a program or set of data saved in backing storage.

Directories, sub-directories and folders

59 riq
A file directory is an index of the contents of a storage drive or sub-directory (a subset of the
drive's contents). A GUI of en represents a directory as a folder.
Commands for file management
04 Ta
• listing, sorting and searching the contents of a storage drive or folder

4
• moving contents between drives or folders •
copying contents between drives or folders
• printing a file without having to open it in an application program window.
92 z
00 ba

Peripheral device control


Methods of communication between the OS and peripheral devices include the use of: 
03 ah

Buffers: Temporary memory area in memory used to compensate the difference in


speed of two devices.
 Spoolling: Acronym for simultaneous peripheral operations on-line, spooling refers
Sh

to putting jobs in a buffer, a special area in memory or on a disk where a device can
access them when it is ready. Spooling is useful because devices access data at
different rates.
 Interrupts: A signal sent from a peripheral device (hardware) or program event
(software) to the printer to indicate that the sender needs attention.
 Polling: The process carried out by an operating system of periodically interrogating
each peripheral device in turn to discover whether it needs the attention of operating
system.
 Handshaking: The process by which two devices negotiate the protocol, (rules) they
will use to communicate for the rest of the session, or signal their readiness to send or
receive data.
 Checksum: A summary value that is calculated from a block of data.

Examination Questions

Computer Science with Syed Shahbaz Tariq Page 104


Summer 2014 P11:
2 (a) (i) A student wrote: "batch processing can be used when making airline bookings".
Why is this statement incorrect? [1]

_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
(ii) The same student also wrote: "to launch an application, a graphical user interface
(GUI) requires typing the name of the application using a keyboard".
Why is this statement incorrect? [1]
...........................................................................................................................................................
..................................................................................................... ……………………………………….
(b) A user interface is a function of a typical operating system.

59 riq
Write down four other functions of a typical operating system.
1: ____________________________________________________________________
2: ___________________________________________________________________ 3:
04 Ta
___________________________________________________________________

4
4: _________________________________________________________________ [4]
92 z

Summer 2011
00 ba

Q) Most operating systems provide a user interface.


03 ah

(a) User interfaces can be either command line interfaces (CLI) or graphical user
interfaces (GUI). Give ONE advantage and ONE disadvantage of both types of interface.
Sh

Advantage CLI:

Disadvantage CLI:

Advantage GUI:

Disadvantage GUI: [4]


(b) Give THREE other tasks carried out by an operating system.
1: ____________________________________________________________________
2: ___________________________________________________________________
3: ___________________________________________________________________ [3]

Question ) 9691_13w_qp11

Computer Science with Syed Shahbaz Tariq Page 105


(a) What is meant by an interrupt?

_____________________________________________________________________
___________________________________________________________________ [1]
(b) A user starts the printing of a document, and then carries on editing a second
document while printing continues.
Explain how interrupts make this possible.

_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
___________________________________________________________________ [4] (c)
Once a week the user runs a virus checker.
What action will be taken if the virus checker detects a virus in a file?

59 riq
...........................................................................................................................................................
.........................................................................................................................................................
04 Ta
[2]
(d) The computer is running a single-user operating system.

4
Describe what this means.
_____________________________________________________________________
92 z

_____________________________________________________________________
00 ba

___________________________________________________________________ [2]
03 ah

Question ) 9691_13s_qp11
(a) Describe the terms buffer and interrupt.
Sh

buffer: _______________________________________________________________
___________________________________________________________________ [2]
interrupt: _____________________________________________________________
_____________________________________________________________________
___________________________________________________________________ [2]

(b) (i) Explain the role of the buffer and interrupts when a large document of over 200
pages is sent to a laser printer.
_____________________________________________________________________
___________________________________________________________________ [3]
(ii) The use of two buffers would speed up the printing process. Explain why.
______________________________________________________________________
______________________________________________________________________
___________________________________________________________ [2]

Computer Science with Syed Shahbaz Tariq Page 106


1.3.7 High- and low-level languages and their translators

1.3.7 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

Programming Language:
"A set of rules that provide a way of telling computer what operation to perform is
called a Programming Language."
Computer needs instructions to perform a task. Program is set of step by step
instruction which directs computer to do the task and to produce results. There are some

59 riq
rules and regulations to write programs and these rules and regulations are programming
languages.
Different types of programming languages are given below:
04 Ta
1) Machine Language: (Low Level Language)

4
Machine languages are the most basic languages. They consist of a series of
92 z

current signals ‘On’ and ‘Off’. On is represented by ‘1’ and off is represented by ‘0’. It is
00 ba

1st generation of language.


Machine language is also called Binary Digits. It is computer’s language in which
03 ah

different parts of computer communicate with each other. 0s and 1s are called bit (binary
digit).
Machine language is easy for computer Machine Language Code
Sh

and difficult for programmer. Every computer 000100101111010101001111010101


has its own unique machine language. It 0100010011000011111010101011110
means machine for Apple Macintosh is 0011110001010101010010100001111
different from IBM compatible. 1010101011110101000111110101011
101100100110000101010010101010
2) Assembly Language: (Middle Level Language)
Assembly language consists of English like symbolic codes known as mnemonics.
It is a second generation of language.
They represent common strings of machine codes. A language translator,
Assembler, is used to convert source code of Assembly language program into object
code of machine language. Though Assembly
languages are easier than machine language Assembly Code (Source code)
but they are highly detailed and cryptic. So
programmers seldom write programs in ADD R1 #6 #12
DIV R2 R1 #2
Assembly language. Instead programmers use STO R2000 R2
Assembly languages to fine-tune important parts

Computer Science with Syed Shahbaz Tariq Page 107


of programs written in a high level language.
3) High Level Languages
High-level languages consist of familiar English words as result programmers can
read, write and understand programs easily.
A language translator (compiler or interpreter) translates source code of High Level
Language into object code. That's why the program of High Level Language can be
executed on any machine.

High Level Code (Source code)

For Count=1 to 10
Print ''Allah''
Next Count

59 riq
Examples: COBOL, Pascal, FORTRAN, GWBASIC, C++, JAVA, VB.Net.
04 Ta
Source Code:

4
''A program written in any language except the machine language is called Source
Code.''
92 z

Programmers can write programs in Machine Language, Assembly Language and


00 ba

High Level Languages like COBOL, PASCAL, and GWBASIC etc. The programs, written in
Assembly Language or any High Level Language are called Source Code.
03 ah

Object Code:
''A program written in Machine Language is called Object Code.''
Sh

Computer can understand only machine language code. Language translators


converts source code of High Level Language into machine code, these converted
codes are Object Codes.

Source Code Language Object Code


(Program in Translator (Program
Assembly or High (Compiler converted in
Level Language) or Machine
Interpreter) Language)

Language Translator:
''Language Translators are programs that convert or translate the instructions in
Assembly Language or High Level Language i.e. source code into instructions of
machine language i.e. object codes are called Language Translators.''
Computer can understand only machine language. Programs written in Assembly
Language and High Level Language are translated into Machine Language so as

Computer Science with Syed Shahbaz Tariq Page 108


computer can understand execute them.
Following are three types of language translators:
1 Assembler:-
''Assembler is a language translator that translates source program written in
Assembly Language into object code in machine language.''
Computer can understand only machine language. Assemblers translate programs
written in Assembly Language into Machine Language so as computer can understand
execute them.

Assembly Assembler Machine Language


Language Object Code
Source Code

2 Interpreter:-

59 riq
''An interpreter is a language translator that translates source program written in
High Level Language into object code in machine language during step by step
04 Ta
execution of program.''

4
Computer can only understand instruction written in machine language.
Interpreters translate one by one instruction of High Level Language source code into
92 z

object code of Machine Language.


Interpreter translates one instruction which is executed before translation of next
00 ba

instruction. The object code is not saved so the source code is interpreted every time
before the execution.
03 ah

Each high level language has its own language translator.


High Level Interpreter Machine
Sh

Language Language Object


Source Code Code

3 Compiler:-
''A compiler is a language translator that translates whole source program written in
High Level Language into object code in machine language before execution of
program.''
Compilers translate all instructions before executions. The object code is saved as
object file, which is executable. Object files don't need compiler or language for execution.

High Level Machine Language


Compiler
Language Object Code
Source Code (Executable file)
1.2.2

Computer Science with Syed Page 109


Shahbaz Tariq

You might also like