Lecture 12
Lecture 12
Encoders
• The combinational circuits that change the binary information into N
output lines are known as Encoders.
• The binary information is passed in the form of 2N input lines. The
output lines define the N-bit code for the binary information.
• In simple words, the Encoder performs the reverse operation of
the Decoder.
4 to 2 line Encoder
• 4 to 2 line encoder, there are total of four inputs, i.e., D0, D1, D2, and
D3, and two outputs, i.e., A and B. In 4-input lines, one input-line is set
to true at a time to get the respective binary code in the output side.
4 to 2 line Encoder
8 to 3 line Encoder:
Decimal to BCD Encoder
• The Decimal to BCD Encoder ten inputs,
i.e., D0, D1, D2, D3, D4, D5, D6, D7, D8, and
D9 and four outputs, i.e., A, B, C, and D. In
10-input lines, one input-line is set to true
at a time to get the respective BCD code in
the output side.
Applications of Encoders:
• Encoders are used to convert a decimal number into the binary
number. The objective is to perform a binary operation such as
addition, subtraction, multiplication, etc.
Decoder
• The combinational circuit that change the binary information into
2N output lines is known as Decoders.
• The output lines define the 2N-bit code for the binary information. At
a time, only one input line is activated for simplicity. The produced
2N-bit output code is equivalent to the binary information.
2 to 4 line decoder
• In the 2 to 4 line decoder, there is a total of three inputs, A0, and
A1 and E and four outputs, 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.
2 to 4 line decoder
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'.
3 to 8 line decoder:
3 to 8 line decoder:
4 to 16 line Decoder
• In the 4 to 16 line decoder, there is a total of 16 outputs, i.e., Y0, Y1,
Y2,……, Y16 and four inputs, i.e., A0, A1, A2, and A3.
4 to 16 line Decoder
4 to 16 line Decoder
• The 3 to 16 line decoder can be
constructed using either 2 to 4 decoder
or 3 to 8 decoder.
• When E= 0, the bottom decoder is
enabled and top is disabled. The if A2 A1
A0 = 100, we will get output 1 in Y4.
• When E= 1, the top decoder is enabled
and bottom is disabled. The if A2 A1 A0
= 100, we will get output 1 in Y12.
Difference between a Decoder and a DEMUX
• A decoder changes the format of an encrypted input stream. In contrast, a DEMUX is
utilized to build general-purpose logic which routes the single input signal into one of the
various output signals.
• Decoders are commonly classified into three categories, 2 to 4, 3 to 8, and 4 to 16
decoders. In contrast, the DEMUX is divided into 1-4, 1-8, and 1-16 DEMUX.
• A decoder takes n input lines and generates 2n output lines, which is then inverse of what
an encoder does. In contrast, the DEMUX sends data from one line to 2 possible output
lines.
• Decoders are the inverse function of encoders. In contrast, a DEMUX does the exact
opposite of what a multiplexer.
• The decoder doesn't contain select lines. On the other hand, the DEMUX includes single
lines.
• DEMUX is widely utilized in networking applications. On the other hand, decoding is
utilized in data-intensive applications where data must be changed into another format.
Propagation Delay and Race Around Condition