 Gray was most interested in using the codes to minimize errors in converting analog signals to digital; his codes are still used today for this purpose.Gray codes are used in linear and rotary position encoders (absolute encoders and quadrature encoders) in preference to weighted binary encoding.This avoids the possibility that, when multiple bits change in the binary representation of a position, a misread will result from some of the bits changing before others.