Perfect Computer Science Notes
Perfect Computer Science Notes
Resources
Topical Notes for Cambridge IGCSE
Computer Science
(0478)
Authored by
ashy and pizza
Data Representation 2
Data Transmission 17
Hardware 24
Software 35
128 64 32 16 8 4 2 1
A B C D E F
10 11 12 13 14 15
● The typical headings for a hexadecimal number with five digits are:
NN - NN - NN - DD - DD - DD
★ There are two types of MAC addresses:
★ Universally Administered MAC address:
● Most common type
● Set by the manufacturer at the factory
● Rare for a user to change this MAC address
139.103.20.92
● IPv6:
★ 128 bits
★ Broken down into 16 chunks
★ Hexadecimal
2202:f000:e:1f24:190e:323a:9377:d87b
★ The main advantages of IPv6 compared to IPv4 are:
● Removes the risk of IP address collisions
● Has built-in authentication checks
● Allows for more efficient packet routes
● Dynamic:
★ Change each time a device logs onto the internet
★ Assigned by the ISP by using Dynamic Host Configuration
Protocol (DHCP)
Less reliable addressing type Allow for faster upload and download
speeds
Method 2:
● Divide the number by 2, write the result of the division, including the remainder and
keep on dividing until the result is 0.
● Lastly, write down all the numbers in reverse.
0+0 0 0
0+1 0 1
1+0 0 1
1+1 1 0
0+0+0 0 0
0+0+1 0 1
0+1+0 0 1
1+0+0 1 0
0+1+1 0 1
1+0+1 1 0
1+1+1 1 1
Overflow
● The result of carrying out a calculation that produces a value that is too large for the
computer’s allocated word size
● Example of overflow (on an 8-bit addition)
● The formation of a 9-bit value indicates that the sum has exceeded this value
Character set consists of 7-bit codes Character set consists of 8-bit codes
Unicode
● It was set up in 1991
● It represents all languages
● Only Western languages are supported
● Its character set consists of 16-bit codes and approximately 65000 characters
Benefits Drawbacks
(of a larger sampling resolution) (of a larger sampling resolution)
Data compression
● It is necessary to compress data:
★ To save storage on devices (like HDD/SSD)
★ It will take less time to transfer the file from one device to another
★ It will take less time to stream a music or video file
★ Reduces the time taken to upload or download files
★ Not as much bandwidth is needed to transfer the file over the internet
★ Reduced file size also reduce costs
● MPEG-4:
- Used for playing videos
- Still retains an acceptable quality of sound and videos
● JPEG:
★ Lossless:
● A compression method that reduces the size of a file by temporarily
altering the data
● Common lossy file compression algorithms are
● Run-Length Encoding:
- An algorithm that groups repeating patterns and indexes
them.
- Used to compress text and image files
Reduces the size of a string of adjacent, identical data
Packet Switching:
● Each packet will follow its path
● Routers will determine the path of each packet
● Routing selection depends on the number of packets waiting to be processed at
each node
● The shortest possible path available is always chosen
● Packets can reach the destination in a different order to that they were sent
Less chance of error in the data Additional data may need to be sent to
indicate to the receiving device when the
data transmission has started and
stopped.
(Start and stop bit)
● Parallel:
★ a transmission method where data is sent multiple bits at a time down
multiple wires
Advantages Disadvantages
● Half-Duplex:
★ a transmission method where data is transmitted in both directions, but only
one direction at a time
● Full-Duplex:
★ a transmission method where data is transmitted in both directions
simultaneously
Check digit:
● A type of error detection method that is used for data entry.
● A calculation is performed on the data entered to create a value.
● Check digit values are compared to see if the data entered is correct.
● This is how a check digit operates:
★ A check digit is pre-calculated and stored with the data (e.g., barcode or ISBN).
★ When the data is entered or scanned, the check digit is recalculated.
★ If the recalculated check digit matches the stored one, the data is correct.
★ If the recalculated check digit does not match the stored one, the data is
incorrect.
Symmetric Encryption:
● A type of encryption that uses the
same key to encrypt and decrypt data.
● The process is:
★ Plain text is encrypted into
cipher text using an encryption key.
★ The cipher text and the
encryption key are sent separately to the
receiving device.
★ The same key is then used to decrypt the ciphertext back into its plain text
form.
Asymmetric Encryption:
● A type of encryption that uses two different keys (public and private keys) to encrypt
and decrypt data.
● The process is:
★ Plain text is encrypted into cipher text using a public key. (This is also a type of
encryption algorithm.)
★ The cipher text is transmitted to the receiving device.
★ The cipher text cannot be decrypted using the public key, it is decrypted using
a private key.
CPUs are used for processing and executing instructions and data that are input into the
computer so that the result can be output.
A microprocessor is a type of integrated circuit on a single chip that usually performs less
functions as compared to a regular CPU.
Components of a CPU
● Units:
○ Examples of units:
■ Arithmetic Logic Unit (ALU): The ALU deals with all arithmetic operations
such as addition, subtraction, etc. It also handles logical operations that
need to be performed such as “AND”, “OR”, “NOT”, etc.
■ Control Unit (CU): The CU has the job of managing and synchronising
data and instructions transfer in the CPU. It does this by sending control
signals to other components. Additionally, it also decodes instructions
sent to it.
● Registers:
○ Registers are high-speed memory components in the CPU that temporarily
store important information.
○ Examples of registers:
■ Program Counter (PC): Stores the memory address of the next
instruction that will be processed
■ Memory Address Register (MAR): Stores the memory address of the
instruction/data that is about to be fetched from the RAM
■ Memory Data Register (MDR): Stores data or instructions that have just
been fetched from the RAM
■ Current Instruction Register (CIR): Stores the instruction that is currently
being processed or decoded by the CPU
■ Accumulator (ACC): Stores any interim values or final values created
during arithmetic or logical operations done by the ALU
● Buses:
Fetch:
● This stage is for fetching the actual data or instructions from the computer’s memory
to the CPU.
● Steps:
1. The Program Counter stores the address of the next instruction to be
processed. This is copied to the Memory Address Register via the address bus.
2. The Memory Address Register copies this address to the RAM via the address
bus.
3. The RAM uses the address sent to it to locate the data or instruction that must
be processed.
4. The RAM copies the data/instruction to the Memory Data Register via the data
bus.
Decode:
● This stage is used to decode the data/instruction, which is carried out by the Control
Unit using an instruction set
● An instruction set is a set of instructions written in low-level machine code that tells
the computer how to carry out specific functions. They are the only instructions
understood by the CPU.
Execute:
● This stage is used to carry out any final arithmetic or logical operations and then
finish executing the instruction.
● The Arithmetic and Logical Unit is responsible for carrying out any such operations. It
used the Accumulator to store any interim values created during execution.
● After all calculations are finished, the command is executed.
The entire process repeats for each piece of data or instruction that needs to be carried
out by the CPU.
Cache:
Cache is internal, temporary storage space inside the CPU itself. It stores data and
instructions which are used regularly by the CPU.
The CPU does not need to fetch regularly used data or instructions from the RAM, instead, it
simply uses the cache. This takes less time and increases the CPU’s performance.
The more cache a computer has, the more data/instructions it can store nearby, which
means less time is spent retrieving information. So, a larger cache size can mean better CPU
performance.
However, an extremely large cache would take more time to look through while fetching
information, causing significant delays which would render the cache useless. So, there
must be a limit for the cache size.
Clock:
© r/IGCSE Resources 2024 26
The System Clock is located inside the CPU. Its job is to control the processing speed and
time taken to execute instructions, as well as control the time intervals between each task
and synchronise the entire FDE cycle. In short, it controls the number of FDE cycles
completed each second.
Clock speed is measured in Hertz (instructions / second). The average clock speed found in
most computers is 2 Gigahertz, which is 2 billion instructions executed per second.
Higher clock speed means that more instructions are processed each second, increasing
the computer’s performance.
However, increasing the clock speed too much can cause the computer to overheat.
Cores:
Cores are the components in the computer that run the FDE cycle. Each core can run one
cycle, i.e process one instruction, at a time.
A higher number of cores in a computer means that more instructions can be processed at
once. This allows a computer to multitask, which increases the computer’s performance.
Embedded Systems
An embedded system is a combination of software and hardware that is built into a device,
which runs on firmware and performs a dedicated function.
They differ from general purpose computers as they only perform a specific task, instead of
being multipurpose.
Advantages Disadvantages
Input Devices
Output Devices
Sensors
Primary Storage:
● Primary storage contains data that is directly accessible by the CPU.
● Random access memory (RAM) and read-only memory (ROM) are examples of
primary storage.
Secondary Storage:
● Secondary storage contains data that is not directly accessible by the CPU and is
not currently required by the CPU.
● It is non-volatile, which means that the data contained in it is not lost if power is
switched off – i.e, it stores data permanently until deleted by the user.
● It stores data that can be transferred to other computers if required.
● Pen drives and CDs are examples of secondary storage devices.
RAM:
● It stores data temporarily, making it a volatile method of data storage. It stores the
data and instructions that are currently being used by the CPU. For example, program
files for an application that is currently open on the user’s computer.
ROM:
● It stores data permanently, making it a non-volatile method of data storage. It stores
the programs that are required for the computer to boot initially. For example, BIOS
(Basic input/output system)
RAM ROM
Secondary storage needs to be fetched into the primary memory first, to be accessed by
the CPU. It can be of two types: internal, such as solid-state drives or hard-disk drives, or
external, such as CDs or DVDs.
Magnetic Storage:
● Magnetic storage uses magnetised and demagnetised dots to store data.
● A circle disk, known as a platter, spins very fast, with a read-write head over it. The
read/write head magnetises and demagnetises dots on the platter as required.
● The platter is divided into tracks and sectors.
● The current state of a dot (i.e. whether magnetised or not) decides its stored value.
For example, all magnetised dots store the value “1”, and all demagnetised dots store
the value “0”.
● An example of magnetic storage is the hard disk drive.
Optical Storage:
● Optical storage uses circular discs and lasers to store data.
● The disc is rotated or spun with a read/write head over it, which uses a laser beam.
● The laser beam makes indentations on the surface of the disc by burning data onto
it. An indentation is known as a pit while the space between indentations are known
as lands
● The pits and lands represent binary values, for example, a pit represents a “1” while a
land represents a “0”.
● The data is written in a spiral or circular pattern around the disc.
● Examples of optical storage are CDs, DVDs, and Blu-Rays.
Solid-State Storage
● Solid-state storage is also known as flash storage. It uses transistors and cells to
store data, onto which the data is ‘flashed’. These transistors and cells are arranged
on a semiconductor chip.
● Transistors are laid out to form a grid. They are used to form a control gate, which is
above a floating gate, at each intersection in the grid.
● The transistors control the flow of electrons in the semiconductor chip. They flow
through the control gate to the floating gate, where they are stored.
Virtual Memory
Virtual memory is a sectioned-off segment of the hard disk drive, which acts as an
extension to the primary memory (RAM). It is required for when the RAM is full but more
data transfer needs to take place.
Virtual memory is important as the RAM is at risk of overloading from excess data and
crashing. The virtual memory helps ensure that this does not happen.
Cloud storage is data stored by a third-party remote server instead of in local storage. It is
accessible via the internet.
The Network Interface Card (NIC) is a hardware component that is required by the
computer to access any networks by connecting to routers. It also contains the MAC
address.
A Media Access Control (MAC) address uniquely identifies each computer on a network,
which is provided by the manufacturer when the computer is created. It is located on the
NIC.
Structure:
● It is written in hexadecimal
● NN – NN – NN – DD – DD – DD; the first six digits comprise the manufacturer’s code,
while the last six digits comprise the device’s serial number.
● It is 48 bits in total; 24 bits for the manufacturer’s code, and 24 bits for the device’s
serial number.
● It is usually separated by a dash.
An Internet Protocol (IP) address is assigned by the internet service provider and it uniquely
identifies each computer on a network.
Structure:
There are two types of IP addresses – IPv4 and IPv6. They both have the characteristics of a
typical IP address, however, their structures differ.
IPv4 IPv6
System Software:
● It provides the services that the computer requires, including operating system and
utility software (such as anti-virus)
● For example: manages hardware and software, provides a user interface, etc
Application Software:
● It provides the services that the user requires, and runs on the OS.
● For example: word processors, databases, spreadsheet applications, and web
browsers.
All application software runs on the operating system. The operating system runs on the
firmware, also known as the bootloader. The bootloader runs on the hardware.
The operating system plays many diverse roles in a computer system. It does the following
tasks:
● Managing files:
○ Allows the creation and deletion of folders and directories to store files
○ Allows users to create, copy, open, close, move, delete, rename, save and sort
files.
● Handles interrupts:
○ Decides the appropriate time to run interrupts in order of requirement
● Provides a user interface:
○ Allows data to be entered by and displayed to the user
Interrupts
Interrupt: A signal that is sent to the CPU asking for its attention. These signals allow the
CPU to multitask.
Interrupts can be of different priority levels. For example, an interrupt sent due to hardware
failure would be of greater importance than an interrupt sent when the user requires input.
The interrupts are organised into a priority queue based on their level of importance. A
CPU’s interrupt handler organises the interrupts.
To handle interrupts, the CPU calls an interrupt service routine. An interrupt service
routine’s job is to retrieve the interrupt and perform the actions required for it to be solved.
Programming Languages
There are two types of programming languages: high-level language and low-level language.
High-Level languages use English-style words, which are easier to understand for humans.
They need to be converted into low-level language to be understood by computers. Python,
Java, and C# are examples of high-level languages.
Low-level languages have two types: assembly language and machine code.
Translators
Translators are required to convert high-level language or assembly language into machine
code, which is the only language which can be understood by the computer. There are
three types of translators: an assembler, an interpreter, and a compiler.
Assemblers translate assembly language into machine code. It translates the entire code at
once and produces a file. If it finds any errors, it will create an error report and display it
once the entire code is read, without producing a file.
Interpreters and compilers translate high level languages into machine code. Their methods of
reading the code and finding errors are different.
An interpreter reads the code line-by-line. If it finds an error, it will stop immediately and display
it to the user. It will not continue to read the code until the error has been corrected. Otherwise,
it runs the code. They are better to use while in the process of writing code, as it lets you correct
errors as they are made.
© r/IGCSE Resources 2024 38
A compiler reads the entire code at once. If it finds any errors, it will compile an error report
of all the errors and display it to the user. Otherwise, it will run the code and create an
executable file. They are better for when the code is complete, as it creates an executable
file that can be run easily anywhere.
interpreter Compiler
● Translates and executes the code ● Translates the whole code at once
line-by-line before executing it, producing an
● Stops execution when an error is executable file
found ● Provides an error report for the whole
● Are better to use while in the code if errors are detected
process of writing code, as it lets you ● Better for when the code is
correct errors as they are made complete, as it creates an executable
● Needs to be re-translated each time file.
it needs to be fun ● Doesn’t need to be re-translated
● The source code is always required each time it needs to be fun, as an
for it to be run exe file is produced
● The interpreter software is always ● The source code is no longer
needed for code to run required after the executable file is
produced
● The compiler software is no longer
needed after the exe file is produced
An Integrated Development Environment is an interface where users can write, edit and run
programs easily. An IDE always contains:
● An editor: where code can be written and edited.
● A runtime environment: where the code’s outputs are shown, and user input is
allowed.
The internet is a network of computers joined together through infrastructure such as wires
and cables. It is a type of network that spans the entire world, connecting computers and
enabling them to use the world wide web.
The world wide web is the collection of websites and web pages accessed using the
internet’s infrastructure. It is primarily software-based, as opposed to hardware
infrastructure.
Websites and webpages on the world wide web must be accessible easily. Uniform
resource locators exist for this purpose. A URL is a text-based address to uniquely identify
a web page. It contains three sections: the protocol, the domain name and the web
page/file name.
Web Browsers
A web browser is used mainly for the purpose of rendering hypertext markup language
(HTML) and displaying web pages to the user. It typically has other functions as well, such
as:
Web pages are stored in web servers. For a web browser to access their HTML, retrieve it
from the server and render it, it first requires the web server’s IP address. This address is
stored in a domain name server, to which a request must be sent first.
1. The user types the URL of the website into their web browser’s address bar.
2. The web browser sends the URL to a domain name server. The DNS stores IP
addresses of each web server.
3. The DNS searches in its database for the IP address corresponding to the URL sent
by the user. If the IP address is not found in one DNS, it is sent to another DNS until it
is found. If the URL’s corresponding IP address is not found at all, an error message is
displayed to the user.
4. When the DNS finds the corresponding IP address, it sends it back to the web
browser.
After this, the HyperText Transfer Protocol - HTTP- is executed by the browser to retrieve
web pages from their web server and then render them. The protocol consists of the
following steps:
1. The web browser sends a request to the web server asking for the web pages by
using its IP address to locate it.
2. The web server sends back all HTML, CSS and active script (such as JavaScript).
3. The browser renders the code it receives.
During the transmission of data to and from the web server, there is a risk of it being hacked
and stolen. Personal information such as passwords may be intercepted and used for
malicious purposes. The standard HTTP protocol does not protect data being transmitted.
So, HyperText Transfer Protocol Secure – HTTPS – is used instead, as it uses digital
certificates to ensure security.
Typically, a website ensures encryption using the Secure Socket Layer(SSL) protocol.
The HTTPS protocol secures its data using the following steps:
1. Before the web browser asks for the web pages, it sends a request to the web server
asking for its digital certificate.
2. If the web server has one, it sends it to the web browser.
3. The browser confirms if the certificate is authentic. If it is, web page transmission
takes place in an encrypted manner. Otherwise, a message displaying that the
website is unsafe is displayed to the user.
Users can check if a website is secure by:
● Ensuring the URL contains “HTTPS” and not “HTTP”
● Checking if there is a padlock symbol near the URL
Cookies
When a user visits a website, they may enter specific information that needs to be entered
again at later dates. For example, passwords and usernames. However, it is an
inconvenience to the user if this information must be entered again each time. The web
server uses cookies to store such information.
A cookie is a small text file that stores information about the user. There are two types of
cookies: session and permanent.
Session cookies are temporarily stored in the primary memory. They are only used as long
as the browser is still open. As soon as the browser window is closed, the cookie is deleted.
Cookies can have certain privacy issues, as they store sensitive information. They are:
● Cookies may store data without the user’s knowledge or permission
● Hackers can intercept the data and build a false user profile, leading to identity theft
● Sensitive information in the cookie files may be intercepted during transmission by a
3rd party
● Other websites may gain unauthorised access to certain cookies
● The computer may be hacked and the cookie file’s information may be visible to a
3rd party.
Digital Currencies
Digital currency is a form of payment that is completely electronic and does not require any
tangible currency, such as coins or notes.
Most digital currencies and tangible currencies both use a centralised system.
A centralised system uses a central authority that oversees all transactions made by users,
such as a bank. It can be susceptible to security breaches, and there are confidentiality
risks in using such a system. This is often why crypto currencies are used.
Crypto currencies are a subtype of digital currencies which use a decentralised system
known as the blockchain. There is no central authority involved, thus making it safer and
more confidential.
Blockchains:
A blockchain is a digital ledger or database of all transactions made on its network, which is
publicly available for all devices on the network.
Each transaction made on a blockchain is stored in a block, which contains:
● A unique identifier for the transaction
● The sender, receiver, and amount of money sent during the transaction
© r/IGCSE Resources 2024 43
● The previous block’s unique identifier.
All blocks in a blockchain are interconnected via their unique identifiers. Each block
contains the previous block’s identifier. Once added, a block is completely unchangeable by
anyone on the network, and can only be viewed.
Cyber Attacks
There are multiple ways malicious third parties can hack into our data and use it for their
own purposes. The most common ones are listed below.
Brute-force attacks:
Data Interception
● Data interception is done by using a packet sniffer software which the perpetrator
has previously installed on transmission hardware. For example, it can be installed on
a router.
● Hacking is the act of gaining unauthorised access to other’s data. This can be done
through vulnerabilities in networks, such as open ports or software bugs.
● Preventions:
○ Two factor authentication, biometrics, and strong passwords.
○ Regularly updating software to ensure it has no vulnerabilities
○ Using anti-malware softwares and regularly checking for malware
○ Using a firewall.
Malware
Pharming:
Social Engineering:
Firewalls:
Proxy Servers:
● Typically used for protection of larger serves, to divert attacks on them.
● It checks, logs and has the ability to block incoming and outgoing signals.
● It can whitelist or blacklist certain IP addresses and signals
● It processes client-side requests primarily.
● It allows faster access to websites using cache.
● It can hide a server’s internal network.
Access Levels:
● Typically used in companies
● It provides each user/employee with different permissions to data
● It limits access to data that can be viewed, and limits access to data that can be
changed or deleted.
● It is usually linked to usernames or user IDs.
Anti-Malware:
● It is a software that scans the computer it is installed on for malware
● It keeps a record of known malware
● It removes/quarantines any suspicious software or malware
● It checks data before it is downloaded, and stops the download or warns the user if it
detects malware.
Passwords:
● Strong passwords, which are changed often, are good defences against data
breaches.
Biometrics:
● The required data for biometrics, such as fingerprints, is unique for everyone. So, it is
very difficult to replicate.
Two-step Verification:
● In two step verification, extra data is sent to the user’s device, which has been
pre-set by the user. It is difficult to obtain.
© r/IGCSE Resources 2024 49
● The data must be entered into one system, which is difficult to do from remote
locations.
Agriculture:
Advantages Disadvantages
Transport:
Advantages Disadvantages
Weather (stations):
Advantages Disadvantages
Lighting:
Advantages Disadvantages
Science:
Advantages Disadvantages
Fewer highly trained staff needed for Less flexible than using human
each experiment technicians
Robotics:
● A branch of computer science that looks at the creation and use of robots.
● Robots have a range of features:
★ A mechanical structure or framework. This is the body of the robot.
★ Electrical components such as:
- Sensors to record its environment, for example, the position of the
component it is building.
Robots in medicine
Advantages Disadvantages
Saves time for doctors and nurses. Network failures can interrupt remote
procedures, necessitating backup
systems
Robots in agriculture
Advantages Disadvantages
Increases efficiency with 24/7 operation Potential job replacement for human
workers
Robots in transport
Advantages Disadvantages
Robots in industry
Advantages Disadvantages
Reduce human error and enhance Potential job replacement for human
accuracy workers
Efficiency as automation speeds up Requires new skill sets for fewer workers
production processes to manage and maintain robots.
Robots in entertainment
● There are different types of robots used for entertainment purposes:
★ Interactive toys
★ Teaching kids on building robots and program them to perform specific tasks
★ Help people learn about robotics and coding
Artificial Intelligence:
● A branch of computer science that looks at creating machines that can stimulate
human behaviour
● There is a broad range of AI:
★ Image Recognition: Identifies objects or people in images.
★ Speech Recognition: Recognizes and stores spoken words.
★ Natural Language Processing: Understands and responds to unstructured
commands.
★ Computer Games: Moves elements or characters based on the environment.
★ Diagnosis Systems: Assists in medical diagnosis.
© r/IGCSE Resources 2024 54
Features of AI:
● Data collection: Programs gather data from users or sensors.
● A set of programmed rules: Rules are used for decision-making (e.g., turning when an
object is detected).
● The ability to reason: Logic-based reasoning develops facts from rules (e.g., deducing
that Fred eats meat because he is a dog).
● The ability to learn and adapt: Machine learning allows systems to improve by training
on data (e.g., distinguishing between images of dogs and horses).
igcse.reddit.com
discord.gg/igcse
The information on this guide has been generously prepared by current students/alumni;
the authors have been acknowledged where possible. Links to external sites embedded in
this document are not affiliated with or operated by r/IGCSE.
This guide is meant to be for educational purposes only and is to remain free of cost for
the benefit of all students.
For any suggested changes or corrections to this document, please contact the r/IGCSE
staff team via email or on the r/IGCSE Discord server.