An offset auto-calibration technique with cost-effective implementation for comparator and operational amplifier