# Relationship between sampling rate and number of levels/bits in PCM

It is said in the books that increasing the levels of quantisation codes in Pulse Code Modulation, or in other words increase the number of bits, could give a better signal.

I understand that having a higher number of bits can represent a value closer to the voltage of the original signal sent out. However, I don't understand how by just increasing the levels could give a better signal if the sampling rate remains constant.

I have a feeling that the sampling rate would affect more on the quality of the signal than increasing the number of levels or bits. Higher sampling rate takes more samples from the original signal to form another signal closer to it.

It's like so what if I had 64 bits if my sampling rate isn't high enough. Then increasing the number of bits will not affect anything to the sampled signal, will it? Is there a relationship between the sampling rate and the number of levels/bits during PCM quantisation that at one point, increasing either one of them(sampling rate or levels) will not do any difference until the other is being increased?

The solid lines in the graph follow the squares (i.e. have low resolution, for instance 8-bit), while the dashed lines have about 3 bits higher resolution, giving 8 levels per square. We see that the dashed line follows the curve closer than the solid line, even when the sampling rate doesn't change; we have 1 sample per 2 squares for both curves.

The sample rate is dictated by the Nyquist/Shannon sampling theorem, which says that you have to sample at least at twice the highest frequency in your signal. For audio we usually assume 20kHz as the higher limit, and so the CD's 44.1ksps (k samples per second) is sufficient to reproduce the audio signal. How accurate depends on the number of bits. The 11-bit sampled signal will follow the 8-bit signal more closely, and a 16-bit signal will do even better. Even at the same 44.1ksps a 64-bit resolution will still do better (even if in practice this is impossible to achieve).
So it all depends on what level of accuracy you expect. An 8-bit signal will not be acceptable for HiFi, but higher than 16-bit does not give an audible improvement.

• Thanks! I'm a little confused with the last sentence. Why wouldn't higher than 16-bit given an audible improvement when it provides a higher resolution and should give a signal that is closer to the original signal? – xenon Sep 20 '11 at 3:33
• @xEnOn - Because you can't hear it. In blind tests a 20-bit signal doesn't sound any better than a 16-bit signal. You simply can't hear the difference. OTOH you can hear the difference between an 8-bit signal and a 16-bit signal. – stevenvh Sep 20 '11 at 5:53

You need to read up on signal theory.

You are confusing two concepts, bandwidth and signal to noise ratio. Both contribute to the maximum amount of information a stream of samples can carry.

As Steven already pointed out, bandwidth is directly related to the sample rate. You simply can't unambiguously represent frequencies in the sampled stream above 1/2 the sampling frequency.

The number of bits/sample tells you the maximum signal/noise ratio the sample stream has. At best, the samples stream will be bounded to +- 1/2 LSB error per sample, for a total ambiguity of 1 LSB. If N is the number of bits/sample, then this signal to noise ratio is 2^N. Since a factor of 2 is 6.02 dB, the inherent signal to noise ratio when sampling with N bits is N*6.02 dB. For example, with 8 bits/sample the signal to noise ratio due to quantization noise alone is 48 dB. With 16 bit samples it's 96 dB. Any noise in the original signal adds to the quantization noise, lowering the overall signal/noise ratio.

Whether increasing the number of bits or the sample rate is useful depends on the properties of the signal you are trying to reproduce. You can sample at 8 kHz (with the appropriate anti-aliasing filters) and 6 bits and get understandable voice although it will have obvious noise on it. Sampling at 8 bits will make it noticeably better, but still with noticeable noise. Sampling at 16 bits will effectively make the noise dissappear for most purposes. At this point the digital stream is representing the voice about as well as it can, and with proper playback equipment most people would consider that a high quality recording. However, if you did the same with a music track it would sound mushed out and obviously missing the high tones. No amount of wider sampling will fix that. You need to increase the sampling rate to above 40 kHz at least (again, with good filters before the sampling) to get "Hi Fi" audio. 8 bit sampling at 50 kHz will have audible quantization noise, but might be more appropriate for some sound sources when the high frequencies matter.