Why does my LM311 comparator's output seem to be inverted?
The LM311's output is &quot;open-collector&quot; meaning that the output is internally tied to the collector of a transistor. The LM311 will turn on and off the transistor which will connect the output to GND or make the output high impedance. It will not source current or make the output go to the positive power supply.
What you need to add in your circuit is a pull up resistor. It is a resistor between the collector output and the power supply that will bring the voltage at the collector output up to the supply. Also you will need to connect the emitter out pin to GND to provide a current path to GND through the internal transistor.