Data Representation Flashcards

1
Q

What is hex used for?

A
  • addresses in memory
    -error message codes
    -machine language instructions
    -HTML colour codes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Why is hex used?

A
  • easy to convert between hex and binary
  • easier to understand than a long string of binary
  • numeric representation of a value is more compact
  • likelihood of making an error when copying hex is lower than binary equivalent
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is unsigned binary?

A

Where each bit used represents another binary column

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

What is signed binary?

A

The sign bit is used to show whether the number is positive or negative

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

What is the MSB?

A

“Most Significant Bit” which is the left-most bit, also known as the sign bit

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

What is an overflow error?

A

Result of binary operation is too large to represent within the number of bits available

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

How do you perform 2’s compliment on a number to make it negative?

A

1-Write out number in binary
2-Flip all the bits
3-Add one

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

What is fixed point binary?

A

Consists of a whole part and fractional part separated by predetermined fixed binary point

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

What is a radix point?

A

Character used to separate the integer and fractional parts of a number

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

What two parts do floating point numbers consist of?

A

A mantissa and an exponent

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

What is normalisation of floating point numbers?

A

Process of maximising the precision of values that can be represented with a given number of bits in floating point binary.

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

What are the benefits of normalisation?

A
  • Ensure the maximum possible accuracy for a given number of bits
  • Reduces rounding errors
  • Ensures only one representation of each number within a given number of bit; simplifies arithmetic operations
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the absolute error for floating point numbers?

A

Difference between number and approximate value of the floating point binary representations of that number. Always positive.

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

What is relative error of a floating point number?

A

Absolute error divided by the actual number, as a percentage. This is often more useful.

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

What is under flow of fractional numbers?

A

Result of a calculation has a fractional part too small to represent in the allocated number of bits.

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

What are the advantages and disadvantages of floating point binary?

A

+ Much wider range of numbers for a given number of bits
+ More relative precision for smaller numbers
- Can result in rounding errors
- More difficult to perform calculations (slower)

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

What are the advantages and disadvantages of fixed-point binary?

A

+ processed more quickly as there is no movement of the binary point
+ Hardware required is much less complicated making it smaller and less energy intensive
- Fixed and limited precision
- Could cause rounding errors

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

What are the causes of overflow?

A
  • Multiplying or adding large numbers together
  • Dividing numbers by a small number less than 1
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What are the causes of underflow?

A
  • Multiplying by a number by a very small number less than 1
  • Dividing a small number by a number greater than 1
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What are the consequences of underflow or overflow of binary numbers?

A
  • Erroneous calculations
  • Data corruption
  • Program crashes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

How is underflow or overflow dealt with?

A

Checking the carry at the MSB and LSB (right and left) and setting a “flag” to state an overflow has occurred.

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

What is a number system?

A

Way of representing numerical values that are used in counting, measuring, and operations

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

What are ordinal numbers?

A

Adjectives that describe the numerical position or order of an item within a list (indexing). There must be an ordered set with at least 2 items.

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

What is a character?

A

Single unit of textual information

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

What is a character set?

A

Scheme of mapping that maps a set of characters to binary numbers that is recognised by a computer system

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

What is ASCII?

A

A character set created to encode alphanumeric characters as well as special characters that used 7 bits to store each character

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

What is Unicode?

A
  • A character set developed with the aim of representing every possible character.
  • It uses up to 48 bits to store each character
  • First 128 characters are the same as ASCII making it backwards-compatible
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

Advantages of parity bits?

A
  • Simplest implementation of error detection
  • Very low cost system as it only involves one additional bit.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

How does the parity bit work?

A
  1. The decision over odd parity or even parity is made
  2. The value of the parity bit is set to either 1 or 0 to satisfy the system
  3. The data is transmitted,parity checked, and then removed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

What were the limitations of ASCII?

A
  • Could not represent more than 128 or 256 characters
  • Resulted in different version that contained different symbols for each language and were incompatible with each other
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

What are the advantages of the parity bit?

A
  • Relatively easy to implement
  • Does not require significant extra data to be included in the transmission or retrieval
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

What are the disadvantages of the parity bit?

A
  • If and even number of transpositional errors occurs the corruption is not detected
  • Not possible to identify which bit has been corrupted
  • Data correction not possible
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

What is majority voting?

A

Each bit is sent multiple times (odd number greater than 2). The receiver checks the bits and if they are not all the same it assumes the one to received the most copies of is the correct value.

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

What are the advantages of majority voting?

A
  • Allows for error correction as it knows exactly where the error occurred
  • No need for retransmission
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

What are the disadvantages of majority voting?

A
  • Triples the amount of data that is sent or stored
  • Is not entirely reliable as 2 transpositional errors can cause an incorrect correction
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

What is a check digit?

A

Extra digit appended to a number in order to confirm that the number has been transmitted or retrieved correctly

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

What is a checksum?

A

Similar to a check digit except a larger sum is transmitted with the data rather than a single digit

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

What makes a good checksum or check digit algorithm?

A

It will produce very different values even if there is a small change to the original data

39
Q

What are the uses of a checksum?

A
  • Confirm integrity of whole files or applications
  • Checksum is provided by the owners so that the checksums of applications can be checked to ensure correct download
40
Q

What is a pixel?

A

The smallest unit of a bitmap image

41
Q

What is the maximum number of colours that that can be be represented given the colour depth?

A

2^colour depth

42
Q

What is the colour depth of an image?

A

The number of bits that are used to encode each pixel

43
Q

What is the size of an image?

A

The width x the height of the image in pixels

44
Q

What is the resolution of an image?

A

The number of data (pixels) in each square inch (PPI)

45
Q

What is a bitmap image?

A

An image file format made up of pixels which represent a small square of colour

46
Q

How do you calculate the file size of a bitmap image?

A

Image size x Colour depth

47
Q

What is a vector image?

A

Way of representing images using a series of geometric shapes or objects

48
Q

What are the advantages of bitmap images?

A
  • Can represent photorealistic images
  • Each individual pixel can be manipulated and edited
49
Q

What are the disadvantages of bitmap images?

A
  • Often have a larger file size
  • As images size is increased the resolution decreases leading to pixelation
50
Q

What are the advantages of vector images?

A
  • Typically have smaller file sizes
  • Image can be infinitely scaled
  • Each shape or path can be individually altered
51
Q

What are the disadvantages of vector images?

A
  • Are not suitable for complex images such as photographs
  • Require to be rendered which requires processing power and time especially for complex images
52
Q

What is an analogue signal?

A

A continuous signal that varies with time that can take an infinite set of values

53
Q

What is a digital signal?

A

A signal that must always take one of a specified range of values and can only change at specified intervals

54
Q

What is analogue data?

A

Data that has no limits to the values that it can take. Represents information in the real world

55
Q

What is digital data?

A

Data that can only take particular values

56
Q

What is the sample resolution of a recording?

A

Number of bits used to represent each sample

57
Q

What is the sample rate of a recording?

A

Number of samples taken per second

58
Q

What is quantisation?

A
  • The process of assigning an integer value to the amplitude of a signal at a specific point in time
    OR
  • mapping of continuous infinite values to a smaller set of discrete finite values
59
Q

What is a quantisation error?

A

The difference between the analogue signal and the closest available digital value at each sampling instant

60
Q

What does metadata typically contain?

A
  • encoding format
  • colour depth
  • size
  • time and data the image was taken
61
Q

What is Nyquist’s theorem?

A

The sampling rate must be at least twice the highest frequency of the signal being sampled such that it can be accurately reproduced.

62
Q

What frequency are digital recordings stored in?

A

44.1KHz

63
Q

What is a MIDI file?

A

A set of stored instructions that can be used to tell musical instruments and synthesisers how to produce a piece of music.

64
Q

What does a MIDI event message contain?

A
  • when the note should be played
  • pitch, volume and duration
  • The instrument that should play that note
  • Clock signals to coordinate multiple instruments
  • Other control data (tempo, special effects)
65
Q

Advantages of MIDI

A
  • Musical content can be easily edited
  • Files are extremely small compared to recordings
66
Q

Disadvantages of MIDI?

A

What the file actually sounded like depends entirely on the setup so the same file can sound totally different.

67
Q

What are the main benefits of compression?

A
  • Amount of data required to store data is reduced so more files can be stored
  • Amount of data required to transmit data is reduced so less bandwidth is required, reduced congestion on the network, increased transmission speeds
68
Q

What are the other benefits of compressions?

A
  • Using compressed images in web pages reduces loading times
  • Improves playback of media streams with less buffering
69
Q

What is lossy compressions?

A

Form of compression where unnecessary detail is removed permanently from the original data.

70
Q

What are the +ive and -ive of lossy compression?

A

+Greatest reduction in file size
-Permanent loss of quality
Ideal for image and audio

71
Q

What is lossless compression?

A

Form of compression that uses algorithms to efficiently represent repeating patterns within the original data.

72
Q

What are the properties of lossless compression?

A

+No original data is lost so can be perfectly reconstructed
-Less reduction in file size
This is the only option where data cannot be lost such as text and program files

73
Q

What is the JPEG image file?

A
  • Form of lossy compression that averages similar colours across adjacent pixels
  • Suitable for photographs which do not have sharp edges
74
Q

What is a PNG image file?

A
  • Lossless compression that efficiently encodes repeating patterns
  • Higher quality images with sharp edges such as logos, icons and texts.
  • Larger file sizes
75
Q

What is an MP3 file?

A
  • Uses lossy compression to remove detail from audio recordings that we cannot perceive then other algorithms are used
  • Results in files that are around 10 times smaller
76
Q

How is text compressed?

A

Text can only be compressed using lossless compression. Otherwise text files such as source code could fail to interpret/compile otherwise.

Therefore we use Dictionary Compression or Huffman Tree Encoding.

77
Q

What is Run Length Encoding?

A

Simple form of lossless compression that represents repeating patterns of data more efficiently. E.g. 6 white pixels in a row could be encoded into 6w

78
Q

What is Dictionary Based Compression?

A

A form of lossless compression where frequently occurring pieces of data are replaced by an index of a dictionary.
It works well on large documents with many repeating words.

79
Q

How does Dictionary Based Compression work?

A
  1. Each word in a piece of text is stored in a dictionary along with an index number
  2. Message is then encoded using the dictionary index values in place of the original data
  3. The resultant message will be significantly smaller, although the dictionary must also be sent/stored with the file.
80
Q

Why was Unicode introduced?

A
  • To enable the representation of a greater range of characters
  • All modern languages can be represented
  • Each character has a unique representation in Unicode which wasn’t the case for ASCII
81
Q

What is encryption?

A

The process of making information unreadable to unauthorised parties through the use of an encryption algorithm.

82
Q

How does encryption work?

A

A cipher is applied to plaintext using a key to transform it into ciphertext.

83
Q

What is computational security?

A

A cipher is considered computationally secure if it cannot be broken using current technologies within a reasonable timeframe.

84
Q

What are methods for cracking ciphers?

A
  • Frequency analysis
  • Looking for other patterns
  • Dictionary attacks
85
Q

What is frequency analysis?

A

It involves looking for frequent symbols within the cipher text and mapping them to common letters in the language of the original message.

86
Q

What is a dictionary attack?

A

A list of common words or phrases that can be compared to the cipher text to see if any patterns arise

87
Q

What is a Caesar cipher and how does it work?

A

A basic substitution cipher where each letter is substituted for another. A numeric key is used to determine the distance that each letter should be shifted by.

88
Q

Why is a Caesar cipher not computationally secure?

A
  • It can be cracked almost instantly using basic brute force attacks as there are only 25 possible keys
  • Frequency analysis is very effective
  • Each character is always converted to the same cipher text letter
  • As it is only a shift cipher you only need to map on of the letters between plaintext and cipher text to deduce mapping for all letters
89
Q

When is a Vernam cipher perfectly secure?

A
  • key used is truly random (e.g. using atmospheric radiation)
  • key is at least as long as the plaintext
  • key used only once and then discarded
  • key itself must be transferred securely
90
Q

How do you use a Vernam cipher?

A

To encrypt a message,each character in the plaintext and key are encoded into their binary representations in a given character set and bitwise XOR them together to get another character. Same process for decryption.

91
Q

Why is a Vernam cipher perfectly secure?

A
  • Cipher text contains no useful information about the plaintext as characters are randomly distributed
  • Mapping of plaintext to cipher text is different for each letter in plaintext
  • Brute forcing cannot reveal plaintext and has too many possible keys
  • Frequency analysis doesn’t work as multiple plaintext letters can map onto the same cipher text letter
92
Q

How does a check sum work?

A
  1. Checksum is calculated from the binary data before it is transmitted
  2. Checksum is recalculated when the packet is received
  3. If the checksum received in packet matches recalculated checksum then data is correct.
93
Q

What does a vector image contain?

A
  • Coordinates
  • Fill colour
  • Edge thickness
  • Edge colour
  • Object type
94
Q

How can data become corrupted?

A
  • Cosmic rays
  • Magnets changing magnetic media
  • Scratches on a CD
  • Cables become damaged