The encoders and decoders are used in many electronics projects to compress the multiple number of inputs into smaller number of outputs. ... For example, in 4-2 encoder, if we give 4 inputs it produces only 2 outputs. The decoder is an electronic device that is used to convert digital signal to an analogue signal.Apr 21, 2017