The Ultimate Question (BEWARE) Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Retell the whole text book

A

GCSE Computer Science
2019
Geraint D. Jones Mark D. Thomas
Jen M. Gillies
Martin C. Gillies Rhys Richardson
1

Disclaimer
This resource is provided to support the teaching and learning of GCSE Computer Science. The materials provide an introduction to the main concepts of the theory of the subject and should be used in conjunction with other resources and sound classroom teaching.
It is intended that the resource will be updated periodically due to the evolving nature of the subject. Tips on how to further develop the materials are welcome. You can send us your tips via our feedback system or by emailing: resources@wjec.co.uk
2

Contents Unit 1
1. Hardware 4
2. Logical operations 21
3. Communication 35
4. Organisation and structure of data 49
5. Operating systems 73
6. Principles of programming 80
7. Software engineering 82
8. Program construction 84
9. Security and data management 87
10. Ethical, legal and environmental impacts of digital technology 100
Unit 2
1. Problem solving 112
2. Algorithms and programming constructs 118
3. Programming languages 134
4. Data structures and data types 143
5. Security and authentication 144
3

Unit 1
1. Hardware
Central Processing Unit (CPU)
To a computer, the world consists of zeros and ones. Inside a processor, we can store zeros and ones using transistors. These are microscopic switches that control the flow of electricity depending on whether the switch is on or off. The transistor, therefore, contains binary information: a one if a current passes through and a zero if a current does not pass through.
Transistors are located on a very thin slice of silicon. A single silicon chip can contain thousands of transistors. A single CPU contains a large number of chips. Combined, these only cover a couple of square centimetres, but can hold several million transistors and process hundreds of millions of instructions per second.
CPU architecture
CPU architecture is a term that refers to the design of a Microprocessor, an integrated circuit, where the components of the CPU are combined as a single unit.
Von Neumann
Early computers were generally designed to carry out a specific task or calculation. Re-programming these custom built computers was very difficult and could even involve some re-wiring. In 1945 John von Neumann proposed the idea of storing the program instructions in the same memory as the data. This idea of a stored program resulted in computers that could be more easily re-programmed and is the basis for the fetch-decode-execute cycle (FDE), fundamental to modern computer processing. The idea of a stored program is often referred to as ‘Von Neumann’ architecture.
Components of the CPU
The CPU is the main component in a computer for processing data and instructions. It could be considered as the computing equivalent of the human brain. It is a hardware device that is made up of many subcomponents:
 controller
 Arithmetic and Logic Unit (ALU)
 registers
 internal memory.
All these components have their own specific function.
ALU
registers
controller
internal memory
4

Controller or control unit
The controller sends and receives signals from all parts of the computer. It ensures that all processes take place at the right time and in the correct order.
Arithmetic and Logic Unit (ALU)
The ALU is the part of the CPU that processes and manipulates data. It performs simple calculations on the data that is temporarily stored in the registers.
The ALU is also able to perform comparisons on data. It is these comparisons that allow programs to make use of choice – e.g. an IF statement in a high-level language.
Registers
A register is a storage location found on the CPU where data or control information is temporarily stored. Registers are usually much faster to access than internal memory, since they have to be accessed so often.
An accumulator is a common example of a register. This is the register used by the ALU to store the results of its calculations.
Other examples of registers include:
 Program Counter (PC) – a counter that keeps track of the memory address of which
instruction is to be executed next.
 Memory Address Register (MAR) – the address in the main memory that is currently
being read or written.
 Current Instruction Register (CIR) – a temporary holding area for the instruction that has
just been fetched from memory.
Internal memory
Internal memory (sometimes called level 1 cache memory) is fast access temporary storage on the CPU. Data is moved from the registers to the internal memory when it is not being actively used. Data from internal memory can then either be written to RAM or called back into the registers for further processing.
SUMMARY OF DEFINITIONS
Controller: manages the execution of instructions Arithmetic and Logic Unit (ALU): processes and manipulates data
Register: fast access temporary data store Internal memory: fast access memory on the CPU
5

Buses
Buses allow data to be transferred to different parts of the computer. There are three main buses used by the CPU.
1. Address bus. When data is saved or loaded from memory, the address at which it is to be stored or loaded from must be sent. The storage address of data always travels along an address bus.
2. Data bus. Data will then need to be moved between several parts of a computer. The path along which data travels is called a data bus.
3. Control bus. The controller uses the control bus to send control signals to different parts of the computer.
The fetch-decode-execute cycle
There are three steps to processing instructions given by a currently running program:
1. The fetch cycle takes the address required from memory, stores it in the current instruction register, and moves the program counter on one so that it points at the next instruction.
2. The control unit authenticates the instruction in the current instruction register. The instruction is decoded to determine the action that needs to be carried out.
3. The actual actions that happen during the execution cycle depend on the instruction itself.
CPU performance and specification
When we use a computer, we want the instructions to be carried out very fast. As the instructions become more complicated (for example, creating a 3D animation or editing a video file), we demand more from the CPU. The technological advances we have seen in processor technology have largely been driven by the need for speed.
CPU cache memory
Cache memory is a fast access type of memory; it’s also very expensive. Because of the cost, most computer systems have very little cache memory, e.g. very few kB or MB compared to a Random Access Memory (RAM) where there is likely to be many GB. Cache memory improves the performance of the CPU as it is able to provide instructions and data to the CPU at a much faster rate than another system memory such as RAM. The more cache memory your system has, the better its performance is likely to be.
6

Clock speed
The speed at which a processor operates is called the clock speed. The faster the clock speed, the faster the computer is able to run the fetch-decode-execute cycle (FDE) and therefore process more instructions. The speed of the processor is measured in Hertz (Hz). One clock tick per second would be measured as 1 Hz. Therefore, a processor that operates at 1,000 clock ticks per second would be a 1,000 Hz processor, also known as a 1 kHz processor.
At this stage, it is a good time to introduce prefix multipliers for clock speeds:
The first Terahertz chip was created by DARPA (an agency of the United States Department of Defense) in 2014.
A typical modern day home computer would have a 2.5 GHz processor. This means the clock speed of the processor runs at 2,500,000,000 Hz or clock ticks per second.
The clock speed inside the CPU can sometimes be changed. A processor can be set to run faster than its original design. By doing this however, it uses more energy and produces more heat. If this heat is not
removed through cooling, the CPU
can overheat, which will damage the CPU and shorten its lifespan. This is called overclocking.
Some computer systems, especially
mobile devices, set the clock speed
of the CPU lower than its original
design. This results in less power
consumption, less heat being produced and will therefore increase the battery life of the device. This is called underclocking.
Some devices are able to change their own clock speed dynamically. For example, when your computer is idle, the clock speed may be set at a lower rate than if you were running a CPU intensive program, such as a computer game.
Prefix
Symbol
Multiplier
Power of 10
Kilo
k
1,000
103
Mega
M
1,000,000
106
Giga
G
1,000,000,000
109
INTERESTING FACT
Most CPU chips are cooled using a fan mounted on a metal heat sink. Liquid cooling systems have been found to be more effective at cooling CPUs, although the water used in these systems conducts electricity and can therefore be dangerous. A computer designer, Seymour Cray, designed a computer cooling system that used artificial human blood to cool the CPU, as it does not conduct electricity.
7

Number of cores
We have assumed that each CPU has only one core. However, this isn’t always the case, as some CPU chips have multiple cores. You may be familiar with the terms dual-core and quad-core. What exactly do they mean?
A core is the term used to describe the processing components within the CPU. Multi-core processors therefore have many processing components within the same CPU. Below is a diagram that illustrates a number of instructions waiting to be processed in single-core and dual-core CPUs.
In a single-core CPU, each instruction is processed one after the other, whereas in a dual-core CPU, two instructions may be processed at the same time. In theory, a dual-core CPU should be able to process instructions twice as fast as a single-core CPU. However, this isn’t always the case, as sometimes Instruction 2 may need the result of Instruction 1 before it can be processed.
In general, a computer running many programs at the same time will run faster on a multi-core processor than on a single-core processor.
INTERESTING FACT
Many high-end gaming consoles include CPU chips with multiple cores. The Sony Playstation 4 and the Xbox One X both have an 8 core CPU.
8

RISC and CISC processors
There are two main types of processor, namely Reduced Instruction Set Computer (RISC) and Complex Instruction Set Computer (CISC).
RISC processors can process a limited number of relatively simple instructions. To carry out more complex commands, the problem is broken down into a longer list of simpler instructions. The advantage of this is that a RISC processor is able to process these simpler instructions quickly. Processing simpler instructions also requires less circuitry to decode and execute these instructions, which in turn means less power consumption and therefore less heat being generated.
CISC processors can process a large number of complex instructions. This allows the
processor to understand and carry out complex tasks with only a few instructions. The
advantage of this is that a CISC processor is able to process complex instructions, without
having to break them down into many simpler instructions. Processing complex instructions
however requires more circuitry to decode and execute these instructions, which in turn
Graphics Board Mouse
means more power consumption and therefore more heat being generated.
Projector
Input and Output
Input devices
An input device allows data, such as text, images, video or sound, to be entered into a
Output devices
Keyboard Microphone
There are many outputs created by a
computer system. These include printed
documents, on-screen data and sound.
Monitor
computer system.
Printer
Speakers
Common hardware input devices
Common hardware output devices
9

Input devices Mouse
A mouse is an input device that allows the user to control the co-ordinates and movements of a cursor on the computer screen. The left button is used to select items and the right button is used to access menus (these can be changed around in settings). Most mice now use a laser to track location on a smooth surface and mice can be wired or wireless.
Trackball
A trackball is an input device similar to a mouse, that allows the user to locate the cursor. Unlike the mouse, however, the trackball remains stationary and the user moves the cursor by moving the ball around in the socket. Some users believe that the use of a trackball gives better control over the cursor, and therefore use a trackball for computer aided design (CAD).
Computer keyboard
Computer keyboards are used to input data and commands into the computer by pressing the keys. Computer keyboards are common in the workplace and are usually used together with a mouse.
Concept keyboard
Concept keyboards look like computer keyboards, but have an image on each key. The images on the keys are chosen to represent the command. For example, in a restaurant, a key may be used for a burger, a cheeseburger or a cheeseburger with bacon.
Microphone
A microphone is an input device that receives analogue sound waves and converts them into electrical signals understood by the computer. Microphones play an important role in speech recognition.
Digital camera
A digital camera is an input device that captures images (and sometimes videos) digitally. A digital camera uses an image sensor and a chip to capture an image, as opposed to the film used in traditional cameras.
2D scanner
2D scanners convert documents or 2D images into digital files. 2D scanners can be run with additional software such as an optical mark reader (OMR) or optical character recognition (OCR). One example would be using OCR software in the computer to read handwriting and convert it into digital text.
3D scanner
A 3D scanner is an input device that generates a 3D model of a scanned object. It may use x-ray, laser, light or sound waves to generate the object in 3D.
10

Interactive whiteboard
An interactive whiteboard is usually used in classrooms. This device was developed long before touch screens. It’s cheaper than touch screens and differs from normal screens as it can be used in many different ways when used alongside a projector. It can be used for navigation systems or to write/design with your fingers or a stylus.
Touch screens
A touch screen is a digital visual display that also works as an input device that responds to the user’s touch. It allows users to make selections by touching the screen.
Barcode scanner
A barcode is a code that can be read by a machine. The code is represented by a series of black and white lines. These lines represent numbers from 0 to 9. The use of barcode scanners speeds up the process of data input into a system, e.g. scanning items at a check out desk in a supermarket.
QR code scanner
QR code scanners as seen on smartphones can scan QR codes by taking a picture of them. The QR codes normally hold more data than barcodes, e.g. web addresses, contact details, calendar registrations and details of goods in factories and warehouses.
INTERESTING FACT
Doug Engelbart made the first computer mouse in 1964. It was made out of wood!
11

Output devices
Monitor
A monitor is an electronic visual computer display. It includes a screen and the case in which all circuitry is enclosed. Most monitors used with devices such as laptops, PDAs and desktop PCs are made using LCD screens as they are lighter and more energy efficient.
Speaker
Speakers are used to produce audio output that can be heard by the listener. When they receive audio input from a device, the electromagnetic waves are converted into sound waves. This input may be in either analog or digital form. Analog speakers simply amplify the analog electromagnetic waves into sound waves. Digital speakers must first convert the digital input into an analog signal, then generate the sound waves.
Printer
A printer is an output device that prints paper documents. This includes text documents, images, or a combination of both. The two most common types of printers are inkjet and laser printers. Inkjet printers are commonly used by consumers, while laser printers are a typical choice for businesses.
Projector
A projector is an output device that projects an image onto a large surface, such as a white screen or a wall. It may be used as an alternative to a monitor or a television when showing video or images to a large group of people.
12

Primary storage
Random Access Memory (RAM)
RAM is used for the temporary storage of currently running programs and data, e.g. the operating system, a text editor program. It consists of a large number
of store locations, each of which is identified by a unique address. The
data in each store location can be changed. RAM is volatile – data is
lost when the power is switched off.
Example: When you are working on a word-processed document, the
program you are using and the data within the document are both
stored in RAM. The process is different when using a web-based word processing program as all letters and numbers pressed on the keyboard are sent immediately to the program over the internet.
Read Only Memory (ROM)
ROM is used for the permanent storage of data. The data in each store location cannot be changed. ROM is permanent – data is not lost when the power is switched off.
Example: ROM can be used for storing programs such as the BIOS. The disadvantage of using ROM to store the BIOS is that it cannot be upgraded. The program on your calculator is held on a ROM chip.
Flash memory
Flash memory is used for the permanent storage of data. However, the data stored in flash memory can be changed. Flash memory is permanent – data is not lost when the power is switched off.
Example: Flash memory can be used for storing the programs such as the BIOS, which is advantageous as the BIOS can then be upgraded.
RAM Cache memory
RAM Cache memory is used for the temporary storage of frequently accessed data and instructions. It consists of a small number of store locations that can be accessed very quickly by the CPU; it is quicker than RAM. Cache memory is volatile – this means that data is lost when the power is switched off.
KEY INFORMATION
Basic Input/Output System (BIOS): A low-level program that handles input and output operations relating to the system’s keyboard and screen. It provides an interface between the hardware and the operating system. One of its primary functions is loading and executing the bootstrap loader – the program that loads the operating system.
13

Summary of different types of memory
ROM
RAM
Flash memory
Permanent


Volatile

Data can be changed


Speed
Cache memory






Secondary storage
Secondary storage is also known as backing storage.
Data from the memory is written in the secondary storage when the data is no longer being actively used, for retrieval at a later time.
The time a computer takes to access data stored on secondary storage is longer than the time it takes to access data from memory.
INTERESTING FACT
The first commercial hard disk drives had the capacity to store approximately 5 MB and were the size of a dining room table.
14

Data capacity
Data capacity is the amount of data a storage device can hold, measured in kilobytes (kB), Megabytes (MB), Gigabytes (GB) and Terabytes (TB). The most frequently used backing storage media are:
Different types of data can create files that vary in size. In general, text based files are relatively small but audio and video files are much larger. Here are some typical file sizes.
File size Typical contents
It’s important to consider the type of data that is going to be stored when you are choosing
a storage device.
Media
Suitability
Typical capacity
Durability
Portability
Speed
Flash drive
Moving relatively small files from work to home
2 GB – 512 GB



External hard drive
Backing up a home computer system
320 MB – 8 TB



CD/DVD/Blu-ray disc
Storing multimedia files
650 MB (CD) 9 GB (DVD) 50 GB (Blu-ray)



Magnetic tape
Backing large commercial servers on multiple tapes
200 GB – 400 GB



15

Storage technologies Optical
Optical storage media uses technology such as lasers. Laser beams are projected onto a CD/DVD or Blu-ray disc and if light is reflected back, then data is read as a 1. If light is not reflected back, data is read as a 0. Lasers are used to read and write information on a disk.
KEY INFORMATION
Binary digIT (BIT): in computer systems, data is represented by either a 1 or a 0.
Magnetic
This technology is used in hard disks and tapes. Data is stored on a magnetic medium, which can be a disc or a tape, by writing data using a write-head. Data can then be read by the read-head.
Solid state
Solid state technology is used in storage media such as flash memory sticks. The technology is called solid state as it doesn’t have any moving parts, such as a read-head in magnetic storage. Solid state storage technology is increasingly used to replace both magnetic and optical storage, especially in mobile devices, where its low power consumption and high speed access is advantageous.
16

Storage requirements
Computer systems can only store and process binary digits, also known as BITs. A BIT is either a 1 or a 0. When 8 bits are stored as a binary number, they are collectively called a byte.
Nybble
Gigabyte
Terabyte
Petabyte
Exabyte
Zettabyte
Yottabyte
B
Symbol
TB
PB
EB
ZB
YB
1 bit
4 bits
1024 MB
1024 GB
1024 TB
1024 PB
1024 EB
1024 ZB
Value
Bit
Byte
kilobyte
Megabyte
kB
MB
GB
8 bits
1024 bytes
1024 kB
INTERESTING FACT
Half a byte (4 bits) is called a nybble.
17

Additional hardware components
Motherboard
The motherboard is the main circuit board of a computer. The CPU and ROM will be mounted on the motherboard, which also provides RAM expansion slots, USB ports,
PCI slots for expansion cards and controllers for devices such as the hard drive, DVD drive, keyboard and mouse.
Graphics Processing Unit (GPU)
A GPU is a microprocessor that performs the calculations needed to produce graphic images on screen. The CPU performed these calculations initially, but as more complex applications were developed, such as 3D graphics and video quality animations, the GPU was introduced to offload those tasks from the CPU.
GPUs can be integrated within the circuitry of the motherboard, or provided on a dedicated graphics card.
Integrated GPU
An integrated GPU uses the computer’s RAM. An integrated unit is cheaper than installing a dedicated GPU. It generates less heat and uses less power. They are perfect for general graphics processing such as watching or editing videos and word processing.
Dedicated GPU
A dedicated GPU has its own video memory. Dedicated cards provide the best visual experience. They are used by people such as graphic designers and people who play a lot of games, but they use more power and need a good cooling system. GPUs are also used to mine digital currency due to their processing ability.
Sound cards
Sound cards may be on the motherboard or designed to fit a PCI slot. They enable the computer to output sound through speakers, record sound from a microphone and manipulate sound stored on a disk. Sound cards convert analogue input signals into digital data and reverse this process for audio output.
18

Embedded systems
An embedded system is a combination of software and hardware that performs a specific task rather than a general-purpose computer that is designed to carry out multiple tasks.
Embedded systems are included as a part of a complete device often with hardware and mechanical parts. As the systems carry out specific tasks they can be designed to be small and have a low cost. Mass-production of embedded systems can save large amounts of money.
The software written for an embedded system is called firmware. The instructions are stored in read-only memory or in Flash memory. The software runs with limited computer hardware resources, little memory and no peripherals.
Most embedded systems are reactive – they react to conditions such as temperature, weight, vibration and air quality. These systems detect external conditions and react to them by recording data, turning motors on or off, sounding an alarm or sending a message to another processor.
Reactive embedded systems often control real time events so must be completely reliable. For example, drivers rely of the anti-lock braking system of their car working correctly to avoid accidents on the road.
19

When an embedded system performs operations at high speed, and if it is very reliable, it can be used for real-time applications. If the size of the embedded system is very small and power consumption is very low, the system can be easily adapted for different situations.
Some examples of devices that incorporate embedded systems are:
INTERESTING FACT
98% of the microprocessors manufactured are installed in embedded systems.
Electronics
Mobile phones, games consoles, printers, televisions, digital cameras.
In the home
Washing machines, microwave ovens, refrigerators, dishwashers, air conditioners.
Medical equipment
CT scanners, electrocardiograms (ECG), MRI scanners, blood pressure monitors, heartbeat monitors.
Cars
Electronic fuel injection systems, anti-lock braking systems, air-conditioner controls.
20

  1. Logical Operations
    Using logical operators: NOT, AND, OR, and XOR
    Computers are binary devices that use 1 and 0 to represent data. Boolean algebra involves looking at statements that will, when evaluated, result in a true or false value. Propositional logic means that a statement or proposition defined in terms of true or false follows mathematical rules that allow the proposition to be manipulated.
    This in turn allows the simplification or derivation of logic statements. In this section, you will learn about propositional logic and some of the tools that can define real world problems as propositional statements. You will also learn about some of the key tools that can be used to derive and simplify these logic statements.
    Propositional logic
    Proposition A is ‘It’s raining’ Proposition B is ‘I have an umbrella’ Proposition C is ‘I will get wet’
    Logic propositions such as ‘it’s raining’ can have a value of true or false. Statements such as ‘what is the weather?’, that can generate a number of different answers, cannot be considered logic propositions. A proposition is an atomic value or placeholder and is represented algebraically by assigning letters to each proposition. In the above statements, A was used to represent the proposition ‘it’s raining’. B and C were also used to represent two different statements. Most rules used to simplify logic are not dependent on the meaning of the propositions, but focus on how a logic statement is structured. When defining problems, it’s useful to give the propositions meaning in order to provide more context. Additional programming focus can also be given by assigning conditional expressions to them.
    Propositional logic uses a number of symbols to represent logical links. These links are summarised in the table below. A logic statement includes a combination of propositions connected by logical links. To make it simpler, informal terms have been given to each symbol, along with their formal names, as shown in the table below.
    Symbol
    Formal term
    Informal term
    .
    Connection
    AND
    +
    Separation
    OR
    Ā
    Negation
    NOT

    Exclusive separation
    XOR
    21

Different symbols are used for Boolean algebra and it’s important that you are familiar with these.
Symbol
Alternative symbol
.

+

Ā
¬A


Connection (AND)
Consider this connected expression: ‘It’s raining and I have an umbrella’. The key word is ‘and’. For this statement to be true, both propositions represented by A and B must be true. If one is false, the entire expression becomes false. A connection can be represented by the simple truth table below.
* Please note: these tables use 1 and 0 to represent True (1) and False (0). This is what will be used in the examination.
When we use a connection to connect two propositions, it is represented by the full stop symbol. If A represents ‘It’s raining’ and B represents ‘I have an umbrella’, we can represent the connection of these two propositions as the statement: A . B
A
B
A AND B
1
1
1
1
0
0
0
1
0
0
0
0
22

Separation (OR)
Sometimes, we want to see if one thing or another is true. The truth table below shows two propositions connected using a separation.
Separation is represented by the symbol + and therefore to show the separation of two propositions we write: A + B
Negation (NOT)
In order to negate a proposition, for example ‘It’s not raining’, we can use the negation operation, ̅ , which is also called NOT. Negation is a unary operator and operates on the proposition below it (or after it, if we use ¬). Therefore, if A represents ‘It’s raining’, we can represent the negative by putting a bar over statement A to give:
Exclusive separation (XOR)
Sometimes we want to see if only one thing or the other is true. The truth table below shows two propositions connected by an exclusive separation.
Exclusive separation is represented by the symbol ⊕ and to represent the exclusive separation of two propositions we write: A ⊕ B
A
B
A OR B
1
1
1
1
0
1
0
1
1
0
0
0
A
NOT A
1
0
0
1
A
B
A XOR B
1
1
0
1
0
1
0
1
1
0
0
0
23

Introduction to Boolean Algebra
Here:
True will be represented by 1. False will be represented by 0.
A variable will ususally be represented by a single letter.
The logical operator OR is represented by the character ‘+’. For example, A + B means A OR B.
The logical operator AND is represented by the character ‘ . ‘. For example, A . B means A AND B.
is an equation for A XOR B. The XOR operator can also be represented by the symbol ⊕. For example: A ⊕ B means A XOR B. In order to understand how the formula works, consider the statement, ‘one or the other but never both’.
The logical operator NOT is represented by an overbar. For example: means NOT A.
OR
The OR operator takes two inputs and returns a true value (1) if either of the inputs are true (1).
0 + 0 = 0 0+ 1= 1 1 + 0 = 1 1+ 1= 1
24

AND
The AND operator takes two inputs and returns a true value (1) if both inputs are true (1).
0 . 0 = 0 0 . 1 =0 1 . 0 = 0 1 . 1 =1
NOT
The NOT operator takes one input (this is a unary operator) and returns the opposite of that input.
XOR
XOR takes two inputs and only returns a true value (1) if exactly one input is true (1). 0⊕0 = 0 0⊕1 = 1
1⊕0 = 1 1⊕1 = 0
Order of precedence
In algebraic expressions, there is an order of precedence for the operations. The mnemonic BIDMAS can help us remember this order – Brackets, Indices, Division/Multiplication/Addition/Subtraction.
Similarly, there is an order of precedence for the operations used in Boolean algebra. The order of precedence is shown below (highest precedence first):
Brackets NOT XOR AND
OR
25

It’s important to remember that AND takes precedence over OR. Therefore, the expression A.B + C will correspond to the truth table:
A
B
C
A.B
A.B + C
0
0
0
0
0
0
0
1
0
1
0
1
0
0
0
0
1
1
0
1
1
0
0
0
0
1
0
1
0
1
1
1
0
1
1
1
1
1
1
1
So, A.B + C means exactly the same as (A.B) + C, but the brackets have been removed. They aren’t needed as AND takes precedence over OR.
The OR operator will be placed in brackets if OR needs to be operated first. The expression would then be A.(B+C). The truth table would look like the following:
A
B
C
B+C
A.(B + C)
0
0
0
0
0
0
0
1
1
0
0
1
0
1
0
0
1
1
1
0
1
0
0
0
0
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1
We can see from these truth tables that the order of operation of the operators has a substantial effect on the result. Brackets are needed in order for OR to take precedence over AND.
26

Commutative Laws
These laws state that the order of (certain) operands doesn’t matter. You will also be very familiar with these laws from algebraic expressions in mathematics – they’re so obvious that you never think of them at all, e.g. 3 x 5 is the same as 5 x 3.
The commutative laws of Boolean algebra are:
A.B = B.A A+B = B+A A⊕B = B⊕A
Associative Laws
These laws state that when all operators are of the same type, it doesn’t matter in what order they’re operated (for certain operators). These laws are also used in algebraic expressions and are so obvious that you may have never thought of them, e.g.
(3 x 5) x 4 = 3 x (5 x 4).
The associative laws of Boolean algebra are:
A.(B.C) = (A.B).C
A +(B+C) = (A+B) + C
A ⊕ (B⊕C) = (A⊕B) ⊕C
27

Simplifying Boolean expressions (part 1)
Simplifying an expression means writing the expression in a way that uses fewer logical operators, but has the same meaning.
Basic Rule 1 – Identity Law:
Using the OR operator with an expression that has a FALSE value (0).
A+0 = A
Test with a truth table:
In every row in column A+0, we can see that A+0 is always equivalent to the corresponding row in column A, and therefore the expressions are equivalent.
This means that every time we use OR with an expression that has a False value (0), it will simplify to the expression only.
Basic Rule 2 – Annulment Law:
Using the OR operator with an expression that has a TRUE value (1).
A+1 = 1
Test with a truth table:
We can see that every row in column A+1 contains 1, so when we use OR with any expression that has a True value (1), this can always be simplified to True (1).
A
0
A+0
0
0
0
1
0
1
A
1
A+1
0
1
1
1
1
1
28

Basic Rule 3 – Idempotent Law:
Using the OR operator with an expression and another copy of that expression.
A+A = A
Test with a truth table (note that this is also true for ):
We can see that every row in column A+A is always the same as the corresponding row in column(s) A, so A+A is an equivalent expression to A. When the OR operator is used with the same expression twice, that expression can be simplified to only one of those expressions.
Basic Rule 4 – Inverse Law:
Using the OR operator with an expression that has an inverse value.
A+ = 1
Test with a truth table:
We can see that every row in column A+ contains 1, so when we use OR with any expression that has an inverse value, this can always be simplified to True (1).
Basic Rule 5 – Annulment Law:
Using the AND operator with an expression that has a False value (0).
A.0 = 0
Test with a truth table:
We can see that every row in column A.0 is always 0 (False), so when AND is used between an expression that has a 0 value, it will always be simplified to False (0).
A
A
A+A
0
0
0
1
1
1
A
A+
0
1
1
1
0
1
A
0
A.0
0
0
0
1
0
0
29

Basic Rule 6 – Identity Law:
Using the AND operator with an expression that has a True value (1).
A.1 = A
Test with a truth table:
We can see that every row in column A.1 is always the same as the corresponding row in column A. Therefore, the expressions are equivalent.
Basic Rule 7 – Idempotent Law:
Using the AND operator with an expression and another copy of the same expression.
A.A = A
Test with a truth table:
We can see that every row in column A.A is always the same as the corresponding row in column(s) A, so A.A is equivalent to A. When the AND operator is used with the same expression twice, that expression can be simplified to only one of those expressions.
Basic Rule 8 – Complement Law:
Using the AND operator with an expression that has an inverse value.
A. = 0
Test with a truth table:
We can see that every row in column A. contains 0, so when we use AND with any expression that has an inverse value, this can always be simplified to False (0).
A
1
A.1
0
1
0
1
1
1
A
A
A.A
0
0
0
1
1
1
A
A.
0
1
0
1
0
0
30

Basic Rule 9 – Double Complement Law:
Using the NOT operator twice with one expression.
=A
Test with a truth table:
We can see that every row in column is always the same as the corresponding row in column A, therefore the expressions are equivalent. If NOT is used twice with one expression, it simplifies to just the expression.
Basic Rule 10 – Absorptive Law:
Enabling a reduction in a complicated expression to a simpler one by absorbing like terms.
A + (A.B) = A
Test with a truth table:
We can see that every row in column A + A.B is always the same as the corresponding row in column A, so we can see that the expressions are equivalent.
A
0
1
0
1
0
1
A
B
A.B
A+A.B
0
0
0
0
0
1
0
0
1
0
0
1
1
1
1
1
31

Basic Rule 11 – Absortive Law:
Enabling a reduction in a complicated expression to a simpler one by absorbing like terms.
A.(A+B) = A
Test with a truth table:
Remember, as the OR is in brackets, A+B takes precedence, so we solve this first in the truth table.
We can see that every row in column A.(A+B) is always the same as the corresponding row in column A, so we can see the expressions are equivalent.
Alternative test for Basic Rule 11 (this will use information from later on in the notes) A.(A+B)
= A.A + A.B (Expand the brackets – more details later on in the notes)
= A + A.B (Use Basic Rule 7)
= A (Use Basic Rule 10)
IMPORTANT: Basic Rules 10 and 11 also work in reverse, e.g. the following is true for Basic Rule 11:
A
B
A+B
A.(A+B)
0
0
0
0
0
1
1
0
1
0
1
1
1
1
1
1
32

Simplifying Boolean expressions (part 2)
Expansion of brackets – Distributive Law:
You will be familiar with the expansion of brackets in algebraic expressions, e.g.
3(y+9) = 3y + 27. It’s also possible to expand brackets in Boolean algebra when an expression is AND-ed with an expression enclosed in brackets. This can often help simplify the expression (although sometimes it doesn’t help and it’s best not to expand the brackets).
Example:
X.(Y + Z)
X.(Y + Z) = X.Y + X.Z
This is the expression, X, being AND-ed…
…with the expression, Y+Z in brackets.
To expand the brackets, the expressions outside the brackets are AND-ed with each term in the expression inside the brackets.
33

Factorising
This is the opposite to expanding brackets. You will be familiar with factorising in algebraic expressions – brackets are added to an expression and the common factor is placed outside the brackets, e.g. 4y+8 = 4(y+2). It is also possible to factorise more than one Boolean algebra expression. Doing so can sometimes simplify an expression.
Example:
X.Z + X.Y
X.Z + X.Y = X.(Z + Y)
The same term (X) appears in the expression on both sides of the operator ‘+’ so this expression can be factorised.
Therefore this expression…
…can be factorised as in the above expression.
34

  1. Communication
    Networks
    A network consists of a number of computer systems connected together. There are many advantages and disadvantages of using a computer network over a stand-alone computer.
    Advantages
    Disadvantages
     Share hardware
     Share software
     Share data/files
     Easier for internal communication/can
    send email
     Central backup
     Easier to monitor network activity
     Centrally controlled security
     Can access data from any computer
     A network manager may need to be employed – expensive
     Security problems – files sent between computers could spread a virus
     Hackers can gain access to data more easily
     If the server is down, all workstations on the network are affected
     Initial cost of servers, communication devices etc. can be expensive
    There are two main types of network, namely a Local Area Network (LAN) and a Wide Area Network (WAN).
    A LAN is a network in which the computer systems are all located relatively close to each other, for example in the same building or on the same site, such as a school.
    A WAN is a network in which the computer systems are all located relatively far from each other, for example in different buildings all over the country or in different countries. The internet is an example of a WAN. Note that many LANs could be linked using a WAN.
    Computer networks use agreed upon protocols to communicate, i.e. common methods of sending data and consistent data formats. If they did not agree on the protocols to be used, the individual computer systems would not be able to communicate with each other.
    Network topologies
    A network topology is the theoretical layout of computer systems on a network. There are a number of different network topologies. Common network topologies include:
     bus network
     ring network
     star network
    35

 mesh network. Bus network
The computer systems, also called the nodes of the network, are all connected to a single cable on which data can be sent, called the bus. A bus network has terminators on each end,
which are needed to ensure the network functions correctly.
The bus carries data packets along the cable. As the packets arrive at each computer system, it authenticates the destination address contained in the packet to see if it matches its own address. If the address doesn’t match, the computer system ignores the packet. If the address of the computer system matches the address contained in the packet, it processes the data.
Advantages
Disadvantages
 Easy to implement and add more computer systems to the network
 Quick to set up – well suited for temporary networks
 Cost-effective – less cabling
 It is difficult to troubleshoot the bus
 Limited cable length and limited number of
stations – performance degrades as
additional computers are added
 If there is a problem with the main cable or
connection, the entire network goes down
 Low security – all computers on the bus
can see all data transmissions
 Proper termination is required
 Data collisions are more likely, which
causes the network to slow down. A collision is when two computers try to send a data packet at the same time
36

Ring network
In a ring network, computer systems are connected in a ring or a loop. Data packets are sent around the ring, being passed from one computer system to the next until they arrive at their destination.
Advantages
Disadvantages
 Data is quickly transferred without a bottleneck – consistent data transfer speeds
 The transmission of data is relatively simple as data packets travel in one direction only
 Adding additional nodes has very little impact on bandwidth
 It prevents network collisions
 If any of the computer systems fail, the ring is broken and data cannot be transmitted efficiently
 If there is a problem with the main cable or connection, the entire network goes down
 It is difficult to troubleshoot the ring
 Because all nodes are wired together, to
add a another you must temporarily shut down the network
Star network
In a star network, each computer system is connected to a central node, also known as a hub.
Advantages
Disadvantages
 Good performance/fast network speed
 Easy to set up
 Possible to add more computer systems
without taking the network down
 Any non-centralised failure will have very
little effect on the network
 Minimal network collisions
 Better security
 Expensive to install – more cabling required
 Extra hardware required, such as a hub
37

Mesh network
In a mesh network, each computer system is directly connected to as many other computer systems as possible. The image above shows a full mesh network, where all computer systems are connected to each other. It is also possible to have a partial mesh network, where only some of the computer systems are connected in similar fashion to a mesh topology, while the rest are only connected to one or two devices. This is called a partial mesh network. The mesh topology is the most common network topology used on wireless networks.
Advantages
Disadvantages
 Data can be transmitted from different nodes simultaneously
 Mesh topologies can withstand high traffic
 Each connection can carry its own data load
 If one node fails, there is always an alternative present, so data transfer isn’t affected
 A fault can be diagnosed easily
 Expansion and modification in topology
can be done without disrupting other
nodes
 Provides high levels of security and
privacy
 Installation and configuration can be difficult as the network grows
 Cabling costs are high
 There is a high chance that many of the
network connections will be redundant
 Set-up and maintenance of mesh
topologies is very difficult
 Administration of the network is difficult
38

Connectivity
To connect a computer system to a network, a Network Interface Card (NIC) is required. A physical hardware port allowing a cable to connect your computer system to the network provides one method of connection. The second method is to connect a computer system using a wireless connection, called Wi-Fi.
Typical network speeds
A physical connection may be made using:
 a copper cable, with typical data transfer speeds of between 100 Megabits per
second (Mb) and 1 Gigabit per second (Gb)
 a fibre-optic connection which has typical data transfer speeds of between 1 and 10
Gb
Wi-Fi connections have typical data transfer speeds of 54–108 Mb but can go much higher. However, this can be severely affected by the distance between the device providing the Wi-Fi connection and the computer system. The data transfer speed can also be severely affected by atmospheric conditions, such as the weather, and building infrastructure.
Circuit switching
Circuit switching is a type of networking technology that provides a temporary but dedicated link between two stations or nodes, regardless of the number of switching devices through which the data has to travel. During the connection, no other data can be transmitted along the same route. The landline telephone system is an example of a circuit switched network. When you phone someone and they answer, a circuit connection is made and you can pass data along the connection until you put down the telephone to end the connection.
The main advantage of circuit switching is that it is reliable. Once the connection is established, it is fast and generally error free. However, it takes time to establish the connection. Should anywhere on the route fail, the connection will be broken.
To overcome the problems with circuit switching, packet switching was developed. Rather than relying on a dedicated connection, packet switching breaks the data down into small packets that can be sent by more than one route.
39

Packet switching (including data redundancy)
Packet switching is the process of delivering packets from one computer system to another using a designated device, such as a switch or a router. Packets are provided to a network for delivery to a specified destination. Each data packet is redirected by a computer system along the network, until it arrives at its destination. Data may be split up into a number of packets. These packets are transmitted over a network and may take different routes to its destination. When all the packets have arrived, the data is reassembled. The internet is an example of a packet-switching network.
Packets
A packet is a collection of data that is transmitted over a packet-switching network.
Here is a simplified diagram showing what a packet will typically contain:
The source address
The destination address
Information which enables the data to be reassembled into its original form
Other tracking information
The data itself
A checksum that authenticates the data, i.e. checks it hasn’t been corrupted
INTERESTING FACT
When packets are transmitted over a Wi-Fi network, they can be intercepted by any device; this is called packet sniffing. If you perform thorough analysis on a large number of packets, you can often break the encryption. This is why security services, such as the National Security Agency, do not allow any Wi-Fi devices on their network.
40

Routing
Routing is the name given to the method of selecting paths along which packets are sent on
a computer network. Specialist computer systems such as routers, switches, bridges, firewalls and ports construct a routing table in their memory. This stores a number of routes which are the best to use to send packets to reach a specific destination. Maintaining accurate routing tables is essential for ensuring that packets are delivered as quickly as possible.
126
In the example shown above, computer system 1 is sending a packet to computer system 126. Clearly, the quickest route for the packet to arrive at its destination is to be sent from router A, on to router B, followed by router E for delivery to computer system 126. This path would be determined by routing, using a routing table. A poorly constructed routing table may choose to send the packet from router A, on to router C, followed by router D and then router E for delivery to computer system 126. This would take longer and is not a good use of network resources. But A>C>D>E may be faster, depending entirely on the cost (hop count) of the routes.
Most routers use only one network path at a time, such as the preferred route above (Computer system 1 > Router A > Router B > Router E > Computer system 126). Some multipath routing techniques enable the same packets to be sent using multiple alternative paths at the same time. This means that in the event of Router B failing in the transmission above, the same packet would also have been sent via the alternative longer route set out above (Computer system 1 > Router A > Router C > Router D > Router E > Computer system 126), to ensure the packet arrives at its destination.
1
41

IP addresses
An IP address is an address which is allocated to a computer system on a network, usually by a DHCP (Dynamic Host Configuration Protocol) server. Alternatively, you may assign your own IP address if you do not wish to rely on the services of a DHCP server. An example of an IP address is 195.10.213.120.
It is used to uniquely identify computer systems on a network, thus allowing communication between them. In routing tables, the corresponding IP address of a unique MAC address is stored and updated as necessary.
Internet Domain Name System (DNS)
A Domain Name System (DNS) is a distributed database that matches IP addresses to computer system resources.
One example of this is to match an IP address to a human friendly domain name. For example, if you wanted to visit the Google search engine, the computer system on which the website is stored has an IP address assigned to it; 172.217.31.164. Try typing this into the address bar of your web browser. You should be able to view the website that you would be more familiar with when accessing the domain name www.google.co.uk. Here, your computer system sent a request to its DNS server for the IP address that is mapped to the domain name www.google.co.uk. The DNS server returned the IP address 172.217.31.164, which allowed your computer system to communicate with the computer system where the Google search engine is stored.
Of course there are many different DNS servers located world-wide. If your local DNS server does not store the address of the resource you are requesting, it will pass the request along to another higher level DNS server, such as the DNS server of your Internet Server Provider (ISP). If again the address is not found, your ISP’s DNS server will pass the request on to a higher level DNS server which may be the DNS server responsible for an entire zone, such as the .co.uk zone. This continues until the address is found (and returned to the local server) or the DNS query fails.
42

Another example where a DNS server is used is where a computer system, on joining a network, would query the DNS server for the IP address of other useful computer systems, such as the logon server, which stores the
details of all usernames and passwords.
INTERESTING FACT
In 2015, YouTube users uploaded 400 hours of video per minute. That means that the equivalent of a 1000 days of video were uploaded every hour of every day.
43

Protocols
A protocol is an agreed format, which allows two devices to communicate. Put simply, a
protocol is a set of rules. These rules can include the following:
 handshaking, where two devices establish their readiness to communicate
 how the sending device will indicate that it has finished sending a message
 how the receiving device will indicate that it has received a message
 the type of error checking to be used
 agreement on the data compression method to be used.
There are many standard protocols used with computer systems. The table below illustrates the protocols with which you need to be familiar:
Protocol
Description
TCP/IP (Transmission Control Protocol/Internet Protocol)
Two protocols that combine to allow communication between computer systems on a network. IP is a protocol that sets out the format of packets and an addressing system. TCP is a protocol that allows packets to be sent and received between computer systems.
HTTP (Hypertext Transfer Protocol)
HTTP is a protocol than can be used to transfer multimedia web pages over the internet.
FTP (File Transfer Protocol)
FTP is a protocol that can be used when copying a file from one location to another via a network or the internet. It is typically used for the transfer of large files, as it allows broken communications to resume transferring a file rather than having to restart.
A protocol stack is a set of protocols that work
together to provide networking capabilities. It is
called a stack because it is designed as a hierarchy of
layers, each supporting the one above it and using
those below it. The use of a layered approach
enables different protocols to be substituted for
each other, e.g. to allow for new protocols and
different network architectures. The number of
layers varies according to the particular protocol stack. However, the lowest layer will deal with physical interaction of the hardware, with each higher layer adding additional features, and user applications interacting with the top layer.
INTERESTING FACT
Although the Bluetooth protocol has been agreed, the protocol stack varies considerably from device to device. Try sending a photograph via Bluetooth from one smartphone to another.
44

TCP/IP 5 layer protocol stack model
TCP stands for Transmission Control Protocol and IP stands for Internet Protocol. There are five layers to this model:
 Physical layer
 Data link layer
 Network layer
 Transport layer
 Application layer.
Physical layer
The physical layer transmits the raw data. It consists of hardware such as switches. This layer deals with all aspects of setting up and maintaining a link between the communicating computers.
Data link layer
The data link layer sends data from the network layer to the physical layer. It divides the data to be sent into data frames. A data frame consists of a link layer header followed by a packet. This layer handles the acknowledgements sent from the receiver and ensures that incoming data has been received correctly by analysing bit patterns in the frames.
Network layer
The network layer is responsible for the addressing and routing of data. Routers belong to the network layer as they use logical addresses to direct the data from the sender to the receiver. A router determines the path the data should take based on network conditions. Routers manage traffic problems on the network such as the routing of packets to minimise congestion of data.
Transport layer
The transport layer ensures that data is transferred form one point to another reliably and without errors. The transport layer is responsible for making sure data is sent and received in the correct order. The transport layer is implemented in the sending and receiving computers, but not in the routers on the path between them. It acts as an interface between the communicating computers and the network.
45

Application layer
The application layer provides interfaces to the software to allow it to use the network. Examples of software include email, file transfer protocol (FTP) and the World Wide Web (WWW).
Sending data from Host 1 to Host 2
The diagram below shows Host 1 sending a message to Host 2. From Host 1, the data flows down through the 5 layers of protocols and then to Router 1. Router 1 is the gateway to the operating area of Host 1 and therefore only the network, data link and physical layers are involved. Similarly, with Router 2 only the three layers are involved as the data is passed into the operating region of Host 2. Finally, the data passes up through the layers to Host 2.
46

Layers and protocols
Layer
Protocol
Application layer
Hypertext Transfer Protocol (HTTP) Simple Mail Transfer Protocol (SMTP) File Transfer Protocol (FTP)
Transport layer
Transmission Control Protocol (TCP)
Network layer
Internet Protocol (IP)
Data link layer
Ethernet Protocol
Physical layer
Physical connection using a NIC to connect to the internet
Ethernet Protocol
At the data link layer, Ethernet Protocols describe how network devices can format data for transmission using frames and packets. Ethernet protocols are also used to define standards for types of network cabling used at the physical layer, and the corresponding transmission speeds.
Wi-Fi Protocol
Wi-Fi is a term used for certain types of wireless networks that use 802.11 wireless protocols for transmitting data using electromagnetic waves in place of cables. 802.11 wireless networks use security protocols, such as Wi-Fi Protected Access (WPA), to provide a level of security and privacy similar to that found on a wired network. Bluetooth is another example of a Wi-Fi protocol and WAPs (Wireless Application Protocols) are protocols to standardise the way wireless devices can be used for internet access.
47

Email Protocols
To use email, you must have an email client on your computer that has access to a mail server. Your Internet Service Provider (ISP) will often provide this server. The mail client and the mail server exchange information with each other using email protocols to transmit information.
1. IMAP Protocol
IMAP is an email protocol that stores email messages on a mail server. It stands for Internet Messaging Access Protocol. It allows the email user to read and handle email messages as though they were stored locally on their own computer. The user can manage their email with facilities such as the ability to create folders to organise their messages, store draft messages in the server and delete unwanted messages.
2. POP3
Post Office Protocol 3 (POP3) is the third version of a protocol for receiving email. POP3 receives email for a client and stores it in a single file on the mail server. When the email client logs onto the mail server, the email is transfered to the user’s computer. There are no copies of the email stored permanently on the server after it’s been downloaded.
3. SMTP
The Simple Mail Transfer Protocol (SMTP) is used to deliver email from the sender to an email server, or when email is delivered from one email server to another. SMTP can only be used to send emails, but not receive them.
INTERESTING FACT
Email existed before the World Wide Web. Early email was very simple – it just put a message in another user’s directory in a location they could see when they logged on.
48

  1. Organisation and structure of data The nature of data
    Data is made up of raw facts and figures and can be represented in many different forms including text, numbers, pictures, sounds and video clips. Information can be derived from data when it is processed.
    Representation of numbers
    You will need to be familiar with three different counting systems. These are denary, binary and hexadecimal.
    Denary
    The first counting system that you need to be familiar with is the denary counting system, also known as the Base 10 or decimal counting system. In the denary counting system, the digits 010, 110, 210, 310, 410, 510, 610, 710, 810, 910 are used to represent numbers. The number 13810 for example, actually means 1 ‘hundred’, 3 ‘tens’ and 8 ‘units’. This gives the total one hundred and thirty-eight:
    Binary
    The second counting system that you need to be familiar with is the binary counting system, also known as the Base 2 counting system. In order for data to be processed by a computer system, it must be converted into binary format. This is because computer systems can only store and process Binary digITs, also known as BITs. A BIT is either a 12 or 02. You may think of this as a light switch, where the switch is either ON or OFF:
     If the switch is ON it is stored as the digit 1.
     If the switch is OFF it is stored as the digit 0.
    49

A binary number is a string of BITs, for example 100010102:
The binary number 100010102 is therefore a binary representation of the denary number 13810 (12810 + 810 + 210).
Hexadecimal
The third counting system that you need to be familiar with is the hexadecimal counting system, also known as the Base 16 counting system. In the hexadecimal counting system, the digits 016, 116, 216, 316, 416, 516, 616, 716, 816, 916 are used to represent 1–9 and then the characters A16, B16, C16, D16, E16 and F16 are used to represent 10–15. The hexadecimal number 8A16 for example:
The hexadecimal number 8A16 therefore represents 8 ‘sixteens’ and 10 ‘units’. This gives the total one hundred and thirty-eight. Remember that A16 = 1010, B16 = 1110, C16 = 1210, D16 = 1310, E16 = 1410, F16 = 1510.
The hexadecimal system is widely used as binary numbers can be quickly converted into hexadecimal numbers that are more convenient for humans to use. For example, a telephone conversation where you might read out the binary number
100010102 could cause confusion. It’s easier to say 8A16, and mistakes are less likely to be made.
INTERESTING FACT
Up until the late 20th century, traditional Chinese weights and measurements used in the marketplace used the hexadecimal counting system. Other cultures used different base counting systems, e.g. the ancient Babylonians used a Base 60 counting system.
50

Denary to binary and hexadecimal, binary to denary and hexadecimal, hexadecimal to binary and denary
In this section, we will discuss how to convert between different number systems.
Denary to binary
One way of converting a denary number to a binary number is by drawing a Base 2 table
from the right to the left.
In this example, we will convert the denary number 19810 into a binary number. Take 19810 and see if it is more than the first number on the left. In this case, 12810 is the number on the left and so we write a 1 under the heading 12810.
We now deduct 12810 from our original denary number, which leaves 7010. The next number in our Base 2 table is 6410. If the number remaining, 7010, is more than the next number on the left, 6410, write the number 1 under the heading 6410.
We now repeat the process again and deduct 6410 from 7010, which leaves 610. The next number in our Base 2 table is 32. If the number remaining, 610, is more than the next number on the left, 3210, write the number 1 under the heading 3210. However, in this case the number remaining is less than the next number on the left, so we write a 0 under the heading 3210.
128
64
32
16
8
4
2
1
128
64
32
16
8
4
2
1
1
128
64
32
16
8
4
2
1
1
1
128
64
32
16
8
4
2
1
1
1
0
51

This process is repeated until you reach the final heading and the binary number for the denary number 19810 is found:
The binary number for the denary number 19810 is therefore 110001102 (12810 + 6410 + 410 + 210).
Denary to hexadecimal
You may wish to convert a denary number into a hexadecimal number. To do this, take the number 19810 from our previous example and draw a Base 16 table, from right to left, as before.
Take 19810 and see if it is more than the first number on the left. In this case, 25610 is the number on the left and so we write a 0 under the heading 25610.
The next number in our Base 16 table is 1610. If the number remaining, 19810, is more than the next number on the left, 1610, work out how many 16s are needed without going over the number remaining. In this case it is C (C16 = 1210, 1210 x 1610 = 19210).
Remember that A16 = 1010, B16 = 1110, C16 = 1210, D16 = 1310, E16 = 1410, F16 = 1510.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly