Comparator with positive feedback.
Supply voltages of the comparator:
V+ = 5V
V- = 0V
Threshold voltage of the comparator:
V_th = 2.5V
Upper and lower threshold voltages of the Schmitt trigger:
V_u = 3V
V_l = 2V
Functionality:
V_out = V- AND V_in > V_u
-> V_out = V+
V_out = V+ AND V_in < V_l
-> V_out = V-