# EFFBIT

## Purpose:

Calculate the number of effective bits possible at a given frequency
for a quantizing device.

## Syntax:

EFFBIT(series, freq, fs)

series |
- |
A series or table. The input sinusoid. |

freq |
- |
A real, the known frequency of the input
sinusoid. Defaults to -1, estimate the frequency. |

fs |
- |
Optional. A real, the full scale input amplitude
of the device being tested. Defaults to abs(max(series)
- min(series)). |

## Returns:

A scalar constant.

## Example:

W1: gsin(1000,1/1000,4)

W2: quantize(W1, 8)

effbit(w2, 4)

returns 2.81, indicating the number of effective bits at a frequency
of 4 Hertz is slightly less than 3, the ideal number of bits for 8 levels
of quantization.

## Remarks:

This routine uses the SINFIT3 to fit a sine
wave to the input data with a known or unknown frequency. The input is
assumed to be a sinusoid.

The number of effective bits is calculated as:

where *F*_{s}
is the full scale input **fs** and
*e*_{rms}
is the RMS error between the input waveform and the fitted sinewave.

## See Also:

BITQUANT

LSINFIT

QUANTIZE

SINFIT3

SINFIT4

## References:

IEEE Std 1057-1994