Inside a rotary encoder there is a disc fixed to a shaft that is free to rotate. On one side of the disc is a signal source, on the other side a receiver. As the disc turns, the signal source is alternately allowed to pass and be blocked. When the signal is passed through the disc, an output pulse is generated. In the illustration shown here, signal A passes through the disc generating an output pulse. At the same time signal B is blocked and no output pulse is generated. The dotted line represents the position of the disc relative to the output pulses.