GCSE Computer Science notes
GCSE Computer Science notes
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.
● 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.
○ 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
● 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.
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:
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.
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.
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
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.
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.
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
■ 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.
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.
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
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.
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.
○ 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.
○ 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
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
● 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
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.
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.
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:
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.
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.
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.
● 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.
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
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:
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.
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.
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
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.