An encoder is a device that compiles and converts a signal (such as a bit stream) or data into a signal form that can be used for communication, transmission, and storage. The encoder converts angular displacement or linear displacement into electrical signals. The former is called a code wheel and the latter is called a code ruler