From ArticleWorld

An encoder is a device that encodes data or signal, so that it can be further transmitted, stored or re-encoded so that it can be used by other devices. Encoding is widely used in communication and electronics, both for encryption and for compression or adaptation to transmission environments.

The absolute rotary encoder

The absolute rotary encoder is a canonical example of encoders. A rotary encoder converts the angular position of an axle to digital code. It is often used in photographic lenses and robotics. Absolute rotary encoders produce one digital code and only one for a given angle of the shaft. The rotary encoder is built using a metal sheet connected to a source of electrical power, cut in a certain pattern and strongly fixed to the shaft. A sliding contacts runs by the metal sheet, at different distances, and, as the disk rotates in the shaft, some contacts touch the metals and other fall in the pattern's gaps. The pattern is created so that each position can determine a single, unique binary code. The data obtained from this encoder can be used by any digital devices, from simple PICs to complex computers.