Given the maximum reference voltage and the minimum reference voltage, the reference voltage is 12-divided. The comparison of this and the input voltage V(in) is made by the comparator circuits, and the 'High' or 'Low output of the AND gate turns on the corresponding transistor and causes the LED to glow.