Chapter - 1

Key Words: Quantization, Bit depth

Quantization

🎯 Learning Objectives:

In this topic, on our quest to create a discrete signal out of a continuous signal, we will begin the discussion on how amplitude values of each sampled signal is represented and stored. We will discuss how the determination of resolution of a sample is lossy when compared to sampling. Finally, we will look at the real world effects of quantization and bit depth on digital audio - namely noise and dynamic range.


So far on our quest for converting analog audio signals the digital ones we have only been looking at one aspect of the signal, it is timing. Sampling, as we found out is just the process of selecting a regular time interval at which we make our measurements. So at a sampling rate of 44.1kHz44.1 kHz, we have evenly split our signal along the time axis into 44100 points every second and at these points we can measure the signal amplitude. All the rest of the points in between are skipped. But throughout this entire process, we never really gave much thought on how we are actually going to measure and store the signal amplitude. We just assumed that at every sample point we would get an accurate measure of what the analog signal is, but this is a faulty assumption for the very same reason that we needed to sample the signal in the first place. An analog signal is a continuous signal. There are infinitely many points between two time intervals where the signal can be measured. So to have any chance in representing analog signals in the digital domain we sample the signal at discrete points in time and ignore the rest. Similarly, each point on the amplitude scale can have a theoretically infinite resolution with an unending number of digits. So we really need to put a foot down and draw a line to represent the maximum resolution that we are willing to maintain.

We can think about it as the accuracy of measurement. If the resolution is really small the accuracy of the measurement drops as well and if we have a large resolution the measurements become super accurate but we have to deal with the technical task of having to measure with such high accuracy consistently and fast enough before the next sampling interval arrives. We need top of the line hardware. Another consideration with high resolution and accuracy is the storage capacity needed to represent and save all the sampled points and the bandwidth required to transmit large amounts of data associated with highly precise representation. So like any discipline of engineering finding the right resolution is a balancing act unlike the sampling rate governed by the sampling theorem which pretty much guarantees lossless conversion beyond a certain rate. The determination of resolution is not quite so lossless but what real world effects does it have on sound.

We saw that sampling along the time axis determines the maximum frequency we want to represents. The higher the sampling rate the higher is the capacity for frequency representation within the digitized signal. And what about sample resolution then? The size of the sampling interval along the amplitude axis or the y-axis in this case determines the maximum dynamic range that the digital signal can represent.

Dynamic range is the range between the highest and the lowest amplitude moments in the sound.

When we talk about resolution, we mean the accuracy of values of sample points being maintained the decimal point or floating point accuracy. It have nothing to do with the quality of the sound itself. The resolution only impacts the amount of noise present in the digitized signal. This noise affects the overall dynamic range that is available.

Let us first see the animation to further understand and then we will discuss below.

Let us take an arbitrary signal which is sampled along the time axis. Let us scale into eight discrete levels at every sampled point. Our measurements have to stick to one of these discrete levels. The eight levels are regarded as the resolution of the digitization process. This process of mapping the analog signal values to a limited range of discrete values as in the animation is called quantization. We can think about quantization as a latch which either pulls or pushes a sample value to the nearest discrete measure. As we can see in the animation with eight discrete points the resolution is quite poor. This is in fact a three bit resolution. We could at this point of time plot a graph with the y-axis as the difference between the original analog signal value and the discrete digital value that the signal is constrained to. We will get something like noise, which represents the quantization error within our digital signals. When compared to the original analog signal this error causes unintended noise to permeate into the digital signal due to the low number of discrete points and the dynamic range of the digitized signal is just the difference between the highest discrete point to the amplitude of the quantization error itself. Since any audio representation below this noise floor is just masked by the noise or the error signal.


🧪 Interactive Demo

Signal Quantization — Visual + Audio

Slider sets bit depth (1–16). Play starts audio (440 Hz sine) quantized to the chosen bit depth and auto-cycles bits.

8 bits
Levels: 256 (28)
RMS noise: 0.00000

📝 Key Takeaways

  • Add key takeaway

🧠 Quick Quiz

1️⃣ What does quantization primarily do in the analog-to-digital conversion process?

2️⃣ How does decreasing the bit depth affect quantization noise?

3️⃣ If a system uses 8-bit quantization, how many discrete quantization levels are available?

4️⃣ What happens when you increase the number of quantization bits for a sine wave?

5️⃣ Quantization noise can be described as:


Numerical MCQs

1️⃣ A 3-bit quantizer is used. How many discrete quantization levels are available?

2️⃣ For an 8-bit uniform quantizer with a full-scale voltage range of 0–4 V, what is the quantization step size (Δ)?

3️⃣ A signal with a maximum amplitude of 5 V is quantized using 4 bits. What is the total number of quantization levels?

4️⃣ For a 12-bit quantizer, what is the theoretical Signal-to-Quantization-Noise Ratio (SQNR) in dB? (Use SQNR ≈ 6.02 × N + 1.76)

5️⃣ A uniform quantizer has a step size of Δ = 0.5 V. If the input sample is 2.36 V, to what value will it be quantized?