The circle can rotate clockwise and back. By using minimum hardware build a circuit to indicate the direction of rotating?
Two sensors are required to determine the direction of rotating. They are placed as at the drawing. One of the m is joined to the data input of D flip-flop, and a subsequent one - to the clock input. When the circle rotates the way clock sensor notices the light first whereas D input (i.e., second sensor) is zero - the output of the flip-flop equivalents zero, and when D input sensor "fires" first and the output of the flip-flop becomes high.