Audio
Describe analogue data.
Continuous - can take any value on a scale.
Describe digital data.
Discrete - can only take particular values.
Describe analogue signals.
- Analogue signals can take any values on a scale.
- Analogue signals can change as frequently as required.
Describe digital signals.
- Digital signals can only take one of a specified range of values.
- Digital signals can only change at specified intervals.
Describe how an Analogue to Digital Converter (ADC) works with sound waves
- The device measures the amplitude of the analogue wave at regular time intervals to produce samples.
- Each sample is stored in binary and a sequence a samples represents sound.
Describe how a Digital to Analogue Converter (DAC) works with sound waves
- The device reads the sequence of binary samples and outputs an alternating, analogue, electrical current.
- A speaker dome will move in/ out depending on the amplitude of this signal.
Define Sampling Rate.
The number of samples measured per second in Hz.
Define Sample Resolution.
The number of bits used to record each sample.
A 60 second stereo audio file was sampled at 44kHz and has a sample resolution of 24 bits. Calculate the file size in MB
- Stereo * length in seconds * sample rate in Hz * sample resolution in bits = file size in bits.
- Convert to MB
- 126,720,000 bits / 8 = 15,840,000 bytes
- 15,840,000 / 1,000,000 = 15.84 MB
2 channels ∗ 60 seconds ∗ 44,000 Hz ∗ 24 bits = 126,720,000bits
bits → bytes → kb → mb
Explain how increases the sampling resolution will affect the properties of an audio file.
File size will increase, but the quality of audio will be higher, that is to say more accurate.
Explain Nyquist's theorem.
Sampling rate must be at least twice the highest frequency of the sound, in order for an accurate binary representation.
Explain how MIDI stores sound?
MIDI stores sound as a series of event messagesEach event message holds data as a series of instructions to reproduce that sound.
Give some pieces of information which event messages store.
- Duration of a note.
- How loud a note is.
- The pitch of a note.
- The octave within which the note is to be played.
State 3 advantages of MIDI over sound sampling
- Easy manipulation: event messages can be played by many instruments.
- event messages can be transposed to different instruments.
- The duration and timing of notes can be altered.
- MIDI files are often smaller than sampled audio files.
- MIDI files are a lossless format, so no information is lost.
State 2 disadvantages of MIDI over sound sampling.
- MIDI music can sound less realistic and "faked" which listeners might not appreciate.
- MIDI music cannot accurately represent human speech.
Images
Explain how raster images are stored in a bitmap file.
Images are series of ordered picture elements, known as pixels.
Define pixel.
picture element, the smallest identifiable area of an raster image, containing a binary value representing a single colour.
State the two properties of an image that image resolution could refer to.
The size of the image in pixels or The Pixels Per Inch (PPI).
How would you calculate image resolution in pixels.
Image resolution = height in pixels * width in pixels.
Define colour depth of a raster image.
- The number of bits per pixel used to store colour information.
- A measure of the range of colours which are present in the image.
An image can store 256 colours, calculate its colour depth.
Bit depth = log(256) / log(2) = 8 bits.
An image with 32 bits of metadata, a height of 100 pixels, a width of 250 pixels and has a range of 8 colours. Calculate the size of the image in KB.
- Use formula: log(colourRange) / log(2) = colour or bit depth.
- Use formula: height * width * colour depth + metadata = size in bits.
- Convert to KB
- 75,032 bits / 8 = 9379 bytes
- 9379 bytes / 1000 = 9.379 KB
log(8) / log(2) = 3 bits
100 *250 * 3 + 32 = 75,032 bits
State some pieces of information that may be stored within the metadata of image file.
- Resolution
- Colour depth
- Date created
- Geolocation co-ordinates
- Author
Explain how vectors images store data.
A list of geometric objects and shapes and their corresponding properties.
Give four typical properties of geometric object in a vector image.
- Stroke width
- Stroke colour
- Fill colour
- Start position, end position
State 2 advantages of vector images over bitmapped images.
- Can be scaled up or down (larger, or smaller) without becoming blurry or pixelated, because objects are simply redrawn.
- Often uses less storage space than bitmapped graphics.
State 2 disadvantages of vector images over bitmapped images
- Fine details such as strands of hair are more accurately represented with pixels than geometric shapes.
- Modification of raster images is more precise than geometric shapes, so unsuitable for applications such as photography.
Compression
Explain 2 advantages of compression of images, sound, text and other binary data
- Reduces file size.
- More economical
- Speeds of transmission across a network are faster.
- More data can be transferred per unit of time.
Meaning more data can be stored per unit of storage space.
Therefore...
Describe lossy compression.
Some information is lost: such as reducing sample resolution or the size of a image in order to decrease file size.
Describe lossless compression.
No information is lost, patterns in data are identified and made concise.
State the advantage of lossy compression over lossless compression.
- Lossy compression is faster to execute, so only lossy is suitable for network transmissions which require a small latency (such as phone call).
- Can in some cases result in smaller file size than lossless.
State the disadvantage of lossy compression over lossless compression.
- As some information is lost, the accuracy of the digital representation is reduced.
- This means ugly artifacts in images and a perceptible loss of quality.
State the advantage of lossless compression over lossy compression.
No information is lost, no reduction in quality of image or sound.
State the disadvantages of lossless compression over lossy compression.
- Lossless compression algorithms are often slower.
- Lossless compression algorithms may not in all cases produce a great reduction in file size.
- There is a limit to how much a file can be compressed.
State two methods of lossless compression.
Run Length Encoding (RLE), Dictionary
Explain how run length encoding works.
- A series of contiguous repeated pixels are replaced with one pixel value and a the length of repetitions.
- Data is stored as a series of these elementary units.
Explain how one can use a dictionary to perform lossless compression.
- A dictionary is used to store large patterns of repeating data.
- The file references the dictionary so such patterns are only stored once.
- The included dictionary may increase file size.
Describe the best case and worst case for lossless compression.
- Best: Many sets of repeating sequential data.
- Worst: No repeating sets of sequential data at all.
Encryption
Define encryption.
The transformation of data into another form to prevent unauthorised parties from understanding the message.
Define cipher.
The algorithm used to encrypt data/ transform data into another form.
Define plaintext.
The original data or message to be sent and understood by authorised users.
Define ciphertext.
The encrypted data to be transmitted.
Describe how the Caesar cipher works.
This is a substitution cipher, where each character of the alphabet is shifted to the left or right by a set value.
Describe how the Vernam cipher works.
- Align the characters of the plaintext and the key.
- Convert each character to binary.
- Apply a logical xor operation on each of the two bit-patterns.
- Convert the result back into a (ASCII or UTF8) characters
Give another name for the key used in the Vernam cipher.
One-time pad.
Explain what must be required of the one-time pad for perfect computational security to be achieved.
- OTP must be at least as long as the plaintext message.
- OTP must only be used once.
- OTP must be chosen uniformly at random.
- OTP must be transmitted using other communication channels.
Explain the concept of computational security
- Given enough time all cipher algorithms can be broken by cryptanalytic attack.
- Cryptanalytic attack relies on the frequency analysis.
- Since computers cannot produce random numbers any key will eventually be found.
- A cipher is more secure the longer it takes for cryptanalysis.
- Some ciphers may take longer than age of the universe but can theoretically be cracked.
Explain why the Vernam cipher is considered perfectly secure.
- Since the key is chosen uniformly at random, the ciphertext data is also uniformly randomly distributed.
- This means frequency analysis and cryptanalytic attacks will always fail mathematically.