Sound and Image Representation

GCSE Computer Science · Data Representation

Sound and Image Representation

Computers must convert analogue real-world data (sound waves, images) into digital binary data. This note covers how sound and images are represented, stored, and how quality and file size are affected.

---

Sound Representation

Sound is an analogue wave — it varies continuously. To store it digitally, it must be sampled.

Sampling

Sampling means measuring the amplitude (height) of the sound wave at regular intervals and recording each measurement as a binary number.

Key Terms

TermDefinition
Sample rateNumber of samples taken per second, measured in Hertz (Hz)
Bit depthNumber of bits used to store each sample
Bit rateNumber of bits processed per second (sample rate × bit depth)
DurationLength of the audio in seconds

How Sampling Works

1. The analogue sound wave is measured at regular intervals (the sample rate)

2. Each measurement is rounded to the nearest available value (determined by bit depth)

3. The rounded values are stored as binary numbers

4. On playback, the binary values are converted back to an approximation of the original wave

Calculating Sound File Size

File size (bits) = sample rate × bit depth × duration (seconds)

For stereo, multiply by the number of channels (2).

Worked Example

A 30-second mono audio clip, sample rate 44,100 Hz, bit depth 16 bits:

  • File size = 44,100 × 16 × 30 = 21,168,000 bits
  • ÷ 8 = 2,646,000 bytes
  • ÷ 1,024 = 2,583.98 KB
  • ÷ 1,024 = 2.52 MB

Effect of Sample Rate and Bit Depth on Quality

ChangeEffect on QualityEffect on File Size
Higher sample rateMore samples = smoother wave = better qualityLarger
Lower sample rateFewer samples = more jagged = worse qualitySmaller
Higher bit depthMore possible values = more accurate = better qualityLarger
Lower bit depthFewer values = less accurate = worse qualitySmaller

Common Sample Rates

UseSample Rate
Telephone8,000 Hz
FM Radio22,050 Hz
CD quality44,100 Hz
Professional96,000 Hz

Nyquist Theorem

The sample rate should be at least double the highest frequency in the sound to capture it accurately. Human hearing goes up to ~20,000 Hz, so CD quality uses 44,100 Hz.

---

Image Representation

Digital images are made up of tiny dots called pixels (picture elements). Each pixel stores colour information as binary data.

Key Terms

TermDefinition
PixelThe smallest addressable element of an image
ResolutionThe number of pixels in the image (width × height)
Colour depthThe number of bits used to store the colour of each pixel
MetadataAdditional data stored with the image (dimensions, file type, date)

Colour Depth

The colour depth determines how many different colours each pixel can display:

Colour DepthNumber of ColoursUse
1 bit2 (black/white)Simple icons
2 bits4Very basic graphics
4 bits16Simple diagrams
8 bits256GIF images
16 bits65,536High colour
24 bits16,777,216True colour (photos)

Formula: Number of colours = 2^(colour depth)

Calculating Image File Size

File size (bits) = width × height × colour depth

Worked Example

An image that is 1920 × 1080 pixels with 24-bit colour depth:

  • File size = 1,920 × 1,080 × 24 = 49,766,400 bits
  • ÷ 8 = 6,220,800 bytes
  • ÷ 1,024 = 6,075 KB
  • ÷ 1,024 = 5.93 MB

Effect of Resolution and Colour Depth on Quality

ChangeEffect on QualityEffect on File Size
Higher resolutionMore pixels = more detail = sharper imageLarger
Lower resolutionFewer pixels = less detail = blocky imageSmaller
Higher colour depthMore colours = more realisticLarger
Lower colour depthFewer colours = less realisticSmaller

---

Compression

Because media files are large, compression reduces file size for storage and transmission.

Lossy Compression

  • Permanently removes some data
  • Cannot be reversed to get the original back
  • Smaller file sizes
  • Examples: JPEG (images), MP3 (audio), MP4 (video)
  • Best for: photos, music, video where slight quality loss is acceptable

Lossless Compression

  • No data is lost — the original can be perfectly reconstructed
  • File sizes larger than lossy but smaller than uncompressed
  • Examples: PNG (images), FLAC (audio), ZIP (files)
  • Best for: text, medical images, professional audio where accuracy matters

---

Exam Tips

  • Always show your working in file size calculations — marks are awarded for the method
  • Remember the formula: file size = sample rate × bit depth × duration (sound) or width × height × colour depth (images)
  • Unit conversions: ÷ 8 for bits→bytes, ÷ 1,024 for bytes→KB→MB→GB
  • Know the trade-off: higher quality = larger file size
  • Be able to explain why increasing sample rate OR bit depth improves sound quality (they do different things)
  • Know that metadata is not included in the basic file size calculation but does add to actual file size
Don't understand a part?

Sign in and ask our AI tutor to explain any passage in plain English.

Try AI explanations →

More on Data Representation

Binary and Denary Hexadecimal Binary Arithmetic and Shifts Characters, Images and Sound Compression Character Encoding

← All GCSE Computer Science notes