Gray code ADC based on an analog neural circuit