Quadrature Incremental Encoder A&B phase
You can read about the encoder basics on the net, plenty of information.



As you can see on the picture, the A and B slots are shifted. No matter where you place the sensor A and B the signals will be unaffected, as long they are at exact distance of N slots.

A precision encoder is somehow different in construction. It may have tens of thousands increments. The physical size of each slot is much smaller than size of photo detector, so a trick is needed. This trick is called a  Moire pattern.

The light from LED goes through glass rotor disc with slots, then it passes through a fringe before reaching the photo detector. On four pictures you can see a movement of a single slot. See the light and dark areas shifting. The A and B photo detectors are placed where this minima and maxima occurs, the signals are sinewaves that are passed trough schmitt triggers to get quadrature signals.