1) As far as I understand, a voltage comparator has two input terminals whose potential must be within the range determined by the two other terminals (represented as midpoints of the triangle sides. What are they called?). What happens if one or more of those potentials is outside that range?

2) I know the input terminals are + and -, but what about the "midpoint terminals"? Must the largest tension always be connected to a certain terminal and not the other? If I reverse the terminals, do the rules of the comparator invert?

3) How do I use a comparator to lead the largest input tension to a pre-defined point in the circuit and the smallest to another point? In other words, I need a circuit that takes two input tensions gives two outputs -- the largest of the inputs, say, in the + terminal and the other in the - terminal. How do I do that?