- A rotary encoder is a sensor or transducer for converting rotary motion or position to a series of electronic pulses.
An encoder is a device used to encode a signal (such as a bitstream) or data into a form that is acceptable for transmission or storage. This is usually done by means of a programmed algorithm, especially if any part is digital, while most analogue encoding is done with analog circuitry.

See also
External links
[1] - a very good overview of encoders.