🔊

Understanding Sound Representation in Computers

May 1, 2025

Representation of Sound in Computer Systems

Introduction

  • Sound is a vibration that propagates as an audible wave through the air.
  • In computers, sound is stored by converting analogue waves into digital binary data.
  • The conversion process is known as analogue-to-digital conversion.

Key Factors Affecting Sound Quality

  1. Sample Rate

    • Frequency at which the sound is sampled per second, measured in Hertz (Hz).
    • Example: A music CD is sampled at 44,100 Hz (44,100 samples per second).
    • Higher sample rates result in higher sound quality and larger file sizes.
  2. Bit Depth

    • Amount of detail captured in each sample.
    • Known as fidelity, sample resolution, or bit depth (in exams).
    • Higher bit depth means closer representation to the original sound, increasing both quality and file size.
    • Example: CD quality usually has a bit depth of 16 bits per sample.

Digital Sound Representation

  • Sound is represented as an analogue wave and converted into a digital format (binary).
  • The digital version is stored based on the sample rate and bit depth.
  • Bandwidth refers to the total range of numbers that can be represented.
  • Example provided: Sample rate of 6 Hz, bit depth of 4 bits, resulting in a bandwidth of 0 to 15.
  • Binary values range from 0000 to 1111.

Calculating Sound File Size

  • Formula: File Size = Sample Rate x Duration in seconds x Bit Depth
  • Example calculation provided:
    • 6 samples per second x 4 bits per sample x 3 seconds = 72 bits
    • Converted to bytes: 72 bits / 8 = 9 bytes

Recap

  • Sound File Size: Total number of bits in a sound file calculated from samples per second, bits per sample, and duration.
  • Bit Depth: Number of bits per sample; higher bit depth equals better quality and larger file size.
  • Sample Rate: Number of samples per second; higher rate equals better quality and larger file size.