There are many concepts missing in your training. How to use any IC. Physical, logical, functional, analog, electromagnetic principles beyond my commit to training here.
In
electronics, a
comparator is a device that compares two
voltages or
currents and outputs a digital signal indicating which is larger. It has two analog input terminals
and
and one binary digital output
. which like a switch to ground =0 or an open switch with the load being external part in series to V+ , limited by the driver I
OL output low current, typically 10 to 100 mA.
Better chips offer low input offset ( low mV) and come in 1,2 or 4 per package and can run with a single or bipolar supply with the input voltage comparison possible near ground even with a single Supply.
Perhaps someone else can volunteer a layout on a protoboard,,.