CSCB-Web-Final
CSCB-Web-Final
CSCB-Web-Final
2
Computer
Science
Colouring
Book
3
Copyright © 2020 by William Lau
Some Rights Reserved. “Computer Science Colouring Book” is licensed under a Creative Commons Attribution -
NonCommercial - ShareAlike 4.0 International License.
I am not affiliated or endorsed by any of the companies or products featured in this book in any way, shape or form. All
product names, trademarks and registered trademarks are property of their respective owners. All company, product and
service names used in this website are for identification purposes only. Use of these names,trademarks and brands does
not imply endorsement. This book is to be used for entertainment and educational purposes only.
ISBN: 978-1-9161163-3-7
4
For Zi and Q
5
6
CONTENTS
0. Introduction………………………………………………………………………. 9
1. Computer Architecture……………………………………………………...…. 11
2. Secondary Storage…………………………………………………………….… 19
3. Embedded Systems……………………………………………....……………. 27
4. Networks………………………………….……………………………….………... 35
5. Software………………………………………………………………….…….……. 47
6. Programming……………………………………………………………...………. 55
7. Data Representation…………………………………………………….……... 65
8. Work and Play………………………………………………………………..……. 79
9. Artificial Intelligence……………………………………………………………. 89
10. Colour Word Search………………………………………………………...….. 97
11. Colour and Match……………………………………………………...……..... 99
12. Copy and Colour…………………………………………………………….……. 101
13. Quiz Answers…………………………………………………………………….... 103
14. Further Reading..….….……………………………………………..………….. 104
15. Acknowledgements…..………………..………………………………….……. 106
16. Index…….……………………………………………………………………….……. 107
7
8
Introduction
When we think of computer science, we may think it is difficult or perhaps it is
only for certain people. However, the beauty of computer science should be
something that everyone is exposed to, regardless of age, gender, race or
income.
I hope this book becomes a stepping stone to helping you learn more about
computer science. Yes, it will be challenging, however once you have learnt the
basics, you will find that the subject is empowering, liberating and fun in the
same way as walking, cycling and talking to friends.
Be bold. Get your colouring pencils, gel pens or glitter pens ready and embark on
a fun and gentle introduction to computer science. Feel free to share your
creations on social media using the hashtag #CSColouringBook
9
10
Desktop Computer
The first desktop computers such as the IBM PC were beige-coloured – how
boring! Later, companies made black, grey and silver desktops. In 1998, Apple
famously released their iMac G3 desktops in a range of colours.
Go wild, you can colour in this desktop with whatever colours you choose!
Computer architecture 11
12
Laptop Computer
Computer systems come in many different forms. A popular portable version is a
laptop. Whilst laptops can perform most of the tasks that a larger desktop can,
they are generally less powerful than a desktop. Many come with built-in
webcams, microphones and speakers.
To avoid damage, you should always close your laptop screen when you are
carrying your laptop and avoid holding your laptop by the hinge.
Computer architecture 13
14
CPU
The Central Processing Unit (CPU) is a microchip which processes all the data
and instructions in a computer system.
1. The CPU fetches data and instructions from memory. The instructions and
data are in binary format which means they are made up of 0s and 1s.
2. The CPU decodes the instructions to make sense of all the 0s and 1s.
3. The instructions are executed.
The CPU can perform billions of these “fetch-decode and execute” cycles
every second!
Computer architecture 15
16
Main Memory
The CPU reads instructions from memory. The CPU has its own memory called
cache, however this is very small and only stores frequently or recently used
data. The computer’s main memory is in the form of RAM and ROM.
RAM stands for Random Access Memory. This stores programs and data
currently in use. When a computer is turned off, all data in RAM is lost. RAM is
therefore described as volatile. Originally, all RAM modules had green circuit
boards. However, RAM now comes in various colours.
ROM stands for Read Only Memory. The main job of ROM is to boot up (start)
your computer when it is turned on. ROM in an embedded system (such as
washing machine) may contain the software for the device as this is unlikely to
change.
Computer architecture 17
18
Floppy Disk
If we want to save programs or files, we need a separate storage to main
memory. This secondary storage is non-volatile which means data is not lost
when the computer is turned off. The most reliable type of secondary storage is
magnetic storage. Examples include the floppy disk, magnetic tape and hard
disk drives.
For younger readers, the image above may look like the icon that you click on to
save your work. This icon is based on the floppy disk. Each floppy disk had a
plastic case which protected a magnetic disk inside. Between 1980 and 2000,
these disks were the dominant form of portable storage. Software was often
distributed on floppy disks. You could also save files such as word-processed
documents and images to a floppy disk. The files could then be carried from
home to work or given to friends.
By the early 2000s, optical storage such as CDs and DVDs began to dominate.
Secondary storage 19
20
Hard Disk Drive
Magnetic storage gets its name from the electromagnets which are used to
magnetise and demagnetise sectors on a spinning disk or tape. A magnetised
sector on the disk could represent a 1, whereas a demagnetised sector can
represent a 0. Hard disk drives like the one below offer large storage capacity at
a relatively low cost.
The electromagnet on a hard disk drive is attached to the end of a moving arm.
The arm frequently has to move to different sectors and this takes time. By
modern standards, hard disk drives are considered to have slow access speeds.
Secondary storage 21
22
Optical Storage
Beneath the clear plastic surface of an optical disk is a track which varies
between bumps and flat sections known as pits and lands. As the disk spins, a
laser is shone onto the disk and a sensor is used to detect a reflection from the
disk. The lands are reflective, so when the laser hits a land, the laser is reflected
back to a sensor. If the laser hits a non-reflective pit, no light is sent back to the
sensor. By varying the pits and the lands, 1s and 0s can be coded on a disk.
CDs, DVDs and Blu-ray disks are examples of optical storage. Optical storage is
cheap and universal - most people have a device that can play CDs and DVDs at
home. However, optical disks can get scratched and it is not possible to change
the contents on the majority of disks.
Secondary storage 23
24
Solid State Storage
The Flash memory used in USB sticks, SD cards and solid state drives (SSDs)
have no moving parts making them fast and robust. This makes them ideal for
storing data in mobile phones, tablets and cameras. Although SSDs are more
expensive than hard disk drives, their fast access times are making them more
popular in desktop computers too.
Secondary storage 25
26
GPS Satellite Navigation
Computer systems can be built into everyday devices such as Satellite
Navigation devices, washing machines and digital cameras. Embedded systems
only perform a limited number of specific tasks.
Embedded systems have a single circuit board and the chips such as RAM and
the CPU are not designed to be modified or upgraded. The chips are often
soldered to the circuit board.
EMBEDDED SYSTEMS 27
28
Washing Machine
Unlike general-purpose computer systems, embedded systems are not designed
to be modified. The ROM in an embedded system contains special software
known as firmware - permanent software which only needs to be changed if a
fault develops.
EMBEDDED SYSTEMS 29
30
Digital Camera
A digital camera is an embedded system as it only performs a limited number of
specific tasks.
As cameras need to be portable and may need to save lots of video or photo
data in a short amount of time, modern digital cameras use solid state storage
such as SD cards.
EMBEDDED SYSTEMS 31
32
Quiz 1
1) What is the name of the component that processes all the data and
instructions stored in a computer’s memory?
3) What is the fastest, most portable and durable type of secondary storage?
Hint: It has no moving parts.
Computer architecture 33
34
Networks
A group of computers connected together is called a network. Most schools and
large companies use a network because networks offer many advantages -
users can share files, an internet connection and resources such as printers.
Computer networks 35
36
The Internet of Things
The Internet itself is a network - the largest network in the world. Sometimes the
Internet is referred to as the “cloud”. Any services or data storage provided over
the Internet can be referred to as “cloud computing”.
It is not just desktops, laptops and mobile phones that are connected to the
Internet. There are many other devices which can be controlled by their owners
through the Internet. Some people have their TV, lights, central heating and air
conditioning connected to the Internet. They can then control their household
devices through an app on their mobile phone. For example they can heat up
their house before they get home. All these devices connected to the Internet
are known as the Internet of Things or IOT.
Computer Networks 37
38
Switch
We can connect several computers together in one building using a switch.
Each computer connects to one of the switch’s sockets known as ports. Switches come in different
sizes, some switches have 4 ports, others can have 48 ports. If you have more than 48 devices on a
network, you can have several switches!
Computer Networks
39
40
Router
If you want to connect two different networks together, for example your home
network and the Internet, you need a router.
The router shown above is a wireless router. You will probably have one of these
at home. The antennae help broadcast the signal in different directions so that
you have a good signal throughout your house. Wireless signals can suffer from
interference from other wireless devices as well as physical obstacles such as
walls.
Computer Networks 41
42
Server
A server is a dedicated network device which all other computers on a network connect to. The other
computers on the network are known as clients and will request services from the server.
Some servers allow you to login to your network and access shared files. Other servers on the Internet
store web pages that make up the World Wide Web.
Computer Networks
When you type a website address into a web browser on your computer, phone or tablet, it is a web
server which eventually receives your request and sends you the web page that you requested.
43
44
Quiz 2
1) What is the name of the device used to connect computers together on
small network?
3) What is the name of the device used to store web pages on the World
Wide Web?
Computer Networks 45
46
Operating System
Hardware is any component that we can touch and feel. All of the previous
images have been hardware; the CPU, RAM and ROM are all examples of
hardware.
Computers are incredible because humans can tell computers what to do. We
do this through software. One of the most important pieces of software, which
every computer system needs to run is called the operating system.
The operating system manages the memory and all the other hardware that is
connected to your computer. Most modern computers allow a human to interact
with the computer using a Graphical User Interface (GUI) which has windows,
icons, menus and pointers. Desktop PCs run an operating system called
Microsoft Windows or Linux. Apple also have their own operating system called
MacOS.
software 47
48
Utilities
The operating system is one form of system software, another group of system
software are known as utilities. These are used to maintain or improve the
performance of a computer. An example of a utility is anti-virus software
designed to scan for and then delete or quarantine computer viruses. Other
examples include backup software, which can be used to make a copy of your
computer system and your files.
software 51
52
Application Software
This book was made using several different pieces of application software -
illustration software, desktop publishing software and a web browser. The image
below shows the illustration software that I used to outline most of the images in
this book.
Many of the images in this book come from websites such as pixabay.com .
Pixabay uses a Creative Commons (CC0) license which allows creative people to
use the images from their website without having to pay a fee. To create this
colouring book, I manually outlined and filled in all the shapes in the images.
software 53
54
Flowcharts
To write software, we need to have a clear idea of the problem we want to solve.
Once we have an idea of what the problem is, we need to formulate a solution.
For many problems, we can write an algorithm - a series of steps that are used to
solve a specific problem.
Some people like to think of algorithms like the recipes you follow when you are
baking a cake. There are a few ways that we can represent these algorithms, the
simplest of these is using flowcharts. The flowchart has a series of boxes
connected by arrows to show what happens next. Each shape has a different
role:
Programming 55
56
Flowcharts
Here is a simple flowchart. It asks for a person’s name and then says Hello to
them ten times.
Start
INPUT
name
counter = 0
counter FALSE
< 10?
TRUE
OUTPUT ‘Hello’
+ name
counter = counter +1
Stop
Programming 57
58
Programming: Blocks
When you first learn to write their own programs, you are likely to encounter
block-based languages. Examples include Scratch and Blockly. Here is the
previous algorithm written out using blocks:
Programming 59
60
Programming: Text
As you begin to understand how programs work and how a computer uses logic
to make decisions and follow instructions, you will progress on to text-based
programming.
Writing large programs using blocks can become cumbersome as there will be
lots of blocks to drag and drop into place. Writing programs with text means you
can write large programs much quicker. The previous program can be written in
python using the three lines of code shown at the bottom of the page.
To mimic an IDE’s syntax highlighting, you could choose four different colours
and colour in the following words according to their grouping:
This program is written using a language called Python. It is simple, yet powerful.
You can learn Python at www.pythonschool.net . There are also further
recommendations at the back of this book.
Programming 61
62
Quiz 3
1) What piece of software does every computer system need in order to run?
3) A word processor, internet browser and illustration software are all examples
of what type of software?
Binary is quite easy to understand once we think more closely about the
numbers that we use in everyday life. The number system we use is called
denary or decimal. Starting on the right, each column increases by a factor of
10.
So the number 931 can be read from right to left as one 1, three 10s and nine
100s. If you add these together you get the number nine hundred and thirty one.
With binary, the columns increase by a factor of 2. The prefix “bi” means “two”
and you will see this in words such as binoculars, bicycle, bicep-all involve two
objects: two sets of lenses, two wheels and two muscles. Binary also only has
two states 1 and 0.
So we can write the binary number 1011 and using the same method as we
used previously, this means we have one 1, one 2, zero 4s and one 8. If we add
these together, this gives us eleven. 1011 in binary is 11 in denary!
DATA Representation 65
66
Binary Numbers
Here is a table of the first 16 numbers in binary from 0 to 15. A 1 can be seen
as on and a 0 as off i.e. if a number is a 0, you do not count that column at all:
1 0110
6:____________________
2
10:___________________
3
4 13:___________________
5
15:___________________
6
7
What would these binary numbers be in
8 denary? Try to remember the place
values for each column, then check
9 your answer on the left:
10 3
0011:_________________
11
0101:_________________
12
13 1110:_________________
14
15 0111:_________________
DATA Representation 67
68
Characters
Characters and therefore any text (string of characters) can also be represented
using binary. One way of representing text is with the following “extended ASCII”
binary codes for each character:
Why not colour in the characters for your name or your favourite animal, then
write the binary value here:
DATA Representation 69
70
Images
Representing images using binary codes is one of the most beautiful ways of
visualising how a computer stores its data. Images which are made using dots )
(pixels) are also referred to as raster or bitmap images. All images taken with a
camera use pixels.
Using only 1-bit and the values 1 and 0, we can colour in the grid below. I would
suggest that you leave the 0s uncoloured. Then pick one colour to colour in all
the squares (pixels) with 1s inside. There are three different images hidden in
the grids below.
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0
0 0 1 1 1 0 0 0 1 1 1 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0
0 1 1 1 1 1 0 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 0 0
0 1 1 1 1 1 1 1 1 1 1 1 0 0 0 1 1 0 1 1 1 1 0 1 1 0
0 0 1 1 1 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1
0 0 0 1 1 1 1 1 1 1 0 0 0 0 1 0 1 1 1 1 1 1 1 1 0 1
0 0 0 0 1 1 1 1 1 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 1
0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 0 0 0
0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0 1 0 0 0
0 0 0 0 1 0 0 0 1 0 0 0 0
0 0 0 1 1 1 1 1 1 1 0 0 0
0 0 1 1 1 0 1 0 1 1 1 0 0
0 1 1 1 1 1 1 1 1 1 1 1 0
0 1 0 1 1 1 1 1 1 1 0 1 0
0 1 0 1 1 1 1 1 1 1 0 1 0
0 0 0 0 0 1 0 1 0 0 0 0 0
0 0 0 0 1 1 0 1 1 0 0 0 0
You will realise by the end that there are so many possibilities if we could
increase the number of colours that can be represented. This is covered in the
following pages.
DATA Representation 71
72
Images
When we could only have one number in each pixel, we could only have two
possible colours throughout our entire image. If we want to increase the number
of colours, we can increase the “colour depth” by using more digits. If we use
two digits, this would give us four possible colours. You can pick two of your own
colours for the codes below:
00 Black
01
10
11 White
Now colour in the grids below using the colours from the table above.
11 01 11 11 11 11 11 11 11 01 11
11 01 01 11 11 11 11 11 01 01 11
11 11 11 11 11 11 11 11 11 11 11 11 11 11 01 01 11 11 11 01 01 11 11
11 11 11 01 01 11 01 01 11 11 11
11 11 11 11 11 01 01 11 11 11 11 11
11 11 11 11 01 11 01 11 11 11 11
11 11 01 01 11 01 01 11 01 01 11 11
11 01 01 01 01 01 01 01 01 01 11
11 11 01 01 01 01 01 01 01 01 11 11
11 01 10 10 10 10 10 10 10 01 11
11 11 11 01 01 01 01 01 01 11 11 11
01 01 10 10 10 10 10 10 10 01 01
11 01 01 01 01 10 10 01 01 01 01 11
01 01 10 00 10 10 10 00 10 01 01
11 01 01 01 01 10 10 01 01 01 01 11
11 01 10 00 10 10 10 00 10 01 11
11 11 11 01 01 01 01 01 01 11 11 11
11 01 10 10 10 10 10 10 10 01 11
11 11 01 01 01 01 01 01 01 01 11 11
11 01 01 01 01 01 01 01 01 01 11
11 11 01 01 11 01 01 11 01 01 11 11 11 11 11 01 10 10 10 01 11 11 11
11 11 11 11 11 01 01 11 11 11 11 11 11 11 11 01 10 10 10 01 11 11 11
11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 01 01 01 01 01 11 11 11
11 11 11 11 01 11 01 11 11 11 11
11 11 11 11 01 11 01 11 11 11 11
DATA Representation 73
74
Images
To demonstrate what is possible with by increasing the colour depth to 3-bits, fill
in the table below which has the potential to represent 8 different colours.
111 111 111 111 111 111 111 111 111 000 111 111 111 111 111 111 111 111 111
111 111 111 111 111 111 111 111 000 001 000 111 111 111 111 111 111 111 111
111 111 111 111 111 111 111 000 001 001 010 000 111 111 111 111 111 111 111
111 111 111 111 111 111 111 000 001 010 010 000 111 111 111 111 111 111 111
111 111 111 111 111 111 000 001 010 010 011 011 000 111 111 111 111 111 111
111 111 111 111 111 111 000 010 010 010 011 011 000 111 111 111 111 111 111
000 000 000 000 000 000 010 010 010 011 011 011 100 000 000 000 000 000 000
000 001 001 001 001 010 010 000 011 011 011 000 100 100 100 101 101 110 000
111 000 001 001 010 010 010 000 011 011 011 000 100 100 101 101 110 000 111
111 111 000 010 010 010 011 000 011 100 100 000 100 101 101 110 000 111 111
111 111 111 000 010 011 011 011 100 100 100 101 101 101 110 000 111 111 111
111 111 111 111 000 011 011 100 100 100 101 101 110 110 000 111 111 111 111
111 111 111 111 000 011 100 100 100 101 101 110 110 110 000 111 111 111 111
111 111 111 000 011 100 100 100 000 000 000 110 110 110 111 000 111 111 111
111 111 000 000 100 100 000 000 111 111 111 000 000 111 111 000 000 111 111
111 111 000 100 100 000 111 111 111 111 111 111 111 000 111 111 000 111 111
111 111 000 000 000 111 111 111 111 111 111 111 111 111 000 000 000 111 111
DATA Representation 75
76
Quiz 4
1) Computers generally process data in a series of 0s and 1s. What is this
number system known as?
5) If you only want to represent two colours, how many bits would you need?
DATA REPRESENTATION 77
78
Graphics Tablet
Computer science is meant to make our lives easier and better. For example
computer scientists have invented various tools to help us in the work place. One
of these tools is the graphics tablet. A graphics tablet is an input device that
enables animators, graphic designers and architects to create digital drawings.
The drawings created with the stylus (pen) on a graphics tablet are far more
accurate than those that could be drawn using a mouse.
Imagine stacking different-sized rings on top of each other and the different
shapes that you could create with this. Imagine if these shapes were not all
round, but any shape. As these layers are stacked on top of each other, any 3D
shape could be printed. You can print replacement parts for toys, jewellery, art
and even clothing.
Some people argue that there are negatives to the amount of technology in our
lives; we may become overly dependent on technology. Some people develop
tech addiction, which is just as serious as any other addiction. We should use
technology responsibly and remember that technology is there to help us when
we need it and at other times it is good to switch off and enjoy reality without
any technology.
Artificial intelligence 91
92
Robots
In his 1920’s play, Karel Čapek raises many ethical issues: Is it right for humans
to force machines to do work? What if artificial intelligence develops so much
that robots can begin to think for themselves? What if a robot harms a human?
Is it OK for robots or machines to replace humans in certain jobs? All of these
ethical questions are still being dealt with by computer scientists and society as
a whole today.
Artificial intelligence 93
94
Autonomous Vehicles
Autonomous vehicles are vehicles which drive by themselves. Self-driving cars
and trains are becoming quite common. Eventually, we may also have self-
driving trucks which can deliver goods without a driver. These autonomous
vehicles use different sensors and artificial intelligence to “see”. This ’computer
vision’ and programmed artificial intelligence allows these autonomous vehicles
to make decisions whilst driving. Based on thousands of hours of video footage,
the vehicles are trained into how to drive safely and how to respond at red lights
or if a person walks in front of the car.
Self-driving cars have very few accidents and some autonomous cars such as
those made by Tesla have collision avoidance systems which detect and avoid
crashes.
Artificial intelligence 95
96
Colour Word Search
Find and colour in the words: Hardware, CPU, RAM, ROM, Desktop, Laptop,
Volatile, Memory, Binary, WIFI, Router, Network
97
98
Colour and match
Colour in the hardware on the left. Then draw lines to match them up to their
correct names:
RAM
CPU
Graphics
Tablet
Router
99
100
Copy and colour
Use the grid to copy the drawing on the left, then colour them in.
101
102
Answers
Quiz 1
1) CPU
2) RAM and ROM
3) Solid State Storage
4) A laser, either red or blue-violet
5)The camera on the previous page is an example of an embedded system, can
you name another embedded system?
Quiz 2
1) Switch
2) The Internet
3) (Web) server
4) Router
5) Smart watch, central heating, air conditioning, TV, lighting and many more...
Quiz 3
1) The Operating System
2) Anti-virus, backup software, Firewall, compression software, disk
defragmenter, auto-update
3) Application software
4) Inputs and Outputs
5) Integrated Development Environment (IDE)
Quiz 4
1) Binary
2) 2
3) 1101
4) 4 colours
5) 1 bit
Thanks to Mum, Dad, Anita and Steve Marshall, Tung, Mary and Wendy Hau,
Susan Nemcek, Jeremy and Jennifer Franklin, Ariane Gras, Richard Morgan,
Nathan Coppard, Robert Lessels, Florent Gonthier, Nadia Lumley, Rian Perle,
Charlie Marbles, Spencer Whatmore, Thomas Bird, Carl Stratton, Eric Liu,
Karman Law, Angharad Jones Buxton, TJ Jones, Yasmin Coutinho and Andy
Swann for your support over the years.
Lastly, thanks to the generous illustrators who provided many of these images
under a Creative Commons license. Special thanks to Pixabay, Vecteezy, Vexels,
Freepik.com and MacroVector for hosting many of the original vector images
which were used as a starting point for the images in this book.
106 ACKNOWLEDGEMENTS
Index
Block-based programming:
Autonomous Vehicles: 95 Binary: 65 Binary Numbers: 67
59
INDEX 107
Index
Graphics Tablet: 79 Hard Disk Drive: 21 Illustration software: 53 Images: 71, 73, 75
108 INDEX
Text-based programming: 61 Utilities: 49 VR Headset: 81 Washing machine: 29
INDEX 109
Also by William Lau...
For teachers and leaders:
The Little Book of Algorithms. This book was written to help GCSE students build
fluency with their Python programming. It covers practically all of the key
programming constructs and algorithms that a student is likely to encounter in
their GCSE Computer Science exam.
1101110
110
Competition
I’d love to find out more about the people who have bought or downloaded this
book. To enter into a competition to win 1 of 100 packs of Computer Combat
Cards, simply answer the four questions below using the form at:
www.computercombatcards.com/contact/
Alternatively, you can email the answers to the following questions to
[email protected]:
1) How did you find out about the Computer Science Colouring Book?
COMPETITION 111
112