Circuit design · Inputs: buttons, pull-ups, noise

Debounce: RC plus Schmitt

A button's contacts bounce for milliseconds; an RC slows the edge past the bounce, and a Schmitt input copes with the slow edge.