An encoder is a system that converts data's format.
With respect to position sensing, encoders sense mechanical motion and turn it into analog or digital signals.
Encoders can be classified into two types: linear and rotary.
Linear encoders are a sensor mounted above a linear strip and then sense the position moved.
Rotary encoders mounted on either the radial and axial ring then sense and keep track of the rotations of a motor.
Encoders can also be classified between incremental and absolute encoders.
Incremental encoders indicate the position and direction by pulsing based on certain set rotation portion.
An absolute encoders reads a magnetization pattern of a scale or ring and then knows the excat postion similar.
Incremental and absolute is similar to the difference between analog and digital.