0% found this document useful (0 votes)
11 views

GCSE Computer Science notes

Uploaded by

skrtifn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

GCSE Computer Science notes

Uploaded by

skrtifn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 52

Computer Science notes

Topic 1: Computational thinking


Algorithm:
● A reusable set of instructions to solve a given problem.
● The instruction must be in the correct order, or a sequence.
● A successful algorithm should lead to the expected outcome, be
consistent, and efficient.
● We can express algorithms using written descriptions, Flowcharts or
Pseudocode.

Written description:

Flowcharts:
● Used to show an algorithm as a diagram.

Pseudocode:
● A structured code-like language that can be used to express an
algorithm.
● It is not an actual programming language and it can’t be run.
● It is used to plan algorithms, focusing on the logic and efficiency
without worrying about syntax.
● Pearson Edexcel pseudocode:
● The numbers entered by the user are stored in two variables with the
identifiers ‘firstNumber’ and ‘secondNumber’.
○ Identifier - a unique name given to a variable or constant.
○ Variables and constants are ‘containers’ for storing data.
○ The value stored in a variable can change, whereas the value
of a constant never changes.
● Text has to be placed in quotation marks (single or double) if it is to
be displayed.
● Quotation marks are not used if a variable is to be displayed.
● Arithmetic operators are used to perform calculations.

Iteration:
● A construct that means a process is repeated until a condition is
met or a particular outcome is reached.
● Often referred to as a ‘loop’.
● Instead of making multiple copies of the same statement to do a
specific action, we can use iteration to repeat them.

Sorting algorithms:
● One of the most common tasks in computer programs is sorting
data into a particular order.
● There are two sorts we need to know:

Bubble Sort:
● When data is sorted, different items must be compared with each
other and moved so that they are in either ascending order or
descending order.
● Pro - Easy to implement Con - Poor efficiency

This process is repeated until all the numbers are in correct order.
This bubble sort would take 3 passes to be solved.
Merge sort:
● Merge sort is a sorting algorithm that divides a list into two smaller
lists and then divides these until the size of each list is one.
● Known as a ‘Divide and Conquer’ algorithm
● Pro - Very efficient
● Con - Can be slower for small lists, Takes lot of memory

● Divide into smaller lists until there is only one item in each list.

● Compare values in each list and put them in order

● Merge the smaller lists and arrange them in order.

● Merge the two lists one last time to arrange them in the correct
order

Search algorithms:
● Searching is a classic computer science problem. It involves finding
a certain value in a set of other values.
Linear search:
● A simple algorithm but not very sophisticated.
● Pro - Very easy to implement Con - Slow on long lists
Binary search:
● Uses ‘divide and conquer’ method
● Only works if the items are in order
● The middle/median item is repeatedly selected and the list is split to
reduce the size of the list to be searched.
● Pro - Faster than linear search on a larger list
● Con - List must be sorted beforehand

Decomposition:
● Breaking a problem down into smaller, more manageable parts
which are easier to solve.
● Each smaller part can then be solved individually, before all the sub-
solutions are combined to solve the original problem.

Abstraction:
● The process of removing unnecessary detail so that only the
important points remain.
● There are different levels of abstraction, depending on the amount
of detail required.

Logic gates
● Data and instructions are transmitted through digital circuits.
● These circuits require high or low voltages that enable electricity to
flow through the computer, so they can perform tasks.
● The flow of electronic signals is controlled by logic gates.
● High voltage is represented using 1 (True) and Low voltage is
represented using 0 (False).
● There can be a number of logic gates in one circuit.
● Truth Tables are a way of showing the outcomes of a logic gate.

Types of Logic gates:


● NOT gate
○ NOT gate makes the output the opposite of the input.

○ Truth table

● AND gate
○ In an AND gate, both inputs need to be True for the output to
be True.

○ Truth table

● OR gate
○ In an OR gate, at least one input must be True for the output to
be True.
○ Truth table

Logic circuit diagrams:


● Logic gates can be combined to product logic circuit diagrams.
● Example:

● Truth table
Topic 2: Data

Binary
● Binary: a base-2 numeral system using only two digits, 0 and 1.
● Binary is used by computers to store data.

Why Binary?
● The processor (which processes all the data and instruction the
computer receives) contains transistors.
○ Transistor - a device that controls electric current.
● The transistors act as switches and they only have two stages, on or
off. This means they either transmit a signal or they don’t.
● As there are only two states (on or off), they are represented by the
digits, 1 and 0.

● Digital system - information represented by certain fixed values. (E.g.


binary system)
● Analogue system - using information represented by a quantity that
is continuously variable. (E.g. Voltage)

How it works?
● The binary system place values increase by powers of 2.
● Units:
○ Bit - the smallest unit of data that is represented in a
computer.
○ Byte - the basic combination of bits used, as shown in the table
above. A byte consists of 8 bits.
○ For example - 1010 is 4 bits

Denary:
● The number system we use in everyday life.
● The denary system place values increase in powers of 10.
Converting from Binary to Denary:

● For every 1, we add the value above it.


● All odd numbers have a 1 at the end and all even numbers don’t.

Converting from Denary to Binary:


● We can use this table to place a 1 or a 0 in each column to convert
the Denary number 213 to a Binary one.

● Step 1 - Is 213 greater than or equal to 128? Yes. So we place a 1.


● Step 2 - Subtract 128 from 213. Remainder = 85
Is 85 greater than or equal to 64? Yes. So we place a 1.
● Step 3 - Subtract 64 from 85. Remainder = 21
Is 21 greater than or equal to 32? No. So we place a 0.
● Step 4 - The remainder is still 21.
Is 21 greater than or equal to 16? Yes. So place a 1.
● Step 5 - Subtract 16 from 21. Remainder = 5
Is 5 greater than or equal to 8? No. So we place a 0.
● Step 6 - The remainder is still 5.
Is 5 greater than or equal to 4? Yes. So we place a 1.
● Step 7 - Subtract 4 from 5. Remainder = 1
So place a 0 in the second last column and place a 1 in the last
column
Binary Addition:
● Always move from right to left when adding
● Carry over to the left

*This answer is wrong as there was an overflow error.

Overflow error:
● Overflow occurs when a calculation gives a result with more bits
than there are available to store it.
● When this happens, the processor is informed that an error has
occurred.

Binary shifts:
● Binary shift - an operation done on all the bits of a binary value in
which they are moved by a specific number of places either to the
left or right.
● Example: If we multiply the binary number 00010100 by 22 (4), there
should be two shifts to the left. The ends are replaced with 0s.

● If we had to divide the number by 22 (4), there would be two shifts to


the right. The right-most bits would be replaced with 0s.

Hexadecimal:
● A base-16 number system where there are 16 digits.
● The place values increase in powers of 16.
● We use hexadecimal numbers to represent large, 32 or 64 bit binary
numbers, as it is difficult for humans to remember and use such
large binary numbers.
● These are the digits used in hexadecimal numbers:
Converting from Binary to Hexadecimal:
● Step 1 - Divide the 8 bit binary code into two halves of 4 bits each
● These halves are called nibbles
● Step 2 - Convert each nibble into its denary number.
● Step 3 - Once you have the denary number, you can use the table to
represent them as hexadecimal characters.
Converting from Hexadecimal to Binary:
● Step 1 - Convert each hexadecimal character to denary
● Step 2 - Convert each denary number into a 4 bit binary number.
● Step 3 - Join the 2 nibbles to get an 8 bit binary number.

Text representation:
● Character set - defined list of characters recognised by the
computer.
● Computers have a character set so they can convert the keys we
press (A,@,?) into a combination of binary numbers.
● That is why there is a universal character set used by computer
manufacturers all over the world. This is known as ASCII.
● Examples of Character sets are ASCII, Extended ASCII and Unicode

● ASCII:
○ American Standard Code for Information Interchange (ASCII)
○ In ASCII, each character is given a 7 bit binary code so in total
ASCII can represent 128 characters.
○ This includes: Lowercase & Uppercase letters, numbers (0-9),
other symbols (@, #, !)
○ However, ASCII doesn’t accommodate for foreign languages.
● Extended ASCII:
○ Each character set has an 8 bit binary code.
○ This allows for 256 characters to be represented.
○ Extended ASCII is particularly useful for many European
languages which include accents on some of the vowels. (è, ŏ,
ŭ)
○ But there are still some languages like Mandarin and Thai that
have way more than 256 characters.
● Unicode:
○ Each Unicode character has a 16 bit binary code.
○ It can store 65,536 different characters.
○ Therefore it can store thousands of characters from many
different languages across the whole world.
○ However, it needs a lot of storage space.

Bitmap images:
● Images are also represented and stored as binary code.
● The basic unit of a bitmap image is Pixel.
● Pixel is short for ‘picture element’. It is the smallest, single point of
colour in a graphic image.
● Each pixel is given a binary value which represents a single colour.
This colour can be changed by changing the binary value.
○ Using 1 bit per pixel allows only 2 colours to be stored (black
and white)
○ To store more colours we need more bits.
○ A 2 bit picture can store 4 colours, a 3 bit picture can store 8
colours, and so on.
● Colour depth - The number of bits per pixel.
○ The greater the colour depth the greater the number of
colours we can achieve.
○ The greater the colour depth, the larger the image file size.
● Resolution - the concentration of pixels within a specific area.
○ The area is defined by the image width and height in pixels
○ The greater the resolution, the larger the image file size.

● File size (bytes) = Width (pixels) x Height (pixels) x Colour depth

● Metadata - information about data stored


○ This includes: Height & Width (pixels), Colour depth, Date &
Time the image was created, Author

Sound representation:
● Sound is also stored by a computer in binary.
● There is metadata along with the binary data to tell the computer
what type of file it is.
● Amplitude - changes the volume of the sound.
● Frequency - changes the pitch of the sound.
● There are two types of sound signals: Analogue and Digital

● Analogue
○ Analogue recording represents continuous change in air
pressure caused by sound waves, as changes in voltage .
○ E.g. Vinyl records, Magnetic tape
○ The complete sound wave is recorded
● Digital
○ Computers represent sound digitally.
○ Continuous analogue change can’t be represented digitally, so
digital recordings take a series of sound samples.
○ Sampling - taking measurements of a sound wave at regular
but different intervals of time.
○ Sample rates:
■ Low sample intervals - Fewer samples, Smaller file size,
Poor sound quality

■ High sound intervals - More samples, Larger file size,


Better sound quality

● File size = Length x Sample rate x Bits x Channels

Data compression:
● Compression - changing the format of a data file so that the size of
the file decreases.
● Compressed files require less storage and less network bandwidth to
upload and download.
● There are two types of compressions, lossy and lossless
compression.

● Lossy compression
○ Where some of the data is removed, and the original file can’t
be restored once compressed.
○ This can not be used with text files as some of the data is being
permanently deleted and can never be restored.
○ This can only be used for image and sound files, where the
data removed is not noticeable.
○ Lossy compression can reduce the quality of the data.
● Lossless compression
○ Leaves out repeated data and instead makes a note of how
many times it is repeated.
○ No data is lost and the original file can be restored.
○ It is very useful in text files as missing data would change the
file.
○ The data quality remains the same after compression.

Topic 3: Computers
● A computer is a machine that takes some kind of input from its
surroundings, processes the input, and provides some kind of
output.

Embedded systems:
● Devices like microwaves, cars, phones, and printers can be classed
as a computer.
● These devices have an embedded computer.
● In a PC all the components are placed separately such as a
keyboard, mouse, CPU.
● An embedded system has all of the components on a single chip
which is built into the device.
● Embedded systems allow the device to perform specific tasks.

● Internet of things (IoT)


○ Many devices can now communicate with each other and be
accessed and controlled remotely via the internet.
○ E.g. you might be able to control the lights and AC of your
house, from your smartphone.
Von Neumann architecture:
● A computer system design where both the data and the instructions
are stored in the computer memory.
● With this architecture, we can change tasks by simply loading a
different program into memory.
● In this architecture, the hardware device that does the processing is
called a CPU (Central Processing Unit) and the storage device is
called a RAM (Random-Access Memory)/Main memory.
● The CPU and RAM are connected by a group of wires called a Bus.

Main memory:
● RAM (Random Access Memory)
○ The temporary memory store the CPU uses for data and
instructions.
○ RAM is a volatile store
○ Volatile - memory that is erased once the power is turned off.
● ROM (Read-Only Memory)
○ The computer also needs to store programs that must run
when the program is first turned on. These are stored in the
ROM.
○ ROM is non-volatile
○ Non-volatile - memory is not lost when power is turned off.
● Cache memory
○ Small amount of fast, expensive memory that is used between
the CPU and RAM.
○ Frequently used data is loaded in chunks from the slower RAM
into the Cache.
○ This increases the processing speed as it is faster for the CPU
to fetch data from the Cache.
○ Cache miss - When the data required for processing is not
found in the cache memory.
● Virtual memory
○ Virtual memory is used by memory manager when there are
several applications running and the RAM is full.
○ If there is no free memory, the memory manager will transfer
the least recently used data onto the virtual memory (hard
disk).
○ However, the hard disk is not made for accessing small pieces
of data, and its read/write speed is a lot slower than the RAM.
○ If the system has to rely too heavily on virtual memory, there
will be a significant drop in performance.
Buses:
● Bus - a collection of wires through which data is transmitted.
● The speed of a bus is measured in Megahertz (MHz)
● The size (width) of a bus is how many bits it can transfer at a time.
E.g. a 64 bit computer has 64-bit width buses.
● There are 3 types of bus:
● Address bus
○ Sends a memory address along the bus from the CPU to the
RAM.
○ This is for the CPU to tell the RAM the address of the data
required.
○ Unidirectional - CPU to RAM only
● Data bus
○ Once the data has been found, the RAM sends it to the CPU.
○ Bidirectional - To and From the memory
● Control bus
○ Carries commands from the CPU to other hardware devices.
○ Carries status messages from hardware devices to the CPU.
○ Bidirectional - To and From the CPU

CPU:
● The CPU processes instructions using the Fetch-Decode-Execute
cycle.
● Fetch - it fetches an instruction from Main memory
● Decode - breaks down the instruction to determine what action is
needed.
● Executes - carries out the instruction.
● It repeats this cycle until it shuts down.

Parts of the CPU:


● Control Unit
○ Organises data and instructions of different parts of the CPU.
● Program counter
○ A register located inside the Control unit.
○ It holds the memory address of the next instruction to be
fetched.
● Arithmetic Logic Unit (ALU)
○ Performs calculations and logic operations.
○ Inside the ALU is a register called the Accumulator.
○ The Accumulator holds the results of calculations performed
by the ALU
● Memory Address Register (MAR)
○ This holds any memory address the computer is about to use.
● Memory Data Register (MDR)
○ This holds actual data or instructions that the computer is
about to use.
○ This data can be fetched from the memory.
● The MAR and MDR work together:
○ The MAR knows where to look for data in the RAM, and the MDR
keeps hold of the data until it’s ready to be used by the CPU.

Factors affecting CPU performance:


● Clock speed
○ The speed at which instructions are processed by the CPU per
second.
○ The faster the clock speed, the faster the rate of processing.
○ Clock speed is measured in Hertz.
○ Disadvantages of increasing clock speed:
■ Increasing clock speed causes the processor to generate
a large amount of heat.
■ There is a limit to the rate at which the transistors (which
process the instructions) can operate.
● Number of Cores
○ The CPU can be broken down into different cores. Each core
can process data independently from all other cores.
○ Multicore processors can increase processing speed.
○ However not all programs will run at increased processing
speed, as some tasks might not be carried out in parallel.
● Size of Cache
○ Before the processor can process data it has to fetch them
from the memory (RAM). The memory is a different component
and therefore it takes time to fetch the data.
○ Cache - a temporary data store so that the data can be
accessed very quickly when needed.
○ Cache memory is built into the same chip as the processor so
it is a lot faster to fetch data from it.
○ Any data that is regularly processed is stored in the Cache so
it can be accessed quickly.
○ The more cache there is, the more data can be stored in the
cache and so it can be quickly fetched and processed.
○ There are different levels of Cache.
■ Level 1 cache is the fastest and the smallest, it is located
right next to the processor.
■ L2 cache is fairly close to the processor and fairly fast.
■ L3 cache is shared by all the cores and is the biggest.

Primary storage:
● Memory areas that the CPU accesses very quickly.
● This includes CPU registers, Cache, ROM, RAM
● The processor is very fast but the Long term storage is extremely
slow.
● So RAM is used to speed things up. It is fast and will get the data
from long term storage and give it to the processor quickly.

Secondary storage:
● A permanent storage device that is not directly connected to the
CPU.
● It stores applications and files that are not in use.
● It is non-volatile.
● Secondary storage is needed to store data for a long time so we can
access it later.
● There are 3 types of storage: Magnetic, Optical, Solid-state

● Magnetic storage
○ E.g. Hard disk
○ Uses read/write heads that store electromagnets.
○ Parts of the disk are made magnetised (1) or demagnetised (0)
using the electromagnets in the head.
○ The head also reads the state of the disk (magnetised or
demagnetised).

■ Large capacity
■ Cheap to buy
■ Usually reliable but not that durable as they use
mechanical movement.
■ Not very portable
■ Can be noisy and Generate heat

● Optical storage
○ E.g. CD, DVD, Blu-Ray
○ To write - Data is written with a laser burning pits into the disk.
○ This creates pits and lands which can be used to represent
binary data as 1 or 0.
○ To read the data, light is shined on the disk. Light that hits a
land reflects differently to light that hits a pit

■ Small capacity
■ Fairly reliable and durable but can get damages (e.g.
scratches)
■ Good portability

● Solid State storage


○ E.g. Flash drives
○ Form of flash memory, so non-mechanical.
○ Consists of digital circuits which are charged (1) or uncharged
(0)
○ This is done using electrons.

■ Very fast
■ Very reliable as non-mechanical
■ Expensive
■ High capacity (but can be lower than magnetic storage)
■ Silent and no heat
■ Doesn’t need defragmentation

Cloud storage:
● A type of secondary storage, often belonging to a third party, that
can be accessed via a network.
● E.g. Dropbox, Google drive, iCloud
● It is not in the same physical place as the computer’s RAM/ROM.
● Files stored in the cloud can be accessed from anywhere via an
internet connection.
● Advantages of Cloud storage:
○ You can access the data from anywhere on many devices
○ The data is securely backed up
○ You don’t need to transfer your data if you get a new
computer.
● Disadvantages:
○ Some people may be concerned about security and privacy.
○ Some people may be worried about losing access to their data.

Software:
● Computer systems consist of both hardware and software.
● Software - the set of programs run by a computer system.
● There are two main types of softwares:
○ Application software - Software that performs a task such as
creating a spreadsheet or writing a document.
○ System software - helps us use the computer and the
application programs. There are two types of System software:
Operating systems and Utility software.

Operating systems (OS):


● The OS is usually loaded up when the computer starts up.
● Operating systems examples - Windows, Android, iOS
● Operating systems are designed for particular hardware and it
manages other program’s access to that hardware.
● Applications have to be written for a particular OS but will work on
any hardware.
○ For example, some Android apps won’t run on iOS devices.
● The OS also provides and runs the user interface.
○ User interface - the way the user interacts with the OS.

Utility software:
● A software that does a useful job for the user.
● Utility software (tools) can be split into 3 areas:
● Basic tools
○ Include things like a simple text editor (e.g. Notes), calculator,
software for accessibility (such as changing the font size)
○ They are usually included as part of the OS.
● File management tools
○ Include software that makes a back-up copy of your files in
another location (cloud).
○ They can also recover deleted files and repair damaged files.
○ They can also be used for converting files between different
formats (e.g. jpg, png, gif or pdf, docx)
○ Another important file management tool is the defragmenter.
Defragmenter - a utility that moves file clusters on a disk so
they are closer to each other in order to speed up disk access.
○ You can use a file management tool to compress infrequently
used files. This frees up space on the disk.
● Security tools
○ This includes anti-malware programs such as antivirus and
antispyware software.
○ Another security tool is a Firewall.
Firewall - a utility that controls program access to the network,
both incoming and outgoing.
○ Encryption is another security tool that makes files unreadable
without a password.

Protecting against code vulnerabilities:


● Design and implementation of software
○ The software and system designers need to consider things
like the Authentication needed, Data encryptions, Access
control, etc.
○ Once the designers have considered security, they need to
look at the implementation (writing the code) phase.
○ This includes rejecting poorly written code and managing code
vulnerabilities.
■ Code vulnerabilities - code that creates security issues
and can be taken advantage of.
○ These issues can be minimised by getting the code reviewed by
another programmer or getting an automated review. These
can be expensive.
○ Modular testing is also important and can improve the
security of the code.
■ Modular testing - testing each block of code as it is
completed to ensure it works as expected.
● Audit trail
○ A record of activities that have taken place on a computer.
○ Audit trails are automatically generated in chronological order
and cannot be changed.
○ Audit trails allow technicians to figure out what happened
during a cyber attack.

Programming languages
Low level languages:
● A computer only knows how to do a few very simple instructions that
are part of its instruction set.
○ Instruction set - The list of all possible commands a particular
CPU knows how to carry out.
● Each instruction is given a binary code, and the binary codes
representing a program are called machine code.
○ Machine code - the binary codes representing each instruction
in the instruction set.
● For humans to understand and program these machine codes, we
use a translator.
○ Translator - a program that converts machine code into
source code.
○ Source code - the text of the program that a programmer
writes.
● The simplest translator is called an Assembler. It converts assembly
language to machine code.
○ Assembly language - a low level language written using
mnemonics.
● Low level programming language - a programming language that is
closely related to the computer’s machine code.
● Assembly language is a bit easier to work with than machine code
because each instruction is written in mnemonic.
○ Mnemonic - a short, simple acronym that represents each of
the instructions in a CPU’s instruction set.
LDR = Load register CMP = Compare STR = Store

● Disadvantages of Assembly language:


○ A very limited range of instructions available
○ Managing all the binary data is difficult
○ Debugging the code is very challenging
● Almost no programs are written in assembly language nowadays. It
is only used in embedded systems that need to be very small and
fast.

High level languages:


● High level languages like Python, Java, C# are a lot more common
● For these programs to run on the CPU, the source code has to be
translated into machine code.
● This can be done all at once or one line at a time.
● Compiler - a translator that translates the whole program in one go.
○ A compiler converts high level language to machine and saves
it to be executed later.
● Interpreter - a translator that translates and runs the program one
line at a time.
Unit 4: Communication & the Internet

Networks
● Network - an arrangement of computers and other devices
connected together to share data and resources.
● Server - a powerful computer that provides the network with
services, such as storing files or sending/receiving emails.

Why are networks used?


● A network can support multiple users accessing multiple services at
the same time.
● Networks allow multiple users …
○ To access shared files among several users
○ To download data or updates to computer programs
○ To send data to a shared printer
○ To access the internet
○ To communicate with each other

Types of networks:
● Local Area Network (LAN)
○ A network that covers a relatively small geographical area.
○ This is usually a single place, like a home, factory, or building.
○ Computers are within a local geographic area and in close
proximity with each other.
○ Computers are usually connected via cables or wireless
devices.
○ The hardware and equipment is owned by the company
providing the network.
● Wireless Local Area Network (WLAN)
○ A LAN in which devices use high frequency radio waves to
communicate.
○ A wireless router allows all the devices to access the Internet
and share devices.
● Wide Area Network (WAN)
○ Covers a large geographical area, usually across several sites
of an organisation.
○ Usually LANs are connected to make a WAN.
○ The WAN allows people on different sites to communicate and
share data.
○ E.g. A university that has various branches
● Personal Area Network (PAN)
○ A network communicating between devices via Bluetooth.
○ The devices can belong to one person or several.
○ The devices can communicate wirelessly up to a distance of
10m.

Computer network models:


● Client server network
○ A network that has at least one server
■ Sever - a powerful computer that provides services to the
network.
○ Individual computers are referred to as the client computers.
○ Client computers request the services and resources that are
then provided by the server.
○ The server will authenticate the user and give them access to
files they have permission for.
○ Sometimes there can be multiple servers that provide different
services. E.g. File server, Print server, Mail server

○ Advantages
■ Software installations can be done on all the computers
at once.
■ The user doesn’t need to do any management of the
network, as there is usually a network manager.
■ Data can be accessed from any computer in the network.
■ Backups are processed quicker.
○ Disadvantages
■ The network needs an expensive server.
■ Network manager is required, which increases the wage
bill.
■ There is too much dependance on the central server. If it
fails the whole network doesn’t work.

● Peer - Peer network


○ There aren’t any dedicated servers.
○ All computers have equal status and permissions.
○ All computers can communicate with each other without going
through a server.
○ These networks are used for the illegal distribution of
copyrighted materials like music and films.

○ Advantages
■ No need to buy an expensive server
■ No need for a network manager
■ Easy to set up and no tech knowledge is required.
■ No reliance on a central control, so less can go wrong.
○ Disadvantages
■ The user may have to use the same computer each time
to access the same data they did previously.
■ Less backup organisation as data can be stored on any
computer.
■ Software has to be installed on each computer
separately.
■ Viruses and malwares are easily transferred over this
type of network.

Network topologies:
● There are several different ways that the connections between
networked devices can be arranged.
● Network topology - the arrangement of these connections.
● There are 4 main types of network topologies.

● Bus network
○ Consists of a single cable to which each networked device is
connected.
○ Messages are sent along the cable in the form of electrical
signals.
○ At each end of the cable is a terminator.
■ Terminator - absorbs the signals that have reached the
end of the cable.
○ Advantages
■ Cheap to install, as only one cable is needed.
■ Easy to add extra network devices.
○ Disadvantages
■ Whole network will fail if the cable is cut or damaged.
■ Can be difficult to identify where the fault is on the cable.
■ The more devices that are added to the bus network, the
slower they run.
■ Security risk - all data sent is received by all devices on
the network.

● Ring
○ A network in which the cable connects one device to another in
a closed loop.
○ Messages sent on a ring network all travel in the same
direction.
○ Data is passed from one device to the next around the ring
until it reaches its destination.
○ Advantages
■ Adding extra devices doesn’t affect the performance of
the network.
■ Easy to add more devices
○ Disadvantages
■ Whole network will fail if the cable is damaged, or a
device of the network fails.
■ Can be difficult to identify where a fault is on the
network.
■ More expensive than Bus.

● Star
○In star topology, each device is connected to a central point.
○This point will either be a hub or a switch.
○All data passed through the central point.
○If one of the computers fails then the rest continue to work.
○But if the hub or switch stops working then all the computers
cannot communicate.
○ Advantages
■ Fast data transfer
■ If one cable fails, other workstations are not affected.
■ It is easy to add more computers.
○ Disadvantages
■ If the central hub fails, then the whole network will fail.
■ Expansive to install as more cables are needed.
● Mesh
○ There are two main types of mesh topology, fully connected
and partially connected.
○ In a Full mesh topology, every network device is connected to
every other network device.
○ In a Partial mesh topology, not all devices have a direct
connection to every device in the network.
This means that a computer may have to pass on data to
other computers without being able to send it directly.
○ There are also Wireless mesh networks. The Internet is an
example of a wireless mesh network.
○ Advantages
■ If a device or network fails, messages are routed around
it.
■ It is easy to expand and modify the network.
■ Data can be transmitted from different devices
simultaneously.
○ Disadvantages
■ Expensive and difficult to install.
■ Network maintenance and management is very difficult.
● Networks can be either wired or wireless. Depending on the
transmission and communication media used.
● Communication media - the method that is used to transfer data
from one computer another. E.g. wires, fibre optics, WiFi
Wired:
● Involves a physical connection between the computer and the
network.
● They can use two types of communication media:
● Copper wires
○ Carries electric signals
○ Are safe and trusted as they are commonly used
○ Relatively inexpensive
○ Very heavy, Low bandwidth
○ Cable length can only be 100m.
● Fibre optics
○ Carried light signals
○ Can be made of plastic or glass
○ Very fast data transmission
○ Allow data to travel over greater distances than copper wire.
○ Very expensive

● Advantages:
○ Faster than wireless connectivity
○ Difficult to intercept data
○ Less interference
● Disadvantages
○ Expensive to install
○ Requires many cables

Wireless:
● Does not require a physical connection between devices.
● Most wireless connections transmit and receive radio signals.
● Examples - Mobile phone network, Bluetooth, WiFi
● Wireless transmission is safer as there are no wires involved.
● Advantages
○ No cables required
○ Easier to add a new device
○ Allows devices to be used anywhere within the signal.
● Disadvantages
○ Data transmission speed is slower than in wired networks
○ Walls and other physical objects can affect network
performance
○ Requires encryption to prevent interception

Network Data speed:


● Data speed - the speed at which data can be transmitted through a
communication medium.
● Measured in bits per second (bps). (Kilobits, Megabits, Gigabits)
● Calculating the Time needed to Transit a file:
○ Time = Data size (bits) / Network speed (bits per sec)
● Bandwidth - the amount of data that can be carried from one point
to the other on a network in a given amount of time.
● Bandwidth is expressed as bits per second (bps)
● Latency - the delay encountered by data travelling through a
network.
● Latency and Bandwidth affect the speed of data transmission.

Protocols:
● Protocol - a set of rules that computers use to ensure that data can
be transferred from a computer, and be understood by another.
● Without protocols different computers and hardware wouldn’t be
able to communicate with each other.
● There are many different protocols needed for different purposes.

Types of Protocols:
● HTTP - Hypertext Transfer Protocol
○ It is used for accessing and receiving web pages
○ The protocol requests the web server to upload the requested
web page to the user's browser for viewing.
■ Web browser - Chrome, Safari, Internet explorer
○ All web browsers use the same protocol

● HTTPS - Hypertext Transfer Protocol Secure


○ HTTPS encrypts the information so it cannot be understood if
it is hacked.

● FTP - File Transfer Protocol


○ It is used to access, edit and move files between devices on a
network.

● Email protocols
○ Emails are sent and received using a set of standard
protocols, regardless of the users’ computer system.
○ SMTP - Simple Mail Transfer Protocol
■ Used to send and transfer emails between servers.
■ Used when sending an email through the Internet.
○ POP - Post Office
■ Used to retrieve emails from a server.
■ The server holds the email until you download it, at which
point it is deleted from the server.
■ If this protocol is used, the email can only be read on one
device.
○ IMAP - Internet Message Access Protocol
■ IMAP will only download the message header until the
message is opened.
■ It will leave the message on the server until you manually
delete it.
■ This allows the email to be accessed on multiple devices.

● TCP/IP
○ TCP/IP is a protocol stack (a collection of protocols that work
together.
○ It is named after two of the most important protocols used in
the stack.
○ Together, they dictate how data is sent between networks and
over the internet.
○ TCP - Transmission Control Protocol
■ Breaks up messages sent over the internet into small
chunks called Packets.
■ Reassembles the packets at the other end.
■ Detects errors
■ Resends lost messages.
○ IP - Internet Protocol
■ Responsible for Packet Switching

TCP/IP Protocol stack:


● Layer 1 - Application
○ The layer that interacts with the user to provide services and
data that comes through the internet.
○ Protocols include - HTTP, FTP, SMTP
● Layer 2 - Transport
○ This layer manages end-to-end communication over a network.
○ It uses the TCP protocol
○ In this layer, the data is divided into packets.
● Layer 3 - Network
○ This layer deals with sending the data across multiple
networks, from the source network to the destination network.
○ This is done by the IP protocol
● Layer 4 - Link
○ This layer controls the transfer of data to/from a local network.
○ This can be the physical hardware that connects the two
computers.

Advantages of layers:
● It divides network communication into manageable pieces.
● Each layer is specialised to perform a different task.
● One layer can be developed or changed without affecting the
others.
● It makes it easier to identify and correct errors.
● It provides a universal standard for hardware and software
manufacturers to follow.

Packet switching:
● Data sent using TCP/IP is broken down into packets.
● Each packet is usually 512 bytes.
● Each packet has a header and a trailer.
● The header stores all the details like
○ The sending computer
○ The recipient computer
○ Size of data
● Packets are then sent across the internet to the IP address of the
recipient network.
● Each packet will take a different route, depending on how much
network traffic there is. This is managed by the Routers.
● Once the recipient computer receives all of the packets, it will use
the information in the header to reconstruct the data.
● Once the data is assembled, it needs to be checked for errors.
Network security:
● Network security includes Confidentiality, Correctness, and
Availability
○ A computer system or network holds data about the company's
employees, finances etc. So it must be protected against
hacking.
○ This can be done by encrypting data, ensuring only authorised
personnel can access the data, stopping misuse.
○ Data is useless unless it is correct. We need to make sure that
data stored is not corrupted.
○ A network is useless if data cannot be accessed when it is
needed. Virus and Denial of service attacks can delete data or
slow it down, which reduces its accessibility.

Authentication and Validity:


● Authentication is the process of checking the identity of a user.
● This is often done by validating a username and password, or
entering a PIN, or fingerprint recognition.

Other ways to secure a network:


● Access control - decides which users have access to which data and
what they are allowed to do with it.
○ Not every user in the network would have access to every file in
the network. Therefore, access control is used.
● Firewall - a network security system that monitors and controls data
that is moving from one network to another.
○ A firewall inspects incoming and outgoing data and uses a set
of rules to decide whether to allow the data or not.
● Penetration testing - where IT systems of an organisation are
deliberately attacked to find any weaknesses.
○ These attacks are authorised by the organisation and are
therefore legal.
● Physical security
○ Ensures that critical parts of the network can only be
physically accessed by authorised people.
○ This might involve a burglar alarm, security tagging or
physically locking doors.

Cloud storage security:


● Relying on a third-party storage provider to keep an organisation
running can be catastrophic, as the data can be stolen, or
corrupted.
● Solutions
○ Data can be encrypted so it can’t be stolen or misused.
○ Most storage providers store the data in multiple locations, so
a natural disaster is less likely to affect the data.

Contemporary storage security:


● NAS (Network Attached Storage)
○ A recently launched storage system that is a hardware device
connected to a network.
○ It has a hard drive that can store data but also allows access
to the internet and accessing files.
○ NAS devices are designed for ease of use rather than being
secure.
● USB (Universal Serial Bus)
○ A widely used storage device that is easy to transport, cheap
and has high storage capacity.
○ However as it is very small it can easily get lost and the data
could get in the wrong hands.
○ Flash drives can also be accessed on any computer.
○ To overcome this, there are encrypted uSB flash drives that
require a PIN to be unlocked and give access to the files.

The Internet
● The internet is short for ‘interconnected network’ and can be seen as
a network of networks.
● The reach of the Internet is global as all countries have cables, fibre
optics and satellites that connect them to other countries and their
networks.

How does the Internet work?


● Step 1 - A user enters the domain name into the browser on the client
computer.
○ Domain name - a part of the URL that is used to identify one or
more IP addresses.
○ When the domain name is used, it will be converted to the
correct IP address by the DNS (Domain name server).
○ DNS - an Internet service that translates domain names into IP
addresses.
■ The DNS system is a network of servers and is very
important as the Internet is based on IP addresses.
■ If one DNS server doesn’t know how to translate a
particular domain name, it asks another one, and so on,
until the correct IP address is returned to the user.
● Step 2 - The client contains a DNS server to resolve the domain
name.
● Step 3 - The server returns the IP address to the client.
● Step 4 - The client then contacts the host using the IP address.

● A computer or network is likely to be connected to the Internet using


an ISP (Internet service provider).
● ISP - An organisation that provides its customers with a connection
to the Internet.

● The Internet uses TCP/IP protocol stack to allow communication


between all the different networks.
● The IP (Internet Protocol) part of the stack provides each device or
network connected to the Internet with a unique address to send
data to/from.
● The networks that are part of the Internet are linked together using
routers.
○ Router - piece of networking hardware used to forward
packets of data from one network to another.
Unit 5: Issues and Impact

Environmental
Ram material extraction:
● Manufacturing electronic devices uses a number of non-renewable
resources such as:
○ Plastics (used for casing and other parts) are made from crude
oil.
○ Metals (e.g. Gold, Silver, Copper, Palladium) are precious and in
short supply.
○ Some metals (e.g. Chromium, Arsenic) are hazardous and pose
a serious health risk.
○ Radioactive metals (e.g. Uranium, Thorium) can contaminate
air, soil and groundwater, and are toxic to human health.
● Mining of raw materials can also cause extensive damage to the
environment.

Energy consumption:
● All electronic devices consume energy in the form of electricity.
● Most electricity is generated from non-renewable resources like coal,
oil, and gas. These resources (aka fossil fuels) are burnt to release
energy which causes a lot of pollution.
● All computers generate heat and require cooling, so they need air
conditioned rooms which use even more energy.
● Devices also waste a lot of energy, as people often leave their
devices idle (turned on without reason). This means the device is
using energy without actually doing anything.
○ Carbon footprint - the amount of CO2 an individual or
organisation produces as a result of the energy they consume.

Manufacture:
● The manufacture of electronic devices uses a lot of energy which
causes pollution and global warming.
● Semiconductors are present in every form of technology.
Manufacturing semiconductors uses a large amount of water which
can cause water shortages. Untreated waste water can also cause
water pollution.
○ Semiconductors - a substance that can conduct electricity
under some conditions, but not others. Making it a good
medium for the control of electric current.
● Six of the most hazardous materials used in the manufacture of
computer technology:

● Exposure to these materials is harmful to human health.


● Chemical emissions and wastewater from factories put people living
nearby at risk.

Disposal:
● The disposal of computer technology poses a serious threat to the
environment as the quantity of e-waste produced increases rapidly.
○ E-waste - any form of discarded electronic equipment.
● Modern devices have a short life before they are discarded - either
because they break or because people want to upgrade.
● Device manufacturers and retailers are part of this problem. They
provide short warranties and use marketing to convince people to
upgrade. They also make pricing policies that make it cheaper to
replace than to repair.
● E-waste that is not recycled properly can be a serious health hazard
and environmental issue.
● Once e-waste ends up in the landfill, toxic chemicals can leak out
into the ground and contaminate water supplies, infiltrate the food
chain and increase pollution.

Ethical and Legal


Privacy:
● Many websites and social media sites require users to provide
personal info in order to set up an account. Social media sites also
encourage users to post even more personal info like photos, and
details about your life.
● Companies can sell your personal details, buying habits,
likes/dislikes, etc. to other organisations who might use it to send
targeted adverts and spam emails.
● Users have to trust companies to keep their data secure but that
doens;t always happen, as data can be leaked or stolen.
● Weak security could also result in personal info falling in the wrong
hands. Which makes people vulnerable to phishing attacks, scams
and identity theft.

Data protection act


● Gives right to data subjects (people whose personal data is stored
on computer systems).
● Eight principles of this Act:
○ Data must only be used in a fair and lawful way.
○ Data must only be used for the specified purpose.
○ Data should be adequate and not excessive for the specified
use.
○ Data must be accurate and kept up to date.
○ Data should not be kept for longer that it is necessary.
○ The rights of the data subject must be observed.
○ Data should be kept safe and secure.
○ Data should not be transferred abroad with adequate
protection

Freedom of Information act:


● .This act allows the public to access information held by a public
organisation about the organisation's activities.
● Public organisations include Government departments, House of
Parliament, Local councils, schools, etc.
● The act makes public organisations publish certain information on a
regular basis. It also allows members of the public to request specific
info.
● However, there are some exceptions to the Act.
Cybersecurity

Why do people attack?


● Espionage
○ A company may try to destroy a rival company’s website to get
more customers from their competitors.
● Score setting
○ Someone may wish to get revenge on someone and therefore
will want to attack them
● Thrill
○ Some people like a challenge and therefore will try and hack.
● Fraud
○ An attacker may simply want to steal money for various
different reasons.
● Public goods
○ Some attacks are to highlight weaknesses in security so the
company can make them better.

Malware:
● Malicious software
● Malware can delete or modify files
● Scareware - Falsely informs the user that their computer is broken to
get them to fit it by paying more to ‘fix it’.

Types of Malware:
● Ransomware - Encrypts all of your files until you pay a large sum of
money to unlock them.
● Spyware - monitors what the user is doing. Can be used to steal
passwords and other private information.
● Virus
○ A program written by an attacker that attaches itself to a file,
enabling it to spread from one computer to another.
○ A virus can not spread without human action (e.g. clicking an
infected popup, or downloading an infected file)
○ A virus can range in severity, some may cause only mildly
annoying effects while others can damage your hardware,
software or files.
● Worms
○ Have the ability to travel without human action
○ Example - a worm could send a copy of itself to everyone in
your email address book.
● Trojan
○ A program that looks and feels verifiable and legitimate, but
contains malware that can get control and damage a
computer system.

How does malware get onto your computer:


● Can be spread through USB storage devices which are infected with
a virus.
● Phishing
○ An email or message that tricks you into handing over
sensitive or personal information.

Cyber attacks:
● Any type of malicious attack on a network connected device.
● These attacks might be designed to:
○ Gain access to data in the system
○ Delete or modify information
○ Make the system unavailable for use
○ Physically damage a device connected to the network.

Types of Cyber attacks:


● Social engineering
○ Any kind of track that relies on exploiting human behaviour.
○ The attacker will “engineer” a situation where the target person
give away confidential information.
○ Common forms of social engineering are:

○ Phishing - attempting to get confidential info by sending the


user a message that appears to be from a trustworthy person
or organisation
■ Phishing attacks can be through email, fake websites,
phone calls or instant messaging.
■ Phishing takes advantage of people trusting the contents
of the email to be genuine.
○ Shoulder surfing - gaining access to info by watching someone
enter it into a computer.
■ Often shoulder surfing is used to get someone’s
username/password or PIN.
■ Shoulder surfing is often done in a cash machine where
the shoulder surfer stands near the cash machine and
watches the person enter their PIN.
○ Pharming - directing internet users to a fake website that looks
like a real one in order to obtain personal information.
■ To prevent pharming users should check the http
address of the site they are on.

● Technical weaknesses
○ Unpatched software - software that hasn’t had the hasn’t had
the latest security updates applied to it, making it vulnerable
to attacks.
○ USB devices - can be a security threat as it is very small it can
easily get lost and the data could get in the wrong hands.
○ Eavesdropping - intercepting data being sent to/from another
computer system.
■ Eavesdropping is simply reading data without actually
stealing or copying it.

Preventing attacks:
● Firewalls - a stand alone machine or software that is used to protect
a network or system from unauthorised attacks.
● Encryption - a method of scrambling data in such a way that only
someone with a secret key can read it.
● Anti-malware - software program created to protect computers from
malicious softwares.
● Anonymizers - a tool that attempts to make activity on the internet
untraceable.

Data Loss and Corruption


● Data can be lost by:
○ Misplacing portable media (e.g. USB)
○ Hard Drive failure
○ Power failure
○ Physical damage (e.g. fire)
○ Theft
○ Human error
● Preventing Data Loss and Corruption
○ Backup data and files
○ Use User ID and passwords to restrict data access
○ Verification - verify before deleting a file
○ Use UPS (Uninterrupted power supply), in case of power loss.
○ Install software to prevent malware attacks.
Topic 6: Programming
Developing code

Once an algorithm has been developed, it has to be coded into a


programming language that the computer can understand. This includes:
Python, Java, C#, etc.

● Program - an algorithm that has been converted into program code


so that it can be executed by a computer.

● When algorithms are converted into programs, the computer needs


to be told what type of data is stored in each variable.
● The data type of a variable determines the operations that can be
performed on it.

● Before a variable can be used it has to be given a value.


● Type coercion - the process of converting the value stored in a
variable from one data type to another.

Constructs:
● Selection - allows us to execute a section of code depending on
whether a condition is met or not.
○ Eg - ‘If statement’ is an easy way of checking if a condition is
true.
● Sequence - In a sequence algorithm, the computer follows a series of
steps that are executed in the same order every time it runs.
● Iteration - allows a group of statements to be repeated multiple
times
○ There are two types of loops: definite and indefinite.
○ Definite - A block of code will repeat a known number of times.
○ Indefinite - A block of code will repeat while a specified
condition is true.

Operators:
● Relational operators - used to compare two values

● Logical operators - perform logical operations and always result in


True or False values.

Program readability:
● It is important to make sure that the code we write is easy to read
and understand.
Strings:
● A sequence of characters. They can be letters, numbers, symbols,
punctuation marks or spaces.
● Each character in a string has an index number, with the first
character at position 0.
● We can use functions to determine the length of a string.
● String traversal - using a loop to cycle through each character in a
string.
● There are many functions we can perform on strings such as:

● Concatenation - joining two or more items of information together.


● Concatenating two strings produces a new string object. It is very
useful when displaying text on screen.

Data structures:
● An organised collection of related elements.
● Eg - Arrays, Records, etc

Arrays:
● An array is a data structure that stores a fixed number of values
under a single identifier.
● The values must be of the same type.
● Arrays are really useful when you have lots of related data that you
don't want to store in multiple variables.
● In Python, we use lists instead of arrays. Just like an array, a list is
created by adding items, separated by commas, inside square
brackets.

● Multidimensional arrays - a data structure which consists of an


array of arrays.

Records:
● A data structure that stores a set of related values of different data
types.
● Records are made up of fields which is an individual element in a
record.

Input/Output:
● All program data needs to be collected using input commands.
○ variable = input( )
● Data is displayed using output commands.
○ print(“”)
● Validation - to check that the data entered by a user or from a file
meets specified requirements
○ Range check - to ensure that the data entered is within a
specified range
○ Presence check - ensures that a value has been entered
○ Look-up check - to test that a value is one of a predefined set
of acceptable values
○ Length check - to check that the length of a value entered
falls
within a specified range
● We can attach files so the program can access input data form
there, without having the user type it all.

● Subprograms - A self-contained module of code that performs a


specific task

● Subroutine - a named block of code within the program.


○ Subroutines are easier to read
○ They are more efficient and reliable
● There are different types of subroutines:
○ Functions, variables, procedures, arguments and parametres

Functions:
● Any command that is specific to a coding language, used to carry
out a specific task.
● Eg - print in Python is a function to display something
● We can also create our own functions using the command def

Local & Global variables:


● Local variable - a variable that is accessed only from within the
subprogram in which it is created.
● Global variable - a variable that can be accessed from anywhere in
the program.

Parameters: special variables used to pass values into a subroutine


Argument: actual values that are passed in.

Types of errors in a program:


● Syntax errors
○ A mistake in the way the code is written
○ These can occur when the grammar rules of a programming
language are not followed.
○ Eg - writing ‘prnit’ instead of ‘print’, missing out a closing
bracket
● Logic errors
○ A mistake that causes the outcome of the program to not be
as intended.
○ Eg - using the wrong operator, mixing up AND/OR
● Runtime errors
○ An error that occurs while the program is running
○ Eg - receiving corrupted data, running out memory

Testing:
● Errors in software are often called bugs. Testing helps to identify
bugs. Debugging gets rid of bugs.
● Programmers make test plans at the start of a programming project
to make a list of all the requirements the program must meet.
● We should also test data to ensure it is valid and in the correct
format.

Integrated Development Environment (IDE):


● A package that helps programmers to develop program code.
● It has a number of useful tools, including a source code editor and a
debugger.
● Eg - IDLE (Python IDE)

You might also like