Any sort of logic gate has a threshold ... I’ve included it along with the other two circuits in one simulation for you to experiment with. We’ve talked about Schmitt triggers with opamps ...