Deriving the 1 bit = 6 dB rule of thumb

This week, a more mathematical topic. Sometime ago, we—friends and I—were discussing the fidelity of various signals, and how many bits were needed for an optimal digitization of the signal, given known characteristics such as spectrum and signal-to-noise ratio.

Indeed, at some point, when adding bits, you only add more power to represent noise in the signal. There’s a rule of thumb that say that for every bit you add, you can represent a signal with \approx 6 dB more of signal to noise ratio. Let me show you how you derive such a result.

The SNR, or signal to noise ratio, is a measure that compares the power of the signal to the power of the noise. Both are squared (by the very definition of the power). We therefore have:


where A stands for amplitude and P for power. A frequent measure to map the SNR to a (somewhat linear) perceptual measure is the decibel, and the SNR is often expressed in decibels:

dB(SNR) = 10 \log_{10} SNR

I usually use \ln for the natural log, base e logarithm, \lg for base 2 logarithms, most often used in computer science, and \log for base 10 logarithms, but to make sure it is unambiguous, I’ll use \log_{10} to make clear it is the base 10 logarithm. So, back to the SNR: when we are measuring the amplitude of the signal, we really mean the average amplitude, and likewise for the error. We can rewrite the SNR equation as:


OK, let us derive that 1 bit \approx 6 dB result. Let us first suppose that we are interested in the PSNR (peak signal-to-noise ratio) of an n bits signal, where only the last bit is corrupted. Considering the PSNR lets us throw away the expectations (E, in the formulæ) and write:

dB(PSNR)=10 \log_{10} \left(\frac{2^n-1}{1}\right)^2

because the maximum value of a n bits integer is not 2^n but 2^n-1, and that we suppose, as a simplification, that the last bit is always wrong, which contributes a (squared) error of \leqslant 1. So, simplifying the previous formula, we have:

dB(PSNR) \geqslant 10 \log_{10}(2^n-1)^2

= 10 \log_{10}(2^n(1-2^{-n}))^2

= 10 \log_{10}(2^n)^2 + 10 \log_{10}(1-2^{-n})^2

= n 20 \log_{10} 2 + 20 \log_{10}(1-2^{-n})

\approx n 6.02059\ldots

because the second term, 20 \log_{10}(1-2^{-n}), goes to zero very rapidly with a growing n. Already, n=10 gives \approx{}-0.0085. Therefore, it is true that adding a bit (growing n) adds (at least) about 6.02 dB to the signal. Using this relation, it is now easier to find how many bits you need to encode a signal with sufficient precision given the amount of noise embedded in it.

(Conversely, you now know that if a sound card touts a 90dB SNR, it really means that if offers 90/6.02 \approx 15 bits restitution, even if it claims to have 24 bits DACs.)

However, that derivation is only for the PSNR, which doesn’t take into account for all of the signal’s characteristics. A much better approximate measure is the RMS, for root mean square—not for the eccentric hippie. RMS is a more realistic approximate measure for ondulatory phenomena as it approximate the average power of the signal. The RMS of a function f on interval a,b is given by:

RMS(f) = \sqrt{ \frac{1}{b-a} \int_{a}^b f(t)^2 \partial t}

which takes different forms depending on the function f. Taking the sine as a “typical function” (which remains entirely debatable), on a complete period (that is, on the interval 0,2\pi) we have:

RMS(\sin)= \sqrt{ \frac{1}{2\pi}\int_{0}^{2\pi}\sin(t)^2 \partial t}

= \sqrt{\frac{1}{2\pi}\pi}

= \frac{1}{\sqrt{2}}

so the RMS of a sine is \frac{1}{\sqrt{2}}. Let us plug this value A, into the previous derivation:

dB(RMS) \geqslant 10 \log_{10}(A(2^n-1))^2

= 20 \log_{10}(2^n-1) + 20 \log_{10}A

= n 20 \log_{10} 2 + 20 \log_{10}(1-2^{-n})+ 20 \log_{10}A

which leads to the expected result. Since A=\frac{1}{\sqrt{2}}, the last term is \approx -3.010 dB, so the final result is still that each additional bit yields an increase of (at least) \approx 6.02 dB.

This result bugged me a long time until I figured out how to derive it by myself. As you can see, there’s nothing to it: we start from hypotheses (like the signal is sinusoidal) and we apply the decibel formula quite mechanically.

reference :

국내에선 돈주고 사봐야 하는 전문자료(?)들이 외국 웹에 보면 널려있다.
새삼 영어의 중요성을 느끼면서 역시 세상은 넓다는 생각도 해본다.


Hello, I'm Dr.kchris, a neuroscience researcher. I love studying and trying new things and also love challenging myself. Have a great day! :)

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.