Encoder and Decoder in Digital Electronics: In digital electronics, encoder and decoder both are combinational circuits. They fall under the medium scale integrated circuit group (MSI). Encoders have “n” input and “m” output. The function of the decoder is opposite to encoder. In this article, we are going to discuss encoder and decoder briefly with logic diagram and truth table.
An encoder is a combinational circuit which basically performs the reverse operation of the decoder. An encoder has 2n or fewer numbers of inputs and n number of output lines. The outputs generated by the encoder are the binary code for the 2n input variables.
8 to 3 Lines Encoder Truth Table:
From the above truth table of the encoder, the only one input line is activated to logic 1 at any particular time. Otherwise, the circuit has no meaning. There are possible 28 = 256 combination, but only 8 input combinations are useful and the rest are don’t care combination. It is noted that D0 input is null to any of the gates because of all the binary outputs A, B and C must have the 0 input. For an output say A, we have to get the logic 1 input from the input lines D0 to D7. All 0’s output may also be obtained if all input variables D0 to D7 are at logic 0.
There are 4 types of Encoder:
- Priority encoder.
- Decimal to BCD encoder.
- Octal to Binary encoder.
- Hexadecimal to Binary encoder.
In digital systems, a binary code of n bits can be represented up to 2n distinct elements of the coded information. A decoder is a combinational circuit that converts n bits of binary information of input lines to a maximum of 2n unique output lines. Usually, decoders are designed as n to m lines decoder, where n is the number of input lines and m (2n) is the number of output lines.
3 to 8 lines decoder:
The 3 to 8 lines decoder consists of 3 input variables and produced 8 output lines. Each of the output lines represents one of the minterms generated from 3 variables. The internal combinational circuit is realized with the help of inverter (NOT Gate) and AND Gates.