CAIE-As Level-Computer Science - Theory
CAIE-As Level-Computer Science - Theory
ORG
CAIE AS LEVEL
COMPUTER SCIENCE
SUMMARIZED NOTES ON THE THEORY SYLLABUS
Prepared for S for personal use only.
CAIE AS LEVEL COMPUTER SCIENCE
Screen Resolution
Definition: The number of pixels that can be viewed
horizontally and vertically on a device’s screen.
Calculation: N umber of pixels = width × height
(e.g., 1680 × 1080 pixels).
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE
Sampling Rate
Vector Graphics
Definition: Number of samples taken per unit of time.
Definition: Made up of drawing objects.
Effect: Increasing the sampling rate improves the
Drawing Objects: Mathematically defined constructs
accuracy of the digitized sound wave representation
(e.g., rectangles, lines, circles).
but increases file size.
Drawing List: A set of commands defining the vector.
Properties: Basic geometric data that determine the
shape and appearance of each object. Sampling Resolution
Encoding: Data is encoded using mathematical Definition: Number of bits used to encode each
formulas to generate properties for drawing lines sample.
and curves to create the image. Effect: Increasing sampling resolution improves the
Scalability: Objects can be resized without losing accuracy of digitized sound waves but increases file
quality, unlike bitmaps. size.
Applications: Company logos and other graphics that
require scaling.
Bit Rate
Definition: Number of bits used to store 1 second of
sound.
Calculation: Bit Rate = Sampling Rate ∗
Sampling Resolution
Length of Sound: Measured in seconds.
1.3. Compression
Definition: Compression is the process of reducing file
size without significant loss in quality, resulting in:
Reduced time needed to search for data.
Faster transfer of compressed files, using less
bandwidth than uncompressed files.
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE
Client-Server Peer-to-Peer Benefits Drawbacks
Centralized backup. Lesser initial setup cost. Can travel over large distances with a Low frequency means less data can be
Lesser network traffic: Each peer can Radio wide range of wavelengths. Relatively transmitted at one time. Affected by
Files & resources centralized in server: waves inexpensive. Used for TV signals and interference from radio stations with
Prevents illegal resource usage. simultaneously receive data from different
sources. mobile phone communications. similar frequencies.
Improved security: Files are stored on a central It can work even if a device goes down, but the Larger bandwidth allows more data Expensive to build emitting towers.
server, which would be regularly scanned for client-server model can’t work if the server Microwaves Physical obstacles can interfere with
transfer. signals.
malware. goes down.
Cost-effective for long-distance
Satellites communication, used in satellite phones Susceptible to interference. Expensive
setup.
Client-Server vs. Peer-to-Peer models and radio broadcasts.
Network Topologies
Wireless Networks
Bus
Use radio waves (including WiFi), microwaves, and
A single line (bus) connects all devices with
satellites to connect devices to networks without
terminators at each end.
cables.
Other computers can read data being sent
between any two computers. Real-time On-demand
Unsuitable for heavy traffic due to frequent The event is captured live via a video camera
that is connected to a computer.
Existing digital files are converted to encoded
bit-streaming format for broadcasting on the
internet by uploading to a dedicated server.
collisions. A link for encoded video is placed on the
Video signal converted to an encoded
Star streaming video signal. website, and the user clicks on the link to view
encoded streaming video.
Consists of a central server (switch) with all other Encoded video signal uploaded from computer The data is streamed to a buffer in the user’s
to a dedicated streaming server via cables or computer, and the buffer stops the video from
computers connected via dedicated connections. high-speed wireless internet connection. being paused as the bits are streamed.
The server then sends live images to all users As the buffer is emptied, it’s filled again, thus
The server can send packets to different devices requesting them as a real-time video. providing continuous viewing.
simultaneously and bidirectionally. It cannot be paused, fast-forwarded, etc. Can be paused, fast-forwarded, etc.
Wired Networks
Use copper (twisted-pair cable or coaxial cable) or
fiber-optic cables.
Cables are connected to an Ethernet port on the
network router.
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE
Public cloud Private Cloud
Ethernet Access provided by third-party service
providers, shared among multiple users.
Owned and maintained by a single
organization, providing exclusive access.
The most common wired medium for data Managed by cloud service providers using Can be managed internally by the organization
large server farms. itself, or outsourced.
transmission in LANs or WANs.
Typically used in bus topology; data collisions are Benefits Drawback
managed by the CSMA/CD (Carrier Sense Multiple Less technical knowledge required, easy to
implement.
Cannot access the resources/data stored on
the cloud if there are bandwidth issues.
Access with Collision Detection) method. Flexibility to scale with organization’s growth Poor data privacy, since there may be data
leakage in the multi-tenant architecture (public
CSMA/CD Process: mindset. clouds).
Device checks if the channel is busy before
transmitting.
World Wide Web (WWW):
If busy, the device waits a random time before
Description: Collection of web pages stored on
retrying.
During transmission, the device listens for other websites.
transmissions. Function: Protocols are used to transmit data across
the WWW.
If a collision occurs, transmission is aborted, and
Internet (Interconnected Network):
both devices wait random times before retrying.
Description: Massive, open network of networks.
Bit Streaming
Sequence of digital signals (bits) transferred over a Protocol: Uses TCP/IP protocol, which uses IP
communication path at high speeds, requiring a fast addresses to identify devices connected to the
internet.
broadband connection and buffers.
Access: Provided by Internet Service Provider.
Bit Streaming Types:
Communication Methods: Wired, radio, and
Real-time: Live events captured and transmitted
directly. satellite.
On-demand: Pre-existing files are converted and Router in a Network:
Function: Connects two networks together which
streamed as requested.
operate under the same protocols (for example, IP).
Importance of High Broadband Speed/Bit-Rate
Connections: Allows internal connections between
The user has to download and display bits at the
same time. LANs or external connection from the main LAN to a
Higher quality media requires faster speeds due WAN.
Additional Roles: Acts as a gateway and firewall.
to larger data frames as well.
Setup: Usually attached to a server or switch in a
Real-time streaming needs higher speeds due to
LAN.
simultaneous data requests coming from multiple
different users. IP Address Translation: Translates private IP
addresses to public IP addresses and vice versa.
Cloud Computing
On-demand provision of computing services over the
internet, including infrastructure, and platforms.
Infrastructure: Storage capacity and higher
processing power.
Platform: Software, testing & debugging
resources.
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE
IPv4 IPv6
32-bit address, split into 4 blocks by “.”The 128-bit address is divided into eight 16-bit
blocks by “:” Public and Private IP Addresses:
Each block could have a value between 0 and Each block can have 4 hex values ranging from Public IP:
255 (00 to FF in hex). 0000 to FFFF.
IPv6 can be shortened by removing at least (≥) 2 Provided by the ISP.
blocks containing only zeroes. For example:
For example, 255.0.1.255. “2001:0db8:85a3:0000:0000:8a2e:0070:7334” Unique and can be accessed across the internet.
can be shortened to
“2001:0db8:85a3::8a2e:0070:7334" Private IP:
Issued by the LAN’s router.
IPv4 vs. IPv6 Unique within the LAN and can only be accessed
IPv4 Functionality: within the LAN.
IP Address Structure: NAT (Network Address Translation): Required
Network Identifier (netID): Identifies the for private IP addresses to access the internet
network to which the host (device) is connected. directly.
Host Identifier (hostID): Identifies the host Security: Private IPs are more secure than public
within the network. IPs since they are not directly accessible on the
Classful Addressing: Used for IPv4, where Internet and are hidden by NAT.
different bit lengths for identification impose Address Range: The range of IP addresses used
restrictions on available addresses. for private IP addressing can never be assigned to
Subnetting: public IP addresses.
Definition: The practice of dividing a network into
two or more networks. Static Dynamic
Structure: IP addresses are broken down into IP address never changes. The IP address will change at regular periods.
Static IP addresses are valid when websites Dynamic IP address is relatively more secure,
three parts by not changing the netID but need to remember a device for a long time, e.g
VPNs whitelisting.
hence used where data privacy is quite
important.
partitioning the host ID into a subnet ID and host Faster upload/download speeds. Maintaining the cost of the dynamic IP address
is a lesser.
ID.
Subnet ID: These bits are used to identify Static vs. Dynamic IP addresses
each subnet within the network.
Subnet Masks: Numbers that hide (mask) the
netID of a system's IP address and leave only URL (Uniform Resource Locator)
the host part as the machine identifier, Unique reference address for the exact location of an
allowing data to be routed within the subnet internet resource on the WWW
to the appropriate host. Protocol: Enables the browser to know what protocol is
used to access information in the domain.
Host-name: The domain name.
Location of Server: The path indicating the server
location.
Domain Name Service (DNS)
Definition: A naming system used for computers or
resources having an internet connection.
Structure: Consists of a hierarchy of DNS servers
which have a URL database and their corresponding
IP addresses.
3. Hardware
3.1. Computers and Their Components
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE
A general-purpose computer system comprises a Incoming sound waves enter the screen and cause
processor, memory, and I/O functionality. vibrations in the diaphragm
The following essential features are needed in a Vibrations cause the coil to move past a magnetic core
computer - Electrical current is generated, which is then digitized
Input: Takes in data from the outside world.
Output: Displays data for human understanding. Speaker:
Primary Storage: Main memory storing critical
Takes electrical signals and translates them into physical
program instructions and data. vibrations to create sound waves
Secondary Storage: Non-volatile storage for The electric current in the voice coil generates an
noncritical data. electromagnetic field
Removable secondary storage: Change in digital audio signal causes current direction to
File backup and archives
change, which changes field polarity
Portable transfer of files to a second device Electromagnet is either attracted or repelled to a
Embedded systems: permanent magnet, causing a diaphragm that is
Miniature computer systems such as attached to the coil to vibrate
microprocessors that are often a part of a more Vibration transmitted to air in front of the speaker
extensive system.
The degree of vibration determines the amplitude and
Each embedded system performs a few specific frequency of the sound wave produced
functions, unlike general-purpose computers.
Benefits Drawbacks
Magnetic Hard Disk:
Reliable since there are no moving parts Difficult to program functions since there is no
interface Hard disks have platters whose surfaces are covered
Require less power Expensive expert help is needed for the repair
Cheap to mass-produce with a magnetisable material.
Platters are mounted on a central spindle and rotated at
Principle Operations of Hardware Devices high speed
The surface of platters is divided into concentric tracks &
Laser printer: sectors, where data is encoded as magnetic patterns
Each surface is accessed by read/write heads
A laser beam and rotating mirrors are used to draw an When writing, current variation in the head causes
image of the page on a photosensitive drum magnetic field variation on the disk
The image is converted into an electric charge, which When reading, magnetic field variation from the disk
attracts charged toner such that it sticks to the image produces current variation in the read head
Electrostatic-charged paper rolled against the drum
Charge pulls toner away from drum and onto paper Solid State (Flash) Memory:
Heat applied in the fuser to fuse toner to the paper
The electrical charge was removed from the drum, and Most use NAND-based flash memory
excess toner was collected Consist of a grid of columns & rows that has 2 transistors
at each intersection
3D Printer: Two transistors:
Floating Gate: stores electrons, and the presence or
The process starts with a saved digital file that holds the absence of charge (electrons) represents either 1 or 0
blueprint of the object to be printed Control Gate: controls charge (electrons) flow for
The object is then built by sequentially adding layers of a read/write
material (e.g. polymer resin) until the object created
The object is then cured (e.g. resin-made objects are Optical Disc Reader/Writer:
hardened by UV light)
Microphone:
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE
PROM EPROM EEPROM
The disc surface has a reflective metal layer and is spun Programmable ROM Erasable Programmable ROM Electrically Erasable
Programmable ROM
The tracking mechanism moves the laser assembly It can be programmed only It can be erased by UV light It can be erased by an
exposure and can then be electrical signal and can then
The lens focuses laser onto the disc once after it is created reprogrammed be reprogrammed
Data cannot be erased or Chip has to be removed for Can update data without
A laser beam shone onto a disc to read/write deleted reprogramming removing the chip.
Tracks have sequences of amorphous and crystalline
states on the metallic layer Monitoring and Control Systems
When reading, the reflected light from the different Monitoring System:
states on the track is encoded as bit patterns Monitors some state external to the computer
When writing, the laser changes surface to crystalline system
and amorphous states along the track, corresponding to No changes were made to the environment by
1s or 0s. the system, and hence, no feedback
Control System:
Touchscreen: Regulates the behaviour of other devices or
systems
Considered as both an input & output device
Event-driven system: the controller alters the
There are two main-types:
system's state in response to some event
Resistive Capacitive Time-driven system, where the controller takes
Consists of two charged plates
Pressure causes plates to touch, completing
Made from materials that store electric charge
When touched, the charge is transferred to the
action at a specific point in time
the circuit finger Hardware typically used in a system:
Point of contact registered with coordinates
used to calculate the position Sensor that measures an (analogue) property and
transmits it to a processing unit, generally as an
Virtual (Reality) Headset: electrical or optical signal
Virtual headsets consist of 2 lenses, (an LCD) display, Actuators that switch on/off heavy appliances
a circuit board with sensors, a cover and foam (e.g. heater to heat/fan to cool)
padding ADC that converts analogue signals to digital
The display provides a simulation of a 3D signals
environment generated by a 3D graphics package Transmission cable to transfer signals
The user can ‘move’ in the virtual environment by Feedback Systems:
moving their head or using controllers Output from the system affects the input of
Buffers: sensors
A queue that temporarily stores data to balance Ensures the system operates within the given
input/output speed of data, while the cache is the criteria
short-term memory storage that stores frequently Enabling the system output to affect subsequent
used data. system inputs may cause a change in the actions
Random Access Memory vs. Read-Only Memory taken by the system
RAM ROM
This enables the system to adjust conditions in a
Volatile memory: loses content when power is Non-volatile memory: does not lose content continuous process automatically
turned off when power is turned off
It can be read and altered It can only be read
Used to store currently executing program Used for storing OS kernel and boot-up
instructions 3.2. Logic Gates and Logic Circuits
Types of RAM - Static RAM vs. Dynamic RAM Logic Gates: use one or more inputs and produce a
single logical output
SRAM DRAM
Doesn’t need to refresh; hence, it uses lessHas to be refreshed; it has slower access times AND gate: If both inputs are high, the output is high
power and faster access time and needs higher power
(A•B)
More complex circuitry, hence more expensive Only a singleexpensive
transistor & capacitor, hence less
to purchase
Each bit is stored in a flip-flop Each bit is stored as a charge
Has lower data density Has higher data density
Used in cache memory Used in main memory
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE
A B Output A B Output
0 0 0 0 0 1
0 1 0 0 1 1
1 0 0 1 0 1
1 1 1 1 1 0
OR gate: If either input is high, the output is high (A+B) NOR gate: (A+B)
A B Output
A B Output
0 0 1
0 0 0
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
A Output
1 0
0 1
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE
Interrupts
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE
A signal from a program seeking the processor’s Assembly language: low-level programming language
attention with instructions made up of an op code and an operand
Handles the interrupt by controlling the processor Machine code: code written in binary that uses the
Different ISRs used for different sources of interrupt processor’s basic machine operations
Relationship between machine and assembly language:
A typical sequence of actions when an interrupt occurs: every assembly language instruction (source code)
The processor checks the interrupt register for translates into exactly one machine code instruction
interrupt at the end of the F-E cycle for the current (object code)
instruction Symbolic addressing
If the interrupt flag is set in the interrupt register, the Symbols used to represent operation codes
interrupt source is detected Labels can be used for addresses
If the interrupt is low priority, then an interrupt is Absolute addressing: a fixed address in memory
disabled Assembler
If interrupting is a high priority: Software that changes assembly language into
All contents of registers of the running process machine code for the processor to understand
are saved on the stack The assembler replaces all mnemonics and labels
PC is loaded with the ISR and is executed with their respective binary values (that are
Once ISR is completed, the processor pops the predefined before by the assembler software)
registers’ contents from the stack, and the One pass assembler
interrupted program continues its execution. Assembler converts mnemonic source code into
Interrupts re-enabled and machine code in one sweep of program
Return to the start of the cycle Cannot handle code that involves forward
referencing
4.2. Assembly Language Two pass assembler: software makes 2 passes thru code
On the first pass:
Symbol table created to enter symbolic addresses
and labels into specific addresses
All errors are suppressed
On the second pass:
Jump instructions access memory addresses via
table
Whole source code translates into machine code
Error reported if they exist
Grouping the Processor’s Instruction Set
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE
Op Code Operand Explanation
Addressing
LDM #n Immediate: Load n into ACC
Binary numbers can be multiplied or divided by shifting
LDD Direct: load contents at address into the ACC Left shift (LSL #n)
LDI Indirect: load contents of address at given address into
ACC
Bits are shifted to the left to multiply
LDX Indexed: load contents of given address + IR into ACC E.g. to multiply by four, all digits shift two places to
Data Movement
STO Store contents of ACC into address
left
Arithmetic Operations Right shift (LSR #n)
ADD
INC
Add contents of register to ACC
Add 1 to contents of the register
Bits are shifted to the right to divide
Comparing E.g. to divide by four, all digits shift two places to right
CMP
CMP #n
Compare contents of ACC with that of given address
Compare contents of ACC with n
Logical shift: zeros replace the vacated bit position
Conditional Jumps Arithmetic shift: Used to carry out multiplication and
JPE
JPN
Jump to address if compare TRUE
Jump to address if compare FALSE
division of signed integers represented by bits in the
Unconditional Jumps accumulator by ensuring that the sign-bit (usually the
JMP
I/O Data
Jump to given address MSB) is the same after the shift.
IN Input any character and store ASCII value in ACC Cyclic shift: the bit that is removed from one end by the
OUT
Ending
Output character whose ASCII value is stored in ACC
shift is added to the other end.
END Return Control to operating system
Bit Masking
#denotes immediate addressing
B denotes a binary number, e.g. B01001010 & denotes a
hexadecimal number, e.g. &4A
Modes of Addressing
Direct Addressing: loads contents at address into ACC
Indirect Addressing: The address to be used is at
given address. Load contents of this second address
to ACC
Indexed addressing: form the address to be used as
+ the contents of the IR (Index Register)
Relative addressing: next instruction to be carried out
is an offset number of locations away, relative to
address of current instruction held in PC; allows for
relocatable code
Conditional jump: has a condition that will be
checked (like using an IF statements)
Unconditional jump: no condition to be followed,
simply jump to the next instruction as specified
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE
Utility Software
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE
Two-step translation Data Security: ensuring data is protected against loss and
Java and some other high level language programs unauthorized access.
may require two-step translation, i.e., they will be Data Integrity: making sure that data is valid and does
partially compiled and partially interpreted not corrupt after transmission
Java code first translated to bytecode by Java Data Privacy: ability to determine what data is shared
compiler with a third party
Bytecode finally interpreted by the Java Virtual Data Security and Computer System Security
Machine to produce machine code
Data Security System Security
Integrated Development Environment (IDE) features Protection of data on a computer system Protection of the computer system
Coding To prevent corruption of data and prevent To prevent access of viruses to the system and
prevent hackers from entering your computer
hackers from using data
Context-sensitive prompts: Displays choice of system
E.g. encryption E.g. ID & Password
keywords and available identifiers appropriate at
current insertion point and provides choices in Threats to Computer & Data Security*
alphabetical order
Highlights undeclared/unassigned variable Malware
identifiers software intentionally designed to damage a
Initial Error Detection computer or computer network
Dynamic syntax checks: Automatic checking and Includes Virus & Spyware
highlighting of syntax errors, as soon as line typed Virus: Software that replicates itself by inserting a
Type checking & parameter checking copy of itself into another piece of software, which
Presentation may cause the computer to crash and can lead to
Prettyprint: Automatic indentation and color- deletion or corruption of data
coding of keywords Spyware: software that gathers information about
Expand and Collapse code blocks: Saves excessive users' online and offline activity, including accessed
scrolling if collapsed, and easy to see global sites, applications, and downloaded files.
variable declarations and main program body Risk restriction: Ensure anti-virus and anti-spyware
when collapsed software is installed, regularly updated and run.
Debugging Hacking
Single stepping: Executes program line-by-line to illegal access to a computer system
see the effect of each statement on variables Hackers can obtain user’s confidential data which can
Breakpoints: Pauses program at a specific line to cause identity theft
ensure program operates correctly up to that line Can lead to the deletion or corruption of data
Variables/expressions Report Window: Monitors Risk restriction: Use strong passwords and ensure
variables for comparing values. firewall
Phishing
6. Security, Privacy and Data Attempt through emails to obtain user’s confidential
data which can cause identity theft
Integrity Risk restriction: Ignore suspicious mails and ensure
firewall criteria include SPAM filters, blacklist, etc.
Pharming
6.1. Data Security Redirects user to a fake website that appears
legitimate to gain confidential data
Risk restriction: use a reliable ISP; check that links are
genuine and ensure https is present in the URL
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE
Software Licencing
Errors may occur when data moved in system.
Parity Check Free Software Foundation:
All data transmitted as bits A license gives users freedom to run, copy, distribute,
Number of 1s in a byte must always be either an odd study, change, and improve the software.
number or an even number Condition: any redistributed version of software must
Parity can be set either as even or odd be distributed with original terms of free use,
E.g. two communicating devices decide there will modification, and distribution (aka copyleft)
always be an odd number of 1s. A byte is received The Open Source Initiative:
that has even number of 1s so error occurred and The source code of open-source software is readily
receiving device would ask for it to be sent again available to users under copyright; it does enable
Used also when data sent between parts of the CPU users to re-distribute the software.
Not foolproof: if 2 bits are transposed, data accepted The concept of an open-source program relies on the
Checksum Check fact that users can review source code to eliminate
Data sent from one place to another as block of bytes bugs in it
rather than individual bytes Shareware:
Computer adds together all bytes being sent Demonstration software that is distributed for free
Any bits lost at most-significant end as carry ignored but for a specific evaluation period only
so answer is an 8-bit number Distributed on a trial basis and with an
Checksum calculated before and after data sent understanding that sometime later, a user may be
If two bytes different, error occurred therefore block interested in paying for it
of bytes must be sent again Used for marketing purposes
Commercial: Requires payment before it can be used,
7. Ethics and Ownership but includes all program's features, with no restrictions
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE
No enforcing control on organization/structure of files Developer interface: allows creating and manipulating
Data repeated in different files; manually change each database in SQL rather than graphically
Sorting must be done manually or must write a program Query processor: handles high-level queries. It parses,
Data may be in different format; difficult to find and use validates, optimizes, and compiles or interprets a query
Impossible for it to be multi-user; chaotic which results in the query plan.
Security not sophisticated; users can access everything
8.3. Relational Database Modelling
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE
2nd Normal Form (2NF): it is in 1NF and every non-primary
Entity: object/event which can be distinctly identified
key attribute is fully dependent on the primary; all the
Table: contains a group of related entities in rows and
incomplete dependencies have been removed. Example:
columns called an entity set
Tuple: a row or a record in a relational database
Attribute: a field or column in a relational database
Primary key: attribute or combination of them that
uniquely define each tuple in relation
Candidate key: attribute that can potentially be a
primary key
Foreign key: attribute or combination of them that
relates 2 different tables
Referential integrity: prevents users or applications
from entering inconsistent data
Secondary key: candidate keys not chosen as the
primary key
Indexing: creating a secondary key on an attribute to
provide fast access when searching on that attribute; 3rd Normal Form (3NF): it is in 1NF and 2NF and all non-key
indexing data must be updated when table data changes elements are fully dependent on the primary key. No inter-
dependencies between attributes.
8.4. Relational Design of a System MANY-TO-MANY functions cannot be directly normalized
to 3NF, must use a 2 step process e.g.
becomes:
Creating a table:
Changing a table:
Example:
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE
Queries:
Creating a query:
SELECT <field-name>
FROM <table-name>
WHERE <search-condition>
SQL Operators:
= Equals to
> Greater than
< Less than
>= Greater than or equal to
<= Less than or equal to
<> Not equal to
IS NULL Check for null values
ORDER BY <field-name>
INNER JOIN
Data Maintenance:
Adding data to table:
Deleting a record:
UPDATE <table-name>
SET <field-name> = <value>
WHERE <condition>
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS Level
Computer Science
© ZNotes Education Ltd. & ZNotes Foundation 2024. All rights reserved.
This version was created by S on Sat Mar 22 2025 for strictly personal use only.
These notes have been created by Nethul Dulwan Gunasekara 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).