For digital signals, amplitude resolution (number of possible amplitude levels) is based on the number of bits used per sample. A bit is a place in memory for binary numbers (base 2) which can either be a 1 or a 0, just as a digit is a place which can hold a value from 0-9 for base-10 numbers.
Bit Reduction is a type of distortion effect where the number of possible amplitude values of a signal is reduced. When used as an audio effect, bit reduction can also be called bit crushing.
As a basic example, infinite clipping could be considered a type of bit-reduction distortion. With infinite clipping, there are only two possible amplitude values for the output signal. A signal with only two possible amplitude values could be represented using a single bit. Therefore, infinite clipping is equivalent to reducing the amplitude of a signal down to 1 bit.
The relationship between possible amplitude values and the number of bits () is: . When representing amplitude with both positive and negative values, the number of possible positive and negative amplitude values is: .
In concept, an input signal is processed to create an output signal as if fewer bits had been used to digitize the signal. In practice, the number of actual bits in memory does not change. Rather, the amplitude of the output signal is just rounded off to one of the possible amplitude levels.
In Matlab, there are several built-in functions which can be used to round the value of a number. Examples of these functions include: round, floor, ceil, and fix. In all cases, these functions round fractions to integers.
When the amplitude of an audio signal is within a range of -1 to 1, the only possible rounded integers are -1, 0, or 1. Rounding the signal when it is within this range will result in something similar to infinite clipping.
By temporarily increasing the amplitude of a signal to stretch it out over more possible integers, a greater number of possible amplitude values can be achieved. Therefore, the process of performing the bit-crush effect is: start with a signal within the range of -1 to 1, increase the amplitude to stretch it out over the appropriate level of integers, round the signal, then shrink the rounded signal back within a range of -1 to 1.
By considering the distortion created by reducing the number of bits as an audio effect, it can help explain the result of actually converting a 24-bit or 32-bit recording down to 16-bit (CD quality).
Now that we have created several types of distortion, let’s look at a couple methods to analyze and compare the different effects.