Decoder,
Encoder and
Multiplexer
Week 06
Digital Logic Design [MCT-241]
Decoder
• A decoder is a combinational circuit that
converts binary information from n input
lines to a maximum of 2n unique output
lines.
• You can say the outputs are the
minterms of n-bit combination.
• For any combination of n-bit input the
corresponding minterm output will be ON
and all other will be OFF.
• What can be the use of the Decoder?
What is Inside a Decoder?
Decoders include one or more enable inputs to control the circuit operation.
• S o m e de c o de r s a re
constructed with NAND
gates.
• Since a NA ND gate
p rodu ce s t h e A ND
op e ratio n w it h a n
inve r t e d o u t p u t , it
becomes more economical
to generate the decoder
minte r ms in t h e ir
complemented form.
Construct 4x16
Decoder from 3x8
Decoders
ENCODERS
ENCODER
• An encoder is a digital circuit that performs
the inverse operation of a decoder.
• An encoder has 2n (or fewer) input lines and n
output lines.
• The output lines generate the binary code
corresponding to the input value
8x3 Encoder
8x3 Encoder
• What if more than one Inputs are 1?
• The output will map to which input?
• The solution is Priority Encoder.
• The operation of the priority encoder is such that if two
or more inputs are equal to 1 at the same time, the input
having the highest priority will take precedence.
• There is another problem with Encoder, that when the
Priority Encoder input is D0 ON, the output will be all zeros (00 for 4x2
Encoder and 000 for 8x3 Encoder) All zero output
corresponds to D0 turned ON.
• So, what if all inputs are 0? The output still be all 0’s.
But that is not D0.
• We can introduce one more output bit as the validity V.
Priority Encoder 4x2
Priority Encoder 4x2
Priority Encoder 4x2
Use of
Encoder
These can be used to detect the
Motor Position
[Link]
Multiplexer
Multiplexer
• A multiplexer is a combinational circuit that selects binary
information from one of many input lines and directs it to a
single output line.
• The selection of a particular input line is controlled by a set of
selection lines. Normally, there are 2n input lines and n selection
lines whose bit combinations determine which input is selected
Four-to-one-line multiplexer
Multiple-Bit Multiplexer
Multiplexer circuits can be combined
with common selection inputs to
provide multiple-bit selection logic.
What can be the use of
Multiplexer?
Quadruple two-to-one-line multiplexer
Boolean Function Implementation
• In Section 4.9, it was shown that a decoder can be used to implement
Boolean functions by employing external OR gates.
• An examination of the logic diagram of a multiplexer reveals that it is
essentially a decoder that includes the OR gate within the unit.
• We will now show a more efficient method for implementing a Boolean
function of n variables with a multiplexer that has n - 1 selection inputs.
• The first n - 1 variables of the function are connected to the selection
inputs of the multiplexer.
• The remaining single variable of the function is used for the data inputs. If
the single variable is denoted by z, each data input of the multiplexer will
be z, z’, 1, or 0.