computing Flashcards
What are the four layers of the TCP/IP stack?
Application, transport, internet/network, link
What is the purpose of the application layer in TCP/IP?
to provide protocols and standards for applications to communicate and access network services
What is the purpose of the transport layer in TCP/IP?
sets up communication between host devices - agree on parameters such as language and packet size
What is the purpose of the internet/network layer in TCP/IP?
addresses packets sent in the transport layer - routes packets across network
What is the purpose of the link layer in TCP/IP?
Facilitates the transmission of data (binary) through physical media across network
What protocols are used with the application layer of TCP/IP?
File Transfer Protocol (FTP), Hypertext Transfer Protocol (Secure) (HTTP/HTTPS)
What protocol is used with the transport layer of TCP/IP?
Transmission Control Protocol (TCP)
What protocol is used with the network/internet layer of TCP/IP?
Internet Protocol (IP)
What protocols are used with the link layer of TCP/IP?
Ethernet, WiFi, Bluetooth
Why are both MAC and IP addresses needed in TCP/IP?
IP addresses are needed for communication between devices on different networks, while MAC addresses are needed for communication across the same network
What is meant by the TCP/IP stack?
The TCP/IP stack is a set of protocols that enables communication between devices on a network, organized into layers, each responsible for a specific aspect of the communication process.
What are some benefits of using ASCII over Unicode?
Simplicity, compatibility with many computer systems and only using 7 bits
What are some benefits of using Unicode over ASCII?
Supports a far wider range of scripts and alphabets
What is a parity bit?
An extra bit added to a group of bits that checks if the number of 1s is even or odd
What is the function of a parity bit?
To detect errors in data and allowing this error to be detected when this data is communicated over a communication channel
What is backtracking?
Incrementally working towards a solution, abandoning partial success when solution can’t be completed and reverting to a previously successful match
What problems are best suited to using backtracking?
Logic problems (e.g. path-finding algorithms)
What is data mining?
The analysis of vast amounts of raw data to find information and trends
What examples of real life use of data mining are there?
Consumer buying habits, stock markets, weather modelling
What are heuristic methods?
Methods that may not find a perfect solution but finds a solution that’s workable
What is the definition of encryption?
The process of encoding a message so that it can only be read by the sender and the intended recipient
How does symmetric encryption work?
A single key is used to encrypt and decrypt the message - both parties need access to the key and need to keep it secret
What are some weaknesses of symmetric encryption?
Can be fairly easily cracked through interception of the key or duplication of the key generation process
How does asymmetric encryption work?
The message is first encrypted by one key, and the once the message is sent it is decrypted by a second key
Why is asymmetric encryption more secure than symmetric encryption?
It is impossible to derive one key from the other
What makes up a key pair in asymmetric encryption?
A public key and a private key
How secure do the keys in a key pair need to be?
The public key can be sent anywhere or published, whilst private keys mustn’t be accessed by anyone else
How are key pairs used in asymmetric encryption?
Public keys are exchanged, the sender uses the recipient’s public key to encrypt the message and then the recipient uses their private key to decrypt it
What is another advantage of asymmetric encryption beyond security?
Messages can be authenticated if first encrypted with private key
What is a combined encryption key?
The combination of your private key and the other person’s public key
Name the benefits of asymmetric encryption
Both parties know the message hasn’t been read by anyone else, the message can be authenticated and the message can’t be modified in transit
What is hashing?
The transformation of a string of characters into a fixed-length value or key that represents the original input string
What is the difference between encryption and hashing?
Hashing is a one-way process - the original data can’t be retrieved from the hashed data even with access to the hashing algorithm
When is hashing useful?
Preventing sensitive data like passwords and PINs from being read by a hacker
Why is hashing secure?
It means data doesn’t have to be sent or stored in plain text - even if intercepted this data is useless to a hacker
What are characteristics of Von Neumann architecture?
Shared memory and buses for instructions and data, linear FDE cycles, instructions completed serially
What are characteristics of Harvard architecture?
Separate memory and buses for instructions and data, reading and writing data can be done at the same time as fetching an instruction
What are advantages of using Von Neumann architecture over Harvard?
Flexibility and easy program modification
What are advantages of using Harvard architecture over Von Neumann?
Faster data access and higher processing speeds
What is the function of the page rank algorithm?
To rank search results based on relevance to the search term and the quality of the web page
How does the page rank algorithm work?
By checking the number of links to a page and the quality of the pages that link to it - assuming more important sites are likely to be linked to more by other sites
When is circuit switching most useful?
When a constant end-to-end link is needed (e.g. live video)
What is circuit switching?
Where a dedicated link of fixed bandwidth is created between the source and the destination
What is the downside of circuit switching?
Lots of potential bandwidth can be wasted, if one part of network fails may go down
What is packet switching?
Data is broken into smaller blocks and sent independently via the route which is least congested
What are the advantages of packet switching?
Maximises bandwidth, needs less complex infrastructure, can easily respond if parts of network fail, is more affordable and efficient compared to circuit switching
What is the downside of packet switching?
Doesn’t guarantee the quality of the transmission
What is the definition of an instruction set?
The set of all instructions written in machine code that can be recognised and executed by a given processing unit/CPU
What is an example of the difference between CISC and RISC in practise?
CISC multiplies 2 numbers in 1 instruction whilst RISC has to add the number to itself the desired number of times
What are the benefits of using CISC over RISC?
More efficient use of RAM, more cycles executed per second, smaller code sizes, less strain on compiler(software)
What are the benefits of using RISC over CISC?
Simpler hardware, supports pipelining, cheaper to produce, leaves more room for general purpose registers and cache, lower energy consumption
What are some key differences between CISC and RISC?
CISC instructions of variable length and can be multiple clock cycles while RISC instructions fixed length and are one cycle each
What is the function of a modem?
To transform digital information from a device into analogue signals that can be transmitted through wires, and vice versa
What is the function of a router?
Responsible for routing data between devices on a small network, or between devices on a network and the internet
What is meant by routing data?
Directing data packets from a source device to a destination device across a network
From most to least, which cables offer the most bandwidth?
Fibre optic, coaxial, twisted pair
From most to least, which cables are the most expensive?
Fibre optic, coaxial, twisted pair
When are twisted pair cables generally used?
Telephone networks, data networks and cable shielding
What is meant by cable shielding?
The blockage of any unwanted electrical interference from affecting signals travelling through a cable
What is a twisted pair cable made up of?
A pair of insulated copper wires
What is a coaxial cable made up of?
Four components (from inside to outside) - solid conductor wire, insulation layer, grounding conductor and exterior insulation layer
When are coaxial cables generally used?
Computer network connections, digital audio and cable television
How much can each method of cabling be affected by external magnetic signals?
Twisted pair can be the most, coaxial can be impacted but to a lesser extent, fibre optic not at all
What are fibre optic cables made up of?
Very thin optical fibres (glass or plastic) bundled together into a cable
When are fibre optic cables generally used?
To support long-distance connections between cities and countries, data centres, organisations that transmit lots of data
Why are fibre optic cables unaffected by external magnetic fields?
Light rays are unaffected by electrical noise
What is the function of a Network Interface Controller (NIC)?
To allow wired and wireless communication between computers on a LAN or connected to a WAN using the Internet Protocol (IP)
What is the function of a Wireless Access Point (WAP)?
To create a wireless LAN (WLAN) by connecting to a wired router, switch or hub and projecting a Wi-Fi signal across the WLAN
What is the function of a hub?
Allows multiple devices to connect to one network
What are the drawbacks of using a hub?
Broadcasts all transmissions to all connected devices, meaning network can become flooded with unnecessary traffic and therefore they’re much slower than switches
How does a switch operate differently in comparison to a hub?
Is an active device meaning transmissions are routed to the correct device limiting unnecessary traffic
What is a co-processor?
Any additional processor used for a specialised task
What is the function of a co-processor?
To improve the overall speed of the computer by executing concurrently with the main CPU
What are the differences between CPUs and GPUs?
CPUs more general purpose while GPUs are specialised - GPU faster and more efficient but only in certain tasks
Why are GPUs more efficient in carrying out mass calculations?
Designed for efficient use of parallel processing
Why are GPUs not limited to graphics any more?
Any situation that requires a large number of simple calculations being done will be far quicker on a GPU than a CPU
What does IDE stand for?
Integrated development environment
What is the purpose of an IDE?
To provide a range of tools and features that help speed up and enhance program development
What are examples of features in an IDE?
Code editors, error diagnostics, run-time environments, translators and auto-documentation
What is an example of an IDE?
Python IDLE (Integrated Development and Learning Environment)
What is a run-time environment?
Software that supports the running of programs allowing programmers to easily run code during development
What is done in auto-documentation?
Variables and modules are tracked with a view to produce documentation that aids in program maintenance, debugging and support
What is concurrency?
Where multiple tasks are executed at overlapping time intervals on one core, allowing progress to be made simultaneously
What is parallelism?
Tasks are actually executed simultaneously on different cores
What is polymorphism?
Where one instruction can do multiple things depending on the inputs given
What is the purpose of a hash table?
To immediately find an item in a list without the need to compare to other items in the data set
How does a hash table work?
Data is first hashed into a unique number, then this value is used as an index for the data. When you want to retrieve that data it is hashed again to find its corresponding index in the hash table
What is a collision in a hash table?
Where the algorithm returns the same index value for multiple data items
What are the main priorities of the hashing function?
Speed, result in few collisions and use little memory
What is open addressing and how does it resolve collisions?
Checks the next available space in the hash table until an empty position is found and stores data there
What is linear probing?
Used with open addressing - hashing function delivers start position and then uses linear search until data is found
What are the disadvantages of linear probing?
Prevents other items from being stored in correct positions, clustering (several positions filled around common collision values)
What is the trade-off made with hash tables?
A bigger hash table takes up more memory however is less likely to result in collisions
What is ‘chaining’?
Where two items with the same hash index are stored in the same address using a 2D array
What second tables can you use to deal with overflows?
Overflow tables or linked lists, searched sequentially
What examples of applications of hash tables are there?
File systems linking a file name to a file path, identifying keywords in a programming language during compilation
What three operations can be performed on a hash table?
Add an item, delete an item, retrieve an item using its hash value
What is a flip flop?
Logic circuit that can store one bit and flip it between 0 and 1
What are a flip flop’s inputs?
Single bit data input (D) and a clock signal (C)
What are a flip flop’s outputs?
Single bit data output (Q) and the inverse of this data output (¬Q)
How is the clock signal provided to a flip flop?
By another circuit that changes state and timed intervals/pulses
When is the output of a flip flop changed?
When the clock pulse is at a rising/positive edge
What logic gates make up a half adder?
XOR for the digit and AND for the value carried
What is the limitation of a half adder?
Can’t store carried over digits
What makes up a full adder?
Two half adders combined with an additional or gate
What is the purpose of the Data Protection Act?
To control how your personal information is used by companies and the UK government
What were the roles defined by the Data Protection Act?
Data subject (has data on them stored), data controller (determines what data is stored and how data is stored by orgs) and data commissioner (independent public body that enforces the act)
What are some of the principles of the Data Protection Act?
Accurate data, kept secure, collected legally, only used for intended purpose, not held longer than necessary
What rights does the Data Protection Act give to data subjects?
Right of access of data, right of correction, right to prevent marketing, right of complaint, right to compensation if flaw found
What does the Computer Misuse Act outlaw?
Unauthorised access to a computer system (hacking), unauthorised access to digital material with intent to commit further crime, unauthorised modification of data (e.g. deleting/changing files), making tools used to commit computer misuse
What is the purpose of the Computer Misuse Act?
To protect computer systems/data from unauthorised access and misuse
What is meant by intellectual property?
“Creations of the mind” (e.g. artwork, music, logos, inventions)
What is meant by copyright?
The rights a creator has over their own work
What is a patent?
An exclusive right granted to an inventor for their invention
What is the purpose of the Copyright, Designs and Patents Act?
To protect the rights of creators and innovators and to grant legal protection to original works
What does the Copyright, Designs and Patents Act do?
Makes it illegal to copy any work without the copyright holder’s permission
What does the Regulation of Investigatory Powers Act (RIPA) do?
Provides certain bodies the right to monitor communications and internet activities
What are examples of public bodies which have a right to monitor internet communications through the RIPA?
Police, security services, environment protection agency, office of fair trade, serious fraud office
What are some examples of data that public bodies can access through RIPA?
Customer communication through ISPs, mass surveillance of communications, monitoring of an individual’s internet activity
What is the impact of RIPA on Internet Service Providers (ISPs) and other businesses?
Provide access to digital communications when asked, implement hardware/software that facilitates surveillance
What are the concerns regarding RIPA?
Invasion of privacy, freedom of speech, unnecessary censorship, can be misused
What is a checksum?
A small piece of data calculated from a larger set of data
What is the purpose of a checksum?
To detect errors or changes made during transmission or storage of data
How does a checksum work?
An algorithm first generates a unique value, then generates it again when the data is received - if checksums match it shows the data hasn’t been corrupted
What is a logical protocol and what are some examples of them?
Logical protocols define formatting, structure and interpretation of data at a higher level (e.g. HTTP, SMTP, FTP)
What is a physical protocol and what are some examples of them?
Physical protocols operate at a lower level and focus on the physical transmission of data over a network (e.g. Ethernet and WiFi)
In terms of relational databases, what is a key?
A field that uniquely identifies each record in a table
In terms of relational databases, what is a primary key?
The main key that uniquely identifies each record in a table
In terms of relational databases, what is a foreign key?
A field in a table that refers to the primary key of another table
What are the 5 components of first normal form in a database? (PUSON)
Primary key, unique field names, same data type in field, only one data element in field, no duplicates
What are the 3 components of second normal form in a database?
Already in 1NF, remove partial dependencies, fix many to many relationships created as a result
What are the 2 components of third normal form in a database?
Already in 2NF, remove transitive dependencies
How do you select data in SQL?
SELECT
What does the FROM command do in SQL?
Sets the table that is to be operated on
How do you make selection in SQL based on a criteria?
WHERE
How do you select all fields in SQL
*
How do you ensure multiple criteria needs to be met in selection in SQL?
AND
What does the LIKE command do in SQL?
Allows selection based on only parts of the data
What does a % do in SQL?
Means the data is only selected based on the data in the field before the %
How do you ensure one of multiple criteria needs to be met in SQL?
OR
What does the INSERT INTO command do in SQL and what is the syntax?
Allows data to be inserted into a table: “INSERT INTO [table name] ([field1]), VALUES ([value1])”
How do you delete data in SQL?
DELETE FROM
How do you combine data from multiple tables in SQL?
JOIN
What does the ON command do in SQL?
Specifies a common field between two tables being joined together
How do you delete an entire table in a database on SQL?
DROP TABLE
What are the two rules of Big O notation?
Remove all terms except one with largest exponent, remove any constant from this