Computer Science Revision Notes Paper 1
Computer Science Revision Notes Paper 1
Computer Science Revision Notes Paper 1
SYSTEM FUNDAMENTALS
Extent of a new system update depends on how much time, software, hardware, people needed
and the immediate environment. May need to train employees to use the system, fire employees
(e.g. secretary not needed if salespersons input orders from home PC), get more hardware (e.g.
employees need PC and network needs to be implemented), change server location etc.
To decide whether project is worth pursuing (Compatibility issues/ strategies for mergers/ data
migration/ hosting system/ installation processes are issues to be considered in the planning stage,
once the project is deemed worth pursuing), use:
Technical feasibility: Is available technology sufficient and advanced enough to implement the
system?
Economic feasibility: Is the new system cost effective? Are funds sufficient?
Legal feasibility: Are there conflicts between the system and laws/ regulations?
Operational feasibility: Are existing organisational procedures sufficient to support maintenance
and operation of the new system?
Schedule feasibility: How long will it take to implement?
Change management: Shifting people, departments and organisations from one state to the
desired state. Need to maximise benefits and minimise impact of change on people so that
stakeholders accept the change in environment. Issues regarding planning the system must be
resolved, e.g. students informed of double-sided printing to make use of the new feature
Compatibility issues
Business mergers: Two businesses combine. Need to ensure systems are compatible.
Incompatibility can arise from...
Remote hosted system: Software As A Service (SaaS) solution. Hardware is elsewhere, updated
centrally. Users can access data and operate software from the cloud and pay for service on a
subscription basis. e.g. sign up for message board system where others take care of maintenance.
PROS:
Lower initial cost
Can predict overall cost easier
Best for when organisation doesn't have necessary hardware already
You don't have to maintain it yourself
Data secure in data centre
CONS:
Relying on a third party= risk of data loss if provider shuts down
Legislation in country of provider may be weaker than in user’s country
Performance generally lower than on-premise solutions
Remote host in different time zone, can be inconvenient for end-users?
Depends on internet connection
Installation processes (adv/dis)
Implementation/ conversion: Putting new system online and retiring old one. Types...
Parallel: Both systems run parallel to each other at first to compare outputs until satisfied
with the new system, terminate old one. If new system fails, can revert to old one = less
risk, ideal for critical systems e.g. nuclear power station. But higher cost. Not efficient if
systems have different input/outputs/ processes. Workers may be trained to use new
system for nothing.
Direct/ Big Bang: Set up new one and terminate old one at the same time. Preferred if
system not critical, due to higher risk as system might not function well. Less costly.
Pilot: In organisations with multiple sites. New system is introduced in one of the sites (pilot
site/group) then introduced to others if successful. Less risk. Worker training
Phased: Convert one module at a time e.g. per department. Training period and
implementation takes longer
Types of testing
Testing is important because it identifies problems to be fixed, areas for improvement and
determines whether system/ software fulfils requirements. If not done properly, inadequate
system= inadequate employee productivity, reduced efficiency and output, increased costs= end-
user dissatisfaction.
1. Alpha testing: Offering early development version to other developers before available to
general public, get feedback.
2. Beta testing: Provide version to select group of users outside of company (closed beta) or
to public (open beta) and receive real-world feedback. But user report is not always best
quality, and there are many reports of the same bugs.
3. User acceptance testing: Usually last stage, provided to clients as a last-minute check
that the product satisfies target audience
4. Debugging: Systematically finding and correcting bugs/errors. Some programs do it
automatically = cheaper and faster.
User focus
User documentation
Important so users can understand, use and make the most of the system. Ensures users can
quickly adapt to the software/ system with minimal costs/inefficiencies. Can include...
Requirements- identify attributes, characteristics and functions
Technical- details on how to install and configure the product
End user- manuals for end user, support staff and system administrators. Details on how to
use the product
Marketing- how to market the product, analysis of market demand
In general, employees need to learn quickly and easily to implement new system faster to reduce
costs and minimise inefficiencies
System backup
Consequences can be serious e.g. hospital: puts lives in danger, may have to repeat tests and
procedures. In other situations, can cut into revenue if dissatisfied customer tells others e.g.
customer makes reservation but there’s no record of it or free rooms so they have to go elsewhere.
Measures to prevent data loss
1. Regular backups: On hard disks/ magnetic tape, online or on removable media (e.g.
USB, CDs) for fast backup and storage
2. Offsite storage: Data backups stored in different geographical location
3. Firewall and antivirus: Prevent virus infections
4. Failover systems: Computer system that system can switch to in case of hardware/
software/ network failure. Often switches automatically to reduce time
Software deployment
It’s important that users can install updates because otherwise they might not have fixes for bugs
and errors or be able to benefit from added features/ improvements leading to performance issues.
Especially for organisations with different locations- different sites could have different versions of
the software, leading to incompatibility.
Computer components
Stakeholder: Has an interest or investment in a project and is impacted by how it turns out.
System analysts have to collaborate with all stakeholders- clients and end-users.
Obtaining requirements:
Interviews: Face-to-face with verbal responses. Can be structured with the same
questions and manner for every stakeholder, or unstructured with more flexibility.
Questionnaires: Can be closed/restricted (yes/no, box checking) or open/unrestricted (free
response questions)
Direct observation of current procedures: On-site observation of different departments
to see where things can be more efficient.
Evaluating requirements
Interviews:
Talk directly to users/member of organisation and can observe non-verbal behaviour= more
reliable, valid data
Unstructured interviews can reveal more questions that otherwise wouldn’t have been
addressed= more detailed reports
Data from unstructured interviews is hard to summarise/ evaluate/ analyse
Level of detail depends on type of interview- structured interviews get less detailed
responses
Time-consuming to get detailed results
Questionnaire:
Time-saving and cost-efficient- can get info from a large group of people easily and cheaply
Closed/restricted questions= data is easier to compare
Open questions= more detailed reports
Level of detail depends on type of questions- closed questions don’t allow for clarifications,
elaborations, more details
Stakeholder could interpret question wrong= invalid answers
Observations:
Highlight aspects not detected in questionnaires/interviews= produce more detailed reports
May be more reliable than interviews- see what people actually do, instead of what they say
they do
Time consuming/expensive- might need to observe a complete business/system cycle
which could take a significant amount of time
People act differently when they know they are being watched= unreliable observations
This involves end user participation. Failure to involve end user in design process can lead to
software not suitable for its intended use because of lack of feedback- has adverse effect on user
productivity, efficiency etc. Need effective collaboration and communication between client,
developer and end-user.
Usability: Ability to accomplish user goals. More usable= more efficient to use, easier to learn.
Accessibility: Ability of system/ device to meet needs of as many individuals as possible. Low
accessibility = barriers to certain groups e.g. disabled
Computer architecture
Central Processing Unit (CPU): Component of a computer system which interprets/ processes
and executes program instructions.
Control Unit (CU): Fetches data/ instructions from memory, decodes it into commands and
controls transfer of data/instructions among other units of CPU.
Arithmetic Logic Unit (ALU): Performs arithmetic and logical calculations/operations
Registers: Small, very fast circuits that store intermediate values from calculations or instructions
inside the CPU
Memory Address Register (MAR): Stores address of next instruction to be decoded and
executed. Connected to RAM through Address Bus
Memory Data Register (MDR): Stores data of instruction most recently taken from RAM,
i.e. instruction about to be executed. Connected to RAM through Data Bus
Instruction/Machine cycle
Basic operation cycle of computer taking place within certain time period, where instruction is
fetched, decoded, executed and stored.
1. Address of next instruction stored in MAR (through Address Bus)
2. Using this address, data is fetched from main memory and stored in MDR
3. CU decodes instruction
4. ALU executes command/ operation
5. Output value stored in accumulator if needed
6. Processed data stored back on main memory. Position/address of location the data will be
stored in is sent along Address Bus, with data sent along Data Bus
Bus: Set of wires that connect two components in a computer system
Read Only Memory (ROM): Stores permanent instructions and data of programs used to boot and
operate the computer (e.g. Basic Input Output System). Cannot be overwritten. Non-volatile, data
and instructions remain even when there’s no power. Smaller than RAM.
Cache memory: Type of memory that is smaller and accessed faster than RAM since closer to the
CPU. Stores most frequently used data and instructions so CPU has to access the slower RAM
less often and performance speeds up. Computer checks if there's a copy of data in cache before
accessing main memory.
Secondary memory
Examples: HDD, USB, SD, magnetic tape, floppy disk
Or auxiliary storage. Relatively slow but higher capacity than primary memory. Can be written to
but non-volatile. Known as persistent storage because contents are persistent, not wiped out
after process is finished, or when there’s no power.
Data and instructions are copied from secondary storage to main memory (RAM) before being
executed by CPU. Because RAM has limited capacity & processed data needs to be stored
somewhere non-volatile, processed data and instructions are moved to secondary memory to
make space for new ones.
Without persistent storage, computer would only be able to perform basic operations and all data
re-inputted every time. Need to store processed data so we can use it again later, e.g. editing a
saved file.
Virtual memory: Part of secondary memory used as if it is main memory. If RAM is too full to load
new program, another program/ part of another program is loaded on virtual memory to make room
for the new program. If the other program is needed again, it’s swapped back out
Operating and application systems
Operating system: Set of software that controls computer's hardware resources and provides
services for programs.
Application software:
Word processing: e.g. MS Word, Google Docs. Producing, editing, formatting and printing
of documents.
Spreadsheets: e.g. MS Excel, Open Office Calc. Data represented by cells, organised in
rows and columns. Can perform calculations through formulae to process data and present
it in visual charts to analyse.
Database Management System (DBMS): e.g. MS Access. Manages and provides
interface for users to use database (organised store of data). Data is organised in records,
user can create or modify records, query and extract data.
Web browsers: e.g. Chrome, IE, MF. Access, retrieve, present content on WWW.
Connects to web servers to request information.
Email: e.g. Gmail (web-based) or MS Outlook (software-based). Exchange of digital
messages to email server, recipient receives message when they connect to server
Computer Aided Design (CAD): e.g. Autodesk AutoCAD, Google Sketchup, Dassault
Systemes Solid Works. Often used in engineering, manufacturing and architecture to
create, modify and analyse a design. Can convey info like shape, materials, dimensions
etc. with changeable values
Graphic processing: e.g Adobe Photoshop, Adobe Illustrator, GIMP. Manipulate visual
images: move, erase, crop, colour etc.
These are common elements provided by OS to improve usability as they’re usually in the same
place and used in the same way, while others may be provided by the software. Use of GUI
improves usability.
Binary representation
Binary digit (bit): Basic unit of info, 1 or 0. One digit in a binary number.
Byte: 8 bits. Kilobyte: 1024 bytes. Megabyte: 1024 kilobytes.
Decimal/ denary: Positional system that uses 10 digits to represent a number. Base-10.
Binary: Uses 2 digits to represent a number. Base-2
Hexadecimal: Positional system that uses 16 digits to represent a number. Base-16
0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
Converting
128 64 32 16 8 4 2 1
1 0 1 1 1 0
^Binary representation of [00]101110. Add up all the values where there’s a 1.
Converting from Dec to Binary could involve algorithm: divide by 2, retain remainders until you're
dividing 0 by 2. Rest of the digits are 0 if you haven’t reached 8 digits. Read result last to first to get
binary number left to right.
Data representation:
Integers: 256 values can be represented by 8-bit numbers. If representing negative
numbers most significant bit (MSB, most left one) is either 0 (positive) or 1 (negative) so
only 7 bits are left for the number.
Characters: American Standard Code for Information Interchange (ASCII) character
encoding scheme represents text. Each character (low/upp case latin letters, numbers,
punctuation and control characters) is assigned a value from 0 to 127. Unicode can also
have symbols and other languages
Strings: e.g. UTF-8 (unicode) used. On average 40 bits per word needed
Colours: Pixels, each one has a colour. Colour value can be represented by hex RGB- 6-
digit hex number (3 values), every 2 digits show how much red/green/blue there is in the
colour. Can also be represented in binary; more bits = more colours. Resolution =
width*height in pixels.
Logic gates
AND
2 inputs, output TRUE only if both inputs TRUE
A B C
0 0 0
0 1 0
1 0 0
1 1 1
OR
2 inputs. If either input is true, output is true.
A B C
0 0 0
0 1 1
1 0 1
1 1 1
NOT
NAND
NOT AND. AND gate but the output is inverted, so when both inputs are TRUE, output is FALSE.
A B C
0 0 1
0 1 1
1 0 1
1 1 0
NOR
NOT OR. OR gate but output inverted, so opposite of OR gate. If either input is true, output is false
A B C
0 0 1
0 1 0
1 0 0
1 1 0
A B C
0 0 0
0 1 1
1 0 1
1 1 0
C R H C•R _ W
H
0 0 0 0 1 1
0 0 1 0 0 0
0 1 0 0 1 1
0 1 1 0 0 0
1 0 0 0 1 1
1 0 1 0 0 0
1 1 0 1 1 1
1 1 1 1 0 1
^Truth table for the 3 inputs, then figure out (C AND R) and (NOT H) for each combination of inputs
between C, R and H. Finally figure out W for each combination by doing NOT of (C AND R) and
(NOT H)
NETWORKS
Network fundamentals
Network: Set of computers or computer systems that are interconnected and share resources and
data
Types of networks
Local Area Network (LAN): Network devices are connected within limited geographical
area, e.g. a room, a home, a school, office building etc. Data and peripherals can be
shared. Usually client-server, connected with hub/ switch and Ethernet cabling
Virtual Local Area Network (VLAN): Devices or LANs from different segments in a LAN
connected logically, e.g. splitting a hospital LAN into VLANs according to department so
each department can only access certain data. Usually via software, not hardware
Wireless Local Area Network (WLAN): Connects nodes in limited geographical area but
with no wires. Allows for mobile devices and easier connection/ removal, although less
secure
Wide Area Network (WAN): Connects different computer systems or LANs from different
geographical areas, can span over a city, country or the world, e.g. internet, different sites
of organisations connected
Storage Area Network (SAN): Type of LAN designed to handle large data transfers. Each
client is connected to a server that provides access to storage devices
Personal Area Network (PAN): Network covering individual's working area, very small
space. e.g. PC, phone, tablet sharing data. Can be wired (e.g. USB) or not (e.g. Bluetooth)
Peer-to-Peer Network (P2P): Different to client-server, no centralised server. All nodes
have equal privileges and responsibility for processing and sending data. All are client and
server at same time, consuming and supplying resources from and to other peers
Internet: A WAN. Connect to it through internet service provider (ISP) for monthly fee. Not owned
by single entity, no central server. All computer systems are independent to share resources.
Internet provides services such as support for email, file transfer, and the WWW, which consists of
webpages
Extranet: External extension to a LAN- Part of a network that uses internet protocols to allow
controlled access by specific users to LAN or WAN. e.g. business wants to share some data/
information with clients or partners but not all, so extends part of network (extranet) available for
access but with security/ privacy measures (e.g. firewall) so outsiders cannot access secure data
VPN vs Extranet
VPN authenticates sender before establishing tunnel
VPN access and transmission are always encrypted, whereas extranet has limited
encryption
VPN users have access to everything whereas extranet users only have access to specific
services
Open Systems Interconnection (OSI) model: Model that defines layers of network interaction.
Each layer deals with one aspect/ abstraction of network communication
1. Physical- e.g. cabling system components
2. Data link- e.g. Network Interface Card (NIC)
3. Network- Routing
4. Transport- Transmission- error detection
5. Session- Retransmission of data if not received by device
6. Presentation- Encryption and decryption of message for security
7. Application- The end-receiver application, e.g. e-mail
Acronyms to remember it: Programmers Do Not Throw Stale Pizza Away, Please Do Not Teach
Students Pointless Acronyms
Data transmission
Data packet: Unit of data for transmission with a format, it is part of a message made into a single
package. Contains address and data.
Packet switching: Network communication method: routers direct data packets transmitted along
different paths through networks to the best next step closer to destination address (where there’s
not too much traffic, or no down devices blocking transmission). Eventually the packet reaches the
router that knows the address of the destination device. Packets assemble there
Necessity of protocols
Data integrity: Ensures data is not changed or corrupted during transmission
Flow control: Controlling flow/load of resources due to limited bandwidth. Transport layer
uses protocols, e.g. to request sending application to slow down data flow rate
Deadlock prevention: Prevents situation where two or more competing programs or
actions are sharing a resource and preventing each other from using it
Congestion management: Prevents requests on network resources exceeding capacity
Error checking
Data compression
Data is often compressed (encoding data using fewer bits than the original) to take up less
bandwidth and reduce transmission time. Receiver has a program to decompress the file
Lossy compression (i.e. problems with compression): Permanently deletes certain information,
only part of the original data is displayed when decompressed. Acceptable with formats such
JPEG, GIF, MP3 as you won't notice much of a change although there may be less quality, e.g.
smaller range of colours
Lossless compression: Only eliminates statistical redundancy, all original data can be seen when
decompressed, e.g. Spreadsheets, word files, financial data as missing words or statistical data
would be a noticeable problem
Transmission media
Wireless: e.g. microwave/ radio signals, satellites, infrared (short distance). Compared to
metal cabling and fibre optics, is least reliable and slowest but cheapest
Metal conductor: e.g. copper cable, UTP cable, Coaxial cable. Faster, more reliable and
expensive than wireless but less than fibre optic.
Fibre optics: Fine optical fibres carrying beams of light as signals. Fastest and most
secure but also most expensive.
Wireless networking
Wireless devices communicate with no cables, e.g. with radio signals. Cell phones, tablets, LANs
etc.
Advantages:
Easier and cheaper to install than cable
Easier to set up temporary links
Easier to add new devices to network
Many public access points exist, can work from different areas like home
Can connect mobile devices, which are more convenient and portable
Disadvantages:
Relatively slow communication as signals travel through air
Affected by weather
Weaker security and protection
Higher error rates
Health concerns about long term exposure to electromagnetic waves
Symmetric-key encryption
Faster than public-key
Uses less computer resources
Keys must be shared before used
Danger of key becoming known by unauthorised individuals, another one must be used
Public-key encryption
Two sides don't need to share secret key beforehand to communicate
Messages take longer to encrypt and decrypt
Authenticity of public key needs to be verified
MAC addresses
Extra security
Danger of allowed list of MAC addresses being discovered
Difficult to manage the list as it grows
User ID
Easy to use
Prevents unauthorised access
With web interface password, person cannot access web-based utility page of router/
modem/ access point unless they have the password
Entering password each time may be time-consuming
Weak password is easy to crack
Firewall
Software firewall monitors traffic between device and network and prevents unauthorised
access
May slow down the device
Issues about censorship with software firewall, depending on organisation
Router hardware firewall prevents unauthorised persons getting access to the network
Router hardware firewall can't stop person within range of your Wi-Fi getting onto your Wi-
Fi network
COMPUTATIONAL THINKING
Thinking procedurally
This includes identifying the steps and putting them in the correct order e.g. recipes
Sub-procedure: A section of code in a program that does a specific job. Can be called by name
when needed without naming the details as these are wrapped in the procedure. It is therefore an
example of abstraction.
Thinking logically
Different actions are taken based on conditions, taking alternative procedures into account. Need
to identify conditions associated with a given decision (like an IF statement or logic gates- testing
conditions).
Thinking ahead
Need to identify inputs and outputs required in solution before carrying it out. e.g. cooking- need to
identify the different ingredients.
Gantt Charts:
Outlining tasks, how long they will take to carry out, and when they are carried out. Can identify
and show what tasks can be carried out concurrently.
^ Bar chart for project schedule management (from markscheme). Time scale on top, list of tasks
on side. Allows easy inspection and overlapping tasks, durations etc.
Pre-planning
Pre-fetching/ caching: Building libraries of pre-formed elements for future use, e.g. using Java
libraries to increase efficiency, making sure you have your most commonly used spices ready at
the front of your cupboard for cooking etc.
Pre-condition: Starting state before algorithm is executed, conditions that need to be fulfilled. e.g.
have to have the required ingredients, a place to cook, pre-conditions while making decisions in
cooking (“Are the carrots still hard? Cook them a bit longer”).
Post-condition: Final state after execution of algorithm, the state you are trying to achieve/ lead
up to, the final result.
Will need to also consider exceptions when building pre-conditions, e.g. identifying conditions for
calculating end of year bonus when not all employees have worked for the company for the whole
year.
Thinking concurrently
Concurrent processing: Implementing parts of a solution at the same time e.g. assembly line
mass production- people carrying out task on one product then moving on to the next one while the
next person carries out another task at the same time.
In computers:
Execution of different instructions simultaneously by multiple processors. Each processor
processes different parts of a program's procedures and sub-procedures.
Needs better planning that accounts for different people working on the solution at the same time
due to the changes they make, e.g. database should only be accessed once edit has been made
otherwise the person wouldn't know someone else has erased their changes
Thinking abstractly
Selecting the pieces of information that are relevant to solving the problem and leaving out other
information, to enable the ability to examine a solution at a human level of interaction. Considering
something as its relevant characteristics and qualities, separated from concrete realities, actual
objects or instances.
e.g.
Map of London only showing roads and names, not the buildings because purpose is
navigation along roads for cars
Tube map showing simplified route as user is only interested in the order of stops
Virtual reality games having smaller time scale and providing icons of items in inventories
City simulation for pilots not having details like people or windows on buildings, just
landmarks and the shape and height of buildings
School decomposed into faculties
An object in OOP is an example of abstraction because it hides the details of the code
while preserving functionality
Program design
Array algorithms:
Sequential/ linear search: Usual search, go through every value and compare to the target value.
Simple to implement, data doesn't need to be in order. Inefficient with large number of elements,
may have to go through every single one of them.
Binary search: Values in order. Compare search value with middle value. If smaller, compare to
middle value of sub-array to the left. If larger, compare to sub-array to the right, and so on.
Faster than sequential search. Too complicated for small number of elements. Only works on
sorted lists, difficult if data is constantly being added.
MARKS = [5,8,23,77,89,104]
TARGET = 89
MIN = 0
MAX = 5
FOUND = false
if MARKS[MID]=TARGET then
FOUND = true
POSITION = MID
else if TARGET>MARKS[MID] then
MIN = MID+1
else
MAX = MID – 1
end if
end while
MARKS = [67,33,2,89,10,99]
TEMP = 0
Selection sort: Splits array into sub-arrays. First sub-array is sorted, second is unsorted. e.g. to
sort in ascending order, find the smallest value, place it in the correct position in the first sub-array
by swapping it with the element that was there, move position of beginning of sub-array forward
one, loop through the rest (second sub-array) to find the smallest value again. Repeated for all
elements.
Good for small lists. Not efficient with big number of items, have to find the smallest value many
times.
MARKS = [67,33,2,89,10,99]
MIN = 0 //position of start of un-sorted sub-array
SMALLEST = 0 //position of currently smallest value found
Collection: Group of objects. No assumptions are made about the order of the collection (if any) or
whether it can contain duplicate elements. We add and retrieve data from them.
Loops
Just know how to code the different types of loop tbh
Suitability of an algorithm
Efficiency: Amount of computer resources required to perform algorithm's functions
Correctness: Extent to which algorithm satisfies specification
Reliability: Capability to maintain performance
Flexibility: Effort required to modify algorithm for other purposes
Nature of programming
Programming languages
Machine language: Low-level language directly understood by computer, made up of binary
numbers.
Assembly language: Low-level language using symbols for instructions and memory addresses
High-level programming language: Uses elements of natural language. Easy to use for humans
and more understandable. Abstracts some areas of computing systems, would otherwise take too
long to write our systems in machine code.
Source code: Original code/program developed using high level language. Needs to be translated
into machine code to be run/executed by the computer.
Object/ target program: Program translated into machine language. Translation methods:
Compiler: Executes translation process only once, translates the whole program. Object
program is saved so it doesn't need to be compiled again. All errors are displayed when the
whole program is checked, compilation ends only once errors are fixed. Example: C++
Interpreter: Reads, translates and executes program line by line. Errors are displayed after
each line is interpreted. Goes through the process every time the program is run, much
slower than a compiler. Example: BASIC
Writing code
Variable: Used to store a data element that can be changed during program execution. Has an
identifier and type.
Constant: Elements and quantities that don't change. e.g. final double PI = 3.14
Object: Comprised of data and methods (operations that can be performed by the object)
Advantages of collections
Methods are predefined algorithms, can immediately use
Software reuse