Professional Documents
Culture Documents
Caie As Level: Computer SCIENCE (9618)
Caie As Level: Computer SCIENCE (9618)
ORG
CAIE AS LEVEL
COMPUTER
SCIENCE (9618)
SUMMARIZED NOTES ON THE SYLLABUS
CAIE AS LEVEL COMPUTER SCIENCE (9618)
WWW.ZNOTES.ORG
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
Communication & Internet
sequences 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 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
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.
WWW.ZNOTES.ORG
CAIE AS LEVEL COMPUTER SCIENCE (9618)
Routers:
Gateways:
WWW.ZNOTES.ORG
CAIE AS LEVEL COMPUTER SCIENCE (9618)
web pages to
be scripted; to have different and changing
content depending on
user input, or other variables.
Server-side script: code that runs on server written using
An IP address serves two principal functions: language supported by server e.g. PHP. Used to provide
host or network interface identification interface for
client & to limit client access to databases
location addressing
When communicating, a device can send another a Bit Streaming
message by stating
their IP address and requesting a
message to be sent through the
router. Bit stream: contiguous sequence of bits, representing a
stream
of data, transmitted continuously over a
Public IP Address Private IP Address communications path,
serially (one at a time).
Address provided to Real-time streaming:
Address issued by router to each
home network by An event is captured live
device in home network
ISP The video signal is encoded to streaming media files
Address only unique in the network The encoded feed is then uploaded to a file server
Address is unique
and cannot be accessed through the Streaming servers duplicate the feed and send it to all
throughout Internet
internet clients
requesting it in real time
Allows two On-demand streaming:
computers to Video is stored on a server as streaming media files
identify each other If client requests to watch a specific video, a bit
stream is
set up which transmits the saved video
Uniform Resource Locator (URL): A character string It is important for the client to have a fast-broadband
referring to
the location of an internet resource speed
when bit streaming because the client has to
download the bits
and display it at the same time.
URLs allow us to specify the domain name and exact
location of a
resource on the internet. Broadband speed required depends on type of stream
For example: user requires; if
user requires better quality then higher
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:
Hardware
Domain Name: humanly-memorable names for Internet
participants
such as computers and networks. One Input Devices
domain name can be connected to
multiple IP addresses
Domain Name Service (DNS): naming system used for Keyboard: device used to input text into a computer
computers or
resources having internet connection system. When
a key is pressed, an electrical circuit is
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
Client and Server-Side Scripting diode
to illuminate the surface and a light sensor to
detect movement
relative to a surface
Sequence of Events when Viewing a Website: Flatbed scanner: optically scans documents, & converts it
1. User specifies a URL in their client to a
digital image. Composed of a glass pane, bright light
2. Client sends DNS lookup request to convert URL to which
illuminates pane and a moving optical array.
an IP address
and initiates a TCP connection to Sensor: device that detects events or changes in physical
server quantities and provides a corresponding output,
3. Server acknowledges TCP connection, client sends generally as an
electrical or optical signal
HTTP requests
to retrieve content for the URL.
4. Server replies with content for web page and 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
WWW.ZNOTES.ORG
CAIE AS LEVEL COMPUTER SCIENCE (9618)
Printer: output device that makes a persistent readable Static RAM (SRAM) Dynamic RAM
representation of graphics/text on physical media. Consumes more
Inkjet printer: non-impact printers which work by Consumes less power
power
propelling
variably-sized droplets of liquid or molten
Faster data access
material (ink) onto
physical media Slower data access time
time
Laser printer: non-impact printers which work by
repeatedly
passing a laser beam back & forth over an Lower storage
Higher storage capacity
electron-charged,
cylindrical drum, to define a capacity
differentially-charged image. Drum
selectively collects Not possible to Memory can be deleted & refreshed
charged, powdered ink, and transfers image
to loaded refresh programs while running a program
paper, which is then heated to fuse.
Speakers: device which outputs sound by converting .
digital
signals of sound from the computer to analogue
Logic Gates
Secondary Storage Device
Logic Gates: use one or more inputs and produces a
Optical disks: flat, usually circular disc which encodes single
logical output
binary
data in form of pits and lands. Pits = 0, due to lack AND gate: If both inputs high, output is high
of reflection
and lands = 1, due to reflection when read
Hard disk: data storage device consisting of rotating A B Output
disks,
platters, and magnetic heads arranged on an 0 0 0
actuator arm to read and
write data to the surfaces.
0 1 0
Flash memory: solid state devices which have no moving
parts and
data is programmed onto them 1 0 0
1 1 1
WWW.ZNOTES.ORG
CAIE AS LEVEL COMPUTER SCIENCE (9618)
1 1 0 instruction that is to
be used.
Index register (IR): a microprocessor register used for
modifying operand addresses during run of a program.
Used if address
indirect; a constant from the instruction
added to contents of IR to
form address to operand/data
Current instruction register (CIR): holds the instruction
NOR gate: A + B that
is to be executed.
Status register (SR): holds results of comparisons to
decide
later for action, intermediate results of arithmetic
A B Output
performed and
any errors occurred during arithmetic
0 0 1 General-purpose register: One or more registers in the
0 1 0 CPU that
temporarily store data
1 0 0 Accumulator: single general-purpose register inside ALU.
1 1 0 It is a
single general-purpose register where all values
held when processed
by arithmetic & logical operations.
The Processor
Arithmetic and logic unit (ALU): part of processor that
XOR gate: A ⨁ B
performs
arithmetic calculations & logical decisions
Arithmetic operations: add, subtract, multiply etc.
A B Output Logical operations: comparing binary patterns and
0 0 0 making
decisions
0 1 1 Control unit: part of processor that fetches instructions
from
memory, decodes them & synchronizes operations
1 0 1
before sending
signals to other parts of the computer.
1 1 0 System clock: timing device connected to the processor
that
synchronizes when fetch-execute cycle runs
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.
WWW.ZNOTES.ORG
CAIE AS LEVEL COMPUTER SCIENCE (9618)
Clock speed: the number of cycles that are performed by Interrupt register: a special register in the CPU
the CPU
per second. Faster clock speed means processes Before each cycle, the interrupt register is checked.
of fetch, decode and
execute occur faster however faster Depending on the priority of the interrupt, the running
clock speed causes processor to
heat up. process is
saved and the control of the processor is
Bus width: determines maximum possible memory passed to the interrupt
handler
capacity of the
system. Wider bus width means more bits
can be transferred
simultaneously. Interrupt handler a.k.a. Interrupt Service Routine (ISR):
WWW.ZNOTES.ORG
CAIE AS LEVEL COMPUTER SCIENCE (9618)
Addressing
Indirect Addressing: The address to be used is at the given Relative addressing: next instruction to be carried out is an
address.
Load contents of this second address to the ACC offset
number of locations away, relative to address of
current instruction
held in PC; allows for relocatable code
Example:
Example of jumps in pseudocode:
LDI 203
Go to location 203
Contents of location 203 is 200 so go to location 200
From location 200, loads contents into accumulator
WWW.ZNOTES.ORG
CAIE AS LEVEL COMPUTER SCIENCE (9618)
Software that changes assembly language into Carries out the process of preparing a data storage device
machine code for
the processor to understand such as a
hard disk drive, for initial use
The assembler replaces all mnemonics and labels with Formatting, process where the computer ‘draws lines’ on
their
respective binary values the surface
of disk surface to split it into small areas.
These binary values are predefined before by the
assembler
software Virus checker:
WWW.ZNOTES.ORG
CAIE AS LEVEL COMPUTER SCIENCE (9618)
WWW.ZNOTES.ORG
CAIE AS LEVEL COMPUTER SCIENCE (9618)
Data held in a computer system may become corrupted in Any bits lost at most-significant end as carry ignored so
different ways
and at many stages during data processing: answer is
an 8 bit number
Checksum calculated before and after data sent
Errors on input: data keyed in wrongly, a batch of data If two bytes different, error occurred therefore block of
could be
lost or accidently entered twice bytes must
be sent again
Errors in operating procedures: update master file twice
Program errors: could lead to a corruption of files which
may
only surface later on Ethics and Ownership
Viruses: files can be corrupted or deleted when a disk is
infected with a virus Computer Ethics: how computing professionals should
Transmission errors: interference in communications link make
decisions regarding professional & social conduct.
may
cause bits to be wrongly received
WWW.ZNOTES.ORG
CAIE AS LEVEL COMPUTER SCIENCE (9618)
WWW.ZNOTES.ORG
CAIE AS LEVEL COMPUTER SCIENCE (9618)
‘’’python
CREATE DATBASE <database-name>
‘’’
Creating a table:
‘’’python
CREATE TABLE <table-name> (…)
‘’’
2nd Normal Form (2NF): it is in 1NF and every non-primary
key attribute is fully dependent on the primary; all the Changing a table:
incomplete
dependencies have been removed. Example:
‘’’python
ALTER TABLE <table-name>
ADD <field-name><data-type>
‘’’
‘’’python
PRIMARY KEY (field)
‘’’
‘’’python
‘’’
Example:
‘’’python
Queries:
‘’’python
Example:
SELECT <field-name>
FROM <table-name>
Data Definition Language (DDL) WHERE <search-condition>
WWW.ZNOTES.ORG
CAIE AS LEVEL COMPUTER SCIENCE (9618)
‘’’python ‘’’python
GROUP BY <field-name>
UPDATE <table-name>
‘’’
SET <field-name> = <value>
Joining together fields of different tables: WHERE <condition>
‘’’python ‘’’
WWW.ZNOTES.ORG
CAIE AS LEVEL
COMPUTER SCIENCE (9618)