Can any body tell me how to determine the direction of rotation of a rotary encoder using logic gates only? Basically how do I determine which of the A and B signals comes first? Thanks