---
title: "Computer representation of sound"
subject: "Multimedia System"
chapter: 2
key: "semester_8/multimedia_system:computer-representation-of-sound"
source: https://www.bctengineer.com/q/semester_8/multimedia_system/computer-representation-of-sound
site: BCT Engineering
---

# Computer representation of sound

Multimedia System · Chapter 2: Sound / Audio System

- Asked in: 2072 Asoj, 6 marks
- Video: [How Digital Audio Works - Computerphile](https://www.youtube.com/watch?v=1RIA9U5oXro) — Computerphile
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_8/multimedia_system/computer-representation-of-sound
- Whole chapter: https://www.bctengineer.com/md/semester_8/multimedia_system/chapter-2

## Question

Explain the computer representation of sound with example.

## Short answer

Sound is digitised by PCM: sampling, quantisation and coding, following the Nyquist theorem. Example: 1 second of CD-quality stereo needs 44,100 x 16 x 2 = 1,411,200 bits = 176,400 bytes. A 3-bit quantiser turns 3.2, 5.8, 6.9, 4.1 into 011, 110, 111, 100.

## Answer

Sound is a continuous analogue pressure wave, so it must be converted into a sequence of numbers before a computer can store it. This conversion is called **digitisation** or **pulse code modulation (PCM)** and has three steps: sampling, quantisation and coding.

```text
 amplitude
   |    .--.        .--.
   |  .'    '.    .'    '.      o = samples taken at
   | o        o  o        o     equal time intervals
   +----|----|----|----|----> time
         T = 1/sampling rate
```

#### 1. Sampling

The amplitude of the wave is measured at regular time intervals. The number of samples per second is the **sampling rate** (Hz). By the **Nyquist theorem** the sampling rate must be at least twice the highest frequency in the signal. Human hearing reaches about 20 kHz, so CD audio uses 44.1 kHz; telephone speech (up to about 4 kHz) uses 8 kHz.

#### 2. Quantisation

Each sample is rounded to the nearest of a fixed number of levels. The number of bits per sample (**resolution**) decides the levels: 8 bits give 2^8 = 256 levels, 16 bits give 65,536 levels. The rounding causes quantisation noise, which falls as bits increase.

#### 3. Coding

The quantised values are written as binary numbers (and optionally compressed) in a file such as WAV.

#### Example

Record 1 second of CD-quality stereo sound: 44,100 samples/s x 16 bits x 2 channels = 1,411,200 bits = 176,400 bytes per second. A 3 minute song therefore needs 176,400 x 180 = 31,752,000 bytes (about 31.8 MB).

For a 3-bit quantiser (8 levels, 0 to 7), samples of a wave at 3.2, 5.8, 6.9, 4.1 become 3, 6, 7, 4 and are stored as 011, 110, 111, 100.

Playback does the reverse: a DAC converts the numbers to voltages and a filter smooths them to an analogue wave.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Which are the three steps of PCM digitisation?
   A. Filtering, mixing, playing
   B. Recording, editing, saving
   C. Sampling, quantisation, coding
   D. Compression, decoding, playback
   Answer: C. Digitisation consists of sampling, quantisation and coding. (Key point: Digitisation steps)

2. According to the Nyquist theorem, what must the sampling rate be?
   A. At least twice the highest frequency in the signal
   B. Equal to the highest frequency
   C. Half the highest frequency
   D. Independent of the signal frequency
   Answer: A. The sampling rate must be at least twice the highest frequency, which is why CD audio uses 44.1 KHz for 20 KHz hearing. (Key point: Nyquist theorem)

3. How many quantisation levels do 16 bits give?
   A. 256
   B. 65,536
   C. 1,024
   D. 16
   Answer: B. 16 bits give 2^16 = 65,536 levels. (Key point: Quantisation levels)

4. How many bytes per second does CD-quality stereo sound need (44,100 Hz, 16 bits, 2 channels)?
   A. 88,200
   B. 352,800
   C. 1,411,200
   D. 176,400
   Answer: D. 44,100 x 16 x 2 = 1,411,200 bits/s, which is 176,400 bytes/s. (Key point: CD-quality data rate)

## Related in other subjects

- [Boundary representation of 3D objects](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Aboundary-representation-technique) — Computer Graphics, chapter 6, asked 4×
- [Space partitioning representation](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Aspace-partitioning-representation) — Computer Graphics, chapter 6
- [Parametric and non-parametric curve representation](https://www.bctengineer.com/question.md?key=semester_4%2Fcomputer_aided_design%3Aparametric-vs-nonparametric-curves) — Computer Aided Design, chapter 2
