Encoder and Decoder

What is Decoder? 

  • The decoder is a combinational logic circuit used to decode the outputs from inputs. The decoder has 'n' inputs and a maximum of 2n outputs.


  • When the decoder is enabled, outputs will be active based on the combination of inputs.

Types of Decoders
  • 2 to 4 decoder
  • 3 to 8 decoder
  • 4 to 16 decoder

Explanation of  2 to 4 Decoder

This is the circuit design of two to four decoder.










Here are 2 input lines and it has 4 outputs.








This is how this decode function works.

Truth Table for decoder



 





  • The E pin always must be HIGH for the decoder to get output. 
  • For A and B if it is '0' and '0' in that case D0 will get selected '1' and other terminals will stay '0'. 
  • For A and B if it is '0' and '1' in that case D1 will get selected '1' and other terminals will stay '0'. 
  • For A and B if it is '1' and '0' in that case D2 will get selected '1' and other terminals will stay '0'. 
  • For A and B if it is '1' and '1' in that case D3 will get selected '1' and other terminals will stay '0'. 

Logic Circuit Diagram of the Decoder










Logic Circuit Simulation of the Decoder

  • Here is the video about the simulation process of the decoder .
             

What is Encoder? 

  • The encoder is a combinational logic circuit that performs the reverse operation of the Decoder. The encoder has a maximum of 2n  inputs and 'n' outputs.

  • When the encoder is enabled, outputs will be active based on the combination of inputs.

Types of Encoders
  • Binary encoder
  • 4 to 2 encoder
  • Decimal to BCD encoder
  • Octal to Binary encoder

Explanation of  4 to 2 Encoder 

This is the circuit design of four to two encoder.








Here are 4 input lines and it has 2 outputs.                 

Truth Table for encoder          






                   

  • For the values of A and B to '0' and '0' in the table D0 should be '1' and other terminals will stay '0'. 
  • For the values of A and B to '0' and '1' in the table D1 should be '1' and other terminals will stay '0'. 
  • For the values of A and B to '1' and '0' in the table D2 should be '1' and other terminals will stay '0'. 
  • For the values of A and B to '1' and '1' in the table D3 should be '1' and other terminals will stay '0'. 

Logic Circuit Diagram of the Encoder

           

Logic Circuit Simulation of the Encoder

  • Here is the video about the simulation process of the encoder.
             

Comments