Maybe to explain a little further, a 1024ppr encoder will give you 1,024 pulses per revolution (PPR). If it is dual channel, then you have two 1024 ppr outputs with one channel positioned so its pulses are delayed one quarter of the distance between the first channels pulses.
With the two channels offset that way, when the encoder rotates in one direction the A channel pulses lead the B channel pulses. When the encoder rotates in the other direction, the B pulses lead the A pulses. That way, the drive or plc can detect rotation direction as well as speed.
Clever, isn't it!