What is Pixel
The smallest element used to make up an image on a display.
What is an image
a series of pixels that are converted to binary, which is processed by a computer
What is Colour depth
The number of bits used to represent the colours of a pixel.
What is Image resolution
The total number of pixels that make up an image.
File size of an image
Image resolution * colour depth
What is Sample rate
Number of samples taken per second
What is sampling resolution
The number of bits used to represent sound amplitude in a digital sound recording.
What is bit depth
Number of bits used to represent the smallest unit in a sound file
How to calculate file size of a mono sound file
Sample rate * sample resolution * length of sample * number of channels
What is a bit
Basic computing Element that is either 0 or 1.
What is compression
Reduction in file size by removing or reorganising redundant or repeated pieces of data
What are the two types of compression
Lossy
Lossless
What is lossy compression
The file compression algorithm eliminates unnecessary data from the file. This means the original file cannot be reconstructed once it has been compressed. Eg: MP3, JPEG
What happens when lossy compression is applied
to an img
to a sound file
img - reduce the resolution and/or the bit/colour depth
sound - reduce the sampling rate and/or the resolution.
What is lossless compression
A file compression method that reorganises runs of data to compress the file. The original file can be fully restored.
What is Run Length Encoding
A lossless file compression technique is used to reduce the size of text and photo files in particular
What is an error code
Error messages that contain numbers that refer to the memory location of the error and are usually automatically generated by the computer
What is ASCII code
A character set for all the characters on a standard keyboard and control codes.
What is Unicode
A character set which represents all the languages of the world
Applications of hexadecimals
MAC Address
IP Address
Representing colours
Error codes
What is an overflow error
When there are more bits than the register can handle
What directions means what operation in Binary Shifting
Right shift = division
Left shift = multiplication
What is the MAC address
Uniquely identifies a device on the internet
How many bits does the MAC address have?
48 bits - 6 pairs of hexadecimal values
What is the IP address
Gives a unique address to each device connected to a network identifying their location
IPv4
32 bit number
separated by ‘.’
IPv6
128 bit number
separated by ‘:’
16 bit chunks (4 hex numbers:4 hex numbers)
MP3 sound files
A form of lossy compression where the original file size is reduced by 90%
Lossy compression removes frequencies outside human hearing range
Perceptual music shaping
What is perceptual music shaping
If two sounds are playing at the same time, the softer one is removed.
JPEG
Lossy file compression.
Bitmap image which is very large becomes a JPEG file after lossy compression
Human eyes can’t detect changes in colour as well as brightness.
Separates pixel colour from brightness, images can be split into 8 x 8 pixel blocks, and allows certain information to be discarded
MP4
Similar to mp3 except mp4 allows videos, photos, animations and music.
Why data is compressed
»save storage space
»reduce the time taken to stream a music or video file
»reduce the time taken to upload, download or transfer a file across a network
»reduced file size also reduces costs
How to convert from binary to denary
Each value in the binary number is a power of 2
1 1 1 1
8 4 2 1
How to convert from denary to binary
Subtract powers of 2 until remainder is 0
12 in binary is
12- 8 = 4 -4 = 0
1100
How to convert binary to hexadecimal
take binary in groups of 4 and see what denary value they have
convert that denary value of hex
eg
1111000011111
1111 | 0000 | 1111
15 | 0 | 15
F0F
How to convert hex to binary
convert each digit to groups of 4 binary digits
How many bits does ascii contain
how many does extneded ascii contain
7 bits (127 diff characters)
8 bits (255 diff characters)
Disadvantage of ascii
it does not represent characters in non-Western languages
What does the fact that unicode representing all languages in the world allow it to do
support many operating systems, search engines and internet browsers used globally.
5 goals of unicode
» create a universal standard that covered all languages and all writing systems
» produce a more efficient coding system than ASCII
» adopt uniform encoding where each character is encoded as 16-bit or 32-bit code
» create unambiguous encoding where each 16-bit and 32-bit value always represents the same character
» reserve part of the code for private use to enable a user to assign codes for their own characters and symbols
Diff between unicode and ascii
Ascii:
» 7 or 8 bits
» Only represents western language and control codes
» no reserved space in code for private users to assign codes for characters and symbols
unicode:
» more bits per character than ascii (16 or 32)
» represents all languages of the world
» reserve part of the code for private use to enable a user to assign codes for characters and symbols
What does sampling mean
how is it done
measuring the amplitude of the sound wave
using an ADC - analogue to digital converter. Converts the sampled sound to binary.
How is accuracy of the sampled sound varied
what else does this impact
by changing the sampling resolution or rate
impacts the file size as well
How is sampling used to record a sound clip
» the amplitude of the sound wave is first determined at set time intervals (the sampling rate)
» this gives an approximate representation of the sound wave
» each sample of the sound wave is then encoded as a series of binary digits.
Benefits of using a larger sampling resolution
larger dynamic range
better sound quality
less sound distortion
Drawbacks of using larger sampling resolution
produces larger file size
takes longer to transmit/download music files
requires greater processing power
how much is 1 (in bytes):
kibibyte
mebibyte
kilobyte
megabyte
KiB 2^10
MiB 2^20
KB 1^3
MB 1^6
Difference between mp3 and mp4
MP4:
format allows the storage of
multimedia files rather than just sound
lossy compression applied both to the video and the sound.
Characteristics of RLE (lossless)
» it is a form of lossless/reversible file compression
» it reduces the size of a string of adjacent, identical data
» a repeating string is encoded into two values
» RLE is only effective where there is a long run of repeated units/bits
In RLE
what is the first value
what is the second value
the first value represents the number of identical data items
the second value represents the item/data itself.
What is a flag in RLE
what happens if it is not used for a particular data block
when is it used
A flag preceding data indicates
that what follows are the number of repeating units
When a flag is not used, the next byte(s) are taken with their face value and a run of 1
when is it used - when standard RLE is not effective. Data may not be in long runs. This allows RLE to be more effective.