UPDATED TO 2021-23 SYLLABUS
CAIE AS LEVEL
COMPUTER
SCIENCE (9618)
SUMMARIZED NOTES ON THE SYLLABUS
CAIE AS LEVEL COMPUTER SCIENCE (9618)
A bitmapped image is encoded by assigning a solid color
to each
pixel.
1. Information Representation Pixels are small blocks of addressable areas and the color
they
have is represented by binary & stored as bits
A bitmapped image also contains a file header which are
1.1. Number Representation a few
bytes of binary and represents basic information
about the graphic,
such as image resolution, size and
Denary: normal integer numbers
number of colors.
Binary
Image Resolution: the amount of pixels an image contains
Values stored as a series of ones and zeroes
per
inch or per centimeter.
A single 0 or 1 is called a binary digit or bit.
Screen resolution: the number of pixels per row by the
Any group of 0s & 1s can represent a character
number of
pixels per column, e.g. HD is 720 by 1280 px
128 64 32 16 8 4 2 1 T otal N umber of P ixels = Width × Height
0 0 0 0 0 0 0 0
Color depth: number of bits used to represent the color of
E.g. 65 in binary is 1000001 a
single pixel
E.g. a 1 bit image can only store 21 pixels which
equals
BCD (Binary Coded Decimal):
to 2. Therefore, a 1 bit image is monochromatic
Each digit in the number is written separately in a
An image with n bits has 2* n* colors per pixel
series of 4
bits
E.g. 398 in BCD The higher the color depth, the better color quality
The higher the color depth, the larger the file size.
3 = 0011 9 = 1001 8 = 1000
398 = 001110011000
F ile Size = N umber of P ixels × C olour Depth
Use of BCD: used in business applications (arithmetic)
where
every digit has to be retained in a result Vector graphics: images defined using mathematics &
Hexadecimal Numbers: geometry
i.e. points, lines, curves & shapes/polygon(s)
The base-16 number system (counting in 16) Objects and properties are stored mathematically.
After 9, numbers represented by letters from A to F Drawing list: set of commands used to define a vector
Vectors are scalable and do not pixelate like a bitmap
256 16 1 image
therefore are used by corporations to create logos
0 0 0 as they can be
resized without losing quality
Bitmapped images are used by general computer users
E.g. A5 in Denary =
(16 × 10 ) + (1 × 5 ) = 165 as they are not
big in file size and can be manipulated.
E.g. 65 in Hexadecimal = 65 ÷ 16 = 4 Remainder 1
∴ = 41 H 1.3. Sound
Quick way of translating hexadecimal to binary is by
converting the
hexadecimal to BCD Sound are vibrations that travel through a medium
E.g. A5 in Binary: A = 1010 5 = 0101 A5 = 10100101 Sound waves are continuous in nature, which means
there is infinite
amount of detail for a sound.
Two’s Complement:
Analogue to Digital Converter (ADC): converts analogue
We can represent a negative number in binary by
sound
into digital signals which can be digitally stored
making the most
significant bit (MSB) a sign bit, which
Digital to Analogue Converter (DAC): converts digital
will tell us whether the
number is positive or negative.
signals
into analogue sound that can be output
An analogue sound wave is picked up by a microphone
-128 64 32 16 8 4 2 1
and sent to an
ADC in the form of analogue electrical
MSB 0 0 0 0 0 0 LSB signals. Once the sound wave
is converted into a digital
form it can be stored and manipulated
Converting a negative denary number into binary Two’s Sound in analogue form can be represented by wave
Complement: forms; the height
of these waves can be sampled
Find the binary equivalent of the denary number regularly with the height being
represented by a bit-code
Add an extra bit before the MSB and turn that into 0
Flip all the bits: 0 to 1; 1 to 0
Add 1
Converting Two’s Complement to denary:
Flip all the bits: 0 to 1; 1 to 0
Add 1
Simple conversion from binary to denary (put a –ve)
1.2. Image Representation Sampling Rate: number of samples taken per second
CAIE AS LEVEL COMPUTER SCIENCE (9618)
A higher sampling rate means the waveform will be This process is done using algorithms
converted from
analog to digital form more accurately. Multimedia Container Formats:
Sampling Resolution: no. of bits assigned to each sample Contains different types of data
The sampling resolution allows you to set the range of Can be audio or video or both codecs
volumes
storable for each sample This interleaves the different type of data
The quality of a sound produced using a sound sampler The video is compressed into codecs
depends on the
sampling rate and sampling resolution E.g. .avi, .mov, .mp4, .ogg, .rm
Higher sampling rate/resolution means larger file size Lossy Data Compression:
Bit Rate: number of bits required to store 1sec of sound These programs eliminate unnecessary bits of data
Reduces data file size more than lossless
Bit Rate = Sampling Rate × Sampling Resolution Unable to get back original version
Lossless Data Compression:
F ile Size = Bit Rate × Length of Sound Breaks data into smaller form of transmission
Allows recreation of original
Lossless Compression: type of compression that allows
original
data to be perfectly reconstructed from
compression
Run-length encoding: compression in which sequences
2. Communication & Internet
with
same data value in many consecutive values are
stored as a
single data value and count
Technologies
E.g. 00001234111111 can be written as (0-4)1234(1-6)
Lossy Compression: type of compression in which file 2.1. Client/Server Model
accuracy is
low, but file size is smaller than lossless
Perceptual coding: works by reducing certain parts of Type of computing system in which one workstation
a
sound which are less audible to human hearing serves requests of
other systems
Server is generally most powerful computer in network
1.4. Video Clients are the individual components which are
connected in a
network.
Frame Rate (FPS): frequency at which frames in a video Clients rely on servers for resources, such as files,
sequence
are displayed devices, and
even processing power
Higher frame rate, better quality video = greater size
Interlaced (e.g. 1080i):
Old Technology (70 years ago)
Each field of a video image displays every other
horizontal line
of a complete image ∴ doubles FPS
Horizontal lines often visible to eye due to distortion
Pros: Refreshes faster, better visual smoothness and
saves
bandwidth
Cons: Becoming outdated and interlaced screen will
not show
fast moving objects clearly
Progressive (e.g. 720p):
Excite every horizontal line simultaneously
Thus frame rate is the same as the number of
individual pictures
in a video sequence
This gives more detail in each frame
Pros: Crisp, detailed frames and is new and popular
Con: Rough frame transition
Inter-frame compression:
Type of video compression and decreases file size
It removes neighboring frames which are similar
Some change in image data is redundant
How redundant the change in image between frames Examples of networks: file, application, printer, proxy
is determines
the amount of compression possible Internet: global system of interconnected networks that
Temporal redundancy: redundancy between frames uses
standard Internet protocol suite (TCP/IP)
This is the correlation between adjacent data points Transmission Control Protocol/Internet Protocol (TCP/IP):
It is based upon abrupt transitions between frames communication language of the Internet;
Spatial redundancy: redundancy within a frame World Wide Web: system of interlinked hypertext
An intercoded frame that is divided into macro blocks documents
accessed via the Internet
Blocks are not directly encoded with raw pixel values HTTP: defines how messages are formatted and
Encoder finds a block similar to the one in last frame transmitted, and
what actions web servers and browsers
This frame is the reference frame should take in response to
various commands.
CAIE AS LEVEL COMPUTER SCIENCE (9618)
Portable transceivers (e.g. mobile phones) are able to
2.2. Hardware
communicate
with each other and also access the
internet via base stations
Network:
Local Area Network (LAN): not over large geo area
Wide Area Network (WAN): formed by a number of LANs
connected
together; large geo area
The Internet is a WAN therefore as more LANs are set up,
it allows
the Internet to expand and if they are maintained,
they are in turn
supporting the Internet
Routers:
A device that forwards packets of data between networks
using IP
addresses
Can be used to connect multiple network segments
Can route packets of the same protocol over networks
with dissimilar
architecture over most efficient route
Gateways:
A device used to connect networks with different
architecture and
protocols.
2.4. Communication Methods
When packets arrive at a gateway, software strips all
networking
information leaving only raw data Benefits Drawbacks
Gateway translates data into new format and sends it on Doesn’t perform
using
networking protocols of destination system Best conductor well with small
Copper Flexible charges.
Server: Cable Safe - high Affected by
melting point electromagnetism
Computer that runs the server program Expensive
Servers run to serve requests of clients.
Fiber- Thinner Needs expensive
Clients typically connect to server through the network
Optic Less signal optical
Cabling degradation transmitters and
2.3. Communication Systems Lightweight receivers.
Low frequency so
The Public Service Telephone Network (PSTN): Wireless transmits less
Radio Can travel over data at one time.
Refers to all telephone networks in the world waves large distances Affected by radio
All networks connected together by switching centers
Not expensive. stations with
Allows any telephone to communicate with another
similar frequency
Internet connection using PSTN is known as dialup
Data is transferred using existing telephone lines Emitting towers
Micro- Wireless expensive to build
When data is being transmitted, the computer dials the waves
network to
set up a connection Larger bandwidth Physical obstacles
can interfere
Dedicated Line: Wireless Easy to interfere
Satellites Cheap with long Expensive to set
A telecommunications path between two points
distance up
Not shared in common among multiple users
Allows you to maintain a continuous, uninterrupted
presence on the
Web 2.5. IP Addressing
Able to host websites as well browse
IP address: numerical label assigned to each device (e.g.
Cell phone network: computer) participating in a computer network that uses
the Internet
Protocol
Wireless network spread over land areas called cells
The most common form of IP Address is “IPv4” which
Each cell is served by at least one fixed-location
requires 32 bits
(4 bytes) to store an address.
transceiver known
as a base-stations
Each cell uses a different set of frequencies to avoid
interference
When joined together, cells provide radio coverage over a
wide
geographic area.
CAIE AS LEVEL COMPUTER SCIENCE (9618)
An IP address serves two principal functions:
host or network interface identification
2.7. Bit Streaming
location addressing
Bit stream: contiguous sequence of bits, representing a
When communicating, a device can send another a
stream
of data, transmitted continuously over a
message by stating
their IP address and requesting a
communications path,
serially (one at a time).
message to be sent through the
router.
Real-time streaming:
Public IP Address Private IP Address An event is captured live
The video signal is encoded to streaming media files
Address provided to home Address issued by router to
The encoded feed is then uploaded to a file server
network by ISP each device in home network
Streaming servers duplicate the feed and send it to all
Address only unique in the clients
requesting it in real time
Address is unique throughout
network and cannot be On-demand streaming:
Internet
accessed through the internet Video is stored on a server as streaming media files
Allows two computers to If client requests to watch a specific video, a bit stream
identify each other is
set up which transmits the saved video
It is important for the client to have a fast-broadband
Uniform Resource Locator (URL): A character string speed
when bit streaming because the client has to
referring to
the location of an internet resource download the bits
and display it at the same time.
URLs allow us to specify the domain name and exact Broadband speed required depends on type of stream
location of a
resource on the internet. user requires; if
user requires better quality then higher
For example: speed needed because each
frame larger in size
Users who stream real-time need faster internet speeds
in comparison
to on-demand because there are greater
number of users requesting
same data simultaneously
A URL can ∴ be summarized as:
3. Hardware
Domain Name: humanly-memorable names for Internet 3.1. Input Devices
participants
such as computers and networks. One
domain name can be connected to
multiple IP addresses
Keyboard: device used to input text into a computer
Domain Name Service (DNS): naming system used for
system. When
a key is pressed, an electrical circuit is
computers or
resources having internet connection
completed. Circuit
transmits a binary signal to computer,
using ASCII code which
represent the key pressed.
Trackerball mouse: pointing device consisting of a ball
held by
a socket containing sensors to detect a rotation of
the ball about
two axes.
Laser mouse: pointing device which uses an infrared laser
diode
to illuminate the surface and a light sensor to detect
2.6. Client and Server-Side Scripting movement
relative to a surface
Flatbed scanner: optically scans documents, & converts it
Sequence of Events when Viewing a Website: to a
digital image. Composed of a glass pane, bright light
1. User specifies a URL in their client which
illuminates pane and a moving optical array.
2. Client sends DNS lookup request to convert URL to Sensor: device that detects events or changes in physical
an IP address
and initiates a TCP connection to quantities and provides a corresponding output, generally
server as an
electrical or optical signal
3. Server acknowledges TCP connection, client sends
HTTP requests
to retrieve content for the URL.
4. Server replies with content for web page and
3.2. Output Devices
browser retrieves
content from the HTTP packets
and renders Actuator: type of motor that is responsible for moving or
controlling a mechanism or system through which a
Client-side script: code that runs on client written using control system
acts upon an environment.
language supported by browser e.g. Javascript. Enables Printer: output device that makes a persistent readable
web pages to
be scripted; to have different and changing representation of graphics/text on physical media.
content depending on
user input, or other variables. Inkjet printer: non-impact printers which work by
Server-side script: code that runs on server written using propelling
variably-sized droplets of liquid or molten
language supported by server e.g. PHP. Used to provide material (ink) onto
physical media
interface for
client & to limit client access to databases Laser printer: non-impact printers which work by
repeatedly
passing a laser beam back & forth over an
CAIE AS LEVEL COMPUTER SCIENCE (9618)
electron-charged,
cylindrical drum, to define a Logic Gates: use one or more inputs and produces a
differentially-charged image. Drum
selectively collects single
logical output
charged, powdered ink, and transfers image
to loaded AND gate: If both inputs high, output is high
paper, which is then heated to fuse.
Speakers: device which outputs sound by converting A B Output
digital
signals of sound from the computer to analogue 0 0 0
0 1 0
3.3. Secondary Storage Device 1 0 0
1 1 1
Optical disks: flat, usually circular disc which encodes
binary
data in form of pits and lands. Pits = 0, due to lack
of reflection
and lands = 1, due to reflection when read
Hard disk: data storage device consisting of rotating disks,
platters, and magnetic heads arranged on an actuator
arm to read and
write data to the surfaces.
Flash memory: solid state devices which have no moving OR gate: If either inputs high, output is high, A + B
parts and
data is programmed onto them
A B Output
0 0 0
3.4. Need for Primary and Secondary
0 1 1
Storage 1 0 1
1 1 1
Primary storage: computer’s main memory; RAM & ROM
Necessary for executing a program (RAM) or storing
permanent system
data (ROM)
However, RAM is volatile and ROM is non-editable ∴
important to have a more permanent, non-volatile form of
storage to
store e.g. documents and images = secondary
storage device,
generally a hard disk NOT gate: an inverter, A
A Output
3.5. RAM and ROM
1 0
RAM ROM 0 1
Random access memory Read only memory
Used to store data during Used to store system
runtime of the computer information
Can read & write data Can only read data
Volatile: data gone when Non-volatile: data is never
NAND gate: A.B
computer switched off deleted
A B Output
3.6. Static and Dynamic RAM 0 0 1
0 1 1
Static RAM (SRAM) Dynamic RAM 1 0 1
Needs 6 to 8 transistors Needs 3 to 4 transistors 1 1 0
More space in a chip Less space in a chip
4× more expensive Cheaper
Consumes more power Consumes less power
Faster data access time Slower data access time
Lower storage capacity Higher storage capacity
NOR gate: A + B
Memory can be deleted &
Not possible to refresh
refreshed while running a A B Output
programs
program
0 0 1
0 1 0
3.7. Logic Gates 1 0 0
1 1 0
CAIE AS LEVEL COMPUTER SCIENCE (9618)
Accumulator: single general-purpose register inside ALU.
It is a
single general-purpose register where all values
held when processed
by arithmetic & logical operations.
XOR gate: A ⨁ B 4.3. The Processor
A B Output Arithmetic and logic unit (ALU): part of processor that
0 0 0 performs
arithmetic calculations & logical decisions
0 1 1 Arithmetic operations: add, subtract, multiply etc.
Logical operations: comparing binary patterns and
1 0 1
making
decisions
1 1 0 Control unit: part of processor that fetches instructions
from
memory, decodes them & synchronizes operations
before sending
signals to other parts of the computer.
System clock: timing device connected to the processor
that
synchronizes when fetch-execute cycle runs
Integrated circuit: set of electronic circuits on one small
plate ("chip") of semiconductor material (e.g. silicon) 4.4. System Buses
Bus: set of parallel wires that connect various
4. Processor Fundamentals components &
provides communication between them
Data bus: bi-directional, used to carry data and
instructions
between system components. The memory
4.1. Von Neumann Machine data register (MDR) is at one
end of the data bus.
Address bus: unidirectional, carries address of main
Von Neumann realized data and programs are memory
location or input/output device about to be used
indistinguishable & can
therefore use the same memory. from processor to
memory address register (MAR)
Von Neumann architecture uses a single processor. Control bus: bi-directional, used to send control signals
It follows a linear sequence of fetch–decode–execute from
control unit to ensure access/use of data & address
operations for
the set of instructions i.e. the program. buses by
components of system does not lead to conflict
In order to do this, the processor has to use registers.
4.2. Registers
Registers: an extremely fast piece of on-chip memory,
usually 32
or 64 bits in size for temporary storage
Registers are outside the immediate access store and
consequently
allow faster access to the data they store.
Special registers have special
purposes:
Program counter (PC): keeps track of where to find next
instruction so that a copy of the instruction can be placed
in the
current instruction register.
Memory data register (MDR): acts like a buffer & holds
anything
copied from memory ready for processor to use 4.5. Performance of a Computer System
Memory address register (MAR): used to hold memory
address that
contains either the next piece of data or an Clock speed: the number of cycles that are performed by
instruction that is to
be used. the CPU
per second. Faster clock speed means processes
Index register (IR): a microprocessor register used for of fetch, decode and
execute occur faster however faster
modifying operand addresses during run of a program. clock speed causes processor to
heat up.
Used if address
indirect; a constant from the instruction Bus width: determines maximum possible memory
added to contents of IR to
form address to operand/data capacity of the
system. Wider bus width means more bits
Current instruction register (CIR): holds the instruction can be transferred
simultaneously.
that
is to be executed.
Status register (SR): holds results of comparisons to 4.6. Peripheral Devices
decide
later for action, intermediate results of arithmetic
performed and
any errors occurred during arithmetic Peripheral devices: hardware device outside the CPU
General-purpose register: One or more registers in the Cannot be connected directly to processor ∴ processor
CPU that
temporarily store data
controls and communicates through an I/O controller
CAIE AS LEVEL COMPUTER SCIENCE (9618)
I/O controller: electronic circuit board consisting of: ISR executed
Interface allowing connection of controller to system All registers except for PC are restored to original
Set of data, command and status registers Interrupts re-enabled
I/O Port: Interface that enables the connection of the PC is then restored
controller to the device Return to start of cycle
I/O ports allow I/O devices to be connected to the CPU
without
having to have specialized hardware for each one 4.10. Processor’s Instruction Set
i.e. a USB port can
connect many different I/Os
Op Code Operand Explanation
4.7. Fetch-Execute Cycle Addressing
Immediate: Load n into
The fetch stage: LDM #n
ACC
Copy the address that is in the PC into the MAR
Increment the PC (ready for the next fetch) Direct: load contents at
LDD
Load the instruction in address of MAR into the MDR address into the ACC
Load the instruction in MDR into the CIR Indirect: Load contents
The decode stage: LDI of address at given
Identify type of addressing used by instruction address into ACC
Direct address: load copy into
MAR & retrieve data Indexed: Load contents
Indirect address: add address
to IR, copy result to MAR LDX of given address + IR into
Retrieve contents of new address ACC
Decode the instruction Data Movement
The execute stage:
Store contents of ACC
If instruction is a jump instruction, load address STO
into address
operand into
PC then go to start
If not, execute instruction then go to start Arithmetic Operations
Add contents of register
ADD
to ACC
4.8. Register Transfer Notation (RTN)
Add 1 to contents of the
INC
register
Here the cycle is depicted by RTN:
MAR ← PC Comparing
PC ← PC + 1 Compare contents of
MDR ← M AR CMP ACC with that of given
CIR ← M DR address
Decode Compare contents of
CMP #n
Execute ACC with n
Return to start Conditional Jumps
Square bracket denote value currently in that register Jump to address if
Double square bracket means the CPU must do a logical JPE
compare TRUE
process and
then copy this value
Jump to address if
JPN
compare FALSE
4.9. Interrupts Unconditional Jumps
JMP Jump to given address
A signal from some device or source seeking the attention
I/O Data
of the
processor
Interrupt register: a special register in the CPU Input any character and
IN
Before each cycle, the interrupt register is checked. store ASCII value in ACC
Depending on the priority of the interrupt, the running Output character whose
process is
saved and the control of the processor is OUT ASCII value is stored in
passed to the interrupt
handler ACC
Ending
Interrupt handler a.k.a. Interrupt Service Routine (ISR):
Return Control to
END
Different ISRs are used for different source of interrupt operating system
Typical sequence of actions when interrupt occurs: # denotes immediate
Current fetch-execute cycle completed addressing
Contents of all registers, especially PC, stored away B denotes a binary
Source of interrupt identified number, e.g. B01001010
If low priority: then disabled & denotes a hexadecimal
If high priority: PC loaded with address of relevant ISR number, e.g. &4A
CAIE AS LEVEL COMPUTER SCIENCE (9618)
4.11. Addressing
Indirect Addressing: The address to be used is at the given
address.
Load contents of this second address to the ACC
Example:
LDI 203
Go to location 203
Contents of location 203 is 200 so go to location 200
From location 200, loads contents into accumulator
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
Example of jumps in pseudocode:
1st line shows a conditional jump, next instruction 3
lines
away if accumulator contains 2
2nd line shows an unconditional jump where 5 lines are
skipped and the code carries on, avoiding some lines
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
Indexed addressing: form the address to be used as 4.12. Assembly Language and Machine
<address> + the
contents of the IR (Index Register)
Code
Example:
Assembly language: low-level programming language
LDX 101
with
instructions made up of an op code and an operand
Index Register = 3 Machine code: code written in binary that uses the
Therefore, address to be used = 101 + 3 = 104 processor’s
basic machine operations
Contents of address 104 is loaded into the Accumulator Relationship: every assembly language instruction
translates
into one machine code instruction (1 to 1)
Symbolic addressing:
Mnemonics used to represent operation codes e.g. IN
Labels can be used for addresses e.g. PRICE
Absolute addressing: a fixed address in memory
Assembly directives are used to specify:
Starting addresses for programs
Starting values for memory locations
Specify the end of program text
Macros: sequence of instructions, assigned by a name
and could
be used anywhere in the program. Macro
instructions are expanded
into a group of instructions.
Assembler:
Software that changes assembly language into
machine code for
the processor to understand
The assembler replaces all mnemonics and labels
with their
respective binary values
These binary values are predefined before by the
assembler
software
Assembly processes:
CAIE AS LEVEL COMPUTER SCIENCE (9618)
One pass assembler: Virus checker keeps a constant check on files, searching
Assembler converts mnemonic source code into for viruses
and deletes it if found.
machine code in one
sweep of program
Cannot handle code that involves forward referencing Defragmenter software:
Two pass assembler: software makes 2 passes thru code
Reorganizes files & unused space on hard disk so
On the first pass:
operating system
accesses data quicker
Symbol table created to enter symbolic addresses and
Files can be big so have to be stored in multiple sectors
labels into
specific addresses
Fragmentation, contents of a file are scattered across two
All errors are suppressed
or more
noncontiguous sectors
On the second pass:
Fragmentation slows down disk access and thus the
Jump instructions can access memory addresses from
performance of the
entire computer.
the table
Defragmenting disk: reorganizing files so they are stored
Whole source code translate into machine code
in
contiguous sectors
Error reported if they exist
Disk content analysis software:
5. System Software Software utility for visualization of disk space usage
Gets size for each folder and files, and generates a
graphical chart
showing disk usage distribution according
5.1. Operating System to folders or other user
defined criteria.
A set of programs designed to run in the background on a File compression:
computer
system which
Controls operation of computer system Reduces the size of a file by cutting out much of the
Provides a user interface duplication of
data in the file.
Controls how computer responds to user’s requests Causes improvements in the computer’s performance by
Controls how hardware communicate with each other reducing the
data that needs to be stored
Provides an environment in which application software
can be
executed Automatic Backup:
The operating system (OS) must provide: Duplicate important data in the event of a hard drive
failure, user
error, disaster or accident.
Management of resources of the computer system: Can be used for individual computers or for an
Processor management: for multiprogramming enterprise’s
computers and servers.
decide which job will
get the next use of the processor Software can be set to backup selected files and folders
File management: maintaining a list of files, on a
scheduled basis or as required.
directories and which file allocation units belong to
which files 5.3. Library Programs
Input/output management: control of all input and
output devices
attached to the computer Collections of resources used to develop software
An interface between the user and the machine Made up of pre-written code & functions, subroutines
An interface between applications software & machine Provide services to other more complex programs
Security for the data on the system Example: the design of a program running on Windows 7
Utility software to allow maintenance to be done.
All programs run on Windows use Windows GUI library
Produces same “feel” when running any program
5.2. Utility Programs
Advantages Disadvantages
Type of system software designed to help analyze, Less time consuming Prone to viruses
configure,
optimize and maintain computer. May require manual tweak -
Reduces need for testing
tedious
Disk formatter:
Better/advanced engines
Carries out the process of preparing a data storage
device such as a
hard disk drive, for initial use Dynamic Link Library Files (DLL):
Formatting, process where the computer ‘draws lines’ on
the surface
of disk surface to split it into small areas. A file acting as a library that contains code and data
Can be used by different programs running
Virus checker: simultaneously
∴ reduces strain on memory
Each DLL file can be seen as modules in a more complex
Finds and removes computer viruses from a computer program,
making it easier to install and run updates
When files sent from one computer to another, possible it
may
contain a virus that can infect receiving computer
CAIE AS LEVEL COMPUTER SCIENCE (9618)
5.4. Language Translators 6.3. Security Measures for Computer
Assembler:
Systems
Translates assembly language into machine code
User Accounts:
The mnemonics used translates into machine opcodes
Each user has an ID and password which are the log in
Process simple because assembly language has a
details
for his user account
one-to-one
relationship with machine code.
User assigned privilege which gives him access to only
Assembler basically translate mnemonics into binary
his
workspace, preventing him to have admin rights.
Compiler: translation of a high-level language program
Can assign privilege to files so users with low
Translates high level code into low level code
privileges do
not have access.
Reason for translating: create an executable program
Firewalls:
Advantages Disadvantages Set of programs, located at network gateway, that
protects the
resources of a private network from
Only be produced when all
exe easily distributed users from other networks
errors are fixed
Filters information incoming to computer system
With .exe, don’t need compiler Development process long – Information packets can be flagged by firewall and
software locating errors thus not
allowed through
No source code – users not Authentication techniques:
Uses a lot of resources
able to edit/plagiarize Digital signatures: a unique personal trait required by
a
computer to access certain data
Interpreter: execution of a high-level language program Password: case-sensitive, unique string of letters,
Program translated line-by-line numbers and
special characters.
Biometric scans e.g. retina, fingerprint, palm
Advantages Disadvantages
Can run program any time, Execution very slow – 6.4. Security Measures for Data
even before code finished translated each time run
Debugging easier/faster Interpreter needed Data backup: an exact copy of an original piece of data in
No .exe produced case
the original is lost or corrupted
Can be made on any type of storage device
High level language programs may be partially compiled May be within the same computer system or at a
and partially
interpreted, such as Java different site
Disk-mirroring strategy: real-time strategy that writes
data to
two or more disks at the same time.
6. Security, Privacy and Data If one fails, the other is still there to be read off of
It can be done using more than one extra hard disk
Integrity Encryption: conversion of data to code by encoding it
Data stored in an incomprehensive state
Data security: making sure that data is protected against Doesn’t prevent illegal access but appears
loss
and unauthorized access. meaningless
Data integrity: making sure that the data is valid. Necessary to use decryption software to decode data
Privacy of Data: deals with the ability to determine what Encryption keys complex algorithms; cannot crack
data
is shared with the third party Access rights to data (authorization): different users are
assigned different authorization levels which prevent
them from
accessing all the data so increase security
6.2. Security of Data and Computer
System 6.5. Errors that can Occur
Security of Data Security of System Data held in a computer system may become corrupted in
Protection of data on a Protection of the computer different ways
and at many stages during data processing:
computer system system
Errors on input: data keyed in wrongly, a batch of data
To prevent access of viruses
To prevent corruption of data could be
lost or accidently entered twice
to the system and prevent
and prevent hackers from Errors in operating procedures: update master file twice
hackers to enter your
using data Program errors: could lead to a corruption of files which
computer system
may
only surface later on
E.g. encryption E.g. ID & Password Viruses: files can be corrupted or deleted when a disk is
infected with a virus
Transmission errors: interference in communications link
may
cause bits to be wrongly received
CAIE AS LEVEL COMPUTER SCIENCE (9618)
6.6. Data Validation 7.2. ACM/IEEE Software Engineering
Data validation: checks data entered is sensible
Code of Ethics
Range check: data must be between a set of values Eight ethics principles of software engineers (SEs):
Character check: data must have correct character type
Public: act consistently in the public interest
Format check: data must follow correct pattern/order
Client: act in the best interests of client
Length check: data must have an exact no. of characters
Employer: act in the best interests of employer
Existence check: data entered must exist (e.g. barcode
Product: software and related modifications meet highest
must
correlate to an item)
possible standards
Check digit: 1 digit is used to be answer to an arithmetic
Judgment: maintain integrity and independence in their
operation of other digits in data. If not matched then data
professional judgment
entered
incorrectly
Management: team leaders should subscribe to and
Data can be valid but this doesn’t mean data is
accurate promote an
ethical approach to the management of
software development and
maintenance.
Profession: advance integrity & reputation of profession
6.7. Data Verification for Data Entry Colleague: be fair to & supportive of colleagues
Self: participate in lifelong learning regarding practice of
Data verification: checks data entered is accurate
profession
Person manually compares original data with that entered
to check if
correct 7.3. Ownership
Enter data into computer twice and compares.
If differences found, go back to raw data to fix error Data ownership: having legal rights and complete control
over a
single piece or set of data elements.
6.8. Data Verification during Data Copyright gives the creators of some types of media
rights to
control how they're used and distributed.
Transfer Programming ideas and methods can be stolen by
competitors, software
can easily be copied and
Errors may occur when data moved from one point to bootlegged (sold illegally) hence
legislation is needed to
another point in
system. Following find errors: protect the ownership, usage and copy right
of data.
Parity Check:
7.4. Software Licensing
All data transmitted as bits
Number of 1s in a byte must always be either an odd Free Software Foundation:
number or an
even number
Parity can be set either as even or odd License gives user freedom to run, copy, distribute, study,
Example: two communicating devices decide there will change
and improve software.
always be an
odd number of 1s. A byte is received that Condition: any redistributed version of software must be
has an even number of 1s
so error must have occurred distributed
with original terms of free use, modification,
and receiving device would ask for it to
be sent again and distribution (aka
copyleft)
Used also when data sent between parts of the CPU
The Open Source Initiative:
Not foolproof: if 2 errors made, data accepted
Source code of an open-source software is readily
Checksum Check:
available to users
under a copyright; does not enable user
Data sent from one place to another as block of bytes to re-distribute the
software
rather than
individual bytes Concept of open-source program relies on fact that a user
Computer adds together all bytes being sent can review
a source-code for eliminating bugs in it
Any bits lost at most-significant end as carry ignored so
Shareware:
answer is
an 8 bit number
Checksum calculated before and after data sent Demonstration software that is distributed for free but for
If two bytes different, error occurred therefore block of a
specific evaluation period only
bytes must
be sent again Distributed on trial basis and with an understanding that
sometime
later a user may be interested in paying for it
7. Ethics and Ownership Used for marketing purposes
Commercial: Requires payment before it can be used, but
Computer Ethics: how computing professionals should includes all
program's features, with no restrictions
make
decisions regarding professional & social conduct.
CAIE AS LEVEL COMPUTER SCIENCE (9618)
Developer interface: allows creating and manipulating
8. Database and Data database
in SQL rather than graphically
Query processor: handles high-level queries. It parses,
Modelling validates, optimizes, and compiles or interprets a query
which
results in the query plan.
8.1. File Based System
8.3. Relational Database Modelling
Data stored in discrete files, stored on computer, and can
be
accessed, altered or removed by the user Entity: object/event which can be distinctly identified
Table: contains a group of related entities in rows and
Disadvantages of File Based System: columns
called an entity set
Tuple: a row or a record in a relation
No enforcing control on organization/structure of files Attribute: a field or column in a relation
Data repeated in different files; manually change each Primary key: attribute or combination of them that
Sorting must be done manually or must write a program uniquely
define each tuple in relation
Data may be in different format; difficult to find and use Candidate key: attribute that can potentially be a primary
Impossible for it to be multi-user; chaotic key
Security not sophisticated; users can access everything Foreign key: attribute or combination of them that relates
2
different tables
8.2. Database Management Systems Referential integrity: prevents users or applications from
entering inconsistent data
(DBMS) Secondary key: candidate keys not chosen as the primary
key
Database: collection of non-redundant interrelated data Indexing: creating a secondary key on an attribute to
DBMS: Software programs that allow databases to be provide
fast access when searching on that attribute;
defined,
constructed and manipulated indexing data must be
updated when table data changes
Features of a DBMS:
8.4. Relational Design of a System
Data management: data stored in relational databases -
tables
stored in secondary storage
Data dictionary contains:
List of all files in database
No. of records in each file
Names & types of each field
Data modeling: analysis of data objects used in database,
identifying relationships among them
Logical schema: overall view of entire database, includes:
entities, attributes and relationships
Data integrity: entire block copied to user’s area when 8.5. Normalization
being
changed, saved back when done
Data security: handles password allocation and 1st Normal Form (1NF): contains no repeating attribute or
verification,
backups database automatically, controls groups of attributes. Intersection of each tuple and attribute
what certain user’s view by
access rights of individuals or contains
only 1 value. Example:
groups of users
Data change clash solutions:
Open entire database in exclusive mode – impractical with
several users
Lock all records in the table being modified – one user
changing
a table, others can only read table
Lock record currently being edited – as someone changes
something, others can only read record
User specifies no locks – software warns user of
simultaneous
change, resolve manually
Deadlock: 2 locks at the same
time, DBMS must
recognize, 1 user must abort task
2nd Normal Form (2NF): it is in 1NF and every non-primary
Tools in a DBMS: key attribute is fully dependent on the primary; all the
incomplete
dependencies have been removed. Example:
CAIE AS LEVEL COMPUTER SCIENCE (9618)
PRIMARY KEY (field)
Adding a foreign key:
FOREIGN KEY (field) REFERENCES <table>(field)
Example:
CREATE DATABASE ‘Personnel.gdb’
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))
8.7. Data Manipulation Language (DML)
Query and maintenance of data done using this language
– written in
SQL
Queries:
Creating a query:
SELECT <field-name>
FROM <table-name>
WHERE <search-condition>
SQL Operators:
3rd Normal Form (3NF): it is in 1NF and 2NF and all
non-key = Equals to
elements are fully dependent on the primary key. No
inter- > Greater than
dependencies between attributes. < Less than
MANY-TO-MANY functions cannot be directly normalized >= Greater than or equal to
to 3NF, must
use a 2 step process e.g. <= Less than or equal to
<> Not equal to
IS NULL Check for null values
becomes: Sort into ascending order:
ORDER BY <field-name>
8.6. Data Definition Language (DDL) Arrange identical data into groups:
GROUP BY <field-name>
Creation/modification of the database structure using this
language Joining together fields of different tables:
written in SQL
Creating a database: INNER JOIN
CREATE DATBASE <database-name>
Data Maintenance:
Creating a table: Adding data to table:
CREATE TABLE <table-name> (…)
INSERT INTO <table-name>(field1, field2, field3)
VALUES (value1, value2, value3)
Changing a table:
Deleting a record:
ALTER TABLE <table-name>
DELETE FROM <table-name>
ADD <field-name><data-type>
WHERE <condition>
Adding a primary key: Updating a field in a table:
CAIE AS LEVEL COMPUTER SCIENCE (9618)
UPDATE <table-name>
WHERE <condition>
SET <field-name> = <value>
CAIE AS LEVEL
COMPUTER SCIENCE (9618)