Lecture 6
Lecture 6
Decoders
Encoder and Decoder
• An encoder is a combinational circuit that converts binary information
in the form of a 2N input lines into N output lines, which represent N
bit code for the input. For simple encoders, it is assumed that only
one input line is active at a time.
• A decoder does the opposite job of an encoder. It is a combinational
circuit that converts n lines of input into 2n lines of output.
Decoder
• The combinational circuit that change the binary information into 2N output
lines is known as Decoders. The binary information is passed in the form of
N input lines. The output lines define the 2N-bit code for the binary
information.
• In simple words, the Decoder performs the reverse operation of
the Encoder. At a time, only one input line is activated for simplicity. The
produced 2N-bit output code is equivalent to the binary information.
There are various types of decoders which are as follows:
2 to 4 line decoder:
• In the 2 to 4 line decoder, there is a total of three inputs, i.e., A0, and
A1 and E and four outputs, i.e., Y0, Y1, Y2, and Y3.
• For each combination of inputs, when the enable 'E' is set to 1, one
of these four outputs will be 1.
• The block diagram and the truth table of the 2 to 4 line decoder are
given below.
• Block Diagram:
• Truth Table:
• The logical expression of the term Y0, Y1, Y2, and Y3 is as follows:
Y3=E.A1.A0
Y2=E.A1.A0‘
Y1=E.A1'.A0
Y0=E.A1'.A0'
• Logical circuit of the above expressions is given below:
3 to 8 line decoder:
• The 3 to 8 line decoder is also known as Binary to Octal Decoder. In a
3 to 8 line decoder, there is a total of eight outputs, i.e., Y0, Y1, Y2, Y3,
Y4, Y5, Y6, and Y7 and three outputs, i.e., A0, A1, and A2.
• This circuit has an enable input 'E'. Just like 2 to 4 line decoder, when
enable 'E' is set to 1, one of these four outputs will be 1.
• The block diagram and the truth table of the 3 to 8 line encoder are
given below.
• Block Diagram:
• Truth Table:
• The logical expression of the term Y0, Y1, Y2, Y3, Y4, Y5, Y6, and Y7 is as
follows:
Y0=A0'.A1'.A2'
Y1=A0.A1'.A2'
Y2=A0'.A1.A2'
Y3=A0.A1.A2'
Y4=A0'.A1'.A2
Y5=A0.A1'.A2
Y6=A0'.A1.A2
Y7=A0.A1.A2
• Logical circuit of the above expressions is given below:
Applications:
• Decoders are combinational circuits implemented with the help of logic
gates.
• They are used in code conversions like binary to decimal, like the 2 to 4
decoder.
• The decoder is used whenever an output or a group of output is to be
activated only on the occurrence of a specific combination of input signals.
• It may also be used for data distribution.
• The decoder is used as address decoders in CPU memory location
identification.
• It is also be used in electronic circuits to convert instruction into CPU
control signals.
• They are mainly used in logical circuits, data transfer.
• They can also be used to create simple other digital logics like half
adders and full adders and some other digital design also.
The End