where ''x'' is a real number, ''Q''(''x'') an integer, and ''f''(''x'') is an arbitrary real-valued function that controls the "quantization law" of the particular coder.
In computer audio, a linear scale is most common. hereIf ''f''(''x'')=is a real valued number between ''x-0.5''.1 and 1, Thethe quantization operator can therefore be alternately expressed as,
where ''floor()'' returns the highest integer less than or equal to x and M is the number of bits used to quantize the value. WithUsing this quantization law, the [[signal- to noise ratio]] can be approximated as
where M is the number of bits being used to code the audio. From this equation, it is often said that the SNR is approximately 6dB per bit.
For example, inIn digital [[telephone|telephony]], two popular quantization schemes are the '[[A-law algorithm|A-law]]' (dominant in [[Europe]]) and '[[Mu-law algorithm|µ-law]]',each(dominant usingin a[[North logarithmicAmerica]] scaleand to[[Japan]]). These schemes map ana analoglinearly signalquantized to14 anbit integer value represented byto an 8- bit [[binary]]scale. The scale is nearly linear for small values and then increase logarithmically as amplitude numbergrows, butproviding eacha withgreater dynamic range than a differentpurely functionlinear ''f''scale.