The LM324 is a low voltage (2.7–5.5V) version of the dual and quad commodity op amps, The LM324 is the most cost effective solution for the applications where low voltage operation, space saving and low price are needed. The LM324 has rail-to-rail output swing capability and the input common-mode voltage range includes ground.
The small package saves space on PC boards, and enables the design of small portable electronic devices. It also allows the designer to place the device closer to the signal source to reduce noise pickup and increase signal integrity.
Here's the pinout of LM324 comparator :-