- Why real-world sound is analogue, but computers store it as binary.
- How amplitude is measured using regular samples.
- The difference between sample rate, sample interval, and bit depth.
- How these choices affect sound quality and file size.
When you speak, clap, or play music, the air vibrates. A microphone can turn those vibrations into an electrical signal that changes smoothly over time.
Computers cannot directly store a perfectly smooth, continuous signal. They store data using binary: patterns of 0s and 1s. So, to store sound, the computer must create a digital approximation of the original sound wave.
Analogue sound
An analogue sound signal is continuous: it can change smoothly over time and its amplitude can take any value within a range.
Binary
Binary is a base-2 number system that uses only two digits: 0 and 1. Each binary digit is called a bit.
The big idea
A computer represents analogue sound by measuring the sound wave many times per second, then storing each measured amplitude as a binary number.
The amplitude of a sound wave is its height from the centre line at a particular moment.
For GCSE Computer Science, you should link amplitude to loudness:
- larger amplitude usually means a louder sound
- smaller amplitude usually means a quieter sound
Amplitude is not the same as pitch. Pitch is about how quickly the wave repeats; amplitude is about the wave’s height.
Amplitude
Amplitude is the size or height of a sound wave at a particular point in time. In digital sound, the amplitude is the value being sampled and stored.
Amplitude is not pitch
Do not write that higher amplitude means higher pitch. Higher amplitude means louder sound; pitch depends on frequency, which is a different idea.
To store sound, the computer does not store the whole smooth wave. Instead, it takes measurements at regular points in time. Each measurement is called a sample.
Sample
A sample is one measurement of the sound wave’s amplitude at a particular moment.
The diagram below shows a smooth analogue wave being sampled at regular intervals. Each dot is a sample, and each sample’s amplitude is converted into a digital value.

The sample interval is the time gap between two neighbouring samples.
For example, if a computer measures the sound every 0.001 seconds, then the sample interval is 0.001 seconds.
Sample interval
The sample interval is the time between one sample and the next sample.
The sample rate is the number of samples taken each second. It is usually measured in hertz, written as Hz. A sample rate of 8000 Hz means 8000 samples are taken every second.
Sample rate
The sample rate is the number of sound samples taken per second.
Sample interval and sample rate are closely connected:
sample rate=1sample interval in seconds\text{sample rate} = \frac{1}{\text{sample interval in seconds}}sample rate=sample interval in seconds1
and:
sample interval=1sample rate\text{sample interval} = \frac{1}{\text{sample rate}}sample interval=sample rate1
Converting sample interval to sample rate
A sound is sampled every 0.00025 seconds. Find the sample rate.
-
Use the reciprocal relationship because the sample interval tells you the time for one sample, but the sample rate asks how many samples fit into one second.
sample rate=1sample interval\text{sample rate} = \frac{1}{\text{sample interval}}sample rate=sample interval1
-
Substitute the sample interval of 0.00025 seconds.
sample rate=10.00025\text{sample rate} = \frac{1}{0.00025}sample rate=0.000251
-
Calculate the value and add the correct unit.
sample rate=4000\text{sample rate} = 4000sample rate=4000
The sample rate is 4000 Hz.
Sample rate sanity check
A smaller sample interval means samples are closer together, so the sample rate must be higher. A larger sample interval means fewer samples per second.
Once a sample has been taken, its amplitude must be stored as a binary number. The bit depth tells you how many bits are used for each sample.
Bit depth
Bit depth is the number of bits used to store the amplitude of one sound sample.
If the bit depth is higher, the computer has more possible binary values available for each sample. This means it can represent the amplitude more accurately.
The number of possible amplitude levels is:
number of amplitude levels=2bit depth\text{number of amplitude levels} = 2^{\text{bit depth}}number of amplitude levels=2bit depth
So:
| Bit depth | Possible amplitude levels | Example binary range |
|---|
| 1 bit | 2 levels | 0 to 1 |
| 2 bits | 4 levels | 00 to 11 |
| 3 bits | 8 levels | 000 to 111 |
| 8 bits | 256 levels | 0000 0000 to 1111 1111 |
With 8-bit samples, there are 256 possible codes. For example, one sampled amplitude level could be stored as 1010 0110.
Finding amplitude levels
A sound recording uses a bit depth of 8 bits per sample. How many different amplitude levels can it store?
-
Use the rule that each bit has two possible values, so the number of levels is found using a power of 2.
levels=2bit depth\text{levels} = 2^{\text{bit depth}}levels=2bit depth
-
Substitute the bit depth of 8.
levels=28\text{levels} = 2^8levels=28
-
Calculate the result.
28=2562^8 = 25628=256
The recording can store 256 different amplitude levels for each sample.
A real analogue amplitude could be almost any value. But a fixed bit depth only gives a fixed number of possible values.
This means the measured amplitude usually has to be rounded to the nearest available digital level. This rounding process is called quantisation.
Quantisation
Quantisation is the process of rounding a sampled analogue amplitude to the nearest value that can be represented using the available bit depth.
A higher bit depth gives more available levels, so the rounded value is usually closer to the original analogue amplitude. This improves the accuracy of the sound representation.
Encoding sampled amplitudes
A simple recording uses 4-bit samples. Four sampled amplitudes have been rounded to denary levels 2, 7, 12, and 15. Show how they would be stored in binary.
-
Use 4 bits for every sample because the bit depth is 4. This means each stored value must be written using exactly four binary digits.
-
Convert each denary amplitude level into a 4-bit binary value: 2 becomes 0010, 7 becomes 0111, 12 becomes 1100, and 15 becomes 1111.
-
Store the samples in time order, so the binary sound data is:
0010 0111 1100 1111
Mixing up sample rate and bit depth
Sample rate is about how often measurements are taken along the time axis. Bit depth is about how many possible amplitude values each measurement can be rounded to.
A digital sound recording is only an approximation of the original analogue sound.
Increasing the sample rate means the computer takes more measurements per second. This captures changes in the wave more frequently.
Increasing the bit depth means each amplitude measurement can be stored using more possible values. This reduces rounding error.
| Feature | What it controls | If increased |
|---|
| Sample rate | Number of samples per second | More detail over time |
| Sample interval | Time between samples | Shorter interval gives more samples |
| Bit depth | Bits used per sample | More possible amplitude levels |
| Amplitude | Height of the wave | Larger value means louder sound |
Quality versus storage
Higher sample rate and higher bit depth usually improve sound quality, but they also increase the amount of data that must be stored.
For uncompressed sound data, the file size depends on:
- sample rate
- duration
- bit depth
For one channel of sound:
size in bits=sample rate×duration in seconds×bit depth\text{size in bits} = \text{sample rate} \times \text{duration in seconds} \times \text{bit depth}size in bits=sample rate×duration in seconds×bit depth
Then convert:
- 8 bits = 1 byte
- 1 KiB = 1024 bytes
Estimating sound data size
A 10-second sound is sampled at 8000 Hz using a bit depth of 8 bits. Calculate the size of the sound data in KiB.
-
Find the number of samples by multiplying the sample rate by the duration.
samples=8000×10=80000\text{samples} = 8000 \times 10 = 80000samples=8000×10=80000
-
Find the number of bits by multiplying the number of samples by the bit depth.
bits=80000×8=640000\text{bits} = 80000 \times 8 = 640000bits=80000×8=640000
-
Convert bits to bytes by dividing by 8.
bytes=640000÷8=80000\text{bytes} = 640000 \div 8 = 80000bytes=640000÷8=80000
-
Convert bytes to KiB by dividing by 1024.
KiB=80000÷1024≈78.1\text{KiB} = 80000 \div 1024 \approx 78.1KiB=80000÷1024≈78.1
The sound data is about 78.1 KiB.
Using 1000 bytes for a KiB
For Edexcel GCSE Computer Science, use binary units: 1 KiB = 1024 bytes, not 1000 bytes.
Putting it all together, analogue sound is represented in binary like this:
- A microphone detects the analogue sound wave.
- The computer measures the wave’s amplitude at regular time intervals.
- Each measurement is a sample.
- Each sample is rounded to one of the available amplitude levels.
- The chosen level is stored as a binary number.
- The sequence of binary numbers represents the sound over time.
The stored sound is not the original smooth wave. It is a digital approximation made from lots of binary amplitude values.
In the exam
- Keep the axes separate: sample rate and sample interval are about time; amplitude and bit depth are about the height/value of each sample.
- If you are given a sample interval, convert it to seconds if needed, then use the reciprocal to find the sample rate.
- For bit depth, use powers of 2 for amplitude levels; for file size, multiply sample rate by duration by bit depth, then convert bits to bytes and bytes to KiB if asked.
Check yourself
- What is the difference between sample rate and bit depth?
- If the sample interval gets smaller, what happens to the sample rate?
- How many possible amplitude levels can be represented using 6-bit samples?