Schmitt Trigger.

You may think about a 2-input chip like hc132: they are flexible enough for you to configure other logic easily from.