Data Representation Flashcards
How do you convert Digital Signals to Analogue signals?
A device called a digital to analogue converter (DAC) is used - it reads a bit pattern representing an digital signal and outputs an analogue, electrical current
How do you convert Analogue Signals to Digital Signals?
1) A sensor such as a microphone outputs an analogue signal
2) Computer uses an Analogue to Digital Convertor
3) ADC takes samples of the analogue signal at regular intervals
4) The amplitude of each sample is approximated to an integer value
5) Each sample is assigned a binary value - so it can be stored digitally
How do you calculate the size of a sound file?
Size (Bits) = Sample Rate x Sample Resolution x Length of Sample
What is the range that humans can hear at?
Between 20Hz and 20,000Hz
What is Nyquist Theorem?
To produce an accurate recording, the sampling rate must be at least double that of the highest frequency in the original signal
What is MIDI?
Electronically generated sounds that mimic musical instruments
What are the advantages of MIDI?
MIDI allows easy manipulation of music without a loss in quality
MIDI are smaller in size and are lossless - so no information is lost when using MIDI
What are the disadvantages of MIDI?
Can’t be used for storing speech
Can result in less realistic sounds
What is colour depth?
The number of bits assigned to a pixel in an image - if one bit, then 2^1 colours are available, if 2 then 2^2 bits, etc
Give some examples of metadata
Metadata is extrainformation - e.g. Width, Height, Date Created
What are vector graphics?
Vector Graphics represent images using geometric objects and shapes
Vector Graphics vs Bitmapped Graphics?
1) Vector Graphics can be scaled without losing quality, whereas bitmap will lose quality
2) Vector graphics are suited to simpler images, bitmap to more complex - such as photographs
3) Vector Graphics use less storage space than bitmapped, as they only store information about the shape instead of each pixel
What is Lossy Compression?
The process of reducing a file size, by deleting information within the file - this could be lowering image resolution (deleting certain pixels)
This can’t be undone
What is Lossless Compression?
The process of reducing a file size without deleting any information, this reduces a file size without lowering qualitty
What is Run Length Encoding?
A type of lossless compression
Reduces the size of a file by removing repeated information and replacing it with a singoe occurance, followed by the number of times it is repeated
e.g. In a bitmap, a line of pixels could be
1 White 5 Yellow 1 white
What is Computational Security?
Something is computationally secure if it cannot be cracked within reasonable time
What are the conditions for the Vernam Cipher to offer perfect security?
1) The encryption key is equal to or longer than the plaintext message
2) The key is random
3) The key is only used once and is then destroyed
How do you peform the Vernam Cipher?
1) Separate your word into its letters (e.g. D, A, V, E)
2) Separate your key into its separate characters (e.g. #9[G)
3) Get the ASCII values of each character
4) Do an XOR calculation, comparing first letter to first character, second letter to second character, etc
5) Convert the new ASCII value back
What is a Caesar Cipher?
1) Choose a letter and then shift that letter and every letter following it by x number of times
Very easy to crack or brute force as limited number of permutations
How does dictionary based compression work?
Take a sentence and give a number to every unique word
(e.g. Walk to the park to say hi)
Walk - 1
To - 2
The - 3
Park - 4
Say - 5
Hi - 6
These new code are stored in unicode
This means that 3 bits are required as (2^3) = 8 and we have 6 codes (Repeated words count for one)
Lossless Compression
How does Truncation/Rounding work?
Truncation - Cut the bits off that don’t fit
Rounding - Cut the bits off, but if the first bit to cut off is a 1, then add a 1 to the least significant bit
What are absolute/relative errors?
Sometimes, some numbers cannot be represented using fixed/floating point binary (e.g. 1/3). So we work out the closest approximation and calculate the error
Absolute Error - The difference between the desired value and the actual value
Relative Error - Absolute Error / Actual Value * 100
Floating Point vs Fixed Point
Floating Point binary allows representation for a greater range of numbers with a given number of bits.
Large exponent, smaller mantissa allows for a large range but little precision
Large Mantissa, Small Exponent allows for small range but great precision
Moving the fixed point to the left increased precision, to the right increases range
What is Underflow?
When a number is too small to be represented with the amount of bits available
What is Overflow?
When a number is too big to be represented with the amount of bits available
What are the benefits of ASCII over Unicode?
1) Takes up less memory as only stores 128 characters
2) Uses 7 bits - so 8th bit can be used as an error check
What are the benefits of Unicode over ASCII?
1) Allows a wider range of characters
2) Can be used internationally as allows multiple languages, better for communicating online
What are the advantages of Normalisation?
1) Maxmises precision based on the number of bits
2) Gives a unique representation of each number