PURPOSE: To attain the rewriting of a memory and the resetting of a reference value by changing address areas storing data in which all are '0' or all are '1' in correspondence with the reference value which obtains a relative relation with an input signal in a D/A conversion means.
CONSTITUTION: In the memory 4, '0' and '1' are previously stored in the prescribed address areas in correspondence with the reference value. When the signal is inputted to an A/D converter 3, the input signal is converted into the digital signal of (n) bits in the A/D converter 3 and is inputted to the address line of the memory 4. The signal is varied in response to the voltage of the input signal. When the voltage becomes large, for example, the bit is set in the MSB bit of (n) bits. When a value obtained in the A/D converter 3 is below (011111...0) for example, data in which all are '0' are red from the memory 4, and the analogue potential of almost '0' is outputted from the D/A converter 5. Since the reference value is set digitally and the value can be changed digitally, the minute adjustment and resetting of the reference value can accurately be executed.