Theory: Data Rep Flashcards

1
Q

List and define each number system

A

-N is natural numbers or Z+, positive integers
-Z is all integers, positive and negative
-Q is all rational numbers, numbers that can be represented as a proper/improper fraction Q = {a/b|a,b ∈ Z , b != 0}
-R is the set of real numbers, all rational and irrational numbers, algebraic numbers
-C is complex or imaginary numbers. C ={ a+bi| a,b ∈ R , b != 0}

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

What set of numbers is used to describe the location of a number relative to another number?

A

Ordinal numbers

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

Which number base is used by humans for counting?

A

Base 10/decimal/denary

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

Which number base can be denoted with a subscript 16?

A

Hexadecimal

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

What is the decimal equivalent of the hexadecimal digit E?

A

14

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

Which number base is useful as a shorthand representation for binary?

A

Hexadecimal

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

What is the decimal equivalent of the binary number 0101?

A

5

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

What is the binary equivalent of the hexadecimal number A3?

A

10100011

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

What is the binary equivalent of the decimal number 14?

A

1110

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

Describe what is meant by a bit

A

A bit is the smallest and fundamental unit of information which can either take the value 1 or 0

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

How many bits are there in a byte?

A

8

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

How many bits are there in a nybble?

A

4

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

How many nybbles are there in a byte?

A

2

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

How many values can be represented with 4 bits?

A

16, 0-15

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

How many values can be represented with 20 bits?

A

2^20= 1048576, 0-1048575

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

How many bytes are there in a mebibit

A

2^20 = 1048576

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

How many bytes in a kibibyte?

A

2^10= 1024

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

Describe the uses of hexadecimals.

A

-third most commonly used number system, large values can be represented using fewer characters. Also easier to interpret than binary.
-colour values
-mac addresses

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

List the names for bit values and how many bits they represent.

A

-bit: smallest value, one digit
-nibble: four bits
-byte: eight bits
-(kibibyte
-

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

In binary multiplication, what are the respective names for the number being multiplied and what it’s being multiplied by?

A

-multiplicand and multiplier

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

Describe the concept of two’s complement

A

Binary numbers beginning with 1 are negative numbers, those beginning with 0 are positive
The range of possible values that can be represented:

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

Define the Caeser cypher and Polyalphabetic encryption.

A

A caeser cypher uses a given numerical key eg. 4 and each letter in a message is shifted along the alphabet by that number. Eg A becomes E.
When used with Polyalphabetic encryption, each letter of the message uses a different key.

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

Is 0 included in the set of natural numbers?

A

Yes

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

Every natural number greater than 1 can be written as a product of what?

A

Prime numbers

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

Calculate the highest number that can be represented with:
-16 bits
-20 bits

A

Where n is the number of bits, (2^n)-1
-65535
-1048575

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

How many bits is a hex digit equivalent to?

A

4 bits
eg. 1101 =13 = D

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

Here is an example of a MAC address; b4:f7:a1:8c:8e:d3 what is the length in bits of the mac address?

A

48 bits

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

What is the difference between a kilobyte (kB) and a kibibyte (KiB) or a gigabyte (GB) and a gibibyte (GiB)?

A

Kilobyte, megabyte, gigabyte etc was historically used as a less accurate representation of storage capacity. It uses base ten with the exponent increasing in powers of three to show the number of BYTES in each measurement eg. kB has 10^3 bytes, a megabyte has 10^6 bytes and a gigabyte has 10^9 bytes.
Kibibyte, mebibyte and gibibyte use base two with the exponent increasing in powers of 10 for a more accurate measurement. eg. A Kibibyte has 2^10 bytes, a mebibyte has 2^20 bytes.

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

How many values can be represented with
-16 bits
-20 bits

A

Where n is the number of bits, 2^n values can be represented
-65536
-1048576

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

What is word size?

A

The maximum number of bits that a CPU can process at one time

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

Add the unsigned numbers: 01001011 and 01111000

A

11000011

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

Revise subtraction with binary, borrowing

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

Give two situations in which overflow errors caused issues.

A
  • 4th June 1996
    A calculation for the sideways velocity of a crewless rocket carrying scientific satellites resulted in an overflow error which initiated a self destruct sequence. £240 mil damage
  • December 2014
    Number of views on gangnam style exceeded the value that could be stored with 32 bits.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

What is the place value of the MSB in a two’s complement representation?

A

-2^n-1 where n is the number of bits

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

What is 00111010 in denary (2s complement)?

A

Positive 58

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

What is 11001010 in denary (2s complement)?

A

Negative 54

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

What is 00111100 in denary?

A

60

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

Convert 11010101 into denary (2s complement).

A

-43

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

Describe the two methods of converting positive two’s complement numbers into.

A
  • flip all bits and add 1
  • flip all bits to the left of the least significant 1 (quicker)(don’t flip most significant 1)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

Count up in increasing powers of 2 until 2^12

A

2^0 = 1
2^1 = 2
2^2 = 4
2^3= 8
2^4=16
2^5 = 32
2^6 = 64
2^7 = 128
2^8 = 256
2^9 = 512
2^10 = 1024
2^11 = 2048
2^12= 4096

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

Convert positive 25, 00011001 to -25.

A

11100111

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

How do you know the smallest number that can be stored in 2s complement?

A

Just the MSB place value. Eg. For eight bits the smallest number is -128

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

Using sign and magnitude, what number is 10011110?

A

-30 (first one just tells us the number is negative)

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

What is a downside of using sign and magnitude?

A

There is a positive and a negative value for 0, eg. 10000000 or 00000000

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

How to calculate the range of values when using two’s complement?

A

Both the negative and the positive values.

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

What is the range of denary values that can be represented using 16 bit twos complement?

A

-32768—–>65535
-2^15 to (2^16)–1

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

What does the binary weighting line look like for decimal values?

A

2^-1, 2^-2, 2^-3 etc

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

Where n is the number of bits, state what the formula is used to calculate.
2^n
(2^n)-1

A

2^n = number of bit patterns
(2^n)-1= highest representable number
2^n-1

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

Where n is the number of bits, state what the formula is used to calculate.
2^n
(2^n)-1

A

2^n = number of bit patterns
(2^n)-1= highest representable number
2^n-1

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

Define the set of natural numbers

A

Symbol: N , Set of numbers containing all positive whole numbers and zero

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

Define the set of Integers

A

Symbol: Z , Set of positive and negative whole numbers

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

Define the set of rational numbers

A

Symbol: Q (quotient) , Set includes positive or negative numbers that can have a fractional part (includes 0) eg 71 can be written 71/1.

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

Define the set of irrational numbers

A

-Positive or negative numbers that cannot be written as a fraction.
-Has no symbol
Eg pi, e ,root 2, root 3

54
Q

Define the set of Real numbers

A

Symbol: R , Set includes all possible real world quantities, includes all irrational numbers and rational numbers (which in turn includes the set of integers and the set of natural numbers)

55
Q

Define the set of ordinal numbers

A

Integers that indicate/describe a numerical position of an object in relation to another eg 1st 2nd etc

56
Q

For counting and measuring, with number set is used?

A

-For counting, natural numbers (whole positive numbers)
-For measuring, values may not be whole so real numbers (any real world value)

57
Q

Define each of the number bases

A

Decimal:
-uses the ten digits 0-9
Binary:
-uses two digits 0-1
-values can be represented using high or low current
Hex:
-uses ten digits 0-9 and six letters A-F

58
Q

Which is the most {compact} base and why?

A

Hexadecimal. Represents the same number with far fewer digits. Each 1 digit in Hex is 4 digits in binary. Hexadecimal is useful as a {shorthand representation for binary}

59
Q

Convert 178 into hex

A

= 10110010
= 1011 0010
1011= 11
0010 = 2
11= B
2 = 2
So B2 in hex

60
Q

Convert C9 into decimal

A

C= 12
9 = 9
9 x 16^0 = 9
12 x 16^1 = 192
= 192 + 9 = 201

61
Q

Define a byte

A

A group of 8 bits

62
Q

What is the number of values you can represent with n bits

A

2^n (0-2^n-1)

63
Q

List the power of two binary prefixes and their values

A

kibi, Ki = 2^10 bytes
mebi, Mi = 2^20 bytes
gibi, Gi = 2^30 bytes
tebi, Ti = 2^40 bytes

64
Q

List the power of ten decimal prefixes

A

kilo, k = 10^3 bytes
mega M = 10^6 bytes
giga G = 10^9 bytes
tera T = 10^12 bytes

65
Q

A bit is the…..

A

FUNDAMENTAL UNIT OF INFORMATION. CAN ONLY TAKE TWO VALUES, REPRESENTABLE USING HIGH OR LOW CURRENTS

66
Q

In a byte there are…..

A

8 BITS

67
Q

In a nibble there are…

A

4 BITS

68
Q

How is bit and byte notated?

A

bit has lowercase “b” byte has uppercase “B”

69
Q

How is kibibyte etc notated?

A

KiB, GiB, MiB, TiB

70
Q

How is kilobyte etc notated?

A

kB, MB, GB, TB

71
Q

How can you tell if a binary number is signed or unsigned?

A

You can’t tell, the computer needs to be told

72
Q

Convert 17.5 to floating point and fixed point

A

010001.1
0.100011 | 0101

73
Q

Convert 0.046875 or 3/64 into fixed point and floating point

A

00.000011
0.1100000 | 1100

74
Q

Convert -29.25 to fixed and floating point.

A

100010.11
1.0001011 | 0101

75
Q

Describe what a rounding error is.

A

Some decimals cannot be represented exactly in binary. For example, 1/3 or 0.3 recurring. Numbers like this can only be approximately represented. As there are so many numbers that cannot be accurately represented, both fixed point and floating point representations may be inaccurate

76
Q

Define an absolute error

A

The amount by which a number is incorrect, the difference between the given value and the actual value.

77
Q

Calculate the absolute error given that 14.6 is represented as 1110.1

A

1110.1 = 14.5. 14.6-14.5 = 0.1. Therefore the absolute error is 0.1

78
Q

Define a relative error and give the equation

A

It is a measure of uncertainty in a given value compared to the actual value, relative to the size of the given value. Relative error = absolute error/actual value. This gives the value as a decimal but can be given as a percentage when multiplied by 100

79
Q

Calculate the relative error for: 12.4 is represented by 1100.011. Calculate the relative error as a percentage

A

1100.011 is equal to 12.375. The absolute error is 12.4- 12.375= 0.025. 0.025 divided by 12.4 = 0.0020161
x 100 = 0.2016%

80
Q

Give the pros and cons of floating point

A

Pros-
Allows wider range of numbers to be represented for a given number of bits. This is because the exponent can be adjusted in size and either positive or negative. With a large exponent and a small mantissa a wide range of values can be represented.
A small exponent and a large mantissa can also allow for high precision.
Cons-
When the exponent is large to achieve a wide range, precision is low
When the mantissa is large for precision, a small range can be achieved.

81
Q

Give pros and cons of fixed point

A

Pros-
If the binary point is placed close to the left, high precision can be achieved
If the binary point is placed close to the right, the range is increased

Cons-
If the range is increased, precision is lower
If the precision is increased, range is lower
Lower range than floating point

82
Q

Define normalisation

A

You know

83
Q

Define underflow

A

When a binary number is very small and not enough bits are there to represent it. Eg. 0.015625 is 0.000001. If only six bits are available it would be represented as 0.00000 which is 0

84
Q

Define overflow

A

When working with numbers that are larger than can be represented. Eg 127 + 1 = 128. In binary, 01111111 + 00000001, when the addition happens, 10000000 is the result, but in twos complement this is -128 which is incorrect

85
Q

What does ASCII stand for

A

American standard code for information interchange

86
Q

How many bits does ASCII use?

A

7 bits (128 options) plus 1 bit for error checking

87
Q

What is the range of Unicode?

A

Uses 8-48 bits (1-6 bytes) per character (2.8 x 10^14 options)

88
Q

Why is unicode used and when was it introduced?

A

1991, meant other alphabets could be represented as well as emojis.

89
Q

What is the purpose of error checking?

A

To reduce the chances of incorrect data being used

90
Q

List the error checking techniques

A

Parity bits
Majority voting
Checksums
Check digits

91
Q

Explain how parity bits are used to detect errors

A

-a parity bit is a bit that is added onto the data being transmitted.
-it can be either odd or even parity
-for an even parity, the value of the parity bit makes the number of ones in the transmitted data even.
-an odd parity is the opposite, the value makes the number of ones odd
-a parity check is carried out when data is recieved

92
Q

What is the main issue with parity checking

A

If an even number of bits are corrupted, the parity check will not detect an error even though there are errors

93
Q

Describe majority voting

A

Each bit of data is transmitted multiple times. The most commonly occurring value is then taken

94
Q

What is the advantage of majority voting?

A

It detects the error, and corrects it. There is no need for re-transmission. Can correct errors even when multiple bits have been corrupted

95
Q

What is the disadvantage of majority voting?

A

Hugely increased volume of data being transmitted. Significantly increase time taken to transmit data

96
Q

Describe checksum error checking

A

-the value that is added to the original data is determined by the data itself
-a simple algorithm can be carried out on the data to determine the checksum
-eg. Mod 8
-the value is appended to the data
-the receiver checks if the appended value matches when they perform the same calculation.
-if it doesn’t the value is re-transmitted

97
Q

Explain check digits in error checking

A

A type of checksum that generates only a single digit to be appended to the data. The number of different algorithms that can be used is fewer so the variety of errors it can detect is lower.

98
Q

What is the difference between analogue and digital data?

A

Analogue data is continuous, there is no limit to the value the data can take. Analogue signals can take any value and change as frequently as required.
Digital data is discrete, it can only take certain values. Digital signals must take one of a specified range of values and change at specific intervals

99
Q

Explain digital to analogue conversion.

A
  • DAC is used.
    -device reads a bit pattern representing analogue signals, and outputs an alternating analogue electric current (signal).
100
Q

Describe analogue to digital conversion

A

-hardware like a microphone or temperature sensor outputs an analogue signal.
-an ADC is then used to convert the analogue signal into a digital bit pattern.
-this works by taking a reading of the analogue signal at regular intervals and recording the value. (Sampling)

101
Q

Describe samples taken in analogue to digital conversion

A

Samples are taken at a frequency given in hertz, this is the number of samples taken per second, or the sampling rate. A high sampling rate means better quality sound (more accurate reproduction of analogue signals)

102
Q

What is the resolution of an image?

A

Can refer to the number of pixels per square inch, or the number of pixels in an image in total

103
Q

Define colour depth

A

The number of bits assigned to each pixel. A greater colour depth means more colours can be represented, so a more accurate image. With n bits, 2^n colours can be represented

104
Q

How do you calculate the size of an image?

A

Number of pixels (width x height) x colour depth

105
Q

How do you calculate the size of an audio file

A

Sample resolution (number of bits) x sampling rate x time (s)

106
Q

Why is the calculation of the file size most likely not correct?

A

It is the minimum value, there is likely also metadata

107
Q

How do vector graphics work?

A

Represents images using geometric objects. The properties of each shape is stored in a list

108
Q

What are the advantages of vector graphics over bitmapped images?

A

-can be scaled without losing quality, bitmap becomes blurry/pixelated
-good for simple images
-use less storage space

109
Q

What is an advantage of bitmap over vector?

A

-vector is no good for photographs

110
Q

Define the Nyquist theorem

A

States that the sampling rate of the audio file must be at least twice the frequency of the sound. If the sampling rate is below the sound will not be accurately represented

111
Q

What is MIDI

A

Musical Instrument Digital interface

112
Q

Describe MIDI

A

Is used with electronic musical instruments that connect to computers. It doesn’t take samples, but stores sound as a series of event messages, each represents an event in the piece. Like a series of instructions that can be used to recreate a piece of music.

113
Q

What information could be in an event message?

A

-duration of a note
-Instrument used
-how loud it is
-if a note should be sustained

114
Q

What are the advantages of MIDI?

A

-Allows easy manipulation of music without loss of quality
-notes can be transposed (switch places) and the duration altered
-smaller file size
-lossless

115
Q

What are disadvantages of MIDI?

A

-can’t be used with speech
-can result in less realistic sound

116
Q

Why are files compressed?

A

To reduce file size. Smaller files can be transferred faster

117
Q

What are the categories of compression?

A

Lossy, lossless

118
Q

What is lossy compression?

A

-some information is lost in compression
-eg. Reducing resolution of an image or removing undetectable frequencies from audio files

119
Q

What is lossless compression?

A

-no data is lost in compression
-file size is reduced without a loss in quality.
-eg .wav is lossless compression for audio

120
Q

What are the two methods of lossless compression?

A

RLE (run length encoding) and dictionary based methods

121
Q

How does RLE work?

A

Removes repeated information by replacing it with one occurrence of the repeated data followed by the number of repetitions. This only fails when there is no repeated information

122
Q

Describe dictionary methods of compression

A

Works like a dictionary: when compressed, a dictionary containing repeating information is appended to the file. A disadvantage of this is that the dictionary needs to be stored in the file which will initially increase file size, especially if there is no repeating data

123
Q

What is a disadvantage of lossless?

A

The amount a file can be compressed is limited, where its unlimited with lossy

124
Q

Why is encryption done?

A

To keep data secure during transmission

125
Q

What are key encryption terms?

A

Unencrypted information = plaintext
Encrypted information = ciphertext
(Cipher is encryption method)

126
Q

What is a substitution caeser cipher?

A

The letters are randomly replaced in the ciphertext

127
Q

What is the disadvantage of caeser ciphers?

A

Shift ciphers can be easily cracked by looking at the frequency by which certain characters occur, once one character is discovered, the entire ciphertext can be decoded

128
Q

Describe a vernam cipher

A

A ONE TIME PAD cipher, the key is only used ONCE. the key must be random and at least as long as the plaintext.

129
Q

Explain each step of a vernam cipher.

A

-align the character codes (bitcodes) of the plaintext and the key.
-perform a XOR operation on each pair of character codes.
-convert the resulting bit patterns into their corresponding characters. This is the ciphertext

130
Q

What is the advantage of vernam cipher?

A

As the key, and therefore the ciphertext are random, the vernam cipher is mathematically proven to be completely secure

131
Q

What is the disadvantage of the vernam cipher?

A

The key must be exchanged between the sender and the recipient in some way, then destroyed.

132
Q

All ciphers other than the Vernam cipher…..

A

Are, in theory, crackable. However not within a reasonable timeframe for current computing power. Ciphers relying on this form of security, relying on COMPUTATIONAL SECURITY