Unified approach to ADC characterization