In a perfect world, a switch is characterized by having two states, on and off. Unfortunately, in the real world, switches can hover, or bounce between the two states, creating a distorted signal. Switch bounce can be incorrectly read as additional pulses by a microcontroller. To prevent this, de-bounce circuitry is used to “square up” the output. Because mechanical encoders are essentially a series of mechanical switches, they require de-bounce circuitry and programming to ensure that the output can be used.