Data Representation Flashcards

1
Q

Real Number

A

Any and all existing sets of numbers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Rational number

A

A rational number is a positive or negative number which can be fractional. The symbol is Q.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Integer

A

Any whole positive or negative number. The symbol is Z.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Natural Number

A

Whole, positive numbers including 0, The symbol is N.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Irrational Number

A

A number that cannot be represented as a fraction or ratio, the decimal form will contain infinite repeating values.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Ordinal Number

A

Values that indicate place value e.g. 1st, 2nd…

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is cardinality?

A

The number of elements in a set (the length)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Countable set

A

The elements in a set can be tallied

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Countably infinite set

A

The elements in a set can be tallied but the result would not be reached

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Cartesian product

A

The resulting of two sets possible ordered pairs e.g. A = {1,2,3} and B = {A, B} then
A x B = {{1,A},{1,B},{2,A},{2,B},{3,A},{3,B}}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the Union?

A

A ∪ B –> Belong to set A, set B or both

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the Intersection?

A

A ∩ B –> Belong to both

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Is a member symbol?

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Is NOT a member symbol?

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the difference between a subset ⊆ , and a proper subset ⊂

A

We say “A is a proper subset of B” if, A is a subset of B but, A is not equal to B.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Base 10? Base 2? Base 16?

A

Base 10: Decimal
Base 2: Binary
Base 16: Hexadecimal

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

How to find the number of binary permutations?

A

2^no of bits
To reverse this and find the number of bits, you find Log2(permutations)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

How do you determine the max value you can create from a binary length?

A

2n - 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Convert 5C (Hexadecimal) into binary and then denary

A
  1. Split hex into nibbles,
    5 = 0101
    C = 12 = 1100
  2. Binary = 01011100
  3. 01011100 Converted to denary = 92
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Convert Denary Number 92 into Hexadecimal?

A
  1. Put into binary 92 = 01011100
  2. Split into nibbles and convert to Hex
    0101 = 5
    1100 = 12 = C
  3. Join, Answer = 5C
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

How do you calculate signed binary min value?

A

-2n/2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

How do you calculate signed binary’s max value?

A

2n-1/2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Define twos complement?

A

Where the most significant binary bit is negative

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What are the binary addition rules?

A

0+0 Carries 0 Result 0
0+1 Carries 0 Result 1
1+1 Carries 1 Result 0
1+1+1 Carries 1 Result 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

What are the binary subtraction rules?

A

Flip the bits, +1 and then perform binary addition

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

How do you convert Floating point to denary?

A

+/- Mantissa x 2^+/-Exponent

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

What does a normalised floating point expression look like?

A

Positive begins with 01
Negative begins with 10
(floating point uses twos complement)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

What is the benefit of normalised floating point?

A

It maximises precision for a given number of bits and provides a unique representation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

What is the mantissa?

A

Represents the significant bits of a number. The larger the bits used here, the greater the precision.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

What is the exponent?

A

The power. The larger the number of bits, the greater the range of numbers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

What is a cancellation error?

A

Adding a very small number to a very big number will not change the result

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

What is an underflow error?

A

The result of the calculation is too small to fit into the number of bits

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

What is an overflow error?

A

The result of the calculation is too large to fit into the number of bits

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

What is a rounding error?

A

The number cannot be represented in binary. It may be absolute, relative or percentage.

35
Q

What is Absolute Error?

A

Absolute error is the accepted error loss when putting a number into binary, it is the difference between the original number and the next bit up or down

36
Q

How do you convert a positive/negative number above 1(or less than -1) into floating point?

A

ALWAYS HAS A POSITIVE EXPONENT
1. Convert the number into binary (if negative denary, flip bits then +1)
2. Put the binary number into
the given mantissa length (starting at the first 01 if positive, 10 if negative)
3. There should be a decimal point after the first digit in the mantissa
4. Count how many places between that and the original binary decimal point
5. This count equals the exponent (will be positive, due to right forward counting), create this in binary in the length stated
6. Put the mantissa and exponent together for your final answer

37
Q

How do you convert 5.25 into floating point (10-bit mantissa and 6-bit exponent)?

A
  1. 5.25 into binary —> 0101.010
    (not negative so no need to flip bits and +1)
  2. Into Mantissa 10 bit = 0.101010000
  3. Determine original decimal (shown by ,)
    0.101,010000 —> moved +3 places
  4. Create the exponent (moved right so POSITIVE)
    —> 000011
  5. Join together for final answer
    == 0101010000 000011
38
Q

How do you convert a positive/negative number less than 1(and greater than -1) into floating point?

A

ALWAYS HAS A NEGATIVE EXPONENT
1. Convert the number into binary (if negative denary, flip bits then +1)
2. Put the binary number into
the given mantissa length (starting at the first 01 if positive, 10 if negative)
3. There should be a decimal point after the first digit in the mantissa
4. Count how many places between that and the original binary decimal point
5. This count equals the exponent (will be negative, due to left backfilling with 1’s), create this in binary in the length stated
6. Put the mantissa and exponent together for your final answer

39
Q

How do you convert -0.25 into floating point? (10 bit mantissa and 6 bit exponent)

A
  1. Convert positive 0.25 into binary —> 0000.010
  2. It is negative, so flip the bits and add 1 —> 1111.110
  3. Place into mantissa starting at first 10 because it is negative —> 1.000000000
  4. Backfill with 1’s and count backwards to original place (denoted by ,) 1,11.000000000
  5. This means it has moved -2 places, therefore -2 is our exponent
  6. Our exponent will be in twos complement because it is a number less than 1 and greater than -1 (largest bit is negative) —> 111110
  7. Put them together for an answer =
    100000000111110
40
Q

How do you calculate relative error?

A

Absolute Error/Number intended to be stored

41
Q

How do you calculate percentage error

A

Relative error x 100

42
Q

Define ASCII

A

American Standard Code for Information Interchange; 7 bits, numerical representation of characters due to computers only understanding numbers
A= 65
a = 97
1 = 49

43
Q

What is an AND gate?

A

Only outputs 1 if both inputs are 1

44
Q

What is an OR gate?

A

Outputs 1 if a singular input of 1

45
Q

XOR gate?

A

Outputs 1 if one input is 1 and one is 0 (exclusively)

46
Q

NOT gate?

A

Outputs opposite

47
Q

What are the measurements of binary storage?

A

K - Kilobyte - 10^3 - Kibibyte - 2^10
M - Megabyte - 10^6 - Mebibyte - 2^20
G - Gigabyte - 10^9 - Gibibyte - 2^30
T - Terabyte - 10^12 - Tebibyte - 2^40

48
Q

What is unicode and what are its advantages over ascii?

A

Unicode is a 16 bit code that can rep non english language characters and emojis due to its much less limited length - more variable

49
Q

What is Parity check?

A

A method of detecting errors in data during transmission (e.g. even parity would result in an even number of 1’s)

e.g. Even parity example
Sending Device: Transmits data and counts the number of set bits in each, if even, parity is set to 0, if odd, parity set to 1
Receiving Device: Checks each byte, to make sure that it has an even/odd number of bits, if it finds the wrong thing, the receiver knows there was a transmission error.

50
Q

What is Majority Voting?

A

Similar to parity check but can also correct errors that it has detected. Each bit is sent multiple times and if there is an error, the majority is used when compressing it back to its original length.

E.g. 111 —> 1, 101 —> 1, 001 —> 0

51
Q

What is a check digit?

A

Check Digit is a value that is added to the end to ensure a number isn’t corrupted. Often associated with Barcodes

52
Q

How does a check digit work for +13 characters?

A

1) First number x1
2) Second number x3
3) Repeat pattern for 12 nums
4) Add results
5) Mod result by 10

53
Q

How does check digit work for less than 13 characters?

A

You add the separate digits until only one remains
e.g. 1+2+3+4+5+6 = 21
2+1 = 3
So the check digit would be 3

54
Q

Analogue Data

A

Analogue data is data that is infinitely variable and often represented in the form of a wave
It is:
- More complex
- Continuously varying

55
Q

Digital Data

A

Digital data is often represented with two discrete values (on/off)

56
Q

Why is accuracy lost at conversion?

A

sound waves in nature are difficult to truly capture as they are:
- continuous and infinitely variable, but computers can only store limited/discrete data, therefore accuracy is lost at conversion

57
Q

ADC

A

Analogue to digital converter e.g. takes analogue signals such as from a microphone

58
Q

DAC

A

Digital to analogue converter e.g. takes digital signals from a digital system and puts them into analogue, such as a speaker

59
Q

Higher frequency of waves

A

Higher pitch of sound

60
Q

Lower frequency of waves

A

Lower pitch of sound

61
Q

Higher amplitude of waves

A

Louder sound

62
Q

Lower amplitude of waves

A

Quieter sound

63
Q

Sample Rate

A

Number of samples per second

64
Q

Sample Resolution

A

The number of bits per sample

65
Q

What is the Sound File Size Calculation

A
  • Size in Bits = File Length (Secs) x Sampling Rate (in Hz) x Sampling Resolution (in bits)
  • Size in Bytes = Size in Bits / 8
66
Q

What is the sound file size of a file with a
- 3 minute 30 second track
- 44KHz(40,000) sampling rate
- 16 bit sampling resolution

A

= 210 x 44,000 x 16

= 147,840,000 bits

Divide by 8

= 18,480,000 Bytes

67
Q

Nyquist Theorem

A

The sample rate should be atleast 2x the highest frequency in the sample signal

68
Q

How to calculate Bitmap resolution?

A

Width x height

69
Q

How to calculate Bitmap Colour/Bit depth?

A

Logv2(no. Of colours) ← round up

70
Q

How to calculate file size?

A

Resolution x bit depth← if in bytes, divide by 8

71
Q

Vector Graphic

A

created using objects/co-ords, their images are made up of primitives - basic pieces of data needed to create an image e.g. points, lines, curves, polygons, radius, colour

72
Q

Drawing List

A

Set of commands used to define rules

73
Q

Vector vs Bitmap?

A

Vector;
- Image scale without file size
- increase/decrease and no distortion
- Better for logos

Bitmap;
- Image scale results in file size
- increase/decrease and distortion/pixelation
- Better for photographs due to complexity

74
Q

Lossy compression

A
  • Removes info from the data so that the original cannot be recreated
  • Transform coding, loses file accuracy, generally smaller than lossless compression
    JPEG for graphics (10:1)
    MP3 for audio (10:2)
    MPEG2 for video/DVD (100:1)
75
Q

Lossless compression

A
  • Doesn’t lose any accuracy and can be composed into an identical copy
  • WAV files do not include any compression at all
    Lossless compressed file formats such as FLAC that compress to 50% of their size through RLE
76
Q

What is Run Length Encoding?

A
  • RLE looks for repeated patterns in the sound file and instead of recording each pattern separately, it stores information on how many times the pattern occurs in a row.

Row: Run of pixels with the same colour

e.g. 000111234
becomes (4-0)(3-1)234

77
Q

Dictionary Based Compression

A
  • Encode variable length strings of symbols as single tokens - the tokens are stored in place of strings
  • When decompressing, strings replace the tokens once more, giving lossless compression.
  • Each one of the pairs have been stored as numbers to shorten the file size.
78
Q

MIDI

A

Musical Instrument Digital Interface - digital signals recording musical notation

79
Q

What are the positives and negatives of sound synthesis/ midi?

A

Positives;
- Smaller file size without loss of quality
- Easy editing
- New sounds that are not traditionally achievable

Negatives;
- Struggles to make traditional instrument sounds
- Struggles to recreate the human voice

opposite option would be recording

80
Q

Decryption

A

Decryption is the process of turning ciphertext back into plaintext, using a key

81
Q

Encryption

A

Encryption is the process of turning plain text into ciphertext, which can only be understood if decrypted (using a key)

82
Q

Brute Force Attack

A

Trying as many letters/numbers as possible to break into software

83
Q

Why is encryption important?

A

Corporate secrets
Classified data/info
Personal info
Data is safe even if device is stolen

The Caesar Cipher is the easiest cipher to hack