4.5 - Fundamentals of data representation Flashcards

1
Q

What are natural numbers?

A

All positive whole numbers and zero.

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

What are integers?

A

All whole numbers, positive and negative, and zero.

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

What are rational numbers?

A

Any number that can be expressed as a fraction, including 0.

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

What are irrational numbers?

A

Numbers that cannot be written exactly as a fraction.

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

What are real numbers?

A

All possible quantities, including irrational, rational, integers and natural.

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

What are ordinal numbers?

A

Integers used to describe numerical positions of objects in relation to others, e.g. 1st, 2nd or 3rd

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

How do you convert from binary to hex?

A

Split the binary number into groups of four bits. Convert each group into decimal, then each decimal value into hex.

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

How do you convert from hex to decimal?

A

Split the hex digits, convert them into decimal, convert each decimal value into binary nibbles, then combine the binary nibbles into one binary number, and finally convert to decimal.

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

How many bits in a byte?

A

8 bits

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

How many bytes in a kilobyte?

A

10^3 bytes

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

How many bytes in a megabyte?

A

10^6 bytes

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

How many bytes in a gigabyte?

A

10^9 bytes

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

How many bytes in a terabyte?

A

10^12 bytes

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

How many bytes in a kibibyte?

A

2^10 bytes

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

How many bytes in a mebibyte?

A

2^20 bytes

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

How many bytes in a gibibyte?

A

2^30 bytes

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

How many bytes in a tebibyte?

A

2^40 bytes

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

Rules for adding binary numbers

A

0 + 0 = 0
0 + 1 = 1
1 + 1 = 10
1 + 1 + 1 = 11

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

How do you multiply binary numbers?

A

Use one number as a guide. Write out the second number under each occurrence of a 1 in the guide number, aligning the rightmost bit with the 1. Then perform binary addition.

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

How do you subtract binary numbers?

A

Perform addition with a two’s complement number (adding a negative number).

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

How do you normalise a floating point mantissa?

A

Positive:
Find out how many places to the right or left you need to move the decimal point so that there is a 0 on the left and a 1 on the right. Discard any leading 0s, pad the right hand side with 0s, and change the value of the exponent so that the final value is the same.

Negative:
Find out how many places to the right or left you need to move the decimal point so that there is a 1 on the left and a 0 on the right. Discard any leading 1s, then pad the right hand side with 0s, and change the value of the exponent so that the final value is the same.

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

Why must floating point numbers be normalised?

A

In order to provide the maximum level of precision for a given number of bits.

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

What are rounding errors?

A

Some decimal numbers cannot possibly be represented exactly in binary, such as 1/3 (0.3333…) - they can only be approximately represented.

There are many numbers that binary cannot accurately represent, such as 0.1. So fixed and floating point numbers may be inaccurate.

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

What is absolute error?

A

The actual amount by which the value is inaccurate. It is the difference between the given value and actual value.

25
Q

What is relative error?

A

A measure of uncertainty in a given value compared to the actual value.

relative error = absolute error / actual value

(multiply by 100 for percentage)

26
Q

What is the advantage of floating point?

A

A greater range of numbers can be represented with a given number of bits than fixed point.

27
Q

What is the advantage of fixed point?

A

Usually the speed of calculation is faster (though this is vastly outweighed by the limited range).

28
Q

What is underflow?

A

When very small numbers are to be represented but there are not enough bits available.

29
Q

What is overflow?

A

When a number is too large to be represented with the available bits, particularly important when using signed binary.

30
Q

How do parity bits work?

A

Even or odd parity is used. In even, value of parity bit chosen to make total number of 1s even. Odd makes total number of 1s odd.

31
Q

How does majority voting work?

A

Each bit transmitted multiple times, and most commonly occurring value taken to be correct.

32
Q

How do checksums work?

A

Algorithm used to determine value of checksum based on data. Recipient can apply checksum algorithm to data received and compare with checksum sent with data.

33
Q

What is the difference between analogue and digital data?

A

Analogue is continuous, while digital is discrete. Analogue can take any values and change as frequently as required, while digital must take one of a specified range of values and only changes value at specified intervals.

34
Q

How does a digital to analogue converter work?

A

Reads bit pattern representing digital signal and converts it into an analogue electrical signal.

35
Q

How does an analogue to digital converter work?

A

Takes reading of analogue signal at regular intervals and records the value (known as sampling). Once value of signal recorded, it can be stored as a bit pattern.

36
Q

What are bitmapped graphics?

A

Images broken down into pixels, where each pixel has a binary value assigned to it.

37
Q

What is the resolution of an image?

A

Number of pixels per square inch

or

Number of pixels in an image

38
Q

What is a pixel?

A

Smallest addressable part of a bitmap image

39
Q

What is the colour depth of an image?

A

Number of bits assigned to each pixel.

40
Q

How do you calculate storage required for a bitmap image?

A

Number of pixels x colour depth

41
Q

Why does calculating storage requirements for a bitmap image result in a minimum value?

A

Image may contain metadata, including image height, width, date created and colour depth.

42
Q

What are vector graphics?

A

Images represented using geometric objects and shapes, where the properties of each object are stored in a list.

43
Q

What are typical properties stored about vector objects?

A

Width, height, fill colour, border colour, border thickness.

44
Q

Advantages of vector graphics

A

Scale without losing quality
Frequently use less storage space as no need to store info about every pixel

45
Q

What is the sample resolution of a sound recording?

A

The number of bits allocated to each sample

46
Q

How do you calculate the size of a sound sample?

A

Duration x sampling rate x sample resolution

47
Q

What is the Nyquist Theorem?

A

Sampling rate of a digital audio file must be at least twice the maximum frequency of the sound.

48
Q

What is MIDI?

A

Musical instrument digital interface. Used with electronic musical instruments which can be connected to computers.

Stores sound as a series of event messages rather than samples, which can be thought of a series of instructions which can recreate a piece of music.

49
Q

What information can event messages contain?

A

Duration of a note
Instrument with which note is played
Volume of a note
Sustain
Pitch of a note

50
Q

What are the advantages of MIDI?

A

Easy manipulation of music without loss of quality: instruments can be changed, notes can be transposed, duration of notes can be altered.

Often smaller in size than sampled audio files

Lossless

51
Q

What are the disadvantages of MIDI?

A

Can’t be used for storing speech

Sometimes results in less realistic sound

52
Q

What is lossy compression?

A

Compression where some info is lost in the process, such as reducing resolution of image or lowering sample resolution.

53
Q

What is lossless compression?

A

No loss of information, size of file reduced without decreasing quality.

54
Q

What is run length encoding?

A

Removing repeated info and replacing with one occurrence of repeated info followed by number of repetitions.

55
Q

What is dictionary-based compression?

A

Dictionary containing repeated data appended to file, resulting in significant size reduction, though dictionary also needs to stored so size slightly increases.

56
Q

Advantage of lossy compression?

A

No limit to how much file size can be reduced (lossless has a limit)

57
Q

Why are Caesar ciphers easily cracked?

A

Frequency at which character occurs can provide clues. Once one character discovered, key can be found and cipher cracked.

58
Q

How does a Vernam cipher work?

A

One-time pad cipher - each key only ever used once. Key is random and at least as long as plaintext.

  1. Align characters of plaintext and key
  2. Convert each character to binary
  3. Apply logical XOR operation
  4. Convert result to a character