Skip to main content

πŸ’Ύ 1. Data Storage Units

πŸ”‘ Basic Units​

UnitMeaning
BitSingle binary digit (0 or 1)
Nibble4 bits
Byte8 bits

πŸ“Š Larger Units (IMPORTANT: base 1024)​

UnitEquivalent
1 KiB1024 bytes
1 MiB1024 KiB
1 GiB1024 MiB
1 TiB1024 GiB
1 PiB1024 TiB
1 EiB1024 PiB

⚠️ Important Rule​

  • Always use 1024 (NOT 1000) in calculations

Example Conversion​

Convert 2048 bytes β†’ KiB

πŸ“Œ Exam Tips

  • Show working clearly
  • Use correct units (KiB, MiBβ€”not KB, MB unless specified)
  • Check what unit the answer must be in

πŸ–ΌοΈ 2. File Size Calculations

πŸ“· Image File Size​

Formula​

πŸ‘‰ Then convert bits β†’ bytes:

Example​

Image:

  • Resolution = 800 Γ— 600
  • Colour depth = 24 bits

Step 1: Total pixels

Step 2: Total bits

Step 3: Convert to bytes

Step 4: Convert to KiB

πŸ“Œ Exam Tip:
Always include:

  • Pixels calculation
  • Multiply by colour depth
  • Divide by 8

πŸ”Š Sound File Size​

Formula​

πŸ‘‰ Then divide by 8 to get bytes

Example​

Sound:

  • Sample rate = 44,100 Hz
  • Resolution = 16 bits
  • Time = 10 seconds

Step 1:

Step 2: Convert to bytes

Step 3: Convert to KiB

πŸ“Œ Exam Tip:
Don’t forget:

  • Multiply ALL three values
  • Include time in seconds

πŸ“¦ 3. Purpose of Data Compression

πŸ”‘ Definition​

Compression = reducing the size of a file

🎯 Why Compression is Needed​

  • Saves storage space
  • Reduces bandwidth usage
  • Speeds up file transfer
  • Reduces download/upload time

🌍 Real-Life Examples​

  • Sending images via WhatsApp
  • Streaming music/videos
  • Storing files on phones

πŸ“Œ Exam Tip:
Use phrases like:

  • β€œreduces file size”
  • β€œreduces transmission time”
  • β€œrequires less storage space”

πŸ”½ 4. Types of Compression

πŸ”Ή Lossy Compression

πŸ”‘ Definition​

  • Removes data permanently
  • Cannot restore original file exactly

How It Works​

  • Removes less important data
  • Reduces:
    • Image resolution
    • Colour depth
    • Sound sample rate/resolution

Examples​

  • JPEG (images)
  • MP3 (audio)

Advantages​

  • Much smaller file size

Disadvantages​

  • Loss of quality
  • Data cannot be recovered

πŸ“Œ Exam Tip:
Always say:

  • β€œpermanent data loss”

πŸ”Ή Lossless Compression

πŸ”‘ Definition​

  • Reduces file size without losing data
  • Original file can be perfectly restored

How It Works​

  • Identifies patterns and removes redundancy

Example: Run Length Encoding (RLE)​

Example Data​

AAAAAAABBBCC

Compressed​

7A 3B 2C

Advantages​

  • No data loss
  • Perfect reconstruction

Disadvantages​

  • Smaller reduction compared to lossy

πŸ“Œ Exam Tip:
Say:

  • β€œno loss of data”
  • β€œoriginal file can be reconstructed”

βš–οΈ Lossy vs Lossless

FeatureLossyLossless
Data lossYes (permanent)No
File sizeVery smallSmaller
QualityReducedUnchanged
ExamplesJPEG, MP3RLE, PNG

🧠 Key Definitions

  • Compression: Reducing file size
  • Bandwidth: Amount of data that can be transmitted
  • RLE: Run Length Encoding (repeating data compression)
  • Resolution: Number of pixels in image
  • Colour Depth: Bits per pixel
  • Sample Rate: Samples per second
  • Sample Resolution: Bits per sample

⚠️ Common Exam Mistakes

❌ Using 1000 instead of 1024
❌ Forgetting to divide by 8 (bits β†’ bytes)
❌ Missing time in sound calculations
❌ Mixing up:

  • Lossy vs Lossless
  • Resolution vs Colour depth

πŸ“ High-Value Exam Answers

Why is compression needed?​

  • Reduces file size β†’ saves storage
  • Faster transmission β†’ less bandwidth

Difference between lossy and lossless​

  • Lossy β†’ permanent data loss
  • Lossless β†’ no data loss, original can be restored

Why is RLE effective?​

  • Works well with repeated data
  • Stores patterns instead of individual values

πŸ”₯ Final Quick Summary

  • Storage units use base 1024
  • Image size = pixels Γ— colour depth
  • Sound size = rate Γ— resolution Γ— time
  • Lossy = smaller but loses data
  • Lossless = no data loss
  • Compression saves space + time + bandwidth