ZNOTES.
ORG
UPDATED TO 2023-2025 SYLLABUS
CAIE AS LEVEL
COMPUTER SCIENCE
SUMMARIZED NOTES ON THE THEORY SYLLABUS
Prepared for Rishitha for personal use only.
CAIE AS LEVEL COMPUTER SCIENCE
Microphone:
1. Hardware Incoming sound waves enter the screen and cause
vibrations in the diaphragm
Vibrations cause the coil to move past a magnetic core
1.1. Computers and Their Components Electrical current is generated, which is then digitized
A general-purpose computer system comprises a Speaker:
processor, memory, and I/O functionality.
The following essential features are needed in a Takes electrical signals and translates them into physical
computer - vibrations to create sound waves
Input: Takes in data from the outside world. The electric current in the voice coil generates an
Output: Displays data for human understanding. electromagnetic field
Primary Storage: Main memory storing critical Change in digital audio signal causes current direction to
program instructions and data. change, which changes field polarity
Secondary Storage: Non-volatile storage for Electromagnet is either attracted or repelled to a
noncritical data. permanent magnet, causing a diaphragm that is
Removable secondary storage: attached to the coil to vibrate
File backup and archives Vibration transmitted to air in front of the speaker
Portable transfer of files to a second device The degree of vibration determines the amplitude and
Embedded systems: frequency of the sound wave produced
Miniature computer systems such as
microprocessors that are often a part of a more Magnetic Hard Disk:
extensive system. Hard disks have platters whose surfaces are covered
Each embedded system performs a few specific with a magnetisable material.
functions, unlike general-purpose computers. Platters are mounted on a central spindle and rotated at
high speed
| Benefits | Drawbacks | |----|----| | Reliable since there are
no moving parts | Difficult to program functions since there The surface of platters is divided into concentric tracks &
is no interface | | Require less power | Expensive expert sectors, where data is encoded as magnetic patterns
help is needed for the repair | | Cheap to mass-produce | | Each surface is accessed by read/write heads
When writing, current variation in the head causes
Principle Operations of Hardware Devices magnetic field variation on the disk
When reading, magnetic field variation from the disk
Laser printer: produces current variation in the read head
A laser beam and rotating mirrors are used to draw an Solid State (Flash) Memory:
image of the page on a photosensitive drum Most use NAND-based flash memory
The image is converted into an electric charge, which Consist of a grid of columns & rows that has 2 transistors
attracts charged toner such that it sticks to the image at each intersection
Electrostatic-charged paper rolled against the drum Two transistors:
Charge pulls toner away from drum and onto paper Floating Gate: stores electrons, and the presence or
Heat applied in the fuser to fuse toner to the paper absence of charge (electrons) represents either 1 or 0
The electrical charge was removed from the drum, and Control Gate: controls charge (electrons) flow for
excess toner was collected read/write
3D Printer:
Optical Disc Reader/Writer:
The process starts with a saved digital file that holds the
blueprint of the object to be printed
The object is then built by sequentially adding layers of a
material (e.g. polymer resin) until the object created
The object is then cured (e.g. resin-made objects are
hardened by UV light)
[Link] Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Rishitha at Meru International School on 10/04/25.
CAIE AS LEVEL COMPUTER SCIENCE
| SRAM | DRAM | |----|----| | Doesn’t need to refresh;
The disc surface has a reflective metal layer and is spun hence, it uses less power and faster access time | Has to be
The tracking mechanism moves the laser assembly refreshed; it has slower access times and needs higher
The lens focuses laser onto the disc power | | More complex circuitry, hence more expensive |
A laser beam shone onto a disc to read/write Only a single transistor & capacitor, hence less expensive to
Tracks have sequences of amorphous and crystalline purchase | | Each bit is stored in a flip-flop | Each bit is
states on the metallic layer stored as a charge | | Has lower data density | Has higher
When reading, the reflected light from the different data density | | Used in cache memory | Used in main
states on the track is encoded as bit patterns memory |
When writing, the laser changes surface to crystalline
and amorphous states along the track, corresponding to Types of ROM – PROM vs. EPROM vs. EEPROM
1s or 0s.
| PROM | EPROM | EEPROM | |----|----|----| |
Touchscreen: Programmable ROM | Erasable Programmable ROM |
Electrically Erasable Programmable ROM | | It can be
Considered as both an input & output device programmed only once after it is created | It can be erased
There are two main-types: by UV light exposure and can then be reprogrammed | It
| Resistive | Capacitive | |----|----| | Consists of two charged can be erased by an electrical signal and can then be
reprogrammed | | Data cannot be erased or deleted | Chip
plates | Made from materials that store electric charge | |
Pressure causes plates to touch, completing the circuit | has to be removed for reprogramming | Can update data
When touched, the charge is transferred to the finger | | without removing the chip. |
Point of contact registered with coordinates used to
calculate the position | |
Virtual (Reality) Headset:
Virtual headsets consist of 2 lenses, (an LCD) display,
a circuit board with sensors, a cover and foam
padding
The display provides a simulation of a 3D
environment generated by a 3D graphics package
The user can ‘move’ in the virtual environment by
moving their head or using controllers
Buffers:
A queue that temporarily stores data to balance
input/output speed of data, while the cache is the
short-term memory storage that stores frequently
used data.
Random Access Memory vs. Read-Only Memory
| RAM | ROM | |----|----| | Volatile memory: loses content
when power is turned off | Non-volatile memory: does not
lose content 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 |
Types of RAM - Static RAM vs. Dynamic RAM
[Link] Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Rishitha at Meru International School on 10/04/25.
CAIE AS LEVEL COMPUTER SCIENCE
Monitoring and Control Systems
Monitoring System:
Monitors some state external to the computer
system
No changes were made to the environment by
the system, and hence, no feedback
Control System:
Regulates the behaviour of other devices or
systems
Event-driven system: the controller alters the
system's state in response to some event
Time-driven system, where the controller takes
action at a specific point in time OR gate: If either input is high, the output is high (A+B)
Hardware typically used in a system: |A|B|Output| |:---|:---|:---| |0|0|0| |0|1|1| |1|0|1|
Sensor that measures an (analogue) property and |1|1|1|
transmits it to a processing unit, generally as an
electrical or optical signal
Actuators that switch on/off heavy appliances
(e.g. heater to heat/fan to cool)
ADC that converts analogue signals to digital
signals
Transmission cable to transfer signals
Feedback Systems:
Output from the system affects the input of
sensors
Ensures the system operates within the given
criteria
Enabling the system output to affect subsequent
system inputs may cause a change in the actions
NOT gate: an inverter (A)
taken by the system
This enables the system to adjust conditions in a |A|Output| |:---|:---| |1|0| |0|1|
continuous process automatically
1.2. Logic Gates and Logic Circuits
Logic Gates: use one or more inputs and produce a
single logical output
AND gate: If both inputs are high, the output is high
(A•B)
|A|B|Output| |:---|:---|:---| |0|0|0| |0|1|0| |1|0|0| NAND gate: (A•B)
|1|1|1|
|A|B|Output| |:---|:---|:---| |0|0|1| |0|1|1| |1|0|1|
|1|1|0|
[Link] Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Rishitha at Meru International School on 10/04/25.
CAIE AS LEVEL COMPUTER SCIENCE
Von Neumann realized data & programs are
indistinguishable and can, therefore, use the same
memory.
Von Neumann's architecture uses a single processor.
It follows a linear sequence of fetch–decode–execute
operations for the set of instructions, i.e. the program.
To do this, the processor uses registers.
Registers
Registers: smallest unit of storage of microprocessor;
allows fast data transfer between other registers
NOR gate: (A+B) General Purpose registers
Used to temporarily store data values which have
|A|B|Output| |:---|:---|:---| |0|0|1| |0|1|0| |1|0|0| been read from memory or some processed result
|1|1|0| Assembly language instructions can use it
Special Purpose Registers
Some are accessible by assembly language
instructions
Only holds either data or memory location, not both
Particular purpose registers include:
Program Counter (PC): holds the address of the
next instruction to be fetched
Memory Data Register (MDR): holds data value
fetched from memory
XOR gate: (A⨁B) Memory Address Register (MAR): Holds the
address of the memory cell of the program which
|A|B|Output| |:---|:---|:---| |0|0|0| |0|1|1| |1|0|1| is to be accessed
|1|1|0| Accumulator (ACC): holds all values that are
processed by arithmetic & logical operations.
Index Register (IX): Stores a number used to
change an address value
Current Instruction Register (CIR): Once program
instruction is fetched, it is stored in CIR and allows
the processor to decode & execute it
Status Register: holds results of comparisons to
decide later for action, intermediate and
erroneous results of arithmetic performed
The Processor (CPU)
2. Processor Fundamentals
2.1. Central Processing Unit (CPU)
Architecture
Von Neumann model
[Link] Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Rishitha at Meru International School on 10/04/25.
CAIE AS LEVEL COMPUTER SCIENCE
Arithmetic and Logic Unit (ALU): part of the processor Clock Speed
that processes instructions which require some form of Number of pulses the clock sends out in a given time
arithmetic or logical operation interval, which determines the number of cycles
Control Unit (CU): part of the CPU that fetches (processes) the CPU executes in a given time interval
instructions from memory, decodes them & Usually measured in Gigahertz (GHz)
synchronizes operations before sending signals to the If the clock speed is increased, then the execution
computer’s memory, ALU and I/O devices to direct how time for instructions decreases. Hence, more cycles
to respond to instructions sent to the processor per unit time, which increases performance.
Immediate Access Store (IAS): memory unit that the However, there is a limit on clock speed since the
processor can directly access heat generated by higher clock speeds cannot be
System Clock: a timing device connected to a processor removed fast enough, which leads to overheating.
that synchronises all components. Bus Width
Determines the number of bits that can be
Buses simultaneously transferred
Set of parallel wires that allow the transfer of data Refers to the number of lines in a bus
between components in a computer system Increasing bus width increases the number of bits
transferred simultaneously, increasing processing
Data bus: bidirectional bus that carries data
instructions between processor, memory, and I/O speed and performance.
devices. Cache Memory
Address bus: unidirectional bus that carries the Commonly used instructions are stored in the cache
address of the main memory location or input/output memory area of the CPU.
If the cache memory size is increased, more
device about to be used, from processor to memory
address register (MAR) commonly executed instructions can be stored, and
Control bus the need for the CPU to wait for instructions to be
Bidirectional loaded reduces. Hence, the CPU executes more
used to transmit control signals from the control unit cycles per unit of time, thus improving performance.
Number of Cores
to ensure access/use of data & address buses by
components of the system does not lead to conflict Most CPU chips are multi-core — have more than
one core (essentially a processor)
Performance of Computer System Factors Each core simultaneously processes different
instructions through multithreading, improving
computer performance.
Ports
[Link] Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Rishitha at Meru International School on 10/04/25.
CAIE AS LEVEL COMPUTER SCIENCE
Hardware which provides a physical interface between a A signal from a program seeking the processor’s
device with CPU and a peripheral device attention
Peripheral (I/O) devices cannot be directly connected to Handles the interrupt by controlling the processor
the CPU, hence connected through ports. Different ISRs used for different sources of interrupt
Universal Serial Bus (USB): Can connect both input and
output devices to the processor through a USB port. A typical sequence of actions when an interrupt occurs:
High Definition Multimedia Interface (HDMI) The processor checks the interrupt register for
Can only connect output devices (e.g. LCD) to the interrupt at the end of the F-E cycle for the current
processor through a HDMI port instruction
HDMI cables transmit high-bandwidth and high- If the interrupt flag is set in the interrupt register, the
resolution video & audio streams through HDMI interrupt source is detected
ports If the interrupt is low priority, then an interrupt is
Video Graphics Array (VGA) disabled
Can only connect output devices (e.g. second If interrupting is a high priority:
monitor/display) to the processor through a VGA port All contents of registers of the running process
VGA ports allow only the transmission of video are saved on the stack
streams but not audio components PC is loaded with the ISR and is executed
Once ISR is completed, the processor pops the
Fetch-Execute (F-E) cycle registers’ contents from the stack, and the
interrupted program continues its execution.
Fetch stage Interrupts re-enabled and
PC holds the address of the next instruction to be Return to the start of the cycle
fetched
The address on the PC is copied to MAR
PC is incremented 2.2. Assembly Language
Instruction loaded to MDR from the address held in
MAR
Instruction from MDR loaded to CIR
Decode stage: The opcode and operand parts of
instruction are identified
Execute stage: Instructions executed by the control unit
sending control signals
Register Transfer Notation (RTN)
MAR ← [PC]
PC ← [PC] + 1
MDR ← [[MAR]]
CIR ← [MDR]
Decode
Execute
Return to start
Square brackets: value currently in that register
Double square brackets: CPU is getting value stored
at the address in the register
Interrupts
[Link] Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Rishitha at Meru International School on 10/04/25.
CAIE AS LEVEL COMPUTER SCIENCE
|Op Code|Operand|Explanation| |:---|:---|:---|
Assembly language: low-level programming language |Addressing||| |LDM|#n|Immediate: Load n into ACC|
with instructions made up of an op code and an operand |LDD|<address>|Direct: load contents at address into the
Machine code: code written in binary that uses the ACC| |LDI|<address>|Indirect: load contents of address at
processor’s basic machine operations given address into ACC| |LDX|<address>|Indexed: load
Relationship between machine and assembly language: contents of given address + IR into ACC| |Data
every assembly language instruction (source code) Movement||| |STO|<address>|Store contents of ACC into
translates into exactly one machine code instruction address| |Arithmetic Operations||| |ADD|<address>|Add
(object code) contents of register to ACC| |INC|<register>|Add 1 to
Symbolic addressing contents of the register| |Comparing||| |CMP|
Symbols used to represent operation codes <address>|Compare contents of ACC with that of given
Labels can be used for addresses address| |CMP|#n|Compare contents of ACC with n|
Absolute addressing: a fixed address in memory |Conditional Jumps||| |JPE|<address>|Jump to address if
Assembler compare TRUE| |JPN|<address>|Jump to address if
Software that changes assembly language into compare FALSE| |Unconditional Jumps||| |JMP|
machine code for the processor to understand <address>|Jump to given address| |I/O Data||| |IN||Input
The assembler replaces all mnemonics and labels any character and store ASCII value in ACC| |OUT||Output
with their respective binary values (that are character whose ASCII value is stored in ACC| |Ending|||
predefined before by the assembler software) |END||Return Control to operating system|
One pass assembler #denotes immediate addressing
Assembler converts mnemonic source code into B denotes a binary number, e.g. B01001010 & denotes a
machine code in one sweep of program hexadecimal number, e.g. &4A
Cannot handle code that involves forward
referencing Modes of Addressing
Two pass assembler: software makes 2 passes through Direct Addressing: loads contents at address into ACC
the code Indirect Addressing: The address to be used is at
On the first pass: given address. Load contents of this second address
Symbol table created to enter symbolic addresses to ACC
and labels into specific addresses Indexed addressing: form the address to be used as
All errors are suppressed <address> + the contents of the IR (Index Register)
On the second pass: Relative addressing: next instruction to be carried out
Jump instructions access memory addresses via is an offset number of locations away, relative to
table address of current instruction held in PC; allows for
Whole source code translates into machine code relocatable code
Error reported if they exist Conditional jump: has a condition that will be
Grouping the Processor’s Instruction Set checked (like using an IF statements)
Unconditional jump: no condition to be followed,
simply jump to the next instruction as specified
2.3. Bit Manipulation
[Link] Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Rishitha at Meru International School on 10/04/25.
CAIE AS LEVEL COMPUTER SCIENCE
Binary numbers can be multiplied or divided by shifting Each bit can represent an individual flag.
Left shift (LSL #n) ∴ by altering the bits, flags could be operated upon.
Bits are shifted to the left to multiply Bit manipulation operations:
E.g. to multiply by four, all digits shift two places to Masking: an operation that defines which bits you
left want to keep and which bits you want to clear.
Right shift (LSR #n) Masking to 1: The OR operation is used with a 1.
Bits are shifted to the right to divide Masking to 0: The AND operation is used with a 0.
E.g. to divide by four, all digits shift two places to right Matching: an operation that allows the accumulator
Logical shift: zeros replace the vacated bit position to compare the value it contains to the given value in
Arithmetic shift: Used to carry out multiplication and order to change the state of the status register.
division of signed integers represented by bits in the Practical applications of Bit Masking:
accumulator by ensuring that the sign-bit (usually the Setting an individual bit position:
MSB) is the same after the shift. Mask the content of the register with a mask
Cyclic shift: the bit that is removed from one end by the pattern which has 0 in the ‘mask out’ positions
shift is added to the other end. and 1 in the ‘retain’ positions.
Set the result with the match pattern by using the
Bit Masking AND command with a direct address.
Testing one or more bits:
Mask the content of the register with a mask
pattern which has 0 in the ‘mask out’ positions
and 1 in the ‘retain’ positions.
Compare the result with the match pattern by
using the CMP command or by “Checking the
pattern”.
Checking the pattern
Use AND operation to mask bits and obtain
resultant.
Now subtract matching bit pattern from resultant.
The final ‘non-zero’ result confirms the patterns
are not the same else vice versa.
3. System Software
3.1. Operating System
[Link] Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Rishitha at Meru International School on 10/04/25.
CAIE AS LEVEL COMPUTER SCIENCE
Need for OS Disk Formatter
A set of programs designed to run in the background Prepares a hard disk to allow data to be stored on it
on a computer system which Deletes any existing data on disk
Controls operation of computer system Performs formatting, process where computer ‘draws
Provides a user interface lines’ on disk surface to split it into small areas
Controls how computer responds to user’s Virus checker
requests Checks for and then removes any viruses found
Controls how hardware communicate Constantly checks all incoming and outgoing files
Provides an environment in which application Defragmentation Software
software can be executed Files can be big so have to be stored in multiple
OS hardware is unusable without an OS, as the OS sectors, which can result in fragmentation (contents
acts as an interface since it controls communication of file scattered across >2 non-contiguous sectors)
between user and hardware Fragmentation slows down disk access and thus the
performance of the entire computer.
Key Management Tasks Defragmenting software works by physically
(Main) Memory Management reorganizing disk contents (files) such that they are
stored in contiguous sectors.
Memory protection to ensure 2 programs do not try
to use same memory space This defragmentation reduces number of movements
Paging of the read/write heads require to access the disk
Use of virtual memory contents, hence increasing computer performance
File Management The defragmentation also creates larger contiguous
free space regions
Provides file naming conventions
Maintains a directory structure Disk contents analysis/disk repair software
Allocates space to particular files Software utility for visualization of disk space usage
Security Management Gets size for each folder and files, and generates a
Proves usernames & passwords graphical chart showing disk usage distribution
according to folders or other user defined criteria.
Ensures data privacy
Prevents unauthorized access Allows disk to report errors (e.g. “bad sector”)
Carries out automatic backup Software will attempt to offer a solution
Hardware (input/output/peripherals) Management File Compression
Installation of appropriate driver software Reduces file size by removing redundant data in files
Causes improvements in the computer’s
Controls access to data sent to and from peripherals
Receives & handles interrupts from hardware devices performance by reducing the data that needs to be
Process Management stored
Enables multiprogramming and multitasking Back-up Software
Makes copy of files on another storage medium in
Resolution of conflicts when 2 or more processes
requires the same resource the event of a hard drive failure, user error, disaster
E.g. via Round-robin method or accident.
Should be a regular process
Utility Software Can provide synchronization between devices
Program Libraries
[Link] Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Rishitha at Meru International School on 10/04/25.
CAIE AS LEVEL COMPUTER SCIENCE
Pre-written code that can be linked to a software under Two-step translation
development without any amendments Java and some other high level language programs
Can perform common or complex tasks may require two-step translation, i.e., they will be
Takes the form of classes partially compiled and partially interpreted
Benefits: Java code first translated to bytecode by Java
Saves time: less code needs to be written compiler
Smaller testing time: pre-tested and used by others Bytecode finally interpreted by the Java Virtual
Library file is a complex algorithm which the user Machine to produce machine code
does not need to understand to use it Integrated Development Environment (IDE) features
Dynamic Link Library (DLL) files Coding
Shared library file that contains code and data Context-sensitive prompts: Displays choice of
Code saved separately from the main .EXE file, keywords and available identifiers appropriate at
reducing the .EXE file’s size current insertion point and provides choices in
Code only loaded to main memory when required alphabetical order
DDL file can be made available to several applications Highlights undeclared/unassigned variable
simultaneously, thus reducing strain on memory identifiers
DLL files act as modules in more complex programs, Initial Error Detection
making it easier to install and run updates Dynamic syntax checks: Automatic checking and
highlighting of syntax errors, as soon as line typed
3.2. Language Translators Type checking & parameter checking
Presentation
Assembler Prettyprint: Automatic indentation and color-
Software that translates assembly language coding of keywords
statements into machine code (binary) for execution Expand and Collapse code blocks: Saves excessive
The mnemonics used translates into machine scrolling if collapsed, and easy to see global
opcodes variable declarations and main program body
Process simple because assembly language has a when collapsed
one-to-one relationship with machine code. Debugging
Compiler and Interpreter Single stepping: Executes program line-by-line to
see the effect of each statement on variables
| Compiler | Interpreter | |----|----| | Translates a high-level Breakpoints: Pauses program at a specific line to
language program to machine code. | Translates and ensure program operates correctly up to that line
executes a high-level language program, line-by-line. | | Variables/expressions Report Window: Monitors
Creates a .exe file which can be easily distributed. | No .exe variables for comparing values.
file created. | | Once compiled, .exe file does not need to be
compiled again, resulting in faster execution. | Execution
very slow – translated each time program run. | | Reports all 4. Security, Privacy and Data
errors at the end of compilation: difficult to locate errors∴
development process long. | Debugging easier/faster, since Integrity
it stops translating when it reaches an error. This allows real
time error correction. | | Only be produced when all errors 4.1. Data Security
are fixed. | Can run program any time, even before code
finished. | | Used when development is completed. | Used
during development. |
[Link] Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Rishitha at Meru International School on 10/04/25.
CAIE AS LEVEL COMPUTER SCIENCE
Data Security: ensuring data is protected against loss and Malware
unauthorized access. software intentionally designed to damage a
Data Integrity: making sure that data is valid and does computer or computer network
not corrupt after transmission Includes Virus & Spyware
Data Privacy: ability to determine what data is shared Virus: Software that replicates itself by inserting a
with a third party copy of itself into another piece of software, which
Data Security and Computer System Security may cause the computer to crash and can lead to
deletion or corruption of data
| Data Security | System Security | |----|----| | Protection of Spyware: software that gathers information about
data on a computer system | Protection of the computer users' online and offline activity, including accessed
system | | To prevent corruption of data and prevent sites, applications, and downloaded files.
hackers from using data | To prevent access of viruses to Risk restriction: Ensure anti-virus and anti-spyware
the system and prevent hackers from entering your software is installed, regularly updated and run.
computer system | | E.g. encryption | E.g. ID & Password | Hacking
Threats to Computer & Data Security* illegal access to a computer system
Hackers can obtain user’s confidential data which can
cause identity theft
Can lead to the deletion or corruption of data
Risk restriction: Use strong passwords and ensure
firewall
Phishing
Attempt through emails to obtain user’s confidential
data which can cause identity theft
Risk restriction: Ignore suspicious mails and ensure
firewall criteria include SPAM filters, blacklist, etc.
Pharming
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
Computer System Security Measures
[Link] Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Rishitha at Meru International School on 10/04/25.
CAIE AS LEVEL COMPUTER SCIENCE
User Accounts and Passwords Data validation and data verification help protect the
Usernames & passwords to deny access to integrity of data by checking whether the data entered is
unauthorized users sensible and accurate, respectively.
User-assigned privilege, which accesses to only the Data Validation: checks if data entered is valid, but not its
user’s workplace, preventing the user to have admin accuracy
rights. Data Validation Methods
Can assign privileges to files so users with low Range check: data must be between a set of values
privileges do not have access. Format check: data must follow correct pattern/order
Firewalls Length check: data must have exact no. of characters
Hardware or software that filters information Presence check: checks if some data has been
travelling between the computer system and the entered
internet Existence check: data entered must exist
(software) firewall can make decisions about what to Limit check: checks whether a value entered is within
allow and block by detecting illegal attempts by acceptable minimum and maximum values.
specific software to connect to the internet Check digit: A digit is used as the answer to an
Authentication arithmetic operation of other digits in data. If not
Process of determining whether someone is who matched, then data entered incorrectly
they claim to be. Data Verification: checks data entered is accurate during
Helps prevent unauthorized access data entry and data transfer
Log-on using digital signatures, passwords and Data Entry Verification Methods
biometric scans. Visual Check: Person manually compares original
Anti-virus software data with that entered to check if correct
Runs in the background to detect & remove viruses. Double Entry: Enter data into computer twice and
Checks files for known malicious patterns compares.
Anti-spyware software: detects & removes spyware. If differences found, go back to raw data to fix error
Encryption:
Conversion of data to code by encoding it Data Transfer Verification Methods
It doesn’t stop illegal access but appears meaningless
Necessary to use decryption software to decode data
Data Security Measures
Encryption
Access Rights to data (authorization): different users
assigned different authorization levels which prevent
them from accessing all data ∴ increases security
Data Backup
An exact copy of an original piece of data in case the
original is lost or corrupted
Within the same computer system or at different site
Disk-mirroring strategy
Real-time strategy that writes data to two or more
disks at the same time.
If one fails, the other is still there to be read off of
4.2. Data Integrity
[Link] Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Rishitha at Meru International School on 10/04/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,
5. Ethics and Ownership but includes all program's features, with no restrictions
Artifical intelligence (AI)
[Link] Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Rishitha at Meru International School on 10/04/25.
CAIE AS LEVEL COMPUTER SCIENCE
Artificial Intelligence (AI): the ability of a computer to Database: collection of non-redundant interrelated data
perform tasks in such a way that is conventionally DBMS: Software programs that allow databases to be
associated with human intelligence: defined, constructed and manipulated
AI can learn from past mistakes
they adapt to stop the same problem from Features of a DBMS:
occurring again Data management: data stored in relational databases -
they learn to predict what might happen & raise
tables stored in secondary storage
alert Data dictionary contains:
AI can learn to work more efficiently List of all files in database
when an action slows the system down, it can No. of records in each file
prevent this from happening again Names & types of each field
when an action increases the speed of the
Data modeling: analysis of data objects used in
system, it can repeat this when necessary to database, identifying relationships among them
improve efficiency Logical schema: overall view of entire database,
AI Applications includes: entities, attributes and relationships
Developing autonomous mechanical products Data integrity: entire block copied to user’s area when
Machine learning through data sets
being changed, saved back when done
AI Impacts Data security: handles password allocation and
Social verification, backups database automatically, controls
Replacement of manual labour with automation what certain user’s view by access rights of individuals or
could lead to massive unemployment. groups of users
However, it could lead to increased leisure time.
Economic: Due to increased innovation and efficiency Data change clash solutions:
with automation provided by AI, there’d be lower
manufacturing costs in general Open entire database in exclusive mode – impractical
Environmental: Detrimental impact on the with several users
environment due to robot manufacture with limited Lock all records in the table being modified – one user
resources and its waste disposal changing a table, others can only read table
Lock record currently being edited – as someone
changes something, others can only read record
6. Database and Data User specifies no locks – software warns user of
simultaneous change, resolve manually
Modelling <span class="underline">Deadlock</span>: 2 locks at the
same time, DBMS must recognize, 1 user must abort task
6.1. File Based System Tools in a DBMS:
Data stored in discrete files, stored on computer, and Developer interface: allows creating and manipulating
can be accessed, altered or removed by the user database in SQL rather than graphically
Query processor: handles high-level queries. It parses,
Disadvantages of File Based System: validates, optimizes, and compiles or interprets a query
which results in the query plan.
No enforcing control on organization/structure of files
Data repeated in different files; manually change each
Sorting must be done manually or must write a program 6.3. Relational Database Modelling
Data may be in different format; difficult to find and use
Impossible for it to be multi-user; chaotic
Security not sophisticated; users can access everything
6.2. Database Management Systems
(DBMS)
[Link] Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Rishitha at Meru International School on 10/04/25.
CAIE AS LEVEL COMPUTER SCIENCE
2<sup>nd</sup> Normal Form (2NF): it is in 1NF and every
Entity: object/event which can be distinctly identified non-primary key attribute is fully dependent on the primary;
Table: contains a group of related entities in rows and all the incomplete dependencies have been removed.
columns called an entity set Example:
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; 3<sup>rd</sup> Normal Form (3NF): it is in 1NF and 2NF
indexing data must be updated when table data changes and all non-key elements are fully dependent on the primary
key. No inter-dependencies between attributes.
6.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:
6.5. Normalization
6.6. Data Definition Language (DDL)
1<sup>st</sup> Normal Form (1NF): contains no repeating
attribute or groups of attributes. Intersection of each tuple Creation/modification of the database structure using
and attribute contains only 1 value. Example: this language
written in SQL
Creating a database:
CREATE DATABASE <database-name>
Creating a table:
CREATE TABLE <table-name> (…)
Changing a table:
ALTER TABLE <table-name>
Adding a primary key:
PRIMARY KEY (field)
ADD <field-name>:<data-type>
Adding a foreign key:
FOREIGN KEY (field) REFERENCES <table>(field)
Example:
[Link] Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Rishitha at Meru International School on 10/04/25.
CAIE AS LEVEL COMPUTER SCIENCE
CREATE DATABASE ‘[Link]’
CREATE TABLE Training
(EmpID INT NOT NULL,
CourseTitle VARCHAR(30) NOT NULL,
CourseDate Date NOT NULL,
PRIMARY KEY (EmpID, CourseDate),
FOREIGN KEY (EmpID) REFERENCES Employee(EmpID))
6.7. Data Manipulation Language (DML)
Query and maintenance of data done using this language
– written in SQL
<span class="underline">Queries:</span>
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 |
Sort into ascending order:
ORDER BY <field-name>
Arrange identical data into groups:
GROUP BY <field-name>
Joining together fields of different tables:
INNER JOIN
<span class="underline">Data Maintenance:</span>
Adding data to table:
INSERT INTO <table-name>(field1, field2, field3
VALUES (value1, value2, value3)
Deleting a record:
DELETE FROM <table-name>
WHERE <condition>
Updating a field in a table:
UPDATE <table-name>
SET <field-name> = <value>
WHERE <condition>
[Link] Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Rishitha at Meru International School on 10/04/25.
CAIE AS Level
Computer Science
© ZNotes Education Ltd. & ZNotes Foundation 2025. All rights reserved.
This version was created by Rishitha on Thu Apr 10 2025 for strictly personal use only.
These notes have been created by Nethul Gunasekara & Shaikh Ayman Abdul-Majid 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).