Next: Example: Binary Coded Decimals
Up: How does a signal
Previous: Elements of A/D Conversion
- Inputs: MIN and MAX of A/D converter, resolution N (number of
bits), sample x.
- Output: binary representation
of x.
- Variables: remainder REM, average AVG, current bit n.
- Initialization: REM = x, AVG = (MIN+MAX)/2.
- For each n between 1 and N:
- If REM
AVG: b(n) = 1, REM = REM - MAX/2.
- If REM < AVG: b(n) = 0, REM = REM - MIN/2.
- MIN = MIN/2, MAX = MAX/2, AVG = AVG/2.
- Notice that each element b(n) in the binary representation can only be
either 0 or 1.
Prof. Bernd-Peter Paris
1998-12-14