Topic 4: Data Types, Data Structures and Algorithms Flashcards
1
Q
What is XOR
A
Either or, not both
2
Q
What is a Record
A
- A row in a file or table
- Widely used in databases
- Made up of fields
3
Q
What is a List
A
- A number of items
- Items can occur more than once
- Data can be of more than one data type
4
Q
What is a Tuple
A
- An ordered set of values
- Cannot be changed once initialised
- Initialised with regular rather than square brackets
5
Q
What is an Array
A
- An ordered set of elements, each of the same type.
- A 1D array is like a list.
- A 2D array is like a table.
- A 3D array is like a multi page spreadsheet.
- 2D arrays are searched first by the rows and then the columns
6
Q
What are Linked Lists
A
- Dynamic data structure.
- Stores an ordered list.
- Contents need not be in contiguous data locations.
7
Q
How do Linked Lists Work
A
- Items are called nodes.
- Each node contains a data field and a link or pointer field.
- The data field contains the data itself.
- The pointer field contains the address of the next item
8
Q
What is Normalisation
A
- Maximises the precision in any number of bits.
- Adjust the mantissa so that it begins with 01 for positive numbers and 10 for negative numbers.
9
Q
What are the names of De Morgan’s 4 Laws
A
- Distribution
- Association
- Commutation
- Double Negation
10
Q
What are floating point numbers split into
A
Mantissa and Exponent
11
Q
Describe De Morgan’s Law
A
not(A and B) is the same as (not A) or (not B)
not(A or B) is the same as (not A) and (not B)