0% found this document useful (0 votes)
4 views

All Computer Science Notes - Tanuja

The document outlines key concepts in problem-solving and programming, including algorithms, data types, and sorting/searching methods. It discusses computational thinking, code readability, data representation, and encryption techniques. Additionally, it covers computer architecture, memory types, and factors affecting CPU performance.

Uploaded by

marvibarsoom2011
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

All Computer Science Notes - Tanuja

The document outlines key concepts in problem-solving and programming, including algorithms, data types, and sorting/searching methods. It discusses computational thinking, code readability, data representation, and encryption techniques. Additionally, it covers computer architecture, memory types, and factors affecting CPU performance.

Uploaded by

marvibarsoom2011
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 35

PROBLEM SOLVING

An algorithm is a step by step set of instructions for solving a problem.

The characteristics of successful algorithms:


- Accuracy: leads to the expected outcome
- Consistency: It must produce the same result each time it is run.
- Efficiency: It must solve the problem in the shortest time and using the least
resources.

PSEUDOCODE ARITHMETIC OPERATOR


Operator Function

+ Adds values together

- Subtracts the second value from the first

* Multiplies the values together

/ Divides the first value by the second value

DIV It returns only the integer

MOD It returns the remainder of the division

^ Exponent (power)

Constant holds a value that stays the same throughout the program,
- They are useful for storing fixed information.

Two programming constructs


- Selection
- Iteration
- Condition-controlled or count-controlled

Bubble sort
- Either ascending or descending
- Starts at one end of the list
- Compares pairs of data items
- The comparisons continue until the end of the list is reached.
- Each complete traversal is called a pass.
- This process repeats until there are no further swaps during a pass.
- This indicates that it is in the right order.
- **Because of this the computer would take one extra swap compared
to a human.

1
Merge sort
- It divides a list into two smaller lists repeatedly until the size of each list is one item.
- The lists are then compared and then merged together
- The order is switched if necessary.
- Repeatedly applying a method and to the result of a previous application of the
same method is called recursion.

Efficiency of sorting algorithms


- Bubble sort uses brute force
- Merge sort uses divide and conquer
- Bubble sort is easier to code and is more beneficial to use in smaller lists.
- Bubble sort is more space efficient than merge sort, as it only swaps values within the
original data structure.
- Merge sort is more beneficial for large lists.

Linear search
- It starts at the beginning of the list and goes through it item by item until it finds the
item it is searching for.
- It is sequential because it moves item by item.

Binary search
- The binary search repeatedly searches the median item in the list and then decreases
the size of the list needed to be searched.
- If the searched item is greater or lesser than the median item, then the items greater or
lesser than the median will be searched.
- This will continue until the searched item is found or all items have been checked.

Efficiency of searching algorithm


- Linear search is more efficient if the first item is being searched.
- Worst case the item is at the end of the list
- Binary search is most efficient if the middle item is being search
- Worst case the item is at the beginning or end of the list.
- The list must already be sorted for binary search to work whereas linear search can
work on an unsorted list.
- If the list has to only be searched once, linear search is better.
- If the list has to be searched many times, binary search is better.

Computational thinking: the thought processes involved in formulating problems and their
solutions and representing them in ways that can be carried out by a computer.

Skills required for this


- Decomposition: breaking a problem down into smaller parts that are easier to solve.
- Abstraction: The process of removing/hiding unnecessary detail

2
- Decomposition is the first step in the problem solving process,
- This means the subprograms can be worked on by different teams.
- It is easier to sport and correct errors.

Levels of Abstraction
- The higher the level of abstraction, the less detail is required
- Inputs and outputs
- Processing and initialisation
- As the programming goes on, the level of abstraction will decrease as the detail
increases.

PROGRAMMING
Develop Code
- A program is converted into program code so that it can be executed by a computer.
- It should be free of logic errors
- It should be easy to code in any high-level language.

Data Type Description

Integer Used to store whole numbers

Real / Float (python) Used to store numbers with a fractional part.

Boolean Has two values: True or False

Character A character has a single letter/symbol/number/space

String A set (array) of characters treated as text rather than numbers.

Variable initialisation (PSEUDOCODE)


- Initialising it when the program is run
- SET total TO 0
- Reading a value from a keyboard or other device
- RECEIVE admissionCharge FROM (VARIABLE TYPE) KEYBOARD
- (INTEGER), (FLOAT)...

Type coercion
- When the data type of a variable changes during program execution.
- If an integer and real value are used in a calculation the resulting value will be
a real value.

SELECTION
IF (condition) THEN

3
SET (variable) TO (value)
ELSE
SET (variable) TO (value)
END IF

LOGICAL OPERATOR PYTHON

AND and

OR or

NOT not

RELATIONAL OPERATOR PYTHON

Equal to ==

Greater than >

Greater than or equal to >=

Lesser than <

Lesser than or equal to <=

Not equal to !=

DEFINITE ITERATION
- When the number of iterations is known in advance
- Using a For loop

NESTED LOOP
- A loop within a loop

INDEFINITE ITERATION
- When the number of iterations is not known in advance
- They are repeated until a specific condition is met.

RANDOM NUMBERS
- Used to make an event random

CODE READABILITY

Technique Description

4
Comments Comments should be used to explain what each part of the program
does.

Descriptive names Use descriptive identifiers for values and subprograms so their
purpose is more clear.

Indentation It makes it easier to see where each block of code starts and finishes.

White space Add blank lines between different blocks of code making them stand
out.

Each character in a string has an index number.


- This can be used to reference individual characters.
- Starting from 0
To check length of a string
SET numChars TO LENGTH(mytext)

String traversal
- To cycle through each character in a string.
SET animalName to ‘monkey’
FOR index = 0 TO LENGTH(animalName) - 1
SEND animalName[index] TO DISPLAY
END FOR

Concatenation
- It involves joining two or more items of information together to form a new string
object.

Data structure
- An organised collection of related elements.
- Arrays:
- It is an organised collection of related values with a single shared identifier.
- In python lists are used.
- Records:
- A data structure that stores a set of related values of different data types.
- Each individual element is called a field.

Validation
- To check that the data entered by a user or from a file meets specified requirements.
- Range check:
- It ensures that the data entered is within a specific range.
- Presence check:
- It checks whether a value has been entered, preventing a blank input.
- Look-up check:
- It tests that a value is part of a predefined set of variables.

5
- Length check:
- It tests whether the length of the value entered falls within a specified range.

Testing validation rules


- Normal data: Data within the limits of what should be accepted by the program.
- Boundary data: Data that is on the outer limits of what should be accepted.
- Erroneous data: Data that should not be accepted by the program.

Text files
- Large sets of data are normally stored in text files.
- This is advantageous as data is not lost when the program stops.
- It can be read from the file whenever needed.

Subprograms
- Functions:
- A subprogram that returns a value
- Procedure:
- A subprogram that does not return a value.

- A local variable: a variable that is accessed only from within the subprogram.
- A global variable: a variable that can be accessed from anywhere in the program,
including inside subprograms.
- Parameter: The names of the variables that are used in the subroutine to store the data
passed from the main program as arguments.

Benefits of subprograms
- They can be recalled when necessary and multiple times.
- Finished program occupies less space.
- It is easier to debug.
- People in teams can develop standard libraries of subroutines that can be reused in
other programs.

Built-in functions: functions that are provided in most high-level programming languages.

A trace table is a technique used to identify logic errors in algorithms.

Types of Errors:
- Logic error: An error in an algorithm that results in an incorrect and unexpected
outcome.
- Syntax error: When the grammar rules of a programming language are broken.
- Runtime error: They occur when the computer is made to perform an impossible
operation.

Integrated Development Environment

6
- It has a debugger
- It flags syntax errors in the code.

Evaluating programs
- Requirements
- Usability
- Validation
- Efficiency
- Code readability

DATA
Binary
- Binary is represented by only two values 1 and 0.
- This is because transistors can only be on and off.
- Binary system uses powers of 2
- A computer can only understand binary.

An analogue system can represent a continuous range of values.

Maths with Binary


- Binary addition
- Unsigned
- Sign and Magnitude
- Two’s complement
- Binary shifts
- Logical shifts
- Arithmetic shifts

Hexadecimal numbers
- Hexadecimal is used because it can be understood and remembered more easily by
humans.

Representation of Text
- ASCII code: 7 bits and can represent 128 characters.
- Extended ASCII: 8 bits and can represent 256 characters
- Unicode: 2 / 4 bytes and can represent all languages and special characters.

Encryption
- To turn information into a code so that it cannot be read by everyone.
- This ensures that the message is only understood by the intended recipient.

Representation of images
- Pixel: The smallest point of colour in a graphic image.

7
- Resolution: The number of pixels per inch.
- Number of pixels in an image: length x height
- Colour depth: Number of bits used to represent a colour in a pixel
- File size: Width x Height x Colour depth

Representation of sound
- Analogue recording:
- They represent continuous changes in air pressure caused by sound waves.
- The voltage changes caused by the changes in air pressure are then stored as
grooves in vinyl records with varying depths.
- It exactly mirrors the sound produced.
- Digital recording: (Sampling)
- Computers are digital. Their transistors are either on and off.
- Sound data is represented by 1s and 0s.
- A digital recording takes snapshots of sounds.
- When they are played in quick succession the sound produced seems
continuous.
- The snapshots are called samples.

A digital recording will never have the same fidelity as an analogue.

Benefits of digital recording


- Equipment to record digital sound is relatively cheap.
- It can be easily edited.
- It is easily copied.
- Digital files do not deteriorate with use
- Digital files are more portable than records.

Fidelity
- The relationship between the original sound and the recording.
- Factors affecting fidelity:
- Sample rate: The number of samples taken per second.
- Number of bits: Using more bits allows for smaller gradations in the volume
differences.

File size of digital sound:


- Sample rate x Bit depth x Duration x Number of channels
- Stereo uses 2 channels

DECIMAL PREFIX
kilobyte KB 10^3 bytes 1000 bytes

megabyte MB 10^6 bytes 1000 kilobytes

8
gigabyte GB 10^9 bytes 1000 megabytes

terabyte TB 10^12 bytes 1000 gigabytes

BINARY PREFIX
kibibyte KiB 2^10 bytes 1024 bytes

mebibyte MiB 2^20 bytes 1024 kibibytes

gibibyte GiB 2^30 bytes 1024 mebibytes

tebibyte TiB 2^40 bytes 1024 gibibytes


*Binary prefix is the most exact, but decimal prefix is used as it is easier to multiple and
divide.

Benefits of compression
- Compressed files can be uploaded and downloaded faster / in less time.
- It uses less internet bandwidth.
- There is less internet congestion, allowing for streaming of video/audio files.

Types of compression:
- Lossless:
- No data is lost
- The original file can be restored.
- It is essential for text as missing data would change the meaning.
- RLE - Run length encoding:
- Reduces the size of a repeating string of items
- A repeating string is called a run.
- Each run is represented by 2 bytes:
- The number of times the information is repeated.
- The item of information.
- Lossy:
- Data is lost
- The original file cannot be restored.
- Bitmap images:
- The algorithm finds areas with tiny differences and then gives them the
same values.
- The difference is not noticeable to the human eye.
- Audio files:
- The algorithm removes sounds that are outside the range of human
hearing.
- It removes sounds that are not distinguishable.

Asymmetric encryption (two keys)

9
- The message is initially sent using a known public encryption key.
- However, the message can then only be decrypted using a private encryption key.

Symmetric encryption:
- Encrypts and decrypts using the same key.

Pigpen cipher:
- It is a substitution cipher.
- It substitutes each letter with a symbol.

Caesar cipher:
- The letters are shifted a set number of places. Alphabetic substitution.
Vigenre Cipher
- Polyalphabetic substitution.
- Each alphabet can be substituted by multiple letters.
- A keyword: characters that are combined with the plaintext to produce an encrypted
message (ciphertext)

Rail fence cipher


- It transposes the characters
- They are written in a zig-zag pattern based on a key.

COMPUTERS
The input-output-process model
- Input: data entered
- Output: display/output data
- Process: to change the data (format/meaning)

Computational models
- Sequential:
- Processing instructions in an algorithm step by step.
- Parallel:
- Computer processes are distributed between two processors.
- Each separate part that each processor processes can then be combined.
- Multi-agent:
- Separate tasks are processed by different systems (agents) to perform specific
functions.
- Each agent acts independently and is autonomous.
- They cooperate through negotiation and coordination.

Stored-program concept / Von Neumann model


- Processing instructions are stored in memory with the data.
- CPU does the processing

10
- The storage is called RAM (random-access memory)
- They are connected to each other (and input/output devices) by a group of connecting
wires called a bus.

RAM and ROM


- RAM is volatile (memory is lost when power is turned off)
- ROM is non-volatile (memory is not lost when power is turned off)
- Stores programs initialising hardware components
- Starting the operating system when the computer is turned on.

Cache memory
- It is a small amount of fast, expensive memory.
- It is used between two devices that communicate at different speeds. (prevents
bottleneck)
- Between the CPU and RAM
- Frequently used data is loaded from the RAM into the cache memory
in chunks.
- The CPU’s reliance on the RAM is reduced, increasing its processing
speed.

Fetch-decode-execute cycle
- Fetch:
- The control unit places the memory address of the next instruction on the
address bus
- It sends a signal on the control bus requesting to read from the memory.
- The memory looks up the memory location and copies it into the data register.
- Decode:
- The control unit analyses the register and sends signals to the other parts of the
CPU telling them what to do.
- Execute:
- The instruction is completed by the CPU.

Factors that affect CPU performance


- Clock speed:
- Advantages of raising clock speed:
- The faster the clock speed, the faster the rate of processing.
- Disadvantages of raising clock speed:
- The rate at which transistors operate is limited.
- The processor generates a large amount of heat, which increases as
clock speed increases.
- There are limits to the rate of cooling.
- Number of processor cores:
- Multiple processor cores can:
- Work together on the same program

11
- On different programs at the same time
- Some tasks may be sequential and require output from the previous step to
continue.
- Size of the cache:
- The larger the cache, the more likely that the instruction/data item to be
fetched is in the cache so the RAM doesn’t need to be accessed.
- This speeds up processing.
- Static RAM: memory that retains data bits in its memory as long as power is
being supplied and does not have to be refreshed.

Secondary storage
- It is non-volatile.
- Slower access compared to RAM.
- Any kind of permanent storage to which the contents of ROM/RAM are copied.

Types of secondary storage


- Magnetic storage:
- The data is held in a stack of disks called platters with a magnetic coating on
each surface.
- Tiny magnetic heads on the end of an arm spins above the platters.
- The surface causes a tiny current in the head.
- The north and south poles represent 1s and 0s.
- Optical storage:
- Writing:
- One laser heats the surface of the disk.
- This creates less reflective pits and more reflective lands than
translates to 1s and 0s.
- Reading:
- The disk spins in the drive to ensure all the data can be read.
- A laser shines on the disk and is reflected back on to a light sensor.
- The signals from the sensor are translated into 1s and 0s.
- Solid state storage:
- It uses special transistors that can trap electrons in a pool.
- Electrons in a pool represent 0s and empty pools represent 1s.
- It provides faster access to data than hard disks.
- Reading:
- Control signals identify which bit should be read out.
- It applies a small voltage.
- If the pool is empty, the transistor turns on and a 1 is read.
- If the pool is full, the transistor doesn’t turn on and a 0 is read.
- Writing:
- Control signals identify which bit should be read out.
- A large voltage is applied to the transistor.
- This pulls electrons into the pools of transistors.

12
- Erasing data also requires high voltage.
- Flash drives can only be rewritten a million times before failing.

Cloud storage
- Storage that is accessed via the internet and data is not stored in the same physical
place.
- Virtualisation: any process that hides the true physical nature of a computing
resource.
- Advantages:
- You can access data from anywhere with an internet connection.
- Data is securely backed up by the company providing the storage service.
- You don’t need to transfer data when you get a new computer.

Embedded systems
- An embedded system is designed to do a specific task.
- It is a computer system part of a larger system with electrical/mechanical parts.
- Embedded computers are often cheap and low-power.
- They run on one program stored permanently in ROM or flash memory.
- Internet of things - IoT:
- The interconnection of digital devices embedded in everyday objects.

Truth table
- Shows all the possible combinations of the inputs and outputs of an operator.
- Bug: error or flaw in a program.

Software
- Application software: Software that performs a task that would otherwise be done by
hand.
- Provides the user with a service.
- System software:
- Provides user interface.
- Contains tools to manage hardware.
- Utility software: software that does a useful job for the user that is not
essential to the operating system and not the reason the computer is used in the
first place.
- Operating system

Operating system
- Manages access to the input/output devices of the computer.
- Managing files and the directory structure.
- The OS shares access to the hardware among the different programs that are running
- It allocates appropriate memory for programs
- Ensures that data and instructions do not interfere with each other.

13
- The operating system keeps the illusion that all applications are running at the same
time by scheduling.
- The operating system is also responsible for virtual memory and swapping data
between the RAM and the hard disk.
- The operating system runs other programs in the background.
- The operating system provides the user-interface for users to communicate with the
computer.
- The operating system controls user access through authentication.

Utility software
- Not essential for the operating system
- Not the reason the computer is used.

Types of utility software


- Basic tools:
- Simple text editor
- Calculator
- Command prompt
- File management tools:
- Software that makes a back-up copy of files which are available if the original
copy is damaged or lost.
- Software for converting files between different formats.
- Defragmenter: software that moves file clusters closer together which
increases the speed of access to the data stored on the hard disk.
- This is because files are not stored in one chunk but stored in clusters.
- Tool for compressing files that are not frequently used. This frees up space on
the disk.
- However, compressed files are slower to access as they need to be
decompressed.
- Security tools:
- Anti-malware:
- Anti-virus
- Anti-spyware
- Firewall software: controls the data that flows into and out of a network which
can prevent infection by viruses.
- Encryption software makes files unreadable ensuring that they are not
understood even if the laptop is stolen.

- Virus: software that is designed to make and distribute copies of itself.


- This can be used for malicious purposes.
- Spyware: software designed to be installed secretly on a computer
- It records private information as the user enters it.

Simulation and modelling

14
- Advantages:
- It allows us to do experiments that can’t/shouldn’t be done in real life.
- Disadvantages:
- The model/simulation includes assumptions so may not be accurate.
- The real world is too complicated to allow every possible factor in the model.
- It requires abstraction making it inaccurate.
- Examples:
- Flight simulator allows pilots to train to fly aircraft safely without endangering
the lives of real people or themselves.
- Atmospheric models used to forecast the weather help people everyday.
- Earthquake prediction

Techniques in models
- Heuristic: A type of algorithm that finds the solution to a problem quickly and easily.
- This is done through trial and error and removing less likely alternatives.
- Monte Carlo: Carrying out a statistical analysis of random samples to get approximate
solutions to the problem.
- Neural network: Process information in a similar way to human brains and learn and
adapt overtime.
- Can recognize faces
- Identify illnesses

Machine code
- The instruction set: the list of all possible commands a CPU can carry out.
- Each instruction has a binary value.
- The binary values make up machine code.

Assembly language (low level programming language)


- Each instruction in assembly language is the same as a machine code instruction.
- The instructions are written in mnemonics.
- Assembly language is converted to machine code using an Assembler.
- Disadvantages:
- There is a limited range of instructions
- You have to manage your data as there are no variables.
- Debugging is very difficult.
- Any bugs typically make the program crash forcing you to reboot.

COMPILER INTERPRETER

Translates the whole program in one go. Translates (and executes) the program line
by line.

A compiler produces an object code file The interpreter does not produce an object
which is executable code file

15
The program will run on any similar The computer will need software installed
computer on its own.

A compiler cannot produce an object code It is easier to debug the program as the
unless the program is correct. interpreter will tell you what has gone
It is harder to debug wrong.

It is easier to protect your code from being Programs tend to run slower as the program
copied as the compiler only produces an is translated while running
object code file which is difficult to
understand/copy.

COMMUNICATION & THE INTERNET


Network
- A network is a collection of two or more computers that are connected for the
purposes of sharing data between them.
- Server: a powerful computer that provides the network with services:
- Storing files
- Sending/receiving emails

Why are networks used?


- To read/write personal files onto a server (providing extra storage space)
- To access shared files among several users.
- To download data or updates to computer programs.
- To send data to a shared printer (peripherals)
- To access the internet
- To communicate with others

LAN, WAN and PAN


- Local Area Network:
- Covers a relatively small geographical area.
- * It is typically owned by a single person or organisation.
- Wireless local area network:
- A wireless router allows all the computer devices to access the internet
and share peripherals.
- Wide Area Network:
- Covers a relatively large geographical area.
- * It is typically under distributed ownership.
- Personal Area network:
- Network used for data transmission over short distances.
- Uses Bluetooth

Client-server
- The server provides services to the network.

16
- The client will make a connection to the server using its address.
- The server will know the address of the client.
- The client will make a service request to the server.
- The server will authenticate the user to give access to files they have permission for.
- If this is done, the server will provide the service to the client (send requested data)
using the client’s address.

Peer-to-peer
- There are no dedicated servers as both computers act as client and server.
- Each computer provides a service and can also request services from the other
computers.
- Messages are sent directly to the recipient.
- Good for real-time chatting.

Bus topology
- A single cable to which each device is connected.
- The messages are sent along the cable.
- There is a terminator at the end of the cable.
- It absorbs signals that have reached the end, preventing them from bouncing
back and causing interference.
- Only one message can be sent at a time.
- A collision occurs when two or more network devices send a message at the same
time. This makes all the messages unreadable.
- Carrier Sense Multiple Access with Collision Detection:
- Check if bus is busy
- If not busy then send a message, or go to step 1
- Listen to see if message is sent correctly
- If not, then wait before sending the message again. If it has then return to
listening for messages.
- Advantages:
- Relatively cheap to install
- Easy to add extra network devices.
- Disadvantages:
- Whole network will fail if the cable is damaged.
- Difficult to identify faults on the cable.
- The more devices that are added, the slower the network will run.
- All the data sent is received by all devices on the network (no privacy)

Ring topology
- A cable connects each device to the next in a ring.
- Messages in a ring network travel in the same direction.
- Advantages:
- Adding extra devices does not affect the network performance.
- It is easy to add extra network devices.

17
- Disadvantages:
- The network will fail if the cable is cut/damaged.
- Adding or removing a device involves shutting down the network temporarily.
- Can be difficult to identify a fault in the network
- More expensive than a bus as more cabling is required.

Star topology
- Each network device is connected to a central hub/switch
- Does not require much cabling.
- Advantages:
- A damaged cable will not stop the whole network, only the device connected
to it.
- If a switch is used, the network sends the messages only to the intended
devices. (security)
- Easy to locate faults because they usually only involve 1 device.
- A new device can be added or removed without the network being shut down.
- Disadvantages:
- If the hub/switch fails, the network will fail.
- It is expensive to install due to the amount of cable.

Mesh topology
- Every device is directly connected to every other device (fully connected).
- They can be wired or wireless.
- With a wired network, it becomes very expensive.
- They are very fault tolerant as if any connection fails, the messages can be routed
around it.
- Largest mesh network of all is the internet.
- Advantages:
- Very fault tolerant
- High performance
- Each node extends the network (wireless network)
- Disadvantages:
- Difficult and expensive to install.
- Can be difficult to manage due to the number of connections within the
network.

Wired communication
- Involves physical connection between the computer and network.
- Made of copper wire (electrical signals) or fibre-optic cable (light signals).
- Fibre-optic cables transmit faster and further than copper wire.
ADVANTAGES DISADVANTAGES

Faster than wireless connectivity Expensive to install and reconfigure

18
Not easy to intercept/eavesdrop data Requires many cables at a premises.

Less susceptible to interference than


wireless connectivity

Wireless communication
- Does not require a physical connection between the computer and network.
- Transmit and receive radio signals or infrared (limited distances).
- Other: Mobile phone network, Bluetooth and Wi-Fi
ADVANTAGES DISADVANTAGES

Does not require a cable Data transmission speeds are slower than
wired.

Allows for users to use their own device. Interference from other wireless devices can
reduce performance.

A wider range of devices can communicate Walls/Physical objects can reduce


as it doesn’t depend on having the correct performance.
cable.

Data needs to be encrypted.

Network data speed


- Discover whether an equipment upgrade is necessary
- Estimate how long it would take to download a file
- Discover whether the performance lives up to the promises of the service provider.

Calculating time needed to transmit a file.


File size / Transmission speed
- The amount of data that can be carried from one point to another on a network in a
given time is called its bandwidth.
- Latency: the delay encountered by data travelling through a network

Protocols
- A protocol is a set of rules that control how communications between devices are
formatted and how these communications are received.
- How each computer is identified.
- How the data is to be formatted
- What to do if data is received incorrectly.

EMAIL PROTOCOLS

SMTP Used when sending email through the internet.


- Details the format they are sent in

19
- How the email servers should respond to them

POP3 Used for retrieving email from an email server.


- Clients will connect to the mail server
- Download all the emails.
- Delete the messages from the server.

IMAP Allows access using multiple clients.


- IMAP leaves messages on the server until the user deletes them.
- There will be an up to date list of email messages

Network Protocols
- Ethernet: Used in wired LANs.
- Wi-Fi: User in wireless LANs.
- TCP: Provides reliable connection between computers ensuring that all data sent is
received.
- The receiving computer sends acknowledgements that each section of the data
is received.
- Uses checksums to ensure data received is accurate
- Allowing for flow control so that the receiving computer has time to process
the received data.
- Ensuring the data has no duplicates and in correct order.
- HTTP: HyperText Transfer Protocol
- It is used for sending data between web browsers and web servers.
- Covers how data is formatted, commands that should be understood and how
to react to them
- HTTPS: HyperText Transfer Protocol Secure
- Data sent between the web browser and web server is encrypted.
- Therefore, it cannot be read by a third party.
- FTP: File Transfer Protocol
- Used to transfer files over a network that uses TCP protocol

Internet Protocols
- The addressing system to identify individual computers on the network.
- Splitting data into packets and giving each the packet header (including sending and
receiving addresses).

TCP/IP Layers
Application:
- Interacts with the user to provide access to services and data sent over a network.
- HTTP, FTP, Email protocols.

Transport:
- Manages end-to-end communication over a network
- Communication between 2 hosts.

20
- TCP and UDP
- Divides the data into packets with packet headers containing:
- Sending and receiving computer
- Total number of packets
- The number of the particular packet.
- UDP is used when speed is desirable (live broadcasts/streaming)

Internet:
- IP protocol is active
- It adds the source and destination IP address to the packets.
- Routes them to the recipient computer.

Data Link
- Transmitting data through a local network.
- Ethernet is active.

Benefits of network layers


- Each layer is specialised to perform its function.
- One layer can be developed without affecting the other layers.
- Makes it easier to identify problems

Mobile communication
- Cellular network is wireless and distributed through cells.
- These cells provide coverage over a large area.
- When the user moves out of range, the base station makes a request to transfer control
to another base station. (Called a Handover)

Importance of network security


- Confidentiality:
- It is important as the personal data of people is not stolen by criminals.
- Companies are legally required to protect their user data.
- Methods to ensure confidentiality:
- Only authorised users can access the parts of a network.
- Encrypting data ensures it can only be read by those who are
authorised.
- Correctness:
- The data should remain correct and unchanged.
- This could result in issues (such has health records)
- Availability:
- The data and access to it needs to be available at all times.
- Protection must be put in place against DoS attacks.
- Slow down network performance
- Delete data
- Allow for eavesdropping of data

21
Importance of Security
- Required for running the organisation:
- If data is lost, the business may lose the trust of its customers leading to
eventual bankruptcy.
- Private and confidential:
- If private and confidential data is leaked, the company could be sued
- Customer trust would be lost (leading to bankruptcy)
- Financially valuable:
- Financially valuable data (if leaked) could be used by the company’s
competitors to gain an advantage.

Authentication and Validation


- Authentication: The process of checking the identity of a user of a computer system.
- Systems of Authentication:
- Username and password
- PIN (Personal Identification Number)
- Fingerprint recognition
- Two-factor authentication: The user has to type in the code ‘secure token’
from an SMS message sent to their mobile phone.

Disadvantage of passwords:
- People have guessable passwords
- There are programs that guess passwords repeatedly.

Access Control
- Controls whether a particular user will gain access to a particular file.
- Read-only access
- Read and write access
- Controlling level of access is important in organisations.

Firewall
- Monitors and controls data moving to/from the network.
- It is in between the local network and internet.
- Inspects data using a set of (customisable) rules which secures the network from
threats.
- It can stop certain protocols from being used.
- Block data coming from or going to certain network addresses
- Stop attempts at hacking by preventing data that matches the patterns an
attacker would use.

Physical security
- Ensures that critical parts of the network can only be physically accessed by those
authorised.

22
- Protecting against theft of equipment.
- Methods of physical security:
- Burglar alarm
- Security tagging
- Having the servers located in a locked room (server room).
- Electronic lock systems
- Anyone with physical access can easily bypass the security provided by
authentication.

Cloud storage (and security)


- Advantages:
- The cloud storage provider is responsible and will need to ensure that the data
is secure.
- The amount of storage can be adjusted when required.
- The data is protected from loss due to fire, theft etc. This business can thus be
continued from elsewhere.
- Cloud storage systems back-up your data allowing you to restore it in case of
any deletion or failure.
- Disadvantages:
- There is a risk that the cloud storage provider may go bankrupt or have its
servers stolen.
- The data being stored on the internet leaves it vulnerable to eavesdropping
from hackers.
- It assumes that the cloud storage provider is trustworthy.
- The cloud storage provider may have servers located in a different country
which may have different laws for data protection.
- Access to the data depends on having a stable internet connection.
- Risk reduction:
- Storage providers will store data in multiple locations so that failures will not
affect access to the data.
- Data can be encrypted to avoid it being eavesdropped by a third party.

Contemporary storage and security


NAS (Network-attached storage)
- Connected to a network to provide file storage for any device on the network.
- It allows for access over the internet.
- The NAS, once connected to the internet, is at risk of being hacked.
- Not changing the device’s default password gives access to the stored files for
anyone who looks up the default password on the internet.
- Not updating the software to fix the security weaknesses. This enables hackers
to exploit them and gain access to the data.
- To minimise risk:
- Use a complex password
- Ensure all software patches are applied.

23
USB flash drive (Universal Serial Bus)
- Advantages:
- Easy to transport
- Relatively cheap for the amount of storage available
- Convenient to use
- Disadvantages:
- People carrying around large amounts of sensitive information may lose it
easily.
- Allows for employees to steal data (to sell)
- To minimise risk:
- Use encrypted USB flash drives which make the data unreadable without
entering a password.

Cyber attacks
- Any electronic attack on a computer system.
- Gain access to data contained within the system
- Delete or modify information
- Make the system unavailable for use
- Physically damage a device connected to the network

Social engineering
- Attacks that rely on exploiting human behaviour tricking them to give away
confidential information.

Phishing
- The attacker will send an email pretending to be from a legitimate organisation.
- The link will take the user to a site that appears to be genuine.
- The attacker will then trick the user into entering their personal information.
- These will then be passed to the hacker who will use them for financial gain.
- To prevent:
- People need to check the URL of the site
- People need to understand that the bank will not email them for details.
- Do not click any link in an email

Shoulder surfing
- Gaining access to confidential information by directly observing the user.
- It occurs in busy places (a cash machine).
- To prevent:
- Carefully cover the digits to the PIN as they are entered
- Avoid entering confidential information in public places

Pharming

24
- Pharming involves the attackers using malware to alter the IP addresses in the DNS
cache of the domain name into one run by the attacker.
- This site will appear legitimate and once the details are entered, they will be passed to
the attacker for their financial gain.
- Malware can also infect the DNS servers which results in everyone being redirected
to the fake website.
- To prevent:
- Check that the http address is the same as the one you intend to visit.
- Check that it has a secure connection (https)
- Install the latest security updates
- Install anti-virus software

Technical Weaknesses
- Vulnerabilities in the system being attacked.

Unpatched Software
- If the software is not patched
- Security issues are discussed on the internet.
- Hackers can use this knowledge to attack unpatched software.

USB devices
- Any USB device may contain malware that could be transferred to the system.

Eavesdropping
- Intercepting data being sent to/from another computer system.
- Security weaknesses may allow malware to be installed that allows eavesdropping
attacks to occur.

Protecting against security weaknesses


- Design and implementation of software:
- Designers have to consider security against cyber attack:
- Type of authentication needed
- Levels of access allowed for users.
- If the data needs to be encrypted.
- Bad programming practice must be guarded against.
- Bad programmers may not consider the safety of their code.
- Code vulnerabilities
- The code performs the intended task but creates potential security
risks.
- Code reviews
- Review by another programmer:
- Checks for bad programming practices and code vulnerabilities
- Labour intensive and expensive
- Automated review

25
- Specialist software that examines the code for vulnerabilities.
- Highlights potential issues and commonly known vulnerabilities
- Can’t find every issue and also expensive.
- Modular testing: testing each block of code as it is completed.
- If small problems remain, they can be used by hackers to gain access to
the system.

Other measures to protect from cyber attacks


- Audit trail.
- This is automatically generated and in chronological order.
- Allows technicians to find out what happened during a cyber attack allowing
them to find the vulnerabilities.
- Use secure operating systems.
- Some operating systems will be harder to attack successfully.
- Provide effective network security
- Effective management, monitoring and training of users.
- Well-educated technical staff
- Implement policies to reduce the chance of an attack

Identifying vulnerabilities
- Penetration testing
- IT systems of an organisation are deliberately attacked to find weaknesses.
- They are then reported to the organisation and fixed.
- Commercial analysis tools
- Tools can be used to scan for vulnerabilities. (purchased/hired)
- They can only identify known vulnerabilities.
- Internal scan:
- Shows issues that could be exploited by an employee who can
physically enter the building.
- External scan:
- Vulnerabilities that can be exploited from outside the network
- The tools are not restricted so hackers can purchase them to identify
weaknesses in the systems.
- Review of network and user policies
- Network policy:
- Access controls
- Password requirements
- How and when patches should be applied.
- User policy:
- What is allowed and not allowed on the network
- What will happen to the user if they do something unacceptable
- How to report faults and security issues

Domain names

26
- They are used to identify IP addresses as they are easier to remember.

Domain name service


- The internet service that translates domain names into IP addresses.
- Domain names are alphabetical but the internet is based on IP addresses.
- The Domain Name Service translates the name into the corresponding IP address.

Domain Name Service (steps)


- A user enters the domain name into the browser
- The client contacts a DNS server to resolve the domain name.
- If the domain name is not in the server’s database, it contacts another server.
- The second server resolves the domain name and returns it.
- The server returns the IP address to the client
- The client then contacts the host using the IP address.

- The computer is likely connected to the internet using an Internet Service Provider
(ISP).
- The internet uses the TC/IP protocol stack for communication between the different
networks.
- The internet protocol (IP) provides rules on addressing.
- Router: Hardware used to forward packets of data from one network to another.
- When a router receives a packet, it checks the packet header and routes it to its
destination address.

When a internet-connected computer sends data to another


- The sending computer splits the data into packets
- Each packet has a header containing:
- Sender’s address
- Destination address
- Each packet is sent to the ISP
- The router will inspect the packet header and check the destination address and then
forward the packet.
- This continues until the destination router is reached.
- Once the packets reach their destination, the receiving computer will put the data back
together from the packets.

World Wide Web


- It is a service that runs on the internet.

Internet
- The Internet refers to the global online interconnection between different electronic
devices.

Accessing the world wide web

27
- The WWW is accessed using a web browser.
- It provides access to web pages.
- The web browser converts the data received from a web server to a human-readable
format.

How the WWW works


- The user enters the web address they want to look at (URL).
- The computer uses the Domain Name Service to find the IP address of the required
server.
- The web browser connects to the web server using the IP address and requests the
relevant web page.
- The web page is transferred from one computer to another using HTTP/HTTPS.
- The web browser displays the web page as described by the HTML.

IP addressing standards
- IPv4
- Four 8 bit numbers
- Separated by dots
- 32 bits (4 billion unique addresses)
- IPv6
- Eight groups of hexadecimal numbers
- Separated by colons
- 128 bits

Components needed to access the internet


- Devices needed to connect a LAN to a WAN.
- Switch:
- It links computers in a local area network.
- They can read the destination address on the packets and send them to the
intended computers.
- This cuts down on network traffic.
- Wireless Access Point (WAP)
- Allows wireless devices to connect to a wired network.
- Converts data they receive through cables into wireless signals. (vice versa)
- Router
- Routers read the packet headers and check the destination address.
- The router forwards packets of data to the destination network
- Routers are used to allow many computers to share an internet connection.
- Modem
- Converts signals in a LAN into signals that can be transmitted along the cables
provided by the ISP.

28
THE BIGGER PICTURE
The manufacture, use and disposal of computing technology uses non-renewable materials
and produces potentially harmful e-waste.

Manufacture
Raw Material extraction
- Non-renewable resources are used in the manufacture of computer products.
- Metals (gold,copper,silver)
- Radioactive metals (uranium)
- The radioactive materials can contaminate air, soil and groundwater and are toxic to
humans.
- Mining causes extensive damage to the local environment.
- Damaging the landscape with holes and waste heaps
- Contaminating water supplies
- Putting wildlife habitats in danger
- Poorly equipped miners are at risk of injury
- They can also suffer long term breathing illnesses (bronchitis)

Production
- Manufacturing uses a lot of energy.
- Large amounts of fossil fuels are burned contributing to global warming.
- Semiconductors use a large amount of water
- This results in water shortages
- The waste water they produce can cause pollution (if untreated)
- There are chemical emissions and waste water
- Puts the humans in the surrounding area at risk.
- Exposure to the radioactive materials harms humans both physically and
neurologically.
- To counter:
- Governments can impose tough recycling targets on the companies to reduce
the need for raw materials.
- Growing public awareness to put pressure on manufacturers to improve
working conditions.

Usage
- Large amount of energy is used to keep the devices running
- This contributes to global warming
- In cloud computing, vast amounts of energy are needed to power and cool all the
computing equipment that is needed.
- It is worse with small,inefficient data centres rather than large facilities.
- To counter: (to reduce carbon footprint)
- Energy efficiency measures
- The use of renewable energy

29
Disposal
- Large amounts of e-waste are sent overseas to developing countries and dumped in
landfill sites.
- The toxic substances can leak into the ground contaminating water supplies,
the food chain and polluting the air.
- Poor local people attempt to recover the expensive materials inside the e-
waste.
- Without proper protection this is hazardous as they may inhale toxic
fumes.
- To counter:
- Countries can set regulations and targets for collections and recovery of
computer technology
- This can recover valuable metals and reusable components.

Preserving the environment


- Climate change
- Satellite data can be used to measure rising sea levels/ surface temperatures.
- Sensors to detect the melting of glaciers
- Early warning
- Tsunami early warning systems use sensors to detect tsunamis to issue timely
warnings.
- Conservation
- GPS and satellites can be used to track endangered animals
- Mobile phones can be used to listen for illegal logging.
- Energy (efficiency)
- Sensors can turn lights on and off saving energy
- Solar farms can track the movement of the sun to maximise their power
generated.

Ethical issues
- Ethics: Are the principles that govern a person’s behaviour, what is right and wrong.
- Privacy
- Security

Personal data
- Everytime you use a web-based service, you add it to a store of personal data.
- This personal data is stored on servers that belong to online services.
- Every organisation collects some information about the user.
- There is little to no control over this
- Weak security could result in personal information falling into the wrong hands.
- This makes people vulnerable to phishing attacks, scams, identity theft, fraud
- Information can also be inaccurate but extremely difficult to change

30
- This can follow the person throughout their life.
- People give away information about themselves as it enables organisations to
understand user needs and provide a more personalised service.
- Some believe it is unethical to target a financially vulnerable person with
adverts for products.

Big Data
- Analysis of Big data can benefit society.
- Optimising energy use in cities.
- Big data comprises large amounts of scattered information.
- When it is brought together, it can create a detailed profile of an individual
making them susceptible to identity theft or fraud.

Surveillance
- Surveillance is used by security forces to:
- Track people’s movements
- Tap phones to keep people safe
- Track down and deter criminals
- Surveillance can also be used by criminals to commit crimes
- To analyse your schedule to find the best time to commit a robbery.

Location-based services
- Enables users to share their location.
- To meet with friends
- Find their way to a particular location
- It allows other people to track your movements
- This represents a huge invasion of privacy.

Privacy-enhancing tools
Encryption Prevents unauthorised people from reading data

Cookie cleaners/ anti- Software that detects and removes cookies, spyware and
spyware/ ad blockers adware

Identity management A third party that holds evidence of your identity and gives
service you an identifier that enables you to conduct transactions
without revealing personal information.

Password manager Stores your website login information in an encrypted database


with a master password.

Digital inclusion
- Providing everyone affordable access to computing technology (along with the skills)
- Digital divide: the gap between those who are technology-empowered and those who
are technology-excluded

31
Why digital exclusion is bad

Information and services Internet is the default option for accessing information

Employment Having poor computing skills makes it harder to find a job and
limits a person’s opportunities

Democracy The internet gives people a voice and lets them express their
views.

Economic growth Businesses that don’t exploit computing technology will be less
competitive than those who do.

Saving money Paying bills and shopping online saves customers money and
keeps them safe

Social isolation Having access to the internet helps people keep in touch with
friends and relatives.

Policies for digital inclusion


- Subsidy programme for low-income households to provide internet access.
- Digital learning programmes
- Establishing internet centres in rural areas.

Professionalism
- Computer scientists should always respect
- Wellbeing
- Privacy
- Security
- Never stop learning and gaining skills

Intellectual property
- It is a unique creative product of the mind
- A piece of software, game, design, digital image, music, literary work
- It has commercial value

Copyrights and Patents


- Legislation makes it illegal to copy, modify or distribute IP without permission.
- It is unethical to allow copying as the programmer who wrote the code doesn’t get
paid for it.
- Copyright:
- Protects the expression of an idea, not the idea itself
- The source code would be protected but someone else could make another
program that performs the same task.
- Patent:

32
- It protects the idea or design of an invention.
- To get a patent, you must prove that what you made is unique from anything
that already exists.
- Patent holder has the exclusive right for 20 years, to make, use and sell their
invention
Creative Commons
- Provides a way for a creator of an intellectual property to allow other people to use it
providing they abide by the conditions specified in the licence.

Open source
- Open source software is freely available on the internet.
- It can be edited by anyone.
ADVANTAGES DISADVANTAGES

It is free to use It won’t be user friendly

It can be modified There will be no technical support

It can be used to demonstrate programming Criminals may be able to identify and


concepts exploit weaknesses

Proprietary software
- It is closed-source.
- The source code is protected and users are not allowed to modify it.
- If it doesn’t do exactly what you want, you can’t change it.
- It is extensively tested before release and errors are fixed.
- It is user friendly
- It has technical support.

Artificial intelligence
- The ability of a digital computer robot to perform tasks commonly associated with
intelligent beings. (solving cognitive problems)
- Traits such as:
- Knowledge
- Reasoning
- Perception
- Learning
- Industrial robots do one job efficiently and well.
- AI involves allowing computers to modify their own programs to try something else
when one thing doesn’t work.
- Machine learning: ability of computers to learn without being explicitly programmed.

Uses of AI
- Medical field

33
- Digital consultations
- Analysing test results
- Health monitoring
- Other uses:
- Recommendations for entertainment
- Virtual assistants
- Autopilot
- Generating game levels
- Monitoring bank transactions

DNA computing
- It uses DNA as a computational tool.
- DNA molecules can be used to store and process information:
- The nucleotides in DNA act as bits and are used to encode information.
- The codon in DNA acts like a byte which has 64 possible values
- The DNA strands can be designed to interact in specific ways such as binding
to each other or catalysing chemical reactions
- Advantages of DNA computing:
- There will always be a supply of DNA (renewable)
- Large supply of DNA makes it cheap
- DNA biochips can be made cleanly (unlike regular processors)
- DNA computers are many times smaller.
- DNA is suitable as a storage medium
- It can survive in a cool, dry environment
- For hundreds of thousands of years

Nanotechnology
- Manipulation of matter with a size from 1 to 100 nm.
- It is an interdisciplinary field.
- By reducing the size of transistors, they can increase the numbers of transistors inside
processors increasing their performance.
- Uses of nanotechnology:
- Self-cleaning glass
- Clothing

Quantum computing
- Quantum computers use quantum mechanics
- The behaviour of subatomic particles that exist as particles and waves.
- Superposition
- An object can have all possible states, until it is measured.
- Quantum computers use qubits
- Superconducting circuits are needed to generate qubits.
- A qubit can be a 1 and 0 at the same time.
- Each qubit represents two values.

34
- They can carry out calculations and crunch through a vast number of
possible outcomes quickly.
- Entanglement
- A pair of qubits exist in a single quantum state and can influence each other.
- This produces an exponential increase in computing power.
- The quantum state of qubits is very fragile as the slightest vibration can cause
a change in state. (noise)
- This causes lots of errors in calculations.
- Efficiency of Quantum computer
- If a normal computer requires t amount of time, a quantum computer requires
square root of t time.
- Uses of quantum computing
- To create models to find optimal conditions.
- Optimising traffic flow in a future city.

Written by Tanuja Kumarasiri

35

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy