Simulation of the hysteresis of a Schmitt trigger

A simple boolean algorithm is proposed for simulation of the input-output characteristic of a Schmitt trigger.