A2 Units Flashcards
What is a procedural programming language?
A language where the control flow is defined rather than the logic
What is a first-class object?
Any object that can be passed as an argument to a function
What is a high-order function?
A function that takes another function as an argument, or a function that returns another function
What does the map function do?
It takes a list of elements and applies a function to each item in the list
What dies the filter function do?
It returns a list of elements with specified values from another list
What does the reduce function do?
It recursively adds each successive element of a list, allowing for the entire lost to be represented as a single number
What is the head of a list?
The first element of a list
What does the application layer of the TCP/IP model do?
Determines which protocol is to be used when transmitting the data
What does the transport layer of the TCP/IP model do?
Splits data up into packets, numbers each packet, and applies a port number to each
What does the network layer of the TCP/IP model do?
Adds both source and destination IP addresses to each packet, forming sockets
What dies the link layer of the TCP/IP model do?
Adds the source and destination MAC addresses to packets
What is a Galois field of two elements?
A system used to find the dot product of two vectors in a logical way
What use is GF2?
Adding two vectors is like applying an AND bitwise operator, and multiplying vectors is like applying a XOR bitwise operator
Give one application of GF2
To find the parity of a string of bits
List every application layer protocol and their ports in order of increasing port number
FTP Data - 20 FTP Control - 21 SSH - 22 Telnet - 23 SMTP - 25 HTTP - 80/8080 POP3 - 110 IMAP - 143 HTTPS - 443
What does a question mark denote when used in a regular expression?
The previous character does not have to be present
What is the symbol to denote the OR bitwise operator in a regular expression?
|
What does the “-“ symbol represent in a regular expression?
A range of values
What is the purpose of a regular expression?
To determine whether a string is valid in a defined language
What is the syntax used when searching for an entire string in a regular expression?
Rounded brackets are used “()”
What is the syntax used when searching for individual characters?
Squared brackets “[]”
What does the “+” symbol denote in a regular expression?
A wildcard. There must be one or more of the preceding element present
What does the “*” symbol denote in a regular expression?
A wildcard. There can be 0+ of the preceding element
Give three advantages of functional programming paradigms
×Functions are very abstract, so are less prone to errors
×Functions are easier to test because a function will always give the same output
×It is easier to reuse functions with any level of data abstraction
How is a normalised floating point number represented in binary?
A normalised floating point number contains a mantissa and exponent, with only a sequence of 01 preceding the binary point
What are the five steps to convert from binary to decimal floating point numbers?
×Find the sign of the mantissa
×Find the value of the exponent and its sign in decimal
×Move the binary point as denoted by the exponent
×Perform two’s complement conversion if the number is negative
What is a subnet mask?
A 32-bit number used to split an IP address into its host ID and network ID using an AND bitwise operator
What is the definition of big data?
High volume, high velocity data with a large range
What is latency?
The time taken for a bit to be sent between two devices
What is unstructured data?
Data that cannot be stored in a traditional database
What is first normal form?
All data is in atomic form and there are no many-to-many relationships
What is second normal form?
The data is in 1NF and there are no partial key dependencies
What is third normal form?
The data is in 2NF and there are no non-key dependencies
Why is reverse Polish notation used?
To make mathematical expressions easier for a computer to process
What type of tree traversal does reverse Polish notation use?
Post-order traversal
Name two ways in which vectors can be expressed
As a list or as a mapping of a function onto a list of values
What is a convex combination of vectors?
If a vector is convex then au +Bv = 1 where a, B > 0
What are convex combinations used for?
To determine whether a vector lies on a plane or not
What is SSH used for?
For transferring data in a secure, encrypted manner