David Watson A Level
David Watson A Level
students with high quality content and unique tools. Dynamic Learning
incorporates elements that all work together to give you the ultimate classroom
and homework resource.
Teaching and Learning titles include interactive resources, lesson planning tools,
self-marking tests and assessment. Teachers can:
● Use the Lesson Builder to plan and deliver lessons
Teachers can also combine their own trusted resources alongside those from
Cambridge International AS & A Level Computer Science Online Teacher’s Guide
which has a whole host of informative and interactive resources including:
● Teaching notes and guidance
● Schemes of work
To find out more and sign up for free trials visit: www.hoddereducation.com/dynamiclearning
Cambridge
International AS & A Level
Compute
r
Scienc
e
This page intentionally left blank
Cambridge
International
AS & A Level
Computer
Scienc
e
David Watson
Helen Williams
Unless otherwise acknowledged, the questions, example answers and comments that appear in this book
were written by the authors. In examinations, the way marks are awarded may be different. Questions
from the Cambridge International AS & A Level Computer Science papers are reproduced by permission
of Cambridge Assessment International Education. Cambridge Assessment International Education bears
no responsibility for the example answers to questions taken from its past question papers which are
contained in this publication.
The publishers would like to thank the following who have given permission to reproduce the following
material in this book:
Page 181 Extract from IEEE Code of Ethics. Reprinted with permission of IEEE with the copyright notice
© Copyright 2018 IEEE; Pages 181–3 Copyright © 1999 by the Institute for Electrical and Electronics
Engineers, Inc. and the Association for Computing Machinery, Inc.; Page 187 eBay software pirates
stump up $100,000 – https://www. theregister.co.uk/2006/11/24/ebay_pirates_payup/. Reprinted with
permission of Out-Law.com, the news service of international law firm Pinsent Masons; Page 218 Map
data © 2018 Google, Imagery © 2018 Landsat/Copernicus.
Photo credits
Figures 1.1 and 1.2 © David Watson; Figure 1.3 © Sébastien Delaunay/stock.adobe.com; Figure 2.18
© Forgem/ Shutterstock.com; Figure 3.1 tl © studio306fotolia/stock.adobe.com; tr
© Chavim/stock.adobe.com; bl © pozdeevvs/ stock.adobe.com; br © Sergey Yarochkin/stock.adobe.com;
Figure 3.4 © Mau Horng/stock.adobe.com; Figure 3.5 © science photo/stock.adobe.com; Figure 3.9
© Maksym Dykha/Shutterstock.com; Figure 3.10 © Hurst Photo/ Shutterstock.com; Figure 3.11
© philipus/stock.adobe.com; Figure 3.12 © belekekin/ Shutterstock.com; Figure 4.4 l
© cybertrone/stock.adobe.com, c © Tungphoto/Shutterstock.com, r © Luminis/Shutterstock.com; Figure
5.1 l © Stuart Brady (Public Domain) via Wikipedia Commons; r © Jiri Hera/stock.adobe.com; Figure 6.3
© Andrey Burmakin/stock.adobe.com; Figure 6.4 © bkilzer/stock.adobe.com; Figure 7.2 l © Pres
Panayotov/ Shutterstock.com; c © James Balog/Getty Images; r © caluian/stock.adobe.com; Figure 18.19
© seewhatmitchsee/ 123rf.com; Figure 18.21 b © Garmon/stock.adobe.com; t © Christian
Musat/stock.adobe.com; ct © Ammit/stock. adobe.com; cb © Martina Berg/stock.adobe.com; Figure 18.24
Harshal/stock.adobe.com; Figures 18.27 and 18.28 all © David Watson.
l = left, c = centre, b = bottom, t = top, r = right
Every effort has been made to trace and acknowledge ownership of copyright. The publishers will be
glad to make suitable arrangements with any copyright holders whom it has not been possible to
contact. Computer hardware and software brand names mentioned in this book are protected by their
respective trademarks and are acknowledged.
Although every effort has been made to ensure that website addresses are correct at time of going to
press, Hodder Education cannot be held responsible for the content of any website mentioned in this
book.
Hachette UK’s policy is to use papers that are natural, renewable and recyclable products and made from
wood grown in well-managed forests and other controlled sources. The logging and manufacturing
processes are expected to conform to the environmental regulations of the country of origin.
Orders: please contact Bookpoint Ltd, 130 Park Drive, Milton Park, Abingdon, Oxon OX14 4SE.
Telephone: (44) 01235 827827. Fax: (44) 01235 400401. Email [email protected] Lines are
open from 9 a.m. to 5 p.m., Monday to Saturday, with a 24-hour message answering service. You can
also order through our website: www.hoddereducation.com
© David Watson and Helen Williams 2019
First published 2019 by
Hodder Education,
An Hachette UK Company
Carmelite House
50 Victoria Embankment
London EC4Y 0DZ
www.hoddereducation.com
Impression number 10 9 8 7 6 5 4 3 2 1
Year 2023 2022 2021 2020 2019
All rights reserved. Apart from any use permitted under UK copyright law, no part of this publication may
be reproduced or transmitted in any form or by any means, electronic or mechanical, including
photocopying and recording, or held within any information storage and retrieval system, without
permission in writing from the publisher or under licence from the Copyright Licensing Agency Limited.
Further details of such licences (for reprographic reproduction) may be obtained from the Copyright
Licensing Agency Limited, www.cla.co.uk
Cover photo © Terrance Emerson – stock.adobe.com
Illustrations by Aptara Inc. and Hodder Education
Typeset by Aptara Inc.
Printed by Bell & Bain Ltd, Glasgow
A catalogue record for this title is available from the British Library.
ISBN: 9781510457591
Contents
Introduction viii AS LEVEL
2 Communication 27
2.1 Networking 28 2.2 The internet 54
3 Hardware 68
3.1 Computers and their components 68 3.2 Logic gates and logic
circuits 89
8 Databases 196
8.1 Database concepts 196 8.2 Database management systems
(DBMSs) 208 8.3 Data definition language (DDL) and data manipulation
language (DML) 211
v
s
Content9 Algorithm design and problem solving 217
9.1 Computational thinking skills 217
9.2 Algorithms 219
11 Programming 264
11.1 Programming basics 264
11.2 Programming constructs 271
11.3 Structured programming 275
A LEVEL
15 Hardware 346
15.1 Processors and parallel processing 346
15.2 Boolean algebra and logic circuits 354
vi
Content
s
17 Security 410
17.1 Encryption 410 17.2 Quantum cryptography 414 17.3 Protocols 416
17.4 Digital signatures and digital certificates 418
Introduction
TION
ODUC
This textbook provides the knowledge, understanding and practical skills
R
to support those studying Cambridge International AS & A Level Computer
INT
Science. This textbook is part of a suite of resources which include a
Programming Skills Workbook and an Online Teacher’s Guide.
The syllabus content has been covered comprehensively and is presented in two
sections: Chapters 1 to 12 cover the AS Level, Chapters 13 to 20 cover the extra
content required for the full A Level.
Organisation
The content is presented in the same order as in the syllabus, and the chapter
titles match those in the syllabus.
Features to help you learn
Each chapter is broken down into several sections, so that the content is
accessible.
At the start of each chapter, there is a blue box that gives a summary of the
syllabus points to be covered in that chapter, to show you what you are going
to learn.
The grey-blue What you should already know boxes at the beginning
of each chapter or section help you to check you have the right level
of knowledge before you begin. You may have already studied
Computer Science at IGCSE,
O Level or equivalent, or you may not have. These boxes contain
questions to find out how much you remember, or to gauge your previous
learning. If you are unable to answer the questions, you will need to
refresh your memory, or make sure you are familiar with the the relevant
ideas, before continuing.
viii
I
NT
WHAT YOU SHOULD ALREADY KNOW TI
3 What are the column weightings for the ON
Try these four questions before you read this hexadecimal (base 16) number system?
chapter. 4 Carry out these hexadecimal
1 What are the column weightings for the additions. Convert your answers to
binary number system? denary.
R
ODU
C
2 Carry out these binary c) 0 1 0 1 1 1 1 1 + 0 0 0 1 1 1 1 a) 1 0 7 + 2 5 7 b) 2 0 8 + A 1 7
additions. Convert your answers 0 c) A A A + 7 7 7 d) 1 F F + 7 F 7
to denary. d) 0 1 0 0 0 1 1 1 + 0 1 1 0 1 1 1 e) 1 4 9 + F 0 F
a) 0 0 1 1 0 1 0 1 + 0 1 0 0 1 0 0 1 f) 1 2 5 1 + 2 5 6 7 g) 3 4 A B +
0 e) 1 0 0 0 0 0 0 1 + 0 1 1 1 0 1 1 C 0 0 A h) A 0 0 1 + D 7 7 F i) 1
b) 0 1 0 0 1 1 0 1 + 0 1 1 0 1 1 1 1 0 0 9 + 9 F F 1 j) 2 7 7 7 + A C F
0 f) 1 0 1 0 1 0 1 0 + 1 0 1 0 1 0 1
1
0
Key terms for each chapter or section are listed, with definitions. When
you are reading through the chapter and you come across a term you
don’t understand, go back and see if it has been explained here.
Key terms
the possible binary input combinations
Logic gates – electronic circuits which depending on the number of inputs; for
rely on ‘on/off’ logic; the most common example, two inputs have 22 (4) possible
ones are NOT, AND, OR, NAND, NOR binary combinations, three inputs will
and XOR. Logic circuit – formed from a have 23 (8) possible binary combinations,
combination of logic gates and designed and so on.
to carry out a particular task; the output
Boolean algebra – a form of algebra
from a logic circuit will be 0 or 1. Truth
linked to logic circuits and based on
table – a method of checking the output TRUE and FALSE.
from a logic circuit; they use all
There are Activities throughout, so that you can apply what you have
learned. Some of these take the form of questions, to allow you to test
your knowledge; others aim to give you experience of practical work.
Some of these will also give you opportunities to work collaboratively with
other students.
ACTIVITY 3B
Produce truth tables for each of the following logic circuits. You are advised
to split them up into intermediate parts to help eliminate errors.
a) b) c)
A
A
A
B
X
X
X
C
B
B
d) e)
C C
B B
A A
X X
ix
TIONThere are also some Extension activities. These go beyond the requirements of
the syllabus, but it is good to see if you know the answers. We hope they will
ODUC
be of interest to you.
R
EXTENSION ACTIVITY 3E
INT
1 Look at this simplified diagram of a keyboard; the letter H has been
pressed. Explain:
a) how pressing the letter H has been recognised by the computer
b) how the computer manages the very slow process of inputting data
from a keyboard.
2 a) Describe how these types of pointing devices work.
i) Mechanical mouse
ii) Optical mouse
b) Connectivity between mouse and computer can be through USB cable
or wireless. Explain these two types of connectivity.
makes contact with
bottom conductive layer
G
H letter H
interpreted
conductive layers
x
I
NT
Assessment
R
ODU
C
If you are following the AS Level course, you will take two examination papers:
T
O
N
» Paper 1 Theory Fundamentals (1 hour 30 minutes)
» Paper 2 Fundamental Problem-solving and Programming Skills (2 hours)
If you are studying the A Level course, you will take four examination
papers, Papers 1 and 2 and also:
» Paper 3 Advanced Theory (1 hour 30 minutes)
» Paper 4 Practical (2 hours 30 minutes)
Command words
The table below includes command words used in the assessment
for this syllabus. The use of the command word will relate to the
subject context. Make sure you are familiar with these.
Command What it means
word
Identify name/select/recognise
xi
TION
ODUC
R
INT
Computational thinking
Computational thinking is a set of fundamental skills that help produce
a solution to a problem. Skills such as abstraction, decomposition and
algorithmic thinking are used to study a problem and design a solution that
can be implemented. This may involve using a range of technologies and
programming languages.
Programming paradigms
A programming paradigm is a way of thinking about or approaching problems.
There are many different programming styles that can be used, which are
suited to unique functions, tools and specific situations. An understanding of
programming paradigms is essential to ensure they are used appropriately, when
designing and building programs.
xii
I
NT
Communication
R
ODU
C
Communication is a core requirement of computer systems. It includes the
TI
ability to transfer data from one device or component to another and an ON
understanding of the rules and methods that are used in this data
transfer. Communication could range from the internal transfer of
data within a computer system, to the transfer of a video across the
internet.
Additional support
The Programming Skills Workbook provides practice for the programming
papers and includes exercises designed to give students the necessary
experience of working in one of the three prescribed high-level
programming languages: Java (Console mode), Visual Basic and Python
(Console mode). It is a write-in workbook designed to be used throughout
the course.
Answers to questions are available in the Online Teacher’s Guide.
xiii
This page intentionally left blank
Information representation
1 and
multimedia
1.
1
In this chapter, you will learn about
Data representatio
n
★ binary magnitudes, binary prefixes and decimal prefixes
★ binary, denary and hexadecimal number systems
★ how to carry out binary addition and subtraction
★ the use of hexadecimal and binary coded decimal (BCD) number
systems
★ the representation of character sets (such as ASCII and Unicode)
★ how data for a bit-mapped image is encoded
★ how to estimate the file size for a bit-map image
★ image resolution and colour depth
★ encoding of vector graphics
★ the representation of sound in a computer
★ the effects of changing sampling rate and resolution on sound quality
★ the need for file compression methods (such as lossy and lossless
formats)
★ how to compress common file formats (such as text files, bit-map
images, vector graphics, sound files and video files).
3 1 4 2 1
ACTIVITY 1A Method 1
This method involves placing 1s in the appropriate
Convert these position so that the total equates to 107.
binary numbers into denary.
a) 0 0 1 1 0 0 1 1 b) 0 1 1 1 1 1 1 1 c) 1 0 0 1 1 0 0 1 d)
0 1 1 1 0 1 0 0 e) 1 1 1 1 1 1 1 1 f) 0 0 0 0 1 1 1 1 g) 1 0
0 0 1 1 1 1 h) 0 0 1 1 0 0 1 1 i) 0 1 1 1 0 0 0 0
The 0 values are simply ignored when calculating
the total.
1 1.
1
128 64 32 16 8 4 2 1
The reverse operation – converting from denary to
binary – is slightly more complex. There are two
basic ways of doing this.
Consider the conversion of the denary number,
107, into binary …
01101011
Method 2
This method involves successive division by 2; the
remainders are then written from bottom to top to
give the binary value.
Data representatio
n
j) 1 1 1 0 1 1 1 0 3
2
1
107
0
53
0
26
13
ACTIVITY 1B 2 remainder: 0
2 remainder: 1
Binary addition and
Convert these subtraction
2 remainder: 1
denary numbers into binary
(using either method).
a) 4 1 Write the remainder from
b) 6 7 bottom to top to get the binary
number:
c) 8 6
2 remainder: 1 01101011
2 remainder: 1
2 remainder: 0
2 remainder: 1 remainder: 0
(denary value 90) becomes:
10100101
+1
d) 1 0 0 e) 1 1 1 f) 1 2 7 g) 1 4 4 h) 1 8 9 i) 2 0 0 j) 2 = 1 0 1 0 0 1 1 0 (since 1 + 1 = 0, a carry of 1) =
55 denary value −90
Up until now we have assumed all binary Throughout the remainder of this chapter, we will
numbers have positive values. There are a use the two’s complement method to avoid
number of methods to represent both positive confusion. Also, two’s complement makes binary
and negative numbers. We will consider: » one’s addition and subtraction more straightforward.
complement The reader is left to investigate one’s
» two’s complement. complement and the sign and magnitude
method in binary arithmetic.
In one’s complement, each digit in the binary
number is inverted (in other words, 0 becomes Now that we are introducing negative numbers,
1 and 1 becomes 0). For example, 0 1 0 1 1 0 1 we need a way to represent these in binary. The
0 (denary value 90) becomes 1 0 1 0 0 1 0 1 two’s complement uses these weightings for an
(denary value −90). 8-bit number representation:
In two’s complement, each digit in the binary −128 64 32 16 8 4 2 1
number is inverted and a ‘1’ is added to the
right-most bit. For example, 0 1 0 1 1 0 1 0
3
multimedia
EXTENSION ACTIVITY 1A
invert the digits: 1 0 0 1 0 1 1 1
Show the column headings for a (+104 in denary) add 1: 1
system that uses 16 bits to represent
which gives: 1 0 0 1 1 0 0 0 =
a binary number.
−104)
This means:
ACTIVITY 1C
−128 64 32 16 8 4 2 1
Convert these denary numbers into
11011010 8-bit binary numbers using two’s
00100110 complement where necessary. Use
these binary column weightings:
The first example is: −128 + 64 +
16 + 8 + 2 = −38 −128 64 32 16 8 4 2 1
The second example is: 32 + 4 + 2 a) +114
= 38 b) +61
The easiest way to convert a c) +96
number into its negative equivalent d) −14
is to use two’s complement. For e) −116
example, 104 in binary is 0 1 1 0 1
0 0 0.
Binary addition
To find the binary value for −104
Consider Examples 1.1 and 1.2.
using two’s complement:
Solution
−128 64 32 16 8 4 2 1
00100101
+
00111010
=
01011111
4
Add 0 1 0 1 0 0 1 0 (82 in denary) and 0 1 0 0 0 1 0 1 (69 in denary). Example 1.2 1
Solution
−128 64 32 16 8 4 2 1
01010010
+
1.
1
01000101
=
Data representatio
n
10010111
Binary subtraction
To carry out subtraction in binary, we convert the number being subtracted into
its negative equivalent using two’s complement, and then add the two numbers.
Solution
1 Convert the two numbers into binary:
95 = 0 1 0 1 1 1 1 1
68 = 0 1 0 0 0 1 0 0
2 Find the two’s complement of 68:
−128 64 32 16 8 4 2 1
01011111
+
10111100
=
100011011
The additional ninth bit is simply ignored leaving the binary number
0 0 0 1 1 0 1 1 (denary equivalent of 27, which is the correct result of the
subtraction).
5
Carry out the subtraction 49 – 80 in binary. Example 1.4
1
Solution
1 Convert the two numbers into binary:
49 = 0 0 1 1 0 0 0 1
80 = 0 1 0 1 0 0 0 0
2 Find the two’s complement of 80:
−128 64 32 16 8 4 2 1
00110001
+
10110000
=
11100001
This gives us 1 1 1 0 0 0 0 1, which is −31 in denary; the correct answer.
ACTIVITY 1D
Carry out these binary additions and subtractions using these 8-bit column
weightings:
−128 64 32 16 8 4 2 1
a) 0 0 1 1 1 0 0 1 + 0 0 1 0 1 0 0 1
b) 0 1 0 0 1 0 1 1 + 0 0 1 0 0 0 1 1
c) 0 1 0 1 1 0 0 0 + 0 0 1 0 1 0 0 0
d) 0 1 1 1 0 0 1 1 + 0 0 1 1 1 1 1 0
e) 0 0 0 0 1 1 1 1 + 0 0 0 1 1 1 0 0
f) 0 1 1 0 0 0 1 1 − 0 0 1 1 0 0 0 0
g) 0 1 1 1 1 1 1 1 − 0 1 0 1 1 0 1 0
h) 0 0 1 1 0 1 0 0 − 0 1 0 0 0 1 0 0
i) 0 0 0 0 0 0 1 1 − 0 1 1 0 0 1 0 0
j) 1 1 0 1 1 1 1 1 − 1 1 0 0 0 0 1 1
6
Name of memory size Equivalent denary value
(bytes)
nt
at
io
n
devices, but is technically inaccurate. It is based on the SI (base 10)
system of units where 1 kilo is equal to 1000. A 1 TB hard disk drive
would allow the storage of 1 × 1012 bytes according to this system.
However, since memory size is actually measured in terms of powers of
2, another system has been proposed by the International
Electrotechnical Commission (IEC); it is based on the binary system. See
Table 1.2.
Name of memory Number of Equivalent denary value
size bytes (bytes)
1048 576 65 536 4096 256 16 1 (165) (164) (163) (162) (161) (160)
0000 0
1 0001 1
0010 2
0011 3
0100 4
1 Information representation and multimedia
Example 1.5 0101 5
0110 6
0111 7
1000 8
1001 9
1010 A
1011 B
Example 1.6
1100 C
Binary value Hexad
1101 First split it into groups of 4 bits:
1110 101111100001
Then find the equivalent hexadecimal digits:
1111 BE1
Solution
8
ACTIVITY 1E
1
Convert these binary numbers into hexadecimal.
a) 1 1 0 0 0 0 1 1 h) 0 1 1 1 0 1 0 0 1 1 1 0 0
b) 1 1 1 1 0 1 1 1 i) 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1
c) 1 0 0 1 1 1 1 1 1 1 d) 1 0 0 1 1 1 0 1 1 1 1.1
0 e) 0 0 0 1 1 1 1 0 0 0 0 1 j) 0 0 1 1 0 0 1 1 1 1 0 1 0 1 1 1 0
f) 1 0 0 0 1 0 0 1 1 1 1 0
g) 0 0 1 0 0 1 1 1 1 1 1 1 0
Converting from hexadecimal to binary is also
straightforward. Using the data from Table 1.3,
simply take each hexadecimal digit and write
down the 4bit code which corresponds to the
digit.
Solution
Using Table 1.3, find the 4-bit code for each digit:
010001011010
Put the groups together to form the binary number:
010001011010
Data representatio
n
This section reviews two uses of the hexadecimal
system.
Convert this hexadecimal number to its binary
Memory dumps
equivalent.
It is much easier to work with:
BF08
B5A41AFC
Solution than it is to work with:
Using Table 1.3: 10110101101001000001101011
1011111100001000 111100
Then put all the digits together: So, hexadecimal is often used when developing
new software or when trying to trace errors in
1011111100001000 programs. When the memory contents are output
to a printer or monitor, this is known as a
memory dump.
Use of the hexadecimal system
9
c) A A 78 20 20
1 00
65
00 00 00
ACTIVITY 1F 20
63
Convert these 73
hexadecimal
65
numbers into binary. a) 6 C
00
b) 5 9
0 0
0 0 0 Method 2: two
bytes
0 0
0 0
0 0 0
0 1 1 0 0 1
0 0
0 0
0 0 0
1 1 0 1 0 1
0 0
0 0 0
ACTIVITY 1G
3
1 3165
6
5
1
The most obvious use of BCD is in the representation of digits on a
calculator or clock display.
1.
Each denary digit will have a BCD equivalent value which makes it easy to 1
convert from computer output to denary display.
Data representatio
n
As you will learn in Chapter 13, it is nearly impossible to represent
decimal values exactly in computer memories which use the binary
number system. Normally this doesn’t cause a major issue since the
differences can be dealt
with. However, when it comes to accounting and representing monetary
values in computers, exact values need to be stored to prevent
significant errors from accumulating. Monetary values use a fixed-point
notation, for example $1.31, so one solution is to represent each denary
digit as a BCD value.
Consider adding $0.37 and $0.94 together using fixed-point decimals.
Expected result =
$0.3 000000 $1.31
7 00000
+
$0.9
4
+
0
1 0 0
=
This produces 1 0 1 1
1 which isn’t a denary
0 1 1 digit; this will flag an
error and the computer
needs to add
0 1 1 0. This now
produces a 0
fifth bit which 1 1 0
is
carried to the
next decimal
digit position. =
1 1
0 1 1 0 0 0 1
+
11
Now we will add .3 and .9 together (the two digits in the first decimal place)
1
remembering the carry bit from the addition above:
0
0 1 1
+
1
=
1
1 0 1
This produces 1 1 0 1 which isn’t a denary digit; this will flag an error and the
computer again needs to add 0 1 1 0.
1
1 0 1
ACTIVITY 1H 0 0 0 0 0 0 0 1
12
32 20 <SPAC 64 40 @ 96 60 `
E>
33 21 ! 65 41 A 97 61 a
34 22 “ 66 42 B 98 62 b
35 23 # 67 43 C 99 63 c
36 24 $ 68 44 D 100 64 d
37 25 % 69 45 E 101 65 e
38 26 & 70 46 F 102 66 f
39 27 ‘ 71 47 G 103 67 g
40 28 ( 72 48 H 104 68 h
41 29 ) 73 49 I 105 69 i
42 2A * 74 4A J 106 6A j
43 2B + 75 4B K 107 6B k
44 2C , 76 4C L 108 6C l
45 2D - 77 4D M 109 6D m
46 2E . 78 4E N 110 6E n
47 2F / 79 4F O 111 6F o
48 30 0 80 50 P 112 70 p
49 31 1 81 51 Q 113 71 q
50 32 2 82 52 R 114 72 r
51 33 3 83 53 S 115 73 s
52 34 4 84 54 T 116 74 t
53 35 5 85 55 U 117 75 u
54 36 6 86 56 V 118 76 v
55 37 7 87 57 W 119 77 w
56 38 8 88 58 X 120 78 x
57 39 9 89 59 Y 121 79 y
58 3A : 90 5A Z 122 7A z
59 3B ; 91 5B [ 123 7B {
60 3C < 92 5C \ 124 7C |
61 3D = 93 5D ] 125 7D }
62 3E > 94 5E ^ 126 7E ~
63 3F ? 95 5F _ 127 7F <DELE
TE>
1
1.
1
Data representatio
n
1
A
94 ö 17 «
A
84 ä 15 Φ
8 128
85 à 15 129
9
Θ
86 å 16130
A
87 ç 16
Ω
A
131
88 ê 16
A
89 ë 16δ
A132
8 è 16
A A
8 ï 16
B A∞
133
8 î 16
C A
8 ì 16
D A
8 Ä 16ø
E A134
8 Å 16
F A
90 É 1
A
91 æ 17
ε
A
135
92 Æ 17
A
93 ô 17
∩
136
⌠
141
≡
137
⌡
± 142
138
≥
139
÷
143
≤
140
≈
144
▪
147
°
145
√
148
▪▪
146
³
149
■
151
²
150
□
152
99│τ
153
179 B3205 CD231 E7 Ö
═
ɀ ɂ ɇ Ɉ
01A0 01B0 01C0 01D0 01E0 01F0 0200 Ɂ Ƀ Ʉ Ʌ Ɇ
0210 0220 0230 0240 0250 0260 0270 0280
0290 02A0 02B0 ɐ ɓ ɔ ɕ ɖ ɗ ɘ
ɑ ɒ
0
1 2 3 4 5 6 7 ɠ ɡ ɢ ɣ ɤ ɥ ɦ ɧ ɨ
Ơ ƥ
ơ Ƣ ƣ Ƥ Ʀ Ƨ ɰ ɳ ɴ ɵ
ɱ ɲ ɶ ɷ ɸ
ư ƴ ƶ
Ʊ Ʋ Ƴ Ƶ Ʒ ʀ ʁ ʂ ʃ ʄ ʆ ʇ ʈ
ʅ
ǀ ǁ ǂ ǃ DŽ LJLj
ʐ ʑ ʒ ʓ ʔ ʕ ʖ ʗ
ʘ
ǐ Ǒ ǒ Ǔ ǔ Ǖ ǖ Ǘ
ʠ ʡ ʢ ʧ
Ǡ ǡ ǥ Ǧ ǧ ʣ ʤ ʥ ʦ ʨ
Ǣ ǣ Ǥ
ʰ ʱ ʲ ʳ ʴ ʵ ʶ ʷ ʸ
ǰ DZ Ǵ ǵ
dz Ƕ Ƿ
Ȁ ȁ Ȃ ȃ Ȅ ȅ Ȇ ȇ F
Ȑ ȑ Ȓ ȓ Ȕ ȕ Ȗ ȗ
1
Ư
Ƞ ȡ ȣ ȥ Ȧ ȧ ƿ
Ȣ Ȥ
Ǐ
Ȱ ȱ ȳ ȴ ȵ ȶ ȷ ǟ
Ȳ ǯ
ǿ
1. ɟ
2
ȏ ɯ
ȟ ɿ
Multimedi ʏ
a
ȯ ʟ
ȿ ʯ
ɏ ʿ
1.2 Multimedia
Key terms
screen
Bit-map image – system that uses pixels to make up an resolution is smaller than the image resolution, the
image. whole image cannot be shown on the screen, or
Pixel – smallest picture element that makes up an the original image will become lower quality.
image. Colour depth – number of bits used to represent Resolution – number of pixels per column and per row
the colours in a pixel, e.g. 8 bit colour depth can on a monitor or television screen.
represent 28 = 256 colours. Pixel density – number of pixels per square centimetre.
Bit depth – number of bits used to represent the Vector graphics – images that use 2D points to
smallest unit in, for example, a sound or image file – describe lines and curves and their properties that are
the larger the bit depth, the better the quality of the grouped to form geometric shapes.
sound or colour image. Sampling resolution – number of bits used to represent
Image resolution – number of pixels that make up an sound amplitude (also known as bit depth). Sampling
image, for example, an image could contain 4096 × rate – number of sound samples taken per second.
3192 pixels (12738656 pixels in total). Frame rate – number of video frames that make up a
Screen resolution – number of horizontal and video per second.
vertical pixels that make up a screen display. If the
15
the colour of each
pixel on a screen.
1 1 Information representation and
How is HTML used in the design
stage of a web page screen layout?
multimedia
EXTENSION
ACTIVITY 1B
Find out how HTML is used to control
than one million colours could contain 4096 × 3192 pixels
» the number of bits used to (12738 656 pixels in total).
represent a pixel is called the » Screen resolution refers to the
colour depth. number of horizontal pixels and the
In terms of images, we need to number of vertical pixels that
distinguish between bit depth and make up a screen display (for
colour depth; for example, the example, if the screen resolution
number of bits that are used to is smaller than the image
represent a single pixel (bit depth) resolution then the whole image
will determine the colour depth of cannot be shown on the screen or
that pixel. As the bit the original image will now be a
depth increases, the number of lower quality).
possible colours which can be We will try to clarify the difference
represented also increases. For
by using an example.
example, a bit depth of 8bits per
pixel allows 256 (28) different Figure 1.1 has been taken by a
colours (the colour depth) to be digital camera using an image
represented, whereas using a bit resolution of 4096 × 3192 pixels:
depth of 32bits per pixel results in
4 294967296 (232) different
colours. The impact of bit depth
and colour depth is considered
later.
We will now consider the actual
image itself and how it can be
displayed on a screen. There are
two important definitions here:
1
now fit on the screen without any modification to the image. We could simply
zoom in to enlarge it to full screen size; however, the image could now become
pixelated (in other words, the number of pixels per square inch (known as the
pixel density) is smaller, causing deterioration in the image quality).
We will now consider a calculation which shows how pixel density can be
calculated for a given screen. Imagine we are using an Apple iPhone 8 which
has 5.5-inch screen size and screen resolution of 1920 pixels × 1080 pixels:
1.
2
1 add together the squares of the resolution size ((19202 + 10802) = (3 686 400
+ 16 640) = 4 852800)
Multimedi
a
2 find the square root ( ) 4852800 2202.907 =
3 divide by screen size (2202.907 ÷ 5.5 = 401)
This gives us the pixel density of 401 pixels per square inch (ppi) (which is the
same as the published figure from the manufacturer).
A pixel-generated image can be scaled up or scaled down; it is important
to understand that this can be done when deciding on the resolution. The
resolution can be varied on many cameras before taking, for example, a digital
photograph. When magnifying an image, the number of pixels that makes up
the image remains the same but the area they cover is now increased. This
means some of the sharpness could be lost. This is known as the pixel density
and is key when scaling up photographs. For example, look at Figure 1.3.
ma
▲ Figure 1.4 Drawing of a robot made up wh
of a number of geometric shapes def
Note: when saving a bit-map
to a
image, it is important to include a
nec
file header; this will contain items geo
such as file type (.bmp or .jpeg),
file size, image resolution, bit the
depth (usually 1, 8, 16, 24 or 32), sin
any type of data compression geo
employed and so on.
be
sha
1.2.2 Vector graphics are
Vector graphics are images that
file
use 2D points to describe lines and
.od
curves and their properties that
are grouped to form geometric
shapes. Vector graphics can be
designed using computer aided ▲ Table 1.8 Comparison between vector
design (CAD) software or using an graphics and bit-map images
application which uses a drawing It is now worth considering
canvas on the screen. See Figure whether a vector graphic or a
1.4. bit-map image would be the best
A vector graphic will contain a choice for a given application.
drawing list (included in a file When deciding which is the better
header) that is made up of method, we should consider the
following:
» the command used for each
object that makes up the graphic
image » the attributes that define
the properties that make up each
» Does the image need to be
object (for example consider the
resized? If so, a vector graphic
ellipse of the robot’s mouth – this
could be the best option.
will need the position of the two
» Does the image need to be
centres, the radius from centres,
the thickness and style of each drawn to scale? Again, a vector
line, the line colour and any fill graphic is probably the best
colour used) option.
» the relative position of each » Does the image need to look
object will also need to be included real? Usually bit-map images look
» the dimensions of each object more realistic than vector
are not defined, but the relative graphics.
positions of objects to each other » Are there file restrictions? If so, it
in the final graphic need to be is important to consider whether
defined; this means that scaling vector graphic images can be
up the vector graphic image will used; if not, it would be necessary
to consider the image resolution ofa bit-map image to ensure the file size is not too large.
18
For example, when designing a logo for a company or composing an ‘exploded
1
diagram’ of a car engine, vector graphics are the best choice.
However, when modifying photographs using photo software, the best
method is to use bit-map images.
Time Time
period
period
10
Sound amplitude
9
6
5
4
3
2
1
8
7
0
10 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Time intervals
19
Figure 1.6 shows a sound wave. The x-axis shows the time intervals when
1
the sound was sampled (0 to 20), and the y-axis shows the amplitude of the
sampled sound (the amplitudes above 10 and below 0 are filtered out in this
example).
At time interval 1, the approximate amplitude is 9; at time interval 2, the
approximate amplitude is 4, and so on for all 20 time intervals. Because the
amplitude range in Figure 1.6 is 0 to 10, then 4 binary bits can be used to
represent each amplitude value (for example, 9 would be represented by the
1 Information representation and multimedia
binary value 1001). Increasing the number of possible values used to represent
sound amplitude also increases the accuracy of the sampled sound (for
example, using a range of 0 to 127 gives a much more accurate representation
of the sound sample than using a range of, for example, 0 to 10). This is known
as the sampling resolution (also known as the bit depth).
Sampling rate is the number of sound samples taken per second. The higher
the sampling rate and/or sampling resolution, the greater the file size. For
example, a 16-bit sampling resolution is used when recording CDs to give better
sound quality.
So, how is sampling used to record a sound clip?
» The amplitude of the sound wave is first determined at set time intervals
(the sampling rate).
» This gives an approximate representation of the sound wave.
» The sound wave is then encoded as a series of binary digits.
Using a higher sampling rate or larger resolution will result in a more faithful
representation of the original sound source.
Pros Cons
▲ Table 1.9 The pros and cons of using a larger sampling resolution when recording sound
1.2.4 Video
This section considers the use of video and extends beyond the syllabus. While
this is not specifically mentioned in the syllabus, it has been included here
for completeness. Many specialist video cameras exist. However, most digital
cameras, smart phones and tablets are also capable of taking moving images by
‘stitching’ a number of still photos (frames) together. They are often referred to
as DV (digital video) cameras; they store compressed photo frames at a speed
of 25MB per second – this is known as motion JPEG.
20
In both single frame and video versions, the camera picks up the light from
1
the image and turns it into an electronic signal using light-sensitive sensors.
In the case of the DV cameras, these signals are automatically converted into a
compressed digital file format.
When recording video, the frame rate refers to the number of frames recorded
per second.
It is often necessary to reduce the file size of a file to either save storage
space or to reduce the time taken to stream or transmit data from one
device to another (see Chapter 2). The two most common forms of file
compression are lossless file compression and lossy file
compression.
1
perceptual music shaping. refers to the number of bits per
second used when creating the
1 Information representation and Perceptual music shaping removes
file. Bit rates are between 80 and
certain sounds. For example
320 kilobits per second; usually
» frequencies that are outside the 200 kilobits or higher gives a
human hearing range sound quality close to a normal
CD.
multimedia MPEG-4 (MP4) files are slightly
different to MP3 files. This format
allows the storage of multimedia
files rather than just sound. Music,
EXTENSION ACTIVITY 1D videos, photos and animation can
Find out how file compression can be all be stored in the MP4 format.
applied to a Videos, for example, could be
photograph without noticeably streamed over the internet using
reducing its quality. Compare the MP4 format without losing any
this to run-length encoding (RLE), » if two sounds are played at the real discernible quality (see
described below. same time, only the louder one canChapter 2 for notes on video
MP3 files are used in MP3 players, be heard by the ear, so the softer streaming).
computers or mobile phones. sound is eliminated.
Music files can be downloaded or Photographic (bit-map) images
streamed from the internet in a This means that certain parts of When a photographic file is
compressed format, or CD files the music can be removed without compressed, both the file size and
can be converted to MP3 format. affecting the quality too much. quality of image are reduced. A
While streamed or MP3 music MP3 files use what is known as a common file format for images is
quality can never match the ‘full’ lossy format, since part of the JPEG, which uses lossy file
version found on a CD, the quality original file is lost following the compression. Once the image is
is satisfactory for most purposes. compression algorithm. This subjected to the JPEG
But how can the original music file means that the original file cannot compression algorithm, a new file
be reduced by 90% while still be put back together again. is formed and the original file can
retaining most of the music However, even the quality of MP3 no longer be constructed. A JPEG
quality? This is done using file files can be different, since it will reduce the raw bit-map image
by a factor of between 5 and 15, Run-length encoding (RLE) can The first value represents the
depending on the quality of the be used to compress a number of number of identical data items
original. different file formats. (such as characters) in the run.
Vector graphics can also undergo It is a form of lossless/reversible The second value represents the
some form of file compression. file compression that reduces the code of the data item (such as
Scalable vector graphics (.svg) size of a string of adjacent, ASCII code if it is a keyboard
are defined in XML text files which, identical data (such as repeated character).
therefore, allows them to be colours in an image). RLE is only effective where there
compressed.
A repeating string is encoded into is a long run of repeated units/bits.
Run-length encoding (RLE) two values.
22
Using RLE on text data
1
Consider the text string ‘aaaaabbbbccddddd’.
Assuming each character requires 1byte, then this string needs 16 bytes.
If we assume ASCII code is being used, then the string can be coded as
follows:
a a a a a b b b b c c d d d d d
05 97 04 98 02 99 05 100
1.
3
This means we have five characters with ASCII code 97, four
characters with ASCII code 98, two characters with ASCII code 99,
and five characters with
File compressio
n
ASCII code 100. Assuming each number in the second row requires
1byte of memory, the RLE code will need 8 bytes. This is half the
original file size.
One issue occurs with a string such as ‘cdcdcdcdcd’, where compression
is not very effective. To cope with this we use a flag. A flag preceding
data indicates that what follows are the number of repeating units (for
example, 255 05 97 where 255 is the flag and the other two numbers
indicate that there are five items with ASCII code 97). When a flag is not
used, the next byte(s) are taken with their face value and a run of 1 (for
example, 01 99 means one character with ASCII code 99 follows).
Consider this example:
Strin aaaaaa bbbbbbbb c d c d c d eeeeee
g aa bb ee
Cod 08 97 10 98 01 01 01 01 01 01 08 101
e 99 100 99 100 99 100
11111111
In compressed RLE format this
becomes:
9W 6B 2W 1B 7W 1B 7W 5B 3W 1B 7W
1B 7W 1B 6W
1 0 0 0 0 0 0 1 1 0 1 1 1 1 1 1 1 0 1 1 1 91 60 21 10 71 10 71 50 31 10 71 10 71
1 1 1 1 0 0 0 0 0 1 1 1 0 1 1 1 1 1 1 1 0 10 61
11111110111111
The 8 × 8 grid would need 64 bytes; the compressed RLE format has 30
values, and therefore needs only 30 bytes to store the image.
23
Coloured images
1
Figure 1.8 shows an object in four colours. Each colour is made up of red, green
and blue (RGB) according to the code on the right.
representation and
24
[2]
1
State two items you would expect to see in the header. [2]
v) Give three features you would expect to see in the sound editing app. [3]
3 The editor of a movie is finalising the music score. They will send the final
version of the score to the movie producer by email attachment.
a) Describe how sampling is used to record the music sound clips. [3]
b) The music sound clips need to undergo some form of data compression
before the music editor can send them via email.
1 Information representation and multimedia
Identify the type of compression, lossy or lossless, they should use.
Give a justification for your answer. [3]
c) One method of data compression is known as run length encoding (RLE).
i) Explain what is meant by RLE. [3]
ii) Show how RLE would be used to produce a compressed file for
the image below.
Write down the data you would expect to see in the RLE compressed
format (you may assume that the grey squares have a code value of 85
and the white squares have a code value of 255). [4]
4 a) Write the denary numbers 60, 27 and −27 in 8-bit binary two’s
complement form. [3]
b) Show the result of the addition 60 + 27 using 8-bit binary two’s
complement form. Show all of your working. [2]
c) Show the result of the subtraction 60 − 27 using 8-bit binary two’s
complement form. [2]
d) Give the result of the following addition.
01011001
+
01100001
Explain why the expected result is not obtained. [2]
5 a) Carry out 0.52 + 0.83 using binary-coded decimal (BCD). Show all
of your working. [4]
b) i) Define the term hexadecimal. [1]
ii) Give two uses of the hexadecimal system. [2]
iii)Convert the following binary number into hexadecimal. [2]
0111111011110010
6 a) Convert the denary number 95 into binary coded decimal (BCD). [1]
b) Using two’s complement, carry out the binary subtraction:
00100011–01000100
and convert your answer into denary. [3]
c) Convert the denary number 506 into hexadecimal. [1]
26
2 Communication
2.
1
In this chapter, you will learn about
Networkin
g
★ the benefits of networking devices
★ the characteristics of a local area network (LAN) and a wide area
network (WAN)
★ client-server and peer-to-peer models in networking
★ the differences between thin client and thick client
★ bus, star, mesh and hybrid networking topologies
★ public and private cloud computing
★ the differences between wired and wireless networks
(including types of cable and wireless technologies)
★ the hardware required to support a LAN
★ the function of routers
★ Ethernet and how data collisions are detected and avoided
★ bit streaming (including differences between real-time and
on-demand streaming of data)
★ the differences between the internet and the World Wide Web (WWW)
★ the hardware needed to support the internet
★ IP addresses (including IPv4, IPv6, public IP addresses and private IP
addresses)
★ the use of the uniform resource locator (URL) to locate a resource on
the world wide web
★ the role of the domain name service (DNS).
27
Key terms Networking
2 2.1
cable in which all devices are connected to this cable
so data can only travel in one direction and only one
device is allowed to transmit at a time.
Packet – message/data sent over a network from node
ARPAnet – Advanced Research Projects Agency
to node (packets include the address of the node
Network. WAN – wide area network (network covering sending the packet, the address of the packet recipient
a very large geographical area). and the actual
LAN – local area network (network covering a small data – this is covered in greater depth in Chapter 14).
Star network topology – a network that uses a central
cation hub/switch with all devices connected to this central
area such as a single building). hub/switch so all data packets are directed through this
MAN – metropolitan area network (network which is central hub/switch.
Mesh network topology – interlinked computers/
larger than a LAN but smaller than a WAN, which 2
devices, which use routing logic so data packets are
sent from sending stations to receiving stations only by
Communi the shortest route.
can cover several buildings in a single city, such as a Hybrid network – network made up of a combination of
university campus). other network topologies.
File server – a server on a network where central files Cloud storage – method of data storage where data is
and other data are stored. They can be accessed by a stored on off-site servers.
user logged onto the network.
Data redundancy – situation in which the same data is
Hub – hardware used to connect together a number stored on several servers in case of maintenance or
of devices to form a LAN that directs incoming data repair. Wi-Fi – wireless connectivity that uses radio
packets to all devices on the network (LAN).
waves, microwaves. Implements IEEE 802.11 protocols.
Switch – hardware used to connect together a Bluetooth – wireless connectivity that uses radio waves
number of devices to form a LAN that directs in the 2.45GHz frequency band.
incoming data packets to a specific destination
Spread spectrum frequency hopping – a method of
address only.
transmitting radio signals in which a device picks one of
Router – device which enables data packets to be 79 channels at random. If the chosen channel is already
routed between different networks (for example, can in use, it randomly chooses another channel. It has a
join LANs to form a WAN). range up to 100 metres.
Modem – modulator demodulator. A device that WPAN – wireless personal area network. A local wireless
converts digital data to analogue data (to be sent network which connects together devices in very close
down a telephone wire); conversely it also converts proximity (such as in a user’s house); typical devices
analogue data to digital data (which a computer can would be a laptop, smartphone, tablet and printer.
process). WLAN – wireless LAN. Twisted pair cable – type of cable in which two wires of
(W)AP – (wireless) access point which allows a device a single circuit are twisted together. Several twisted pairs
to access a LAN without a wired connection. make up a single cable.
PAN – network that is centred around a person or their Coaxial cable – cable made up of central copper core,
workspace. insulation, copper mesh and outer insulation. Fibre
Client-server – network that uses separate dedicated optic cable – cable made up of glass fibre wires which
servers and specific client workstations. All client use pulses of light (rather than electricity) to transmit
computers are connected to the dedicated servers. data.
Spread spectrum technology – wideband radio Gateway – device that connects LANs which use
frequency with a range of 30 to 50 metres. different protocols.
Node – device connected to a network (it can be a Repeater – device used to boost a signal on both wired
computer, storage device or peripheral device). and wireless networks.
Peer-to-peer – network in which each node can share Repeating hubs – network devices which are a hybrid of
its files with all the other nodes. Each node has its own hub and repeater unit.
data and there is no central server. Bridge – device that connects LANs which use the
Thin client – device that needs access to the internet same protocols.
for it to work and depends on a more powerful Softmodem – abbreviation for software modem; a
computer for processing. software-based modem that uses minimal hardware.
Thick client – device which can work both off line and NIC – network interface card. These cards allow
on line and is able to do some processing even if not devices to connect to a network/internet (usually
connected to a network/internet. associated with a MAC address set at the factory).
Bus network topology – network using single central
28
WNIC – wireless network interface resolve the issue. (and microphone) connected to a
cards/controllers. Ethernet – protocol Bit streaming – contiguous sequence of computer and sent to a server where the
IEEE 802.3 used by many wired LANs. digital bits sent over a network/internet. data is encoded. The user can access
Buffering – store which holds data the data ‘as it happens’ live.
Conflict – situation in which two devices
temporarily. Bit rate – number of bits per
2
have the same IP address.
second that can be transmitted over a
Broadcast – communication where network. It is a measure of the data
pieces of data are sent from sender to
transfer rate over a digital telecoms
receiver.
network. On demand (bit streaming) –
Collision – situation in which two system that allows users to stream video
messages/data from different sources or music files from a central server as
are trying to transmit along the same and when required without having to
data channel.
save the files on their own computer/ 2.
CSMA/CD – carrier sense multiple 1
tablet/phone.
access with collision detection – a Networkin
Real-time (bit streaming) – system in g
method used to detect collisions and
which an event is captured by camera
LINCOLN
MIT-IPC
MIT-MAC
LBL T
SRI UTAH CARNEGIE
AMES LLL T T GWC T
T T XEROX
AMES
CASE HARVARD
CCA STANFORD BBN
RADC BBN TYMSHARE
UCLA ABERDEEN
FNWC T T BELVOIR NBS
UCSD T DOCB ILLINOS SDAC
T
T UCSB NORSAR T
MITRE T T
HAWAI SDC T T
T
T LONDON
RAND ARPA ETAC
USC USC–ISI
RML
T
2
(MAN) – has emerged. MANs are larger than LANs as they can connect together
many small computer networks (e.g LANs) housed in different buildings within
a city (for example, a university campus). MANs are restricted in their size
geographically to, for example, a single city.
In contrast, WANs can cover a much larger geographical area, such as a country
or a continent. For example, a multi-national company may connect a number
of smaller networks together (e.g. LANs or MANs) to form a world-wide WAN.
This is covered in more detail later.
cation
Here are some of the main benefits of networking computers and devices
(rather than using a number of stand-alone computers):
2 Communi
» Devices, such as printers, can be shared (thus reducing costs).
» Licences to run software on networks are often far cheaper than buying
licences for an equivalent number of stand-alone computers.
» Users can share files and data.
» Access to reliable data that comes from a central source, such as a file
server.
» Data and files can be backed up centrally at the end of each day.
» Users can communicate using email and instant messaging.
» A network manager can oversee the network and, for example, apply access
rights to certain files, or restrict access to external networks, such as the
internet.
Networked computers
Networked computers form an infrastructure which enables internal and external
communications to take place. The infrastructure includes the following:
Hardware
» LAN cards
» routers
» switches
» wireless routers
» cabling
Software
» operation and management of the network
» operation of firewalls
» security applications/utilities
Services
» DSL
» satellite communication channels
» wireless protocols
» IP addressing.
30
Networks can be categorised as private or public.
2
Private networks are owned by a single company or organisation (they
are often LANs or intranets with restricted user access, for example,
passwords and user ids are required to join the network); the companies
are responsible for the purchase of their own equipment and software,
maintenance of the network and the hiring and training of staff.
Public networks are owned by a communications carrier company
(such as a telecoms company); many organisations will use the
network and there are
2.
1
usually no specific password requirements to enter the network –
but sub networks may be under security management.
Networkin
g
WANs and LANs
Local area networks (LANs)
LANs are usually contained within one building, or within a small
geographical area. A typical LAN consists of a number of computers and
devices (such as printers) connected to hubs or switches. One of the
hubs or switches is usually connected to a router and/or modem to allow
the LAN to connect to the internet or become part of a wide area network
(WAN).
Wireless LANs (WLANs)
Wireless LANs (WLANs) are similar to LANs but there are no wires or
cables. In other words, they provide wireless network communications
over fairly short distances (up to 100 metres) using radio or infrared
signals instead of using cables.
Devices, known as wireless access points (WAPs), are connected into
the wired network at fixed locations. Because of the limited range, most
commercial LANs (such as those on a college campus or at an airport)
need several WAPs to permit uninterrupted wireless communications.
The WAPs use either spread spectrum technology (which is a
wideband radio frequency with a range from a few metres to 100 metres)
or infrared (which has a very short range of about 1 to 2 metres and is
easily blocked, and therefore has limited use; see Section 2.1.5 Wired
and wireless networking).
The WAP receives and transmits data between the WLAN and the wired
network structure. End users access the WLAN through wireless LAN
adapters which are built into the devices or as a plug in module.
WAP
▲ Figure 2.2 Wireless local
area networks (WLAN)
WAP WAP
31
Wide area networks (WANs)
2
Wide area networks (WANs) are used when computers or networks are situated
a long distance from each other (for example, they may be in different cities or
on different continents). If a number of LANs are joined together using a router
or modem, they can form a WAN. The network of automated teller machines
(ATMs) used by banks is one of the most common examples of the use of a WAN.
Because of the long distances between devices, WANs usually make use of a
public communications network (such as telephone lines or satellites), but they
can use dedicated or leased communication lines which can be less expensive
cation
and more secure (less risk of hacking, for example).
2 Communi
A typical WAN will consist of end systems and intermediate systems, as shown
in Figure 2.3. 1, 3, 7 and 10 are known as end systems, and the remainder are
known as intermediate systems. The distance between each system can be
considerable, especially if the WAN is run by a multi-national company.
123
456
7 8 9 10
Client-server model
sends it back to the client.
clients server
32
computer.
Networkin
g
» The model uses central security databases which control access to the
shared resources. (Note: passwords and user IDs are required to log
into the network.)
» Once a user is logged into the system, they will have access to only
those resources (such as a printer) and files assigned to them by the
network administrator, so offers greater security than peer-to-peer
networks.
» Client-server networks can be as large as you want them to be and
they are much easier to scale up than peer-to-peer networks.
» A central server looks after the storing, delivery and sending of
emails. » This model offers the most stable system, for example, if
someone deletes a shared resource from the server, the nightly
back-up would restore the deleted resource (this is different in
peer-to-peer – see later).
» Client-server networks can become bottlenecked if there are several
client requests at the same time.
» In the client-server model, a file server is used and is responsible
for – central storage and management of data files, thus
enabling other network users to access files
– allowing users to share information without the need for offline
devices (such as a memory stick)
– allowing any computer to be configured as the host machine and
act as the file server (note that the server could be a storage
device (such as SSD or HDD) that could also serve as a remote
storage device for other computers, thus allowing them to access
this device as if it were a local storage device attached to their
computer).
33
aware that other customers are using the website at the same time – there is
2
no interaction between users and server since they are kept entirely separate
at all times.
Peer-to-peer model
cation
node
2 Communi
34
Peer-to-peer offers little data security since there is no central security system.
2
This means it is impossible to know who is authorised to share certain
data. Users can create their own network node share point which is the
only real security aspect since this gives them some kind of control.
However, there are no real authentication procedures.
35
Pros Cons
ie
ts
ts
2
cation
2 Communi
▲ Table 2.1 Summary of pros and cons of thick and thin client hardware
Table 2.2 highlights the differences between thick and thin client software.
Thin client software Thick client software
n relies
on a good, stable and fast n more tolerant of a slow
network connection for it to work network connection
ACTIVITY 2A
1 A company has 20 employees working on the development of a new type
of battery for use in mobile phones. Decide which type of network model
(client-server or peer-to-peer) would be most suitable. Give reasons for
your choice.
2 Another company is made up of a group of financial consultants who
advise other companies on financial matters, such as taxation and
exporting overseas. Decide which type of network model (client-server or
peer-to-peer) would be most suitable. Give reasons for your choice.
2.
1
» The performance of the network deteriorates
under heavy loading. » The network is not secure
since each packet passes through every node.
Networkin
g
The advantages of a bus network include:
» Even if one node fails, the remainder of the
network continues to function. » It is easy to
increase the size of the network by adding additional
nodes.
hub/switch
2
added or removed. They are well suited to applications where there is heavy
data traffic.
Mesh networks
There are two types of mesh network topologies: routing and flooding.
Routing works by giving the nodes routing logic (in other words, they act like
a router) so that data is directed to its destination by the shortest route and
can be re-routed if one of the nodes in the route has failed. Flooding simply
cation
sends the data via all the nodes and uses no routing logic, which can lead to
unnecessary loading on the network. It is a type of peer-to-peer network, but
2 Communi
is fundamentally different. The disadvantages of a mesh network include:
» A large amount of cabling is needed, which is expensive and time
consuming.
» Set-up and maintenance is difficult and complex.
The advantages of a mesh network include:
» It is easy to identify where faults on the network have occurred.
» Any broken links in the network do not affect the other nodes.
» Good privacy and security, since packets travel along dedicated routes.
» The network is relatively easy to expand.
▲ Figure 2.8 Mesh network topology
38
EXTENSION ACTIVITY 2A
2
There appear to be similarities between the peer-to-peer network model
and mesh network model.
Describe the differences between the two models.
Hybrid networks
2.
1
A hybrid network is a mixture of two or more different topologies (bus
and star, bus and mesh, and so on). The main advantages and
disadvantages depend on
Networkin
g
which types of network are used to make up the hybrid network, but an
additional disadvantage is that they can be very complex to install,
configure and maintain.
Additional advantages include:
» They can handle large volumes of traffic.
» It is easy to identify where a network fault has occurred.
» They are very well suited to the creation of larger networks.
▲ Figure 2.9 Hybrid bus and star network
Note that the handling of packets in hybrid networks will depend on which
of the above topologies are used to make up the hybrid structure.
One of the typical applications of hybrid networks is illustrated by
the following example, involving three hotel chains, A, B and C.
Suppose hotel chain A uses a bus network, hotel chain B uses a star
network and hotel chain C uses a mesh network.
At some point, all three hotel chains are taken over by another
company. By using hybrid network technology, all three hotel chains
can be connected together even though they are each using a
different type of network. The system can also be expanded easily
without affecting any of the existing hotels using the network.
There are many other examples; you might want to explore the
various applications for each type of network topology.
2
repair, allowing clients to access data at any time. This is known as data
redundancy. The physical environment is owned and managed by a hosting
company.
There are three common systems, public cloud, private cloud and hybrid cloud.
Public cloud is a storage environment where the customer/client and cloud
storage provider are different companies.
Private cloud is storage provided by a dedicated environment behind a
cation
company firewall. Customer/client and cloud storage provider are integrated
and operate as a single entity.
2 Communi
Hybrid cloud is a combination of private and public clouds. Some data resides
in the private cloud and less sensitive/less commercial data can be accessed
from a public cloud storage provider.
Instead of saving data on a local hard disk or other storage device, a user can
save their data ‘in the cloud’. The pros and cons of using cloud storage are
shown in Table 2.3.
Pros of using cloud storage Cons of using cloud storage
n customer/client files stored on the cloud can be n ifthe customer/client has a slow or unstable
accessed at any time from any device anywhere internet connection, they would have problems
in the world provided internet access is accessing or downloading their data/files
available n costs can be high if large storage capacity is
n no need for a customer/client to carry an external required n expensive to pay for high
storage device with them, or use the same download/upload data transfer limits with the
computer to store and retrieve information customer/client internet service provider (ISP)
n provides the user with remote back-up of data to n potential failure of the cloud storage company is
aid data loss and disaster recovery possible – this poses a risk of loss of all
n recovers data if a customer/client has a hard back-up data
disk or back-up device failure
n offers almost unlimited storage capacity
» The XEN security threat, which forced several cloud operators to reboot 2
all their cloud servers, was caused by a problem in the XEN
hypervisor (a hypervisor is a piece of computer software, firmware
or hardware that creates and runs virtual machines).
» A large cloud service provider permanently lost data during a
routine back-up procedure.
» The celebrity photos cloud hacking scandal, in which more than 100
private photos of celebrities were leaked. Hackers had gained access
to a number of cloud accounts, which then enabled them to publish
the photos on social
2.
1
networks and sell them to publishing companies.
Networkin
g
» In 2016, the National Electoral Institute of Mexico suffered a cloud
security breach in which 93 million voter registrations, stored on a
central database, were compromised and became publicly available to
everyone. To make matters worse, much of the information on this
database was also linked to an Amazon cloud server outside Mexico.
Cloud software
Cloud storage is, of course, only one aspect of cloud computing. Other
areas covered by cloud computing include databases, networking,
software and analytical services using the internet.
Here we will consider cloud software – you can research for yourself
how databases and analytical services are provided by cloud
computing services.
Software applications can be delivered to a user’s computer on demand
using cloud computing services. The cloud provider will both host and
manage software applications – this will include maintenance, software
upgrades and security for a monthly fee. A user will simply connect to
the internet (using their web browser on a computer or tablet or mobile
phone) and contact their cloud services supplier. The cloud services
supplier will connect them to the software application they require.
The main advantages are that the software will be fully tested and it does
not need to reside on the user’s device. However, the user can still use
the software even if the internet connection is lost. Data will simply be
stored on the local device and then data will be uploaded or downloaded
once the internet connection is restored.
Cloud-based applications can, therefore, perform tasks on a local device.
This makes them fundamentally different to web-based apps which need
an internet connection at all times.
2
minimise the risks of interference with other devices, the communication pairs
constantly change the frequencies (channels) they are using (several times a
second). Bluetooth creates a secure wireless personal area network (WPAN)
based on key encryption.
Bluetooth is useful when
» transferring data between two or more devices which are less than 30
metres apart
cation
» the speed of data transmission is not critical
» using low bandwidth applications (for example, sending music files from a
mobile phone to a headset).
2 Communi
As mentioned earlier in the chapter, Wi-Fi also uses spread spectrum
technology. However, Wi-Fi is best suited to operating full-scale networks,
since it offers much faster data transfer rates, better range and better security
than Bluetooth. A Wi-Fi-enabled device (such as a computer or smart phone)
can access, for example, the internet wirelessly at any wireless access point
(WAP) or ‘hot spot’ up to 100 metres away.
As mentioned, wireless connectivity uses electromagnetic radiation: radio
waves, microwaves or infrared. The scale of frequency and wavelength of
magnetic radiation is shown in Table 2.4.
radio microwav infrared visible ultra X-rays gamma
waves es light violet rays
EXTENSION ACTIVITY 2B
Frequency and wavelength are linked by the equation:
c
f= λ
where f = frequency (m), λ = wavelength (Hz), and
c = velocity of light (3 × 108m/s).
Confirm the frequency values in Table 2.3 using the wavelengths given.
Table 2.5 compares radio waves, microwaves and infrared. (Please note: the
‘>’ symbol in the table means ‘better than’).
Bandwidth infrared > microwaves > radio waves
(infrared has the largest bandwidth)
AB
▲ Figure 2.11
Wired
There are three main types of cable used in wired networks (see Figure 2.12).
43
1 water blocking binders
2 23
conductor insulator outside insulation insulation
ripcord
Aramid strength yarns
optical fibres
cation
jacket
2 Communi
▲ Figure 2.12 (left to right) Twisted pair cable, coaxial cable, fibre optic cable
44
Wireless networking
2
» It is easier to expand networks and is not necessary to connect
devices using cables.
» Devices have increased mobility, provided they are within range of the
WAPs. » Increased chance of interference from external sources.
» Data is less secure than with wired systems; it is easier to intercept
radio waves and microwaves than cables so it is essential to protect
data transmissions using encryption (such as WEP, WPA2).
2.
1
» Data transmission rate is slower than wired networks (although it is
improving). » Signals can be stopped by thick walls (in old houses, for example)
Networkin
and signal g
strength can vary, or ‘drop out’.
Wired networking
» More reliable and stable network (wireless connectivity is often
subjected to interference).
» Data transfer rates tend to be faster with no ‘dead spots’.
» Tends to be cheaper overall, in spite of the need to buy and install
cable. » Devices are not mobile; they must be close enough to allow
for cable connections.
» Lots of wires can lead to tripping hazards, overheating of connections
(potential fire risk) and disconnection of cables during routine office
cleaning.
Other considerations
» If mobile phones and tablets are connected to the network, it will need
to offer Wi-Fi or Bluetooth capability.
» There may be regulations in some countries regarding which
wireless transmission frequencies can be used legally.
» Permission from authorities and land owners may be required before
laying cables underground.
» There are numerous competing signals in the air around us; it is
important to consider this when deciding whether to go for wired or
wireless connectivity.
Hub
Hubs are hardware devices that can have a number of devices or
computers connected to them.
computer
computer
data packet sent to network
data sent out to all computers on
▲ Figure 2.13 Hub flow the network
diagram
computer
HUB
computer
45
They are often used to connect a number of devices to form a local area
2
network (LAN), for example a star network (see Section 2.1.3). A hub’s
main task is to take any data packet (a group of data being transmitted)
received at one of its ports and then send the data to every computer
in the network. Using hubs is not a very secure method of data distribution
and is also wasteful of bandwidth. Note that hubs can be wired or
wireless devices.
Switch
cation
Switches are similar to hubs, but are more efficient in the way they distribute
the data packet. As with hubs, they connect a number of devices or computers
2 Communi
together to form a LAN (for example, a star network).
However, unlike a hub, the switch checks the data packet received and works
out its destination address (or addresses) and sends the data to the appropriate
computer(s) only. This makes using a switch a more secure and efficient way of
distributing data.
computer
computer
data packet sent to network
data sent out only to the
▲ Figure 2.14 Switch flow appropriate
diagram computers on the network
SWITCH computer
computer
46
Bridge
Bridges are devices that connect one LAN to another LAN that uses
the same protocol (communication rules). They are often used to
connect together
2.
1
Networkin
different parts of a LAN so that they can function as a single LAN. g
LAN server
server
computer LAN
computer
SWITCH
computer computer
computer computer
SWITCH
BRIDGE
▲ Figure 2.15 Bridge flow diagram
Bridges are used to interconnect LANs (or parts of LANs), since sending
out every data packet to all possible destinations would quickly flood
larger networks with unnecessary traffic. For this reason, a router is
used to communicate with other networks, such as the internet. Note
that bridges can be wired or wireless devices.
Router
Routers enable data packets to be routed between the different networks
for example, to join a LAN to a WAN. The router takes data transmitted in
one format from a network (which is using a particular protocol) and
converts the data to a protocol and format understood by another
network, thereby allowing them to communicate via the router. We can,
therefore, summarise the role of routers as follows. Routers
» restrict broadcasts to a LAN
» act as a default gateway
» can perform protocol translation; for example, allowing a wired network
to communicate with a wireless (Wi-Fi) network – the router can take
an Ethernet data packet, remove the Ethernet part and put the IP
address into a frame recognised by the wireless protocol (in other
words, it is performing a protocol conversion)
» can move data between networks
» can calculate the best route to a network destination address.
47
2 cation
computer computer computer
SWITCH
LAN or WAN
server
LAN ROUTER
internet
2 Communi
Broadband routers sit behind a firewall. The firewall protects the computers
on a network. The router’s main function is to transmit internet and
transmission protocols between two networks and allow private networks to
be connected.
The router inspects the data package sent to it from any computer on any
of the networks connected to it. Since every computer on the same network
has the same part of an internet protocol (IP) address, the router is able to
send the data packet to the appropriate switch and it will then be delivered
using the MAC destination address (see next section). If the MAC address
doesn’t match any device on the network, it passes on to another switch on
the same network until the appropriate device is found. Routers can be wired
or wireless devices.
Gateway
A gateway is a network point (or node) that acts as an entrance to another
network. It is a key point for data on its way to or from other networks. It
can be used to connect two or more dissimilar LANs (LANs using different
protocols). The gateway converts data packets from one protocol to another.
Gateways can also act as routers, firewalls or servers – in other words, any
device that allows traffic to flow in and out of the networks. Gateways can be
wired or wireless devices.
All networks have boundaries so that all communication within the network is
conducted using devices such as switches or routers. If a network node needs
to communicate outside its network, it needs to use a gateway.
Modems
Modern computers work with digital data, whereas many of the public
communication channels still only allow analogue data transmission. To allow
the transmission of digital data over analogue communication channels we
need to use a modem (modulator demodulator). This device converts digital
data to analogue data. It also does the reverse and converts data received
over the analogue network into digital data which can be understood by the
computer.
Wireless modems transmit data in a modulated form to allow several
simultaneous wireless communications to take place without interfering
with each other. A modem will connect to the public infrastructure (cable,
telephone, fibre-optics or satellite) and will supply the user with a standard
Ethernet output which allows connection to a router, thus enabling an internet
connection to occur.
48
laptop
internet 2 PC
smart phone
modem router
tablet
n can route traffic from one network n convert data packets from one
to another network protocol to another; they act as an
entry and exit point to networks
EXTENSION ACTIVITY 2C
Draw a diagram to show how a gateway could be used to connect
together three LANs which are using different protocols. Include all the
hardware devices and cables needed.
49
card/controller (WNIC) all the data is transferred using the
2
multiple access with collision detection (CSMA/CD) was developed to
try and resolve this issue. Collison detection depends on simple physics:
when a frame is sent it causes a voltage change on the Ethernet cable.
When a collision is detected, a node stops transmitting a frame and
transmits a ‘jam’ signal and then waits for a random time interval before
trying to resend the frame. CSMA/CD protocol will define the random time
period for a device to wait before trying again.
2.
1
Figure 2.20 shows how data collisions can be dealt with using transmission
counters (which keep track of how many times the collision detection routine
Networkin
g
has been entered – there will a defined limit as part of the CSMA/CD
protocol) and random time periods.
A assemble
frame
1 allocated frame?
No time
Yes
is line
idle?
No frame
sent?
Yes
END
start to send
frame
Yes
set
transmissio No
n counter = wait for another
wait for allocated
time period then
collision re-start
detected? transmission
No
Yes
stop transmission
and
send jam signal
increment abort
transmission transmission A
counter
max
Yes
transmission
counter? continue to send
No
▲ Figure 2.20 How data collisions can be dealt with using transmission counters
51
EXTENSION ACTIVITY 2D
2
Review Figure 2.20. As it stands, it is possible for an endless loop to be
established.
Suggest a modification to the flow diagram to ensure it terminates if there is
a problem with the data channel, or to prevent the data transmission holding
up the computer for an unacceptable time period.
cation
2.1.8 Bit streaming
Bit streaming is a contiguous sequence of digital bits sent over the internet
2 Communi
or a network that requires a high speed data communication link (such as
fast broadband). Since bit streaming often involves very large files (such as
video) it is necessary for the files to undergo some data compression before
transmission. It is also necessary to have some form of buffering to ensure
smooth playback of the media files.
The data transmission rate from the file server (containing the video, for
example) to the buffer must be greater than the rate at which data is
transmitted from buffer to media player. The larger the buffer, the better the
control over the bit rate being sent to the media player. The media player will
always check to ensure data lies between a minimum value (often referred to as
low water mark) and a maximum value (often referred to as a high water mark).
The difference between the two values is usually about 80% of the total buffer
capacity. The buffer is a temporary storage area of the computer.
stream
bit streaming from
media
server
player
source of data low high buffer
▲ Figure 2.21 Bit streaming
52
Bit streaming can be either on demand or real time.
2
On demand
» Digital files stored on a server are converted to a bit streaming
format (encoding takes place and the encoded files are uploaded to a
server). » A link to the encoded video/music file is placed on the web
server to be downloaded.
» The user clicks on the link and the video/music file is downloaded
in a contiguous bit stream.
2.
1
» Because it is on demand, the streamed video/music is broadcast to the user
N
et
rk
in
g
as and when required.
» It is possible to pause, rewind and fast forward the video/music if required.
Real time
» An event is captured by camera and microphone and is sent to a
computer. » The video signal is converted (encoded) to a streaming
media file. » The encoded file is uploaded from the computer to the
dedicated video streaming server.
» The server sends the encoded live video to the user’s device.
» Since the video footage is live it is not possible to pause, rewind or
fast forward.
ACTIVITY 2B
1 a) Explain the differences between LAN, MAN and WAN.
b) Give three of the benefits of networking computers.
c) Explain the following terms.
i) Thick client
ii) Thin client
2 a) Draw diagrams to show the following network topologies.
i) Bus
ii) Star
iii) Mesh
b) Give one benefit and one drawback of using each type of network
topology.
3 a) Explain the differences between public and private cloud computing.
b) Give two benefits of using cloud computing.
c) Give two drawbacks of using cloud computing.
4 You have been asked by a manager to write a report on whether a
LAN being set up in their new building should use wired or wireless
connectivity. The building has 20 floors.
Explain your arguments for and against using both types of connectivity
and draw a conclusion to help the manager make their decision.
5 a) What is meant by bit streaming?
b) Why is it necessary to use buffers whilst streaming a video from the
internet?
c) Explain the differences between on demand and real time bit streaming.
53
World Wide Web (WWW) – collection of telephones when making calls or when
sending faxes.
2
multimedia web pages stored on a
website, which uses the internet to Voice over Internet Protocol (VoIP) –
access information from servers and converts voice and webcam images into
other computers. digital packages to be sent over the
HyperText Mark-up Language (HTML) – internet.
used to design web pages and to write Internet protocol (IP) – uses IPv4 or
http(s) protocols, for example. IPv6 to give addresses to devices
Uniform resource locator (URL) – connected to the internet.
specifies location of a web page (for
cation example, www.hoddereducation.co.uk).
Web browser – software that connects
2 Communi to DNS to locate IP addresses; interprets
2.2 The internet web pages sent to a user’s computer so
that documents and multimedia can be IPv4 – IP address format which uses
read or watched/listened to. 32bits, such as 200.21.100.6.
Key terms Internet service provider (ISP) – Classless inter-domain routing (CIDR)
company which allows a user to connect – increases IPv4 flexibility by adding a
Internet – massive network of to the internet. They will usually charge a suffix to the IP address, such as
networks, made up of computers and 200.21.100.6/18.
monthly fee for the service they provide.
other electronic devices; uses TCP/IP IPv6 – newer IP address format which
Public switched telephone network
communication protocols.
(PSTN) – network used by traditional uses 128bits, such as
A8F0:7FFF:F0F1:F000:3DD0: Private IP address – an IP address system for finding IP addresses of a
256A:22FF:AA00. reserved for internal network use behind domain name.
Zero compression – way of reducing the a router. JavaScript® – object-orientated (or
length of an IPv6 address by replacing Public IP address – an IP address scripting) programming language used
groups of zeroes by a double colon (::); allocated by the user’s ISP to identify the mainly on the web to enhance HTML
this can only be applied once to an location of their device on the internet. pages.
address to avoid ambiguity. Domain name service (DNS) – (also PHP – hypertext processor; an HTML
Sub-netting – practice of dividing known as domain name system) gives embedded scripting language used to
networks into two or more sub-networks. domain names for internet hosts and is a write web pages.
Internet
» The internet is a massive network of networks (although, as
explained in Section 2.1.1, the internet is not a WAN) which are
made up of various computers and other electronic devices.
» It stands for interconnected network.
» The internet makes use of transmission control protocol
(TCP)/internet protocol (IP).
54
World Wide Web (WWW)
2
» This is a collection of multimedia web pages and other documents
which are stored on websites.
» http(s) protocols are written using HyperText Mark-up Language
(HTML). » Uniform resource locators (URLs) specify the location of
all web pages. » Web resources are accessed by web browsers.
» The world wide web uses the internet to access information from servers
and other computers.
2.
2
The internet
2.2.2 Hardware and software needed to support
the internet
The fundamental requirements for connecting to the internet are
» a device (such as a computer, tablet or mobile phone)
» a telephone line connection or a mobile phone network connection
(however, it is possible that a tablet or mobile phone may connect to
the internet using a wireless router)
» a router (which can be wired or wireless) or router and modem
» an internet service provider (ISP) (combination of hardware and
software) » a web browser.
The telephone network system, public switched telephone network
(PSTN), is used to connect computers/devices and LANs between
towns and cities. Satellite technology is used to connect to other
countries (see later).
In recent years, telephone lines have changed from copper cables to fibre
optic cables, which permits greater bandwidth and faster data transfer
rates (and less risk of data corruption from interference). Fibre optic
telephone networks are usually identified as ‘fast broadband’. As
discussed earlier, high speed broadband has allowed WLANs to be
developed by using WAPs.
High speed communication links allow telephone and video calls to be
made using a computer and the internet. Telephone calls require either
an internet enabled telephone connected to a computer (using a USB
port) or external/ internal microphone and speakers. Video calls also
require a webcam. When using the internet to make a phone call, the
user’s voice is converted to digital packages using Voice over Internet
Protocol (VoIP). Data is split into packages (packet switching) and sent
over the network via the fastest route. Packet switching and circuit
switching are covered in more detail in Chapter 14.
2
Phone calls using the internet use either an internet phone or microphone and
speakers (video calls also require a webcam).
The internet connection is only ‘live’ while data (sound/video image) is being
transmitted.
Voice over Internet Protocol (VoIP) converts sound to digital packages
(encoding) which can be sent over the internet.
VoIP uses packet switching; the networks simply send and retrieve data as it
cation
is needed so there is no dedicated line, unlike PSTN. Data is routed through
thousands of possible pathways, allowing the fastest route to be determined.
2 Communi
The conversation (data) is split into data packages. Each packet contains at
least the sender’s address, receiver’s address and order number of packet – the
sending computer sends the data to its router which sends the packets to
another router, and so on. At the receiving end, the packets are reassembled
into the original state (see Chapter 14 for more details).
VoIP also carries out file compression to reduce the amount of data being
transmitted.
Because the link only exists while data is being transmitted, a typical 10
minute phone call may only contain about 3 minutes where people are talking;
thus only 3MB of data is transmitted making it much more efficient than PSTN.
Cellular networks and satellites
Other devices, such as mobile phones, use the cellular network. Here, the
mobile phone providers act as the ISPs and the phones contain communication
software which allows them to access the telephone network and also permits
them to make an internet connection.
Satellites are an important part of all network communications that cover
vast distances. Due to the curvature of the Earth, the height of the satellite’s
orbit determines how much coverage it can give. Figure 2.22 shows how
satellites are classified according to how high they orbit in relation to the
Earth’s surface.
GEO
MEO
LEO
35 800 km
5000–12 000 km 500–2500
km
Geostationary Earth Orbit (GEO) provide long distance telephone and computer network
communications; orbital period = 24 hours
Medium Earth Orbit (MEO) used for GPS systems (about 10 MEO satellites are currently orbiting the
Earth); orbital period = 2 to 12 hours
Low Earth Orbit (LEO) used by the mobile phone networks (there are currently more than 100 LEO
satellites orbiting the Earth); orbital period = 80 mins to 2 hours
56
Satellites have the advantage that they will always give complete coverage 2
and don’t suffer from signal attenuation to the same extent as
underground/ undersea cables. It is also difficult to isolate and resolve
faults in cables on the sea bed.
2.2.3 IP addresses
The internet is based on TCP/IP protocols. Protocols define the rules that must
be agreed by senders and receivers on the internet. Protocols can be divided
2.
2
into TCP layers (see Chapter 14). We will first consider internet protocols (IP).
T
e
i
C 192.0.0.0 to 24 8 small
223.255.255.255 networks
D 224.0.0.0 to – – multi-cast
239.255.255.255
E 240.0.0.0 to – – experimental
255.255.255.255
57
However, it soon became clear that this IPv4 system provides insufficient
2
address range. For example, a user with a medium sized network (class B) might
have 284 host machines and their class B licence allows them 216 (65534; note
the value is not 65536 since two values are not assigned). This means several of
the allocated host IDs will not be used, which is wasteful.
Classless inter-domain routing (CIDR) reduces this problem by increasing the
flexibility of the IPv4 system. A suffix is used, such as 192.30.250.00/18, which
means 18 bits will be used for the net ID and the last 14 bits will be used for
the host ID (rather than the normal 24 bits and 8bits for a class C network).
cation
The suffix clearly increases the flexibility regarding which bits represent the
net ID and which represent the host ID.
2 Communi
EXTENSION ACTIVITY 2E
Network address translation (NAT) removes the need for each IP address to
be unique. Find out how it works.
IPv6 addressing
IPv6 addressing has been developed to overcome some of the problems
associated with IPv4. This system uses 128-bit addressing, which allows for
much more complex addressing structures. An IPv6 address is broken into
16-bit chunks and because of this, it adopts the hexadecimal notation. For
example:
A8FB:7A88:FFF0:0FFF:3D21:2085:66FB:F0FA
Note how a colon (:) rather than a decimal point (.) is used here.
It has been designed to allow the internet to grow in terms of number of hosts
and the potential amount of data traffic. IPv6 has benefits over IPv4, it
» has no need for NATs (network address translation)
» removes risk of private IP address collisions
» has built in authentication
» allows for more efficient routing.
Zero compression
IPv6 addresses can be quite long; but there is a way to shorten them using
zero compression. For example, 900B:3E4A:AE41:0000:0000:AFF7:DD44:F1FF
can be written as:
900B:3E4A:AE41::AFF7:DD44:F1FF
With the section 0000:0000 replaced by ::
The zero compression can only be applied ONCE to an IPv6 address, otherwise
it would be impossible to tell how many zeros were replaced on each occasion
where it was applied. For example, 8055:F2F2:0000:0000:FFF1:0000:0000:DD04
can be rewritten either as:
8055:F2F2::FFF1:0000:0000:DD04
or as:
8055:F2F2:0000:0000:FFF1::DD04
58
8055:F2F2::FFF1::DD04 is not a legal way of compressing the original address
–
2
we have no way of knowing whether the original address was
8055:F2F2:0000:FFF1:0000:0000:0000:DD04
or
8055:F2F2:0000:0000:0000:FFF1:0000:DD04
or
2.
2
8055:F2F2:0000:0000:FFF1:0000:0000:DD04
It would, therefore, be regarded as ambiguous.
The internet
Sub-netting
CIDR is actually based on sub-netting and the two are similar in many
ways. Sub-netting divides a LAN into two or more smaller networks. This
helps reduce network traffic and can also hide the complexity of the
overall network. Recall that the IP address (using IPv4) is made up of the
netID and hostID. Suppose a university network has eight departments
and has a netID of 192.200.20 (11000000.11001000.00010100). All of the
devices on the university network will be associated with this netID and
can have hostID values from 00000001 to 1111110 (hostIDs containing all
0s or all 1s are forbidden). The university network will look something like
this:
Humanities
Admin and
finance Business
Science
internet
Arts
gateway Engineering
Computing
Maths
So, for example, the devices in the Admin and finance department might
have hostIDs of 1, 8, 240, 35, 67, 88, 134, and so on, with similar
spreads for the other seven departments.
It would be beneficial to organise the netIDs and hostIDs so that the
network was a lot less complex in nature. With sub-netting, the hostID is
split as follows:
000 00000, where the first 3 bits are netID expansion and the last 5bits
are the hostIDs.
59
Thus, we have eight sub-nets with the same range of hostIDs.
2
Department netID hostID range
cation
2 Communi
▲ Table 2.9
Humanities
Admin and finance
192.200.20.0
192.200.20.1
Maths
192.200.20.2
Science
192.200.20.3 Computing
192.200.20.6
internet router
Arts
192.200.20.4
Engineering
192.200.20.5
Business
192.200.20.7
The internet
▲ Table 2.10
Private IP addresses (which are internal value only) allow for an entirely
separate set of addresses within a network. They allow access to the
network without taking up a public IP address space. However, devices
using these private IP addresses cannot be reached by internet users.
Public IP addresses are the ones allocated by a user’s ISP to identify
the location of their device. Devices using these IP addresses are
accessible from anybody using the internet. Public IP addresses are
used by
» DNS servers
» network routers
» directly-controlled computers.
Path is the web page (if this is omitted then it is the root directory of the
website) Filename is the item from the web page
For example: http://www.hoddereducation.co.uk/computerscience
cation
computer
2 Communi
5 ① The user opens their web browser and types in
the URL
website server
62
HTML would be used to create a file using tags. For example:
2
<html>
<body>
<p> Example <p/>
[program code]
</html>
2.
2
The
Between the HTML tags the inclusion of JavaScript or PHP can be used.
i
JavaScript
JavaScript (unlike HTML) is a programming language which will run
on the client-side. What is the difference between running on the
client-side and running on the server-side?
» Client-side – the script runs on the computer, which is making the
request, processing the web page data that is being sent to the
computer from the server.
» Server-side – the script is run on the web server and the
results of processing are then sent to the computer that made
the request.
01 <html>
02 <body>
03 <p>Enter the temperature</p>
04 <input id="Temp" value="0"
05 <button onclick="checkReading()>"Enter</button>
06 <script>
07 function checkReading() {
08 var temp, result;
09 temp = document.getElementById("Temp").value;
10 if (temp >= 200) {
11 result = "HIGH"
12 } else if (temp >= 100) {
13 result = "OK"
14 } else {
15 result = "LOW"
16 }
17 alert("The result is " + result)
18 }
19 </script>
20 </body>
21 </html>
PHP
PHP is another language which can be embedded within HTML.
However, when PHP is used it is processed on the server-side.
Again, the code will be sandwiched inside HTML and will be stored as
a .php file.
63
The following example is similar to the JavaScript example; again temperatures
2
are input but this time ‘H’, ‘O’ and ‘L’ are output depending on the result. Note
that variables begin with $ and are case-sensitive.
01 <?php
02 if(isset($ _ GET['temp'])) {
03 echo "Result: " . checkReading($ _ GET['temp']);
04 } else {
cation
05 ?>
06 <form action="#" method="get">
2 Communi
07 Enter Temp: <input type="text" name="temp" /><br />
08 <input type="submit" value="Calculate" />
09 </form>
10
11 <?php
12 }
13 function checkReading($inputTemp) {
14 $resultChar = "L";
15 if($inputTemp >= 200) $resultChar = "H";
16 else if($inputTemp >= 100) $resultChar = "O";
17 return $resultChar;
18 }
19 ?>
EXTENSION ACTIVITY 2F
Look at the two pieces of code in the previous JavaScript and PHP sections,
then answer these questions.
a) Write down the names of two variables which are used in each piece
of code.
b) In each case, identify which statement(s) correspond(s) to an output.
c) What is the purpose of the statement shown in line:
i) 09 of the JavaScript code
ii) 03 of the PHP code?
e) What is the purpose of line 05 in the JavaScript?
ACTIVITY 2C
1 a) Describe what happens when a telephone call is made using PSTN.
b) Describe what happens when a computer, equipped with microphone
and speakers, is used to make a ‘telephone’ call over the internet.
c) Communication links between continents frequently involve the use of
satellite technology. Explain the differences between GEO, MEO and
LEO satellites.
64