Debounce a button: a schematic puzzle
A real button bounces. One resistor and one capacitor turn the chatter into a single clean press.
With the button released, the 10 kΩ resistor pulls OUT up to 3.3 V and the capacitor sits charged. Press, and the button shorts OUT to ground: 0 V. Real contacts bounce for a few milliseconds, opening and closing dozens of times. The capacitor is a shock absorber: every time the contact opens, OUT can only climb at the pace 10 kΩ × 100 nF allows, about 1 ms per time constant, so it never reaches the logic threshold before the contact closes again. One press becomes one edge.
10 kΩ pull-up: Gives OUT a definite level when nothing else is driving it: 3.3 V through 10 kΩ, costing only 0.33 mA while the button is held. It is also half of the timing pair with the capacitor.
Push button: The only part the user touches. Closed, it ties OUT to ground; open, it does nothing and the pull-up wins. Either way round works, which is why it is drawn without polarity.
100 nF capacitor: The shock absorber. With the 10 kΩ it sets a time constant of about 1 ms, long enough to ride through contact bounce and short enough that the press still feels instant.