5.6 Representing images, sound and other data Flashcards
what are the main differences between analogue and digital data? ( 2 separate points)
Analogue data is continuous, Digital is discrete
Analogue signals can take any values and can change frequency as required
Digital signals must always take on specified range of values and can only change values at specified intervals
How do you convert sound, digital to analogue and how does it work?
DAC is used
Device reads a bit pattern representing an analogue signal and outputs an alternating, analogue, electrical current
How do you convert sound analogue to digital?
ADC is used
The device takes a reading of an analogue signal at regular intervals and records the value (sampling)
Samples are taken at a specific frequency (in Hertz)
This determines the number of samples taken per second
Greater sampling frequencies result in a better reproduction of an analogue signal
How do bitmap graphics work?
An image is broken down into pixels each of which has a binary value assigned to it.
What is the resolution of an image?
number of dots per square inch in an image where a dot is a pixel. also refer to the number of pixels in an image.
what is colour depth, how can it be calculated?
Colour depth is the number of bits assigned to a pixel in an image. It can be calculated by 2^n n being the amount of bits used
how do you calculate the storage required to represent a bitmap image?
Multiple the number of pixels (width * height) by the colour depth + metadata.
what are some typical examples of metadata?
Width, height, date created and colour depth
How do vector graphics work?
Geometric objects and shapes are used to create images
Properties for each geometric object or shape in the image are stored in a list
What’s the advantages and disadvantages of using vector graphics over bitmap images?
Vector graphics can be scaled without losing quality
Vector graphics are not suited to store photos
Vector graphics take up less storage space
How do you represent sound digitally?
As a sequence of samples
Each sample takes a discrete digital value
Samples per second is the sample rate (hertz)
Number of bits allocated is the sample resolution.
How do you calculate the size of a sound sample?
Multiplying the duration of the sample in seconds by the sampling rate in hertz and the sample resolution. With metadata
What is the Nyquist theorem?
The sampling rate must be at least twice the frequency of the signal
What is MIDI?
Musical instrument digital interface.
Used with electronic instruments which can be connected to computers
Stores sound as event messages
each event message represents an event in a piece of music.
In MIDI what do the event messages contain?
the duration of a note, The instrument with which a note is played, how loud a note is, if a note should be sustained
what are the advantages and disadvantages of MIDI?
Benefits of MIDI
MIDI allows easy manipulation of music without loss of quality
The instruments on which notes sound can be changed
Notes can be transposed
The duration of notes can be altered
MIDI files are often smaller than sampled audio files
Drawbacks of MIDI
MIDI can’t be used for storing speech
MIDI sometimes results in a less realistic sound than sampled recordings
Why are files compressed?
To reduce their size
So then can be transferred faster
What is lossy compression?
Lossy compression is when information is lost in the process of reducing the files size.
what is lossless compression and the 2 methods?
Lossless compression is when there is no loss of information. the file size can be reduced without a decrease of quality.
This can be RLE or dictionary based methods.
How does run length encoding (RLE) work?
RLE reduces the size of a file by removing repeated information and replacing it with one occurrence of the repeated information followed by the number of times it is to be repeated
How do dictionary-based methods work?
A dictionary containing repeated data is appended to the file. The dictionary used to comprise the data must be present in the file
What are the advantages and disadvantages of lossy compression compared to lossless compression?
Information is lost in lossy but not lossless.
Quality is reduced in lossy but not lossless
There is no limit of compression in lossy but there is a limit to lossless
what is encryption?
Encryption is the process of scrambling data so that it cannot be understood if intercepted in order to keep it secure during transmission.
Describe what is meant by plain text and cypher text?
Unencrypted information is referred to as plaintext and encrypted information is called cypher text.
What is a cipher?
A cipher is a type of encryption method
How do caesar ciphers work?
Encrypt information by replacing characters
One character is always replaced by the same characters.
Two types - shift and substitution
How do shift ciphers work?
All letters in the alphabet are shifted by the same amount.
This forms a key
How do substitution ciphers work?
Substitution ciphers are when letters are randomly replaced.
Why aren’t caesar ciphers secure?
Once one character has been discovered a shift cipher can be completely crackers as the key can be found.
How does the Vernam cipher work?
Aligning the characters of plaintext with key
Convert each character to binary
Apply XOR operation to bit patterns
Convert the results back to characters
What is a one-time pad cipher
Cipher where:
Each key should only ever be used once
The key must be random
The key must be as long as the plaintext
Why is the vernam cipher so secure?
because it is an example of a one-time pad cipher
What is computational security?
In theory every cryptographic algorithm except for vernam cipher can be broken, given enough cipher text and time.