I am trying to use a LM324N as a comparator. Here is the circuit and the waveforms. As you can see the output does not exceed ~3.8V, why does it not go to 5V? Am I incorrect in expecting the output to reach 5V?
Also note that I initially did it without the feedback resistors and just an open loop with the same result, then copied their circuit example for a comparator out of the datasheet.

[![Circuit](https://i.stack.imgur.com/GiVOl.png)](https://i.stack.imgur.com/GiVOl.png)[![Waveforms](https://i.stack.imgur.com/vdXvc.png)](https://i.stack.imgur.com/vdXvc.png)