LM393 is an open-collector output voltage comparator with two independent voltage comparators inside, and the output of each comparator has an open-collector structure. To make the comparator output a valid high level, the output terminal needs to be connected to the positive pole of the power supply. The value of the resistance depends on the size of the load. If you are interested in LM393, you can click on the following link:
https://www.utmel.com/componen....ts/lm393-low-offset-