Shawon Shahryiar over at Embedded Lab has written an article on XMega analog comparator:
Generally a comparator is a device that compares two quantities. Analog comparators compare voltage – an analog quantity. An analog comparator is essentially an op-amp with infinite gain. It has one output and two inputs. The output is switched to VDD or ground (0V) depending on the relative voltage levels in the two input pins. Just as with an op-amp the two inputs are labeled as inverting input (INV) and non-inverting input (NINV). When the non-inverting input voltage is higher than that of the inverting input, the output switches to VDD and when it is the other way, the output switches to ground. Thus we get two logic states.
Details at Embedded Lab blog.