• Skip to main content
  • Skip to primary sidebar
  • Basic Electronics
  • Digital Electronics
  • Electronics Instrumentation
  • ADC
  • Comparisons

Electronics Coach

All About Electronics

Difference Between Encoder and Decoder

Both encoder and decoder are combinational logic circuits, however, one of the crucial difference between encoder and decoder is that an encoder provides binary code as its output. On the contrary, a decoder accepts binary code as its input.

An encoder is a device that converts the active data signal into a coded message format. However, a decoder performs inverse operation of the encoder and thus converts the coded input into original data input.

In order to have secured data transmission, encoders and decoders are employed in a communication system. The encoder and decoder perform encoding and decoding of data at transmitting and receiving end respectively.

Content: Encoder Vs Decoder

  1. Comparison Chart
  2. Definition
  3. Key Differences
  4. Conclusion

Comparison Chart

ParameterEncoderDecoder
Input appliedActive input signal (original message signal)Coded binary input
Output generatedCoded binary outputActive output signal (original message)
Input lines2nn
Output linesn2n
OpearationSimpleComplex
Basic logic elementOR gateAND gate along with NOT gate
ApplicationsE-mail , video encoders etc.Microprocessors, memory chips etc.

Definition of Encoder

It is a combinational circuit that is used to convert the input signal in the form of coded output (digital data stream). An encoder consists of ‘2n’ number of input lines but has only ‘n’ output lines. When an input signal is applied to an encoder then logic circuitry involved within it converts that particular input into coded binary output.

The figure below shows the basic structure of an encoder:

Encoder

Let us move further and have a look at 4 to 2 binary encoder that is shown below:

4 to 2 encoder

As we can see the four inputs provided to the encoder are A0, A1, A2, A3 and the 2 outputs are given as Z0 and Z1. It is noteworthy here that to have the particular binary code at the output of the encoder, out of the 4 inputs, only one of them can be high, for a given time.

Hence the truth table given below is for 4 to 2 binary encoder

InputOutput
A3A2A1A0Z1Z0
000100
001001
010010
100011

As we have already mentioned in the previous paragraph, that among all four, only one input will be 1 at a given time. This we can see in the truth table shown above.

Thus, the Boolean function for each output is given as

eqn3

The figure below shows OR gate realization of a 4 to 2 binary encoder

encoder logic circuit

 

Despite its advantage of providing the coded output, an encoder sometimes proves as a disadvantageous circuit and results in incorrect code, when 2 or more than 2 inputs are active high.

Definition of Decoder

A decoder is also a combinational circuit as encoder but its operation is exactly reverse as that of the encoder. A decoder is a device that generates the original signal as output from the coded input signal. It basically decodes the coded bits into another format.

A decoder converts n bit coded data inputs into 2n output lines. The particular coded data is converted into original information signal with the help of internal logic circuitry involved within the decoder.

Let’s have a look at the basic decoder circuit:

Decoder

Now, we will discuss 2 to 4 binary decoder in order to have a better understanding of decoders

2 to 4 decoder

Here, the applied inputs to the circuit are A0 and A1 that provides 4 outputs namely Z0, Z1, Z2, Z3 and E shows the enable signal of the decoder.

Thus we will have the truth table for 2 to 4 decoder as shown below:

EnableInputOutput
EA1A0Z3Z2Z1Z0
0--0000
1000001
1010010
1100100
1111000

Here, as we can see in the first row of the truth table that the enable terminal is low, thus no any input is fed to the device. Resultantly, which provide no result at the output. Hence, each combination of input will provide us high output when E will be high.

Hence the Boolean function for each output is given as:

eqn 1

Let’s have a look at the AND gate realization of the decoder using NOT gate

decoder cogic circuit 1

Key Differences Between Encoder and Decoder

  1. The encoder circuit basically converts the applied information signal into a coded digital bit stream. While a decoder performs reverse operation and recovers the original information signal from the coded bits.
  2. The applied input in case of an encoder is an active input signal. As against decoder accepts coded binary data as its input.
  3. The encoder generates coded data bits as its output that is fed to the decoder. On the contrary, a decoder provides an active output signal (original message signal) in response to the coded data bits.
  4. The number of inputs accepted by an encoder is 2n but decoder accepts only n inputs.
  5. The output lines for an encoder is n while for the decoder it is 2n.
  6. The operation of an encoder is quite simple but the operation of the decoder is complex as it needs to understand the coding format of the encoder.
  7. In a communication system, the encoder is installed at the transmitting end whereas decoder circuit is installed at the receiving side.

Conclusion

As we are aware of the fact that both are combinational circuits but the operation of the two is exactly reverse of each other. One performs encoding of the original information signal, while the other decodes the coded data bits in order to have the exact message signal.

Related Terms:

  1. Difference between Demultiplexer and Decoder
  2. Difference between Combinational and Sequential Logic Circuit
  3. Difference Between Multiplexer (MUX) and Demultiplexer (DEMUX)
  4. Digital Multiplexer
  5. Difference between Half Adder and Full Adder

Reader Interactions

Comments

  1. vishehsh kumar says

    October 24, 2018 at 7:25 am

    Nice article

    Reply
  2. Altaj Virani says

    November 8, 2018 at 3:28 pm

    Please upload difference between MUX and Encoder like this….. I’m having my final exams from this 14th🙏🙏🙏🙏

    Reply
  3. sangwi kudakwashe says

    February 9, 2021 at 9:12 pm

    good explanation.. I liked it

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Most Searched Terms

  • Difference Between Half Wave and Full Wave Rectifier
  • Sample and Hold Circuit
  • Full Wave Rectifier
  • Difference between LED and LASER
  • Characteristics of JFET
  • Varactor Diode
  • 3 Phase Rectifier
  • Number System
  • Difference Between Clipper and Clamper
  • Analogous Systems

Trending Terms

  • Difference Between LED and OLED
  • AC Servomotor
  • Pulse Code Modulation (PCM)
  • Difference Between Multiplexer (MUX) and Demultiplexer (DEMUX)
  • Peak Detector
  • Time Division Multiplexing (TDM)
  • Difference between RC and RL Circuit
  • Differential Amplifier

New Additions

  • Resonant Converters
  • AC Voltage Controllers
  • Static Circuit Breakers
  • Synchronous Motor Drives
  • DC Drives

Categories

  • Analog & Digital Communication
  • Basic Electronics
  • Comparisons
  • Control Systems
  • Digital Electronics
  • Electronics Instrumentation
  • Optical Fiber System
  • Power Electronics

Copyright © 2025 · Electronics Coach · Contact Us · About Us · Privacy