what is sound
a type of analog signal that is captured and converted into digital form to be processed by a computer
how is sound converted into digital form
by sampling. (taking measurements of the sound wave at regular intervals and converting these measurements into binary)
what is the sample resolution
the number of bits per sample, determines the level of detail of each sample
what are the two types of sound files
MIDI and MP3
describe MIDI
Musical Instrument Digital Interface (file)
Stores a set of instructions (for how the sound should be played)
It does not store the actual sounds
Data in the file has been recorded using digital instruments
Specifies everything important so
Individual notes can be edited
describe MP3
MP3 is a format for digital audio
MP3 is an actual recording of the sound
MP3 is a (lossy) compression format
It is recorded using a microphone
how are images represented
using a bitmap (series of pixels)
what are pixels
small dots of colour that are arranged in a grid. each pixel can be represented by a binary code
how does the file size of an image increase
when the resolution and colour depth increase
how many bytes are in
Kibibyte (KiB)
mebibyte (MiB)
gibibyte (GiB)
tebibyte (TiB)
pebibyte (PiB)
exbibyte (EiB)
2^10 bytes
2^20
2^30
2^40
2^50
2^60
describe lossless compression
-reduces size without permanently removing data
-repeated patterns are identifies and indexed
- run-length encoding (RLE) and huffman encoding is used
-RLE replaces sequences of repeated characters with a code that represents the character and the number of times it is repeated
-huffman encoding replaces frequent characters with shorter codes and less frequent characters with longer codes
what is text
a collection of characters that can be represented in binary
how do computers represent text in binary
using a character set - a collection of characters and the corresponding binary codes to represent them
what the most common character set
ASCII
which assigns a unique 7-but binary code to each character
what a flaw of ASCII
limit in terms of the number of characters it can represent and doesnt support non-western languages
how are the ASCII problems solved
unicode was developed, which can represent a larger variety of characters (uses 8 or 16 bits)
How does Unicode work?
uses a variable - length encoding scheme that assigns a unique code to each character, which is represented in binary using several bytes
whats the negatives of unicode
requires more bits per character than ASCII, it can result in larger file sizes and slower processing times when working with text-based data
what does the quality of digital sound depend on
on the sample rate (number of samples taken per second) the higher the rate the higher the quality, however also increases file size
what is a typical CD sample rate and resolution
44.1 kHz and 16-bit binary
what affects the resolution of an image
the number of pixels in the image, higher resolution = more pixels = more detailed but more storage space
how many colours can an 8-bit colour depth allow
2^8 so 256 different colours
what is the colour depth of an image
the number of bits used to represent each colour. the higher the colour depth = more colours = more storage
An image has a resolution of 600 x 400 and a colour depth of 1 byte. Calculate the file size of the image giving your answer in bytes
600 x 400 = 240000
what is the smallest unit of data storage
1 bit (either 0 or 1)
how many bits is a nibble
4 bits
how many bits is a byte
8 bits
how to calculate image file size
resolution (width x height) x colour depth (number of pixels)
(if question is in bytes, divide number of bits by 8)
find image size in bytes, An image measures 100 by 80 pixels and has 128 colours
resolution = 100 x 80 = 800
colour depth = 2^7 = 128 so 7
size = 800 x 7 = 56000bits
bytes = 7000
how to calculate file size of sound
Sample rate (hz) x sample resolution (bits) x length of sample (seconds)
calculate size: A sound clip uses 48KHz sample rate, 24 bit resolution and is 30 seconds long
bits per second = 48000 x 24
size = 1152000 x 30 = 34560000
bytes = 4320000
kibibytes = 4218. 75 (divide 1024)
mebibytes = 4.12 (divide 1024)
what are the two types of compression
lossless and lossy
why is compression necessary
to reduce the size of large files for storage, transmission and faster processing
when is lossless used for
for text, code and archival purposes as loosing data would be a problem
describe lossy compression
-reduces file size permanently
-used to images and audio, where minor details can be removed without impacting the quality
-uses downscaling, reducing resolution or colour depth and reducing samples or rate
-amount of data removed depends on the level of compression selected and can impact the quality of the final file
what is lossy compression used for
for media files like audio or images where minor data loss is accpetable