Computer science
Fundamentals of algorithms
3.2 efficiency of algorithms
3.3. Searching algorithms
3.1 Representing algorithms
3.4. Sorting algorithms
Algorithm - a sequence of steps that can be
followed to complete a task.
Decomposition - breaking a problem into sub-problems which are smaller and easier to complete
Abstraction - removing unnecessary information from a problem
pseudo-code - a simplified programming language which helps someone design aprogram
problems can be solved by different algorithms some shorter and some longer
efficiency - how long the program takes to get to the intended solution , often compared with how many lines of code
Programming
3.7 ethical and legal issues
computer systems
Linear Search
goes through items in a list one by one looking for the desired item
- slow when there are large amounts of items
- simple to implement
Binary search
finds midpoint of list and determinds if desired item is lower or higher than the mid point , then splits the list and repeats untill item is found
- finds items in long lists quickly
- hard to implement
merge sort
splits the list into single items then connects the items back together ordering as they are put together
- fast at sorting larger list
- requires a large file
bubble sort
goes through a list and compares two items putting them into order as it goes along
- slow on longer lists
-simple to implement
programming concepts
Arithmetic operations
Data types
Relational operations
Variable declaration - Something that can store any data type and can be changed while the program is running
Constant declaration - Something that can store any data type and can not be changed while the program is running
Assignment - sets a value to a variable
Iteration - where a set of instructions are repeated until a condition is made
Selection - a question and depending on the answer it will decide if the program continues to the next statement
Subroutine - a sequence that performs a specific task and that runs separate to the main code and can be recalled at anytime
Addition - adding two numbers together
Subtraction - removing one number from another
Multiplication - multiplying two numbers together - *
Real division - The remainder when a number is divided - MOD
Integer division - - Divides a number with no remainder - DIV
Equal to - =
Not equal to !=
less than - <
Greater than - >
Less than or equal to - <=
Greater than or equal to.- >=
Integer - whole number E.g 12
Real - any number E.g 1.2
Boolean - either true or false (0 or 1)
Character - a single letter E.g L
String - a group of characters
Boolean operators
AND - needs both to be true to output a 1
OR - either has to be true to output a 1
NOT - takes opposite
Data structure
Array - data structure consisting of a collection of elements
Record - a collection of fields
Input/output and handling
obtain user input from the keyboard.
Be able to output data and information from a program to the computer display.
Be able to read/write from/to a text file
String handling
Length
Position
Substring
Concatenation
Convert character to character code
Convert character code to character
String conversion operations.
random number generation
import random
random.randint
Subroutines
a section of code (seperate to the main body of code)
does one specific task and can be recalled into the program at any time
fundamentals of data representation
3.5 - fundamentals of computer networks
3.6 cyber security
Structured programming
structured code should be clear and sectioned
Robust and secure programming
code that focuses on handling unexpected inputs e.g Extreme (boundary)
code the focuses on making sure that code can handle extreme values and unexpected values like words or characters
classification of programming languages
low level code - programming languages that are not abstracted from a computers code so it is harder for a human to understand
High level code - programming language that is abstracted a lot from machine code so that it easy for a human to understand
machine code - code that the computer understands (01000100110111010010)
number bases
• decimal (base 10)
• binary (base 2) - computers use binary to represent all data and instructions
• hexadecimal (base 16).
Units of information
• a byte is a group of 8 bits.
• a bit is the fundamental unit of information
• kilo, 1 kB is 1,000 bytes
• mega, 1 MB is 1,000 kilobytes
• giga, 1 GB is 1,000 Megabytes
• tera, 1 TB is 1,000 Gigabytes.
binary arithmetic
Binary Addition
Binary shift
converting between number bases
• decimal: 255
• binary: 1111 1111
• hexadecimal: FF
3.5 character encoding
ASCIII - ‘A’ is coded as 65, ‘B’ as 66,
and so on
Unicode uses the same codes as
ASCII up to 127
3.6 Representing images
variables that affect the quality and size of an image
colour depth
size in pixels (Height x Width)
Calculating size of an image
Size bits = W x H x D
Size bytes = W x H x D /8
Binary data can be represented as a image with only black and white pixels
3.7 representing sound
sound is analogue and needs to be converted to digital to be stored by computer
things that affect size of sound file
sample resolution.
sample rate
3.8 data compression
lossless - doesn't lose any quality but doesn't reduce the file size by a massive amount
lossy - removes pixels and sound hat may be important but loses reduces the file size
4.4 system architecture
Von Neumann architecture.
- arithmetic logic unit
does all the calculations
• control unit
-controls the flow of data through the CPU
• clock - controls the timing of everything in the CPU
- Bus - transports data and instructions between memory and the alu
things that affect the speed of the CPU
• clock speed
• number of processor cores
• cache size
• cache type.
Main memory - secondary storage
RAM vs ROM
ROM - non volatile, stores the start up instructions for the computer and the BIOs.
RAM - volatile , stores applications that are currently in use
secondary storage - long term storage(applications and photos,videos music) , e.g SSD HDD
Cloud storage - remote storage devices that are backed up regularly and can be accessed from anywhere with an internet connection
PAN - Personal area network (bluetooth)
WAN - Wide area network
LAN - Local area network
computer network - A group of interconnected computers and other digital devices.
A network protocol is an agreed way of how to communicate over a network. A protocol is often made formal by setting up a world standard.
click to edit
Ethernet
• Wi-Fi
• TCP (Transmission Control Protocol)
• UDP (User Datagram Protocol)
• IP (Internet Protocol)
• HTTP (Hypertext Transfer Protocol)
• HTTPS (Hypertext Transfer Protocol
Secure)
• FTP (File Transfer Protocol)
• email protocols:
• SMTP (Simple Mail Transfer Protocol)
• IMAP (Internet Message Access
Protocol).
click to edit
• authentication - confirming the user is who they say they are when trying to enter a computer system
• encryption - scrambling data using a key so that the only the intended recipient can open and use the data
• firewall - blocks all unwanted entries into the network and blocks any malicious software
• MAC address filtering - filters specific MAC adresses (specific to every computer)
click to edit
• application layer - where network applications such as web browsers of emails operate
• transport layer - sets up communications between the tow hosts and agree the setting such as the language and size of the packets
• internet layer - packets up the data read for the transmission and sends the packets of data across the network
• link layer -this is where the hardware such as network interface card or Ethernet is located , OS drivers are also located here
click to edit
social engineering techniques
• malicious code
• weak and default passwords
• misconfigured access rights
• removable media
• unpatched and/or outdated software.
click to edit
Penetration testing is the process of attempting to gain access to resources without knowledge of usernames, passwords and other normal means of access.
blagging (pretexting)
• phishing
• pharming
• shouldering (or shoulder surfing).
computer virus
• trojan
• spyware
• adware.
click to edit
biometric measures (particularly for
mobile devices)
• password systems
• CAPTCHA (or similar)
• using email confirmations to confirm a
user’s identity
• automatic software updates.
• cyber security
• mobile technologies
• wireless networking
• cloud storage - data is maintained, managed, backed up remotely and made available to users over a network
• theft of computer code
• issues around copyright of algorithms
• cracking - Gaining unauthorised access to computer systems to commit a crime, such as digging into the code to make a copy-protected program run
• hacking - the gaining of unauthorised access to data in a system or computer.
• wearable technologies
• computer based implants