DMM Auto-Polarity / Polarity detection
Here is a typical dual-slope integrating meter chip operation (7107): 



After the auto-zero phase, the output of the integrator is 0 as far as the comparator is concerned. Then the unknown signal is integrated for 1000 counts. Following the fixed integration period, the state of the comparator will indicate whether the input was positive or negative, and which way the de-integration should proceed (DE+ or DE-). It is de-integrated with the reference towards zero (from either direction) and the time 0-1999 counts is measured and displayed as the reading.