Comp Sci Mock Flashcards
What is underflow?
A calculation too close to 0 to be represented in a given number of bits
What is overflow?
A calculation too large to be represented in a given number of bits
what is cancellation error?
Where addition or subtraction takes place with number of very different sizes
what is absolute error?
Number required-Number represented
What is relative error?
absolute error/number required
Why do we normalise floating point values?
Ensure only one representation of a number
What is the range in floating point?
The amount of numbers it can represent.
What is precision in floating point?
How close to you can get to representing complex numbers like 110111011. More bits = More precision
What is the largest and smallest number you can represent with a 6bit mantissa 4 bit exponent?
Largest 0.11111 0111
Smallest 1.00000 0111
How would you represent A AND B using logic notation?
A.B
How would you represent A OR B in logic notation?
A+B
How would you represent Not A in logic notation?
Ā
What values makes an XOR true?
01 and 10
What is DeMorgan’s Law?
Break the line, change the sign
What is Analogue Data?
Data that varies in a continuous manner
What is Digital Data?
Data that takes the form of discrete values
What does a ADC do?
Converts analogue sound into digital signals that can be stored on a computer
What does a DAC do?
Converts digital signals stored on a computer into analogue sound that can be played through devices such as speakers
What is sampling rate?
The number of samples take per second. Measured in Hz
What is sampling resolution?
The number of bits assigned to each sample
What is the equation for file size for sound?
Sample rate* Sample resolution * Length of sound
What is lossless compression?
Compression that doesn’t lose any accuracy and can be decompressed into an identical copy of the original data
(FLAC, WAV are examples for Audio. JPEG PNG for images) Uses Run length encoding which takes long repeated values such as 111111 and compresses it to (6-1) so six ones
What is lossy compression?
Compression that loses file accuracy. Generally smaller than lossless compression. Finds audio data that is less audible to humans and discards it. Then stores the remaining data in an efficient manner.
What is Nyquist’s theorem?
The sample rate should be at a frequency which is at least twice that of the highest frequency in the sampled signal