Online Quiz
Computers use a variety of ways to represent information, such as numbers, text, images, and sound. Since computers operate using electrical signals, they rely on the binary number system (0s and 1s) to store and process data. This section explores different number systems, character encoding methods, and memory measurements used in computing.
The decimal system (also called denary) is the number system we use in daily life. It is a base-10 system, meaning it has ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. Each digit has a place value based on powers of 10.
Computers use the binary system (base-2), which consists of only two digits: 0 and 1. Each digit in a binary number is called a bit (short for binary digit).
Example:
The binary number 1011 represents the decimal number:
(1×2^3)+(0×2^2)+(1×2^1)+(1×2^0) =8+0+2+1=11= 8 + 0 + 2 + 1 = 11=8+0+2+1=11
Converting Decimal to Binary:
To convert a decimal number to binary, we repeatedly divide by 2 and record the remainders.
Reading from bottom to top, 13 in decimal = 1101 in binary.
The hexadecimal (hex) system is a base-16 system, using digits 0-9 and letters A-F (where A = 10, B = 11, ..., F = 15). It is often used in computing because it is more compact than binary.
Example: Convert 2F (hex) to decimal
(2×16^1)+(F×16^0) = 32 + 15 = 47=(2×16)+(15×1)=32+15=47
Binary-Hexadecimal Conversion
Each hex digit represents four binary digits:
Hex Binary
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
A 1010
B 1011
C 1100
D 1101
E 1110
F 1111
Binary addition follows these rules:
0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 10 (carry 1)
Example:
1011 (11 in decimal)
+ 0101 (5 in decimal)
------------
10000 (16 in decimal)
Binary subtraction follows these rules:
0 - 0 = 0
1 - 0 = 1
1 - 1 = 0
0 - 1 (requires borrowing from the left)
Example:
1010 (10 in decimal)
- 0011 (3 in decimal)
------------
0111 (7 in decimal)
ASCII uses 7-bit binary codes to represent characters like letters, digits, and punctuation marks.
Example: ASCII codes for ‘A’ and ‘B’
Character ASCII Code Binary
A 65 1000001
B 66 1000010
Unicode extends ASCII and supports all world languages, using up to 32-bit encoding. The first 128 characters in Unicode are the same as ASCII.
Example:
Unicode for ‘A’ is U+0041
Unicode for ‘α’ (Greek alpha) is U+03B1
Memory size is measured in bytes, where:
Unit Size
1 Byte
8 bits
1 Kilobyte (KB)
1,000 bytes
Megabyte (MB) 1,000,000 bytes
Gigabyte (GB) 1,000,000,000 bytes
However, since computers use binary, memory sizes are also measured in powers of 2:
Unit
Size (Binary)
1 Kibibyte (KiB)
1,024 bytes (2¹⁰)
1 Mebibyte (MiB)
1,048,576 bytes (2²⁰)
1 Gibibyte (GiB)
1,073,741,824 bytes (2³⁰)
Data representation is fundamental to computing. The binary, hexadecimal, and decimal systems are used in different applications. Character encoding schemes like ASCII and Unicode help store text, while memory units determine storage capacity. Understanding these concepts allows us to work efficiently with digital systems.
Multimedia refers to the combination of different types of digital content, including text, images, audio, and video. Computers store and process these forms of data in specific ways. Understanding how multimedia is represented digitally helps us work with files efficiently and manage storage.
This section covers bit-map and vector graphics, sound representation, video formats, and file compression techniques used in multimedia.
A bit-map image is made up of tiny squares called pixels (picture elements). Each pixel has a specific color and is stored as a binary value in the computer. The quality of a bit-map image depends on two key factors:
Resolution – The number of pixels in an image (measured as width × height).
Color Depth – The number of bits used to store each pixel’s color.
Resolution determines how detailed an image is. A higher resolution means more pixels and better image quality, but it also increases file size.
Example:
An image with 1920 × 1080 pixels contains 2,073,600 pixels in total.
The color depth defines how many different colors can be represented in an image. It is based on the number of bits per pixel.
Color Depth
Colors Available
1-bit 2 (black and white)
8-bit 256 colors
16-bit 65,536 colors
24-bit 16.7 million colors (True Color)
The file size of a bit-map image can be estimated using:
File size=Width × Height × Color depth
Example:
A 1920 × 1080 image with 24-bit color depth requires:
1920×1080×24=49,766,400 bits=6.2 MB
If a bit-map image is enlarged, the individual pixels become visible, making the image appear blurry or pixelated. This is because the number of pixels remains the same even when stretched.
Vector graphics use mathematical formulas instead of pixels to define images. These images are made of lines, curves, and shapes with properties like position, size, and color.
Made up of geometric shapes.
Can be scaled to any size without losing quality.
Smaller file sizes compared to bit-map images.
Used for logos, diagrams, and illustrations.
Example:
A company logo designed as a vector graphic remains clear and sharp whether printed on a business card or a billboard.
Sound is a waveform that needs to be converted into digital data for storage and processing. This is done through sampling.
Sound is stored digitally by taking samples of the waveform at regular time intervals.
Sampling rate – The number of samples per second, measured in Hertz (Hz).
Sampling resolution – The number of bits used to store each sample (bit depth).
Example:
A CD-quality sound file has:
Sampling rate: 44.1 kHz (44,100 samples per second)
Bit depth: 16-bit
The analogue sound wave is captured (e.g., using a microphone).
The wave is sampled at fixed time intervals.
The sampled values are converted into binary numbers.
A higher sampling rate and bit depth improve sound quality but also increase file size.
Example:
A 1-minute stereo recording at 44.1 kHz, 16-bit requires about 10 MB of storage.
Common sound editing features include:
Trimming – Cutting unwanted parts.
Volume adjustments – Increasing or decreasing loudness.
Noise reduction – Removing background noise.
Mixing – Combining multiple tracks.
A video is made up of a sequence of images (frames) displayed rapidly to create motion.
The frame rate is the number of frames per second (fps) in a video.
Frame Rate Common Use
24 fps Movies
30 fps TV & Online Videos
60 fps High-quality gaming & sports
A higher frame rate results in smoother motion but increases file size.
The file size depends on:
Resolution – Number of pixels per frame.
Frame rate – Frames per second.
Color depth – Bits per pixel.
Duration – Length of the video.
Multimedia files are often large, so compression is used to reduce file size. There are two types:
No data is lost.
Original file can be restored.
Used for text, images, and sound where accuracy is important.
Example:
PNG images use lossless compression to preserve quality.
Removes unnecessary data.
Some quality is lost, but file size is much smaller.
Used for images, audio, and video.
Examples:
JPEG (for images) – Slightly reduces quality but saves space.
MP3 (for audio) – Removes sounds outside human hearing range.
MP4 (for video) – Compresses video efficiently while maintaining quality.
A simple lossless compression method that replaces repeated data with a count and value.
Example:
Instead of storing "AAAABBBCCDDDDD", RLE stores:
4A 3B 2C 5D
This reduces file size without losing information.
Multimedia includes images, sound, and video, each stored in a unique format. Bit-map and vector graphics differ in structure and use, while sound and video require sampling and compression. File compression helps manage storage, making multimedia efficient for sharing and streaming. Understanding these concepts allows us to choose the best format and quality for different applications.
Computers store and process sound and video in a digital format. Since both sound and video exist in analog form in the real world, they must be converted into digital data to be stored and processed by computers. This process involves sampling for sound and frame sequencing for video.
This section explains how sound is digitized, how video works, and how both can be compressed to reduce file size while maintaining quality.
Sound is a continuous analog wave that must be converted into digital data to be stored on a computer. This conversion process is called sampling.
A device called an Analog-to-Digital Converter (ADC) takes sound waves and measures them at regular intervals to create a digital version of the wave.
The main factors that affect the quality of digital sound are:
Sampling rate – How often the sound wave is measured.
Bit depth (sampling resolution) – The number of bits used to store each sample.
The sampling rate is the number of sound samples taken per second. It is measured in Hertz (Hz).
Sampling Rate Common Use
8,000 Hz (8 kHz) Telephone quality
22,050 Hz (22.05 kHz) Radio quality
44,100 Hz (44.1 kHz) CD quality
48,000 Hz (48 kHz) Digital videos
96,000 Hz (96 kHz) Studio recordings
A higher sampling rate means better sound quality because more details of the sound wave are captured. However, it also increases the file size.
Example:
A CD uses a 44.1 kHz sampling rate, meaning the sound wave is measured 44,100 times per second.
The bit depth determines how accurately each sound sample is recorded. It represents the number of bits used to store each sample.
Bit Depth Number of Possible Values Quality
8-bit 256 levels Low quality
6-bit 65,536 levels CD quality
24-bit 16.7 million levels Studio quality
A higher bit depth captures more precise sound variations but increases the file size.
Example:
8-bit audio can only store 256 different sound levels, so the sound may be rough or noisy.
16-bit audio stores 65,536 different levels, making the sound smoother and more detailed.
The file size of a digital sound file depends on:
File size=sampling rate×bit depth×duration×channels\text{File size} = \text{sampling rate} \times \text{bit depth} \times \text{duration} \times \text{channels}File size=sampling rate×bit depth×duration×channels
Example:
A 1-minute stereo recording at 44.1 kHz, 16-bit:
44,100×16×60×2=84,672,000 bits=10.58 MB
Once digitized, sound can be edited using special software. Common editing tasks include:
Trimming – Removing unwanted parts.
Volume adjustments – Making sound louder or softer.
Noise reduction – Removing background noise.
Mixing – Combining multiple soundtracks.
A video is a sequence of images (frames) displayed rapidly to create motion. A typical video consists of:
Frames – Individual pictures that make up a video.
Frame Rate – The number of frames shown per second (fps).
Resolution – The number of pixels in each frame.
Bit Depth – The number of bits used for color in each pixel.
Frame rate is measured in frames per second (fps) and affects how smooth a video appears.
Frame Rate Common Use
24 fps Standard movies
30 fps TV and YouTube videos
60 fps High-quality gaming and sports
A higher frame rate makes motion smoother but increases file size.
Example:
A movie at 24 fps means 24 images are shown per second.
Resolution defines the number of pixels in each video frame. More pixels mean higher quality.
Resolution Pixels (Width × Height) Common Use
720p (HD) 1280 × 720 Online videos
1080p (Full HD) 1920 × 1080 Blu-ray movies
4K (Ultra HD) 3840 × 2160 High-end TVs
Example:
A 1920 × 1080 video has 2,073,600 pixels per frame.
Video file size depends on:
File size = Resolution × Frame rate× Color depth× Duration
Example:
A 1-minute 1080p video at 30 fps, with 24-bit color depth:
1920×1080×30×24×60=Huge file
Since raw video files are too large, compression is used to reduce file size.
Multimedia files are often compressed to save storage space and make streaming faster. There are two types of compression:
No data is lost.
The original file can be restored.
Used for text, images, and sound files where accuracy matters.
Example:
PNG and FLAC files use lossless compression to maintain quality.
Some data is removed permanently.
Results in smaller file sizes.
Used for videos, images, and music.
Examples:
JPEG (for images) – Slight quality loss but smaller files.
MP3 (for sound) – Removes sounds that the human ear can’t hear.
MP4 (for video) – Efficiently compresses video files while maintaining quality.
MP3 compresses music by removing unnecessary sounds.
MP4 compresses video by reducing redundant image data.
Example:
A song that is 50 MB in full quality can be compressed to 5 MB using MP3, with little noticeable quality loss.
A simple lossless compression technique that replaces repeated data with a count and value.
Example:
Instead of storing "AAAABBBCCDDDDD", RLE stores:
mathematica
CopyEdit
4A 3B 2C 5D
This reduces file size without losing information.
Sound and video must be converted into digital format for storage. Sound is digitized through sampling, while video is stored as a sequence of frames. Compression helps reduce file sizes for easier storage and faster streaming. Understanding these concepts ensures efficient use of multimedia technology.
File compression is a method used to reduce the size of files so that they take up less storage space and can be transferred more quickly over networks. This is especially important for multimedia files such as images, sound, and video, which can be very large in their original formats.
There are two main types of file compression:
Lossless compression – The original file can be restored completely.
Lossy compression – Some data is lost permanently, but the file size is much smaller.
This section explains how file compression works, the differences between lossy and lossless compression, and how it is applied to different file types.
Without file compression, large files can cause several problems:
Storage Issues – Large files consume too much space on a hard drive.
Slow Transfers – Large files take longer to download, upload, or stream.
Bandwidth Limitations – Internet services often limit the amount of data that can be transferred.
By compressing files, we can save space, improve efficiency, and speed up file transfers.
There are two main types of file compression:
No data is lost during compression.
The original file can be fully restored after decompression.
Used for files where accuracy is important (e.g., documents, spreadsheets, high-quality images).
Example: ZIP files
ZIP compression reduces file size while keeping the data intact. A 10 MB text file might be compressed to 5 MB, and when decompressed, it will return to 10 MB without any loss.
Some data is permanently lost to reduce file size.
Used mainly for images, audio, and video where some loss of quality is acceptable.
Results in much smaller files compared to lossless compression.
Example: MP3 files
An uncompressed CD-quality audio file (50 MB) can be compressed into a 5 MB MP3 file. The lost data includes sounds that the human ear cannot hear, making the file much smaller with minimal noticeable quality loss.
Different file types use specific compression methods to achieve smaller file sizes.
JPEG Compression (Lossy)
JPEG (Joint Photographic Experts Group) is a lossy compression method used for photos. It works by:
Removing subtle color variations that the human eye cannot notice.
Reducing redundant pixel data to shrink the file size.
Example:
A 10 MB raw image may be reduced to 1 MB as a JPEG.
However, if too much compression is applied, the image may appear blurry or pixelated.
PNG Compression (Lossless)
PNG (Portable Network Graphics) uses lossless compression, which means no image quality is lost. However, PNG files are larger than JPEGs.
Example:
A 10 MB raw image may shrink to 6 MB as a PNG, but it will retain every detail from the original image.
MP3 Compression (Lossy)
MP3 uses perceptual music shaping, meaning it:
Removes inaudible sounds (e.g., very high or low frequencies).
Reduces the file size significantly while keeping sound quality acceptable.
Example:
A 50 MB WAV file (CD quality) can be compressed into a 5 MB MP3 file.
FLAC Compression (Lossless)
FLAC (Free Lossless Audio Codec) compresses audio files without losing quality but keeps a larger file size than MP3.
Example:
A 50 MB WAV file might be compressed to 30 MB as FLAC.
MP4 Compression (Lossy)
MP4 (MPEG-4) is a popular lossy video format used for streaming and storage.
Reduces file size by compressing each frame efficiently.
Removes unnecessary visual details to save space.
Example:
A 1 GB uncompressed video can be reduced to 200 MB as an MP4 file, making it easier to stream online.
Run-Length Encoding (RLE) is a basic lossless compression technique that replaces repeated data with a count and the actual value.
Instead of storing AAAABBBCCDDDDD, RLE stores:
mathematica
CopyEdit
4A 3B 2C 5D
This method reduces file size without losing information.
An image made of white (1) and black (0) pixels:
CopyEdit
111100001111
Can be stored as:
CopyEdit
4 1s, 4 0s, 4 1s → 4 1 4 0 4 1
This significantly reduces the number of bits needed to store the image.
Best Use Cases for RLE
Simple graphics (e.g., icons, logos).
Text files with repeating characters.
However, RLE does not work well if the data does not have many repeated elements.
When data accuracy is important (e.g., text documents, high-quality images).
Example formats: ZIP, PNG, FLAC.
When file size needs to be small (e.g., streaming videos, music, online images).
Example formats: JPEG, MP3, MP4.
Compression Type Advantages Disadvantages
Lossless Keeps full quality Does not reduce file size as much as lossy compression
Lossy Greatly reduces file size
Some quality is lost, especially at high compression levels
Streaming Services
YouTube, Netflix, and Spotify use lossy compression (MP4, MP3) to reduce bandwidth use while keeping quality acceptable.
Image Storage & Sharing
JPEG is used for social media and websites where file size matters more than absolute quality.
Data Backup
ZIP and RAR formats help store multiple files in smaller packages.
Gaming & Software
Game files and apps use compression to reduce installation size.
File compression helps save space, improve transfer speeds, and optimize multimedia usage. Lossless compression is useful when data integrity is needed, while lossy compression significantly reduces file size for sound, images, and videos. Techniques like RLE, MP3, MP4, and JPEG make storage and streaming more efficient. Understanding file compression allows us to choose the right method for different applications.