1.3 Data storage and compression Flashcards
(24 cards)
What is a bit in computer data storage?
A bit is the smallest unit of data in a computer, represented as either 0 or 1.
How many bits are in a byte?
A byte consists of 8 bits.
What is the size of 1 Kibibyte (1 KiB)?
1 KiB equals 1,024 bytes.
How many bytes are in 1 Mebibyte (1 MiB)?
1 MiB equals 1,048,576 bytes.
What is the size of 1 Kilobyte (1 KB) in the conventional system?
1 KB equals 1,000 bytes.
How many bytes are in 1 Gigabyte (1 GB) in the conventional system?
1 GB equals 1,000,000,000 bytes.
How many bytes are in 1 Gibibyte (1 GiB)?
1 GiB equals 1,073,741,824 bytes.
How many bytes are in 1 Terabyte (1 TiB)?
1 TiB equals 1,099,511,627,776 bytes.
How do you calculate the file size of an image?
The file size of an image is calculated by multiplying the image resolution (in pixels) by the colour depth (in bits).
How do you calculate the file size of a mono sound and stereo file?
For mono sound:
File Size = Sample Rate × Sample Resolution × Length of Sample
For stereo sound:
File Size = Sample Rate × Sample Resolution × Length of Sample × 2
What is the main purpose of data compression?
The main purpose of data compression is to reduce file sizes, requiring less storage space, reducing bandwidth usage, and speeding up transmission times.
What is lossless compression?
Lossless compression reduces the file size without losing any data. It allows the original file to be reconstructed exactly after decompression.
What is an example of a lossless compression algorithm?
An example of a lossless compression algorithm is Run-Length Encoding (RLE).
How does Run-Length Encoding (RLE) work?
RLE compresses data by encoding repeating sequences. For example, the string “aaaaabbbbccddddd” would be compressed as “05 97 04 98 02 99 05 100”.
What is a limitation of Run-Length Encoding (RLE)?
RLE is not effective for data with few repeating patterns. For example, alternating patterns like “cdcdcdcd” would not compress well using RLE.
What is lossy compression?
Lossy compression reduces file size by permanently removing some data, typically reducing image resolution, colour depth, or audio sample rates. The original file cannot be fully restored after compression.
What are two examples of lossy compression formats?
MP3 (for audio) and JPEG (for images) are both examples of lossy compression formats.
How does MP3 compression work?
MP3 compression reduces the file size by removing sound frequencies that are less perceptible to the human ear, achieving up to a 90% reduction in file size.
How does JPEG compression work?
JPEG compression reduces the file size by lowering the image resolution or colour depth, which removes less important visual data.
What is the MIDI file format used for?
MIDI (Musical Instrument Digital Interface) is used for storing music as a series of commands, not actual audio. It enables electronic musical instruments to communicate with each other.
What type of files can be stored in the MP4 format?
MP4 is a multimedia file format that can store audio, video, images, and animations.
How does file compression impact the quality of a file?
Lossy compression reduces file quality by removing some of the original data, while lossless compression maintains the original quality.
What is the key difference between lossless and lossy compression?
The key difference is that lossless compression retains all the original data, while lossy compression permanently discards some data to reduce file size.
How does compression reduce bandwidth and storage requirements?
Compression reduces the size of the file, meaning it requires less bandwidth to transmit and less storage space to save.