CAIE-A2 Level-Computer Science - Theory
CAIE-A2 Level-Computer Science - Theory
ORG
CAIE A2 LEVEL
COMPUTER SCIENCE
SUMMARIZED NOTES ON THE THEORY SYLLABUS
Prepared for Temurmalik for personal use only.
CAIE A2 LEVEL COMPUTER SCIENCE
// Implementing inheritance
CLASS FlyingBird IMPLEMENTS Bird
// Class info...
ENDCLASS
// Creating an object
<name> ← NEW <class_name>(<parameter1>, <paramete
MyPet ← NEW Bird("Kiwi")
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Temurmalik at Presidential School In Andijan on 18/03/25.
CAIE A2 LEVEL COMPUTER SCIENCE
A data type that references only one data type. Examples
include: Serial: In serial files, records are stored one after
another in chronological order. Records are appended to
Integers the next available spot. Benefits:
Booleans No need to sort list.
Strings Data can be appended easily.
Enumerated Data Type: A user defined non-composite Sequential: In sequential files, records are stored one
data type that contains an ordered list of all possible after another in the order of the key field. Records are
values. inserted into the correct position. A new version of the
file has to be created to update it. Benefits:
TYPE <name> : (<value1>, <value2>, ...) Allows for batch processing.
TYPE Days: (Sunday, Monday, Tuesday, Wednesday, T Allows the data to be stored and sorted in a specific
TYPE Numbers: (1..10) // Inclusive order.
DECLARE Today: Days // Declaration Random: In random files, records are stored in no
Days ← Sunday particular order. Changes to file are done directly.
Days ← Days + 1 // Value is now Monday In random file organization a unique key field is
Pointer Data Type: A user defined non-composite data passed through a hash algorithm which produces the
home location for the data, if that location is empty
type that is used to reference a memory location and
indicates data type of value stored. the data is stored else it relies on an overflow
method.
TYPE <Name> = ^<Type> A collision can occur when two different records
produce the same hash, this means that the location
// Declaring a pointer type is already being used to store a different record.
TYPE PIntPointer: ^INTEGER When saving a file, it searches the file linearly for an
// Declaring a pointer variable empty spot and saves the file there or search the
DECLARE MyPointer: PIntPointer overflow area linearly for the next empty spot and
save the record there. When finding a record, search
MyPointer^ ← 3 // Sets the value at the address t the overflow area linearly of the matching record or
MyPointer ← 3 // Pointer points to value at the a start from current location and search linearly and
MyPointer ← @<variable_name> // Makes pointer poi until matching record is found.
Benefits:
1.2. File organization and access Fast as real time processing is used
File access
File organization
Serial: In serial access records are read in the order that
they are stored in. It is read record by record until the
record is found or the key field value is exceeded. This is
used for serial and sequential file organization.
Direct/Random Access: In random access you can
directly access the data needed.
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Temurmalik at Presidential School In Andijan on 18/03/25.
CAIE A2 LEVEL COMPUTER SCIENCE
+3.5 became -3.5
When there is no advanced processing and all files need
to be read, serial is generally used Normalization
When there is batch processing, sequential is generally
used For a positive binary digit, the first two bits need to be
When we need one specific file, random is used different. (Removing extra zeros before in between the
decimal and the first 1 digit).
1.3. Floating-point numbers, 0 ⋅ 0110000 0011 →
0 ⋅ 1100000 0010
representation and manipulation Benefits:
Floating point representation Avoids two of the same number being represented
differently.
Mantissa: Represents the numbers. If we increase the Maximizes the potential precision.
bits allocated to the mantissa, we increase accuracy. Allows us to store the maximum range of numbers in the
Exponent: Represents the number of times the decimal minimum number of bits.
place needs to move. If we increase the bits allocated to
exponent, we increase the range. Important values
Converting from Binary Digit to Positive Float Largest positive number 0111 1111 0111
Smallest positive number 0000 0001 1000
Smallest normalized positive number 0100 0000 1000
Mantissa = 01101000 Largest magnitude negative number 1000 0000 0111
Exponent = 0011
Errors
1. Write the binary number with the decimal point
Rounding Error: When numbers can’t be represented be
0 ⋅ 1101 represented exactly in binary, an approximate value is
2. Multiply with 2 to the power of the exponent (Move used which is either more or less than the needed value.
the decimal point the same number of places as the When these numbers are then used in operations, the
exponent) inaccuracies get added to the point where they are
visible in the final answer. Like 0.1 + 0.2 =
0 ⋅ 1101 x 23 0.3000000000004
0110 ⋅ 1 Underflow: Underflow occurs when a number is too
close to zero to be accurately represented in binary,
3. Convert to decimal by multiplying leading to a loss of precision.
Overflow: Overflow happens when a number's
(4 × 1) + (2 × 1) + ( 12 × 1)
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Temurmalik at Presidential School In Andijan on 18/03/25.
CAIE A2 LEVEL COMPUTER SCIENCE
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Temurmalik at Presidential School In Andijan on 18/03/25.
CAIE A2 LEVEL COMPUTER SCIENCE
If a user wishes to join this network, they need to use a
BitTorrent client to load the torrent descriptor file. When a Comparison
user wishes to download a file, pieces of this file are
Circuit Switching Packet Switching
downloaded and uploaded at the same time. When a user Nature Dedicated channel Data segmented into packets
has even a single piece of a file they become a seed. To be Setup Requires pre-established channel No prior setup needed
Data handling Message remains intact Message gets split into packets
able to download this file, a complete copy needs to exist on Transmission Single Path Path recalculated each time
one of the peer computers. Order In order May need reassembly
Layer (Data) Link Layer Network Layer
Bandwidth Makes full use of bandwidth Bandwidth can be shared
2.2. Circuit Switching, Packet Switching Error handling
Complexity
Communication ends incase of an error
Simple
Allows packets to be resent
More complex
Circuit Switching
3. Hardware and Virtual
Dedicated circuit is selected before the communication
starts and is used to send all the data through this route. Machines
- Uses the whole bandwidth.
Releases circuit once the communication ends.
Used for live video broadcasts or calling 3.1. RISC & CISC Processors
Data arrives in order so it doesn’t need to be
reassembled. RISC: Reduced Instruction Set Computers.
Whole bandwidth is available. CISC: Complex Instruction Set Computers.
Data can’t get lost. RISC CISC
Less secure as it only uses one route. Fewer instructions More instructions
Simpler instructions Complicated instructions
No alternative route in case of failure. A small number of instruction formats Many instruction formats
Bandwidth can’t be shared. Single-cycle instructions whenever possible Multi-cycle instructions
Fixed-length instructions Variable-length instructions
Only load and store instructions to address
May types of instructions to address memory
Packet Switching memory
Fewer addressing modes More addressing modes
Multiple register sets Fewer registers
Data is split into multiple packets and each packet a Hard-wired control unit Microprogrammed control unit
Pipelining easier Pipelining much difficult
route is calculated for each packet.
Each packet contain a header, which has a source IP Pipelining: Instruction level parallelism
address and destination IP address, and a payload. Used extensively in RISC processor-based systems to
Calculates the most efficient path for each packet. reduce the time taken to run processes
Used when sending large files that don’t need to be live Multiple registers are employed
streamed or when it is necessary to be able to overcome Interrupt handling in CISC and RISC Processors:
faulty lines by rerouting like emails, text messages, As soon as the interrupt is detected, the current
sending documents, etc. processes are paused and moved into registers
Harder to intercept as new route is used each time. The ISR (Interrupt Service Routine) is loaded onto the
Packets need to be reassembled. pipeline and is executed.
If there’s a missing packet, a request is sent to retransmit When the interrupt has been serviced, the paused
the data. processes are resumed by bringing them back from the
Role of Router: registers to the pipeline
RISC processors allow for providing efficient pipelining.
Examines the header and finds the destination IP Pipelining is instruction-level parallelism. Its underlying
address. principle is that the fetch-decode execute cycle can be
Decides the best route for the packet, with the help of separated into several stages.
the information from the routing table, and sends it
towards the next hop. One of the possibilities include:
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Temurmalik at Presidential School In Andijan on 18/03/25.
CAIE A2 LEVEL COMPUTER SCIENCE
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Temurmalik at Presidential School In Andijan on 18/03/25.
CAIE A2 LEVEL COMPUTER SCIENCE
A B X
0 0 0
0 1 0
1 0 0
1 1 1
OR Gate: A + B = X
A B Output
0 0 1
0 1 1
1 0 1
1 1 0
NOR Gate: A + B = X
A B Output
0 0 0
0 1 1
1 0 1
1 1 1
NOT Gate: A = X
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Temurmalik at Presidential School In Andijan on 18/03/25.
CAIE A2 LEVEL COMPUTER SCIENCE
A half adder adds two binary digits and outputs the sum
(s) and their carry (c).
A XOR gate acts like a half adder.
Input Output
A B S C
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
Full-Adder
A full adder adds three binary digits and outputs the sum
and their carry.
A B Output
0 0 1
0 1 0
1 0 0
1 1 0
R is "Carry In"
J is "Carry Out"
K is "Sum"
A B Output
0 0 0
0 1 1
1 0 1
1 1 0
Half-Adder
3.5. Flip-Flops
Flip flops can store a single bit of data as 0 or 1
Computers use bits to store data.
Flip-flops can be used to store bits of data.
Memory can be created from flip-flops.
SR Flip Flops
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Temurmalik at Presidential School In Andijan on 18/03/25.
CAIE A2 LEVEL COMPUTER SCIENCE
Can be made with NAND gates or NOR gates JK flip flops are only active when the clock is high.
Error state exists JK flip flops use a clock pulse for synchronization to
ensure proper functioning.
Advantages of JK flip flops include the validity of all input
combinations, avoidance of unstable states, and
increased stability compared to SR flip flops.
S R Q Q Bar
0 0 1 1
0 1 1 0
1 0 0 1
1 1 No Change No Change
S R Q Q Bar
0 0 No Change No Change
0 1 0 1
1 0 1 0
1 1 0 0
JK Flip Flops
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Temurmalik at Presidential School In Andijan on 18/03/25.
CAIE A2 LEVEL COMPUTER SCIENCE
{example}
1. Sum of Products
A⋅B⋅C +A⋅B⋅C +A⋅B⋅C
2. Fill in the map
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Temurmalik at Presidential School In Andijan on 18/03/25.
CAIE A2 LEVEL COMPUTER SCIENCE
3. Circle the largest group containing an even number Hides complexities of the hardware from the user
of 1s. gives users access to the hardware/software systems
depending on their needs without involving them with
the backend
Examples include GUIs and CLIs
Multi-Tasking
Managing the execution of multiple programs that appear to
be running simultaneously.
Process
4. Take the common values from both
In the first group, A ⋅ B is common A process is the code being executed.
In the second group, A ⋅ C is common
Program
5. Write the simplified expression.
A⋅C +A⋅B A program is the code that has been written.
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Temurmalik at Presidential School In Andijan on 18/03/25.
CAIE A2 LEVEL COMPUTER SCIENCE
Lexical Analysis
Characters are converted from strings into tokens.
Comments are removed.
Symbol table stores identifiers and keywords.
Keyword table stores the reserved words used and the
matching operators.
Syntax Analysis
A parse tree is generated for reverse polish notation and
syntax errors are reported.
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Temurmalik at Presidential School In Andijan on 18/03/25.
CAIE A2 LEVEL COMPUTER SCIENCE
5. Security
5.1. Encryption
The process of converting of data into an unreadable
format.
Plain Text
Data before applying encryption.
Public Key
4.6. Reverse Polish Notation (RPN)
A public key is shared. It is used to encrypt data so that it can
Reverse Polish notation (RPN): An unambiguous method be decrypted with its matching private key.
for representing an expression left to right with needing
rules of precedence or brackets. Private Key
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Temurmalik at Presidential School In Andijan on 18/03/25.
CAIE A2 LEVEL COMPUTER SCIENCE
Asymmetric Encryption Allow for more security when communicating over the
internet as it allows two parties identify and verify each
Two keys are used: public key and private key. The message other and communicate confidentially with integrity
is encrypted with the public key and decrypted using the Provides encryption.
matching private key.
Working
Symmetric VS Asymmetric
An SSL/TLS connection is initiated between two
Symmetric Asymmetric applications.
Number of Keys 1 key for both 2 keys
Is Key Shared Yes Only public key
The one initiating it is the client. The one receiving it is
Security Less secure as key needs to be shared More secure the server.
Complexity Simple Complex
Speed Fast Slow
Session begins with a handshake.
Key Length Short Longer Server sends its digital certificate and public key
Client confirms the server’s identity.
Security concerns relating to a transmission: Encryption algorithm is agreed upon and the symmetric
session keys are generated.
Confidentiality: Only the intended recipient should be
able to decrypt the message.
Use Cases
Authenticity: Receiver must know who sent the
ciphertext. Transmitting passwords or session cookies.
Integrity: Message must not be modified during Online shopping and banking websites.
transmission.
Non-repudiation: Neither the sender nor the receiver
should be able to deny involvement in the transmission. 5.3. Digital Certification
Quantum Cryptography Digital Certificate
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Temurmalik at Presidential School In Andijan on 18/03/25.
CAIE A2 LEVEL COMPUTER SCIENCE
A graph is an abstract datatype that contains a collection of
nodes. These nodes are connected to each other with edges.
A node usually has a name, and an edge usually has a
numerical value.
One example of graphs is A* or Dijkstra's algorithm. The
nodes represent locations, and the edges represent the
distance between them.
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Temurmalik at Presidential School In Andijan on 18/03/25.
CAIE A2 LEVEL COMPUTER SCIENCE
Supervised Learning
In supervised learning the computer is fed labelled test data,
and it identifies the patterns that led to the data being
labelled in a specific way. This allows it to then predict labels
for new unseen data.
Unsupervised Learning
In unsupervised learning the computer is fed unlabeled test
Neural networks are modelled on the human brain. data, and it identifies hidden patterns.
They contain input and output nodes as well as one or
more hidden layers. Back Propagation of Errors
Each input node is assigned a specific weight, these
weights are summed, and an activation function An algorithm identifies errors with the machine learning and
calculates a value for the output. is then used to adjust the model for improved accuracy by
Repeated for each layer within the network thereby starting at the output layer and working backwards through
allowing reinforcement learning to take place. the hidden layers to the input layer.
For example, if you threw a ball and missed your target.
Use of Hidden Layers: You'd check how far off you were from the target and then
adjust things like angle and strength the next time you threw
Allow deep learning to take place the ball.
Allows the network to make decisions independently
Helps to improve the accuracy of the output Regression
Machine Learning Regression is finding a mathematical function that best fits
out output data based on the previous results in order to
Machine learning is a field of artificial intelligence in which predict the future value.
computers learn from provided data and past experiences in
order to improve its performance in a given task without
explicitly being programmed to know how to do the task. For
example, rather than telling the computer that emails that
advertise free products are most likely scams we feed it a lot
of data and it identifies that pattern on its own.
Deep Learning
A subset of machine learning that simulates the decision
making and data processing abilities of the human brain.
Benefits:
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Temurmalik at Presidential School In Andijan on 18/03/25.
CAIE A2 Level
Computer Science
© ZNotes Education Ltd. & ZNotes Foundation 2024. All rights reserved.
This version was created by Temurmalik on Tue Mar 18 2025 for strictly personal use only.
These notes have been created by Talal Aamer for the 2024-2025 syllabus.
The document contains images and excerpts of text from educational resources available on the internet and printed books.
If you are the owner of such media, test or visual, utilized in this document and do not accept its usage then we urge you to contact us
and we would immediately replace said media. No part of this document may be copied or re-uploaded to another website.
Under no conditions may this document be distributed under the name of false author(s) or sold for financial gain.
"ZNotes" and the ZNotes logo are trademarks of ZNotes Education Limited (registration UK00003478331).