Math
Math
COMPUTE-IT
COMPUTING
FOR KS3
MARK DORLING
AND GEORGE ROUSE
Series Editors
~ DYNAMIC
,, HODDER
~LEARNING
EDUCATION i
LEARN MQRE,
.'
_J
Contents
lntroduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv
Glossary/index 152
Acknowledgements 156
111
lntroduction
Computing drives innovation in the sciences, in engineering, business,
entertainment and education. It touches every aspect of our lives from the
cars we drive to the movies we watch and the way in which businesses and
governments communicate with and hear from us.
An understanding of Computer Science is essential if you want to keep up
with changing technology and take advantage of the opportunities it offers in
your life - whether it's as a career or a way of problem solving, or as a way of
providing you with a greater appreciation of the way things work.
Computing is a relatively modern are a of study but its roots go back to ancient
times when our ancestors created calculating devices - long before modern-
day calculators carne into being. As you'll see, computer science also has a rich
history of innovation and design.
While it is almost impossible to accurately predict what technological
developments will happen next, there are underlying Computer Science
concepts and principles that lead to future developments. These can be
recognized and applied by people who work in computing.
Computational Thinking is one of these processes and it underpins all the
learning in this Student Book. This should provide you with an approach to
problem solving that you will be able to use in relation to a wide range of
computer-related and non-computer related situations. By studying Computer
Science you will develop valuable skills that will enable you to solve deep,
multi-layered problems.
Throughout this Student's Book we have described the processes that led to
the development of major ideas and systems. This will give you a much better
understanding of how computing has come to be as it is today. We look at the
development of computing through time, from ancient calculating devices
to modern technology, highlighting how each break through or development
has contributed to modern Computer Science. We look at the elements that
make much of the technology we all take for granted today actually work, and
we look at how you can apply this knowledge and these skills to computing
challenges.
IV
Each unit in the Student's Book centres around a challenge and, in arder to
gain the knowledge and skills you require to complete each challenge, you will
come across three different types of activity:
• Think-IT: These are thinking and discussion activities to get you
thinking about ideas and concepts.
• Plan-lT: These are planning exercises that set the scene for the
practical activities.
• Compute-IT:These are the practical computing or 'doing' activities
that will allow you to apply the skills and knowledge that you have
developed within the unit.
We hope that you enjoy the challenges we have set you and your study of
computing.
V
Challenge
• Key Terms Your challenge is to learn to 'think' like a
computer, and understand how computers
Data: A collection of facts
process data.
without context, such as
values or measurements.
On a computer 'data' can
be stored as files, emails,
video games, songs, pictures, III Under the hood of a
data logged by sensors and
computer
calculations carried out by
the central processing unit
To compute
(CPU).
The word 'compute' is derived from the Latin word
Compute: The verb 'to
'computare', which means 'to count up', 'to sum up', 'to
compute' means to carry out
reckon together'. The Romans certainly did not have
mathematical calculations. computers and 'to compute' does not mean to use a
Today, with electronic computer. Computing is something that we all do whenever
computers everywhere, the we perform a mathematical calculation.
term is more commonly The electronic computer is not the first device that people
defined as 'the use of have used to help them to compute. For many centuries
computers to solve mathematicians have been inventing tools to help them to
problerns' carry out calculations with greater speed and accuracy.
~
Think-lT'
1.1.1 Draw a timeline stretching from the year 18 000 BC to today.
a) Where do the computing machines in the photographs fit on the timeline?
b) Can you think of any other computing devices or machines to add to the timeline?
~
Think-lT' What is under the hood of a modern
computer?
1.1.2 List ali the computing
Traditionally we think of computers as the large desktop
devices you use at
machines that many of us regularly use at home and at school.
home and at school.
However, in recent years computers have become faster and
smaller.
~
Compute-lT
1.1.3 a) Find an old computer to take apart. Make sure the machine is unplugged before you
open the case and then examine ali the component parts in turn. As you remove each
part from the case, find out its function. Beware of sharp edges!
sound card
• Key Terms
.:
input
Input device: An input device enables the user to 'input' data
into a computer:
Memory: This is where a computer keeps the data that has
been input, as well as software applications and the results of any
processing it has carried out, for the short term. This memory is
lost when the computer is off
Storage device: This is where a computer stores files that have
been created, as well as software that has been installed, for the storage
longer term.
Processor: The part of a computer that processes data
according to the instructions it has been given. lt provides the user
with information.
Output device: An output device enables the u ser to receive
information from a computer.
~
Think-lT'
1.1.4 Look at the table and name as many examples of each part of a computer as you can.
Function Examples
Input Without externa! data a computer can do almost nothing. The
devices role of the input device is to 'input' data into the computer.
The computer has to keep the data that has been entered until
Memory it is ready to process it. lt also has to load software applications.
This memory is lost when the computer is off.
Files and applications need to be stored safely until the
Storage computer is ready to load them again. This data is not lost when
the computer is off.
This is the part of the computer that processes data, according
Processor to the instructions it has been given, to provide the user with
information.
Output lnformation has to be conveyed to the user. This function is
devices performed by 'output' devices.
5
Unit I Under the hood of a computer
input
VDU
/
Q!;!~ XJ
+7
process
'-----./
19
1 1
D D
1 1
The CPU has to have sorne data to
process. This is often input using a
keyboard or a touch screen. The data is ~
stored in the computer's memory. In the
Think-lT
illustration the number '4' has been entered 1.1.5 Which interna! component of a
into the function machine's memory. computer can be regarded as a
function machine in its own right?
6
1.1 Under the hood of a computer
~
~
Compute-lT
1.1.6 Create a function machine, like the one in the picture.
Decide on an input, describe the processing that will
take place and think about the resulting output. Now
create three cards containing this inforrnation. Place the
cards face down on the function machine. Turn over the
input and output, and ask a fellow student to work out
what the processing card has on it,
r fetch
.Á A Fetch-Decode-Execute cycle
7
• .,- ,t
18 Code breakers
Enigma and the Lorenz machine
During the Second World War vital supplies were sent
to Britain from the United States of América, but Nazi
submarines (U-boats) were sinking large numbers of the
ships bringing these supplies across the Atlantic. Winston
Churchill understood that intelligence was crucial if Britain
and its allies were to win the Second World War, and he put
his faith in the team of code breakers at Bletchley Park. Their
task was to decrypt Nazi communications. The Nazis were
enciphering their messages using the Enigma machine and
its successor, the Lorenz machine. If the Allies were able to
break the codes, they could keep one step ahead of the Nazis.
A Sorne of the code-breaking team at Bletchley Park. A The Nazis used the Lorenz cipher machine
Many of the cede breakers were women. to generate a cede that they believed was
unbreakable.
Colossus
Code breaking requires vast numbers of computations to
be carried out extremely quickly. The team at Bletchley
Park were working against the clock. Alan Turing, the
mathematician who led the tearn, knew that humans
were just too slow at performing the required volume of
calculations, so the code breakers built a computer, known
as Colossus (see the photograph on page 2), to speed things
up. Colossus decrypted codes generated by the Lorenz
Machine by carrying out complex analysis on the messages
that were intercepted. Colossus could read 5000 characters
per second. This meant that the analysis could be carried
out in hours, rather than weeks. In a sense, Colossus was a
function machine because it was programmed to perform
just one task.
8
1.2 Code breakers
~
r-,
Compute-lT
1.2.1 Think back to when you learned to organise numbers in
multiples of ten, and then copy and complete the table.
Number Hundreds Tens Units
146 1 4 6
o o 3
5
24
o 6 5
93
131
1 7 9
2 1 3
255
9
Unit I Under the hood of a computer
Circuit semaphore
Imagine an electric circuit with three lights, each
controlled by its own switch. You can switch the lights
on in many different patterns. Now imagine that each
pattern represents a number, and each number relates to a
message in a code book.
4 2 1 ~
Think-lT
= 5 1.2.2 Look at the circuit semaphore diagram on the left.
What do you notice about the number at the top of
each column?
~
r-,
Compute-lT
1.2.3 a) Use the information contained in the circuit
semaphore diagram on the left to work out what
numbers the other four patterns of lights represent.
b) In the code book, the number 5 represents the
question, 'What is your choice of meeting point,
A, B or C?' The code book contains the following
responses: 1 = A, 2 = B and 3 = C. What pattern
of lights would an agent use to tell their controller to
meet them at point B?
A Circuit semaphore
/
lf you have three lights you
Binary can make the left-hand light
represent '4', the middle
LIGHTS
light represent '2' and the
Left Middle Right right hand light represent
Decimal
number
4 2 1 --.....____
l 'I '. A light can be 'on',
represented by a 'I', or 'off,
~
2
1
o
o
o
o
o
1
O
1
O ~L[
represented by a 'O'.
~
~
Compute-lT
1.2.4 a) Copy and extend the table below as required. Complete the cells for ali the different
binary combinations you can make. The first few cells have been completed for you.
- - - - - -
Total number of I bit Total number of 2 bit Total number of 3 bit Total number of 4 bit
combinations: combinations: combinations: combinations:
b) You have seen how it is possible to count up to 7 in binary. How would you count to 8?
e) What is the largest number you can make with I bit? With 2 bits? With 3 bits?
With 4 bits?
d) What is the smallest number you can make regardless of the number of bits?
e) What pattern can you spot when working out the largest number with a given number
of bits?
f) What would you have to do if you wanted to count to 16?
g) What do you notice when you place a 'O' to the right of a 'I '?
~
Think-lT'
1.2.5 In 1836, Samuel Morse, Joseph
Henry and Alfred Vail invented a
method of using electrical signals to
A
B
e
·-
-·• 0
••- --
-- -· Q--·-
N - e
J·--- y-·--
H u • • -
long and short signals to represent
the letters in the alphabet. A short
I
•• V e e e -
'on' is called a dot and a long 'on' is
M--
w ·--
a dash. For example, 'dot dot dot X - e e -
K
L e -
-·- e e e
dash dash dash dot dot dot' is the
internationally recognised distress z - - ••
A lnternational Morse code
signa[, SOS.
lnvestigate other methods of sharing information through
data transfer that have been used throughout history.
11
' ,t
¡;, ' , ;i..'
~ ·;::-~
Unit I Under the hood of a computer
'. ;~~
. -"'~
-.
Unit Size
/ Bit A binary digit, 1 or O
A 'nibble' is half a 'byte'.
l-Nibble 4 bits
Who says that computer
Byte 8 bits
scientists don't have a sense
of humour?' kilobyte (kB) 1024 bytes
megabyte (M B) 1024kB
gigabyte (GB) 1024MB
terabyte (TB) 1024GB
petabyte (PB) 1024TB
A The common units for measuring digital data, computer file sizes
and computer memory
~
Think-lT~
1.2.6 Using your understanding of bits and bytes, convert the following values, which represent
file sizes, into bits. Show your working.
a)7kB b)29kB c)279kB d)IMB e)2MB
1.2.7 The number 1024 keeps appearing. Where does this number come from?
12
1.2 Code breakers
Challenge
Do you remember the challenge far this unit, to learn to 'think' like a
computer, and understand how computers process data? Let's put your
learning to the test.
~
~
Compute-lT
1.2.8 a) Create a plain text file. Type in the letters of the alphabet, then save the file as '/\.
Right click the file's name, select 'Properties' and record the size of the file in bytes
and bits in a copy of the table below.
b) Why do you think file A has a size of 26 bytes?
e) How muid you test your theory of why file A has 26 bytes?
d) Copy this sentence or one you make up yourself, which contains spaces and
punctuation, into a text file and save itas 'B': 'The quick, brown fox jumps over the
lazy dog. The lazy dog does not bark!' Now, copy and paste the sentence into a new
text file twice and save itas 'C'. Finally, paste the sentence into a new text file five
times and save it as 'D'. Complete the rest of the table below. What do you notice?
Character Size
File File type count (bytes) Size (bits)
A: Plain text file (letters of the alphabet) .txt 26
B: Plain text file (sentence once) .txt
C: Plain text file (sentence twice) .txt
O: Plain text file (sentence five times) .txt
~
Think-lT~
1.2.9 How many average-sized reading books muid be stored
in a megabyte, assuming the files are not compressed?
13