You are on page 1of 24

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.

• Some decoders are


constructed with
NAND gates.
• Since a NAND gate
produces the AND
operation with an
inverted output, it
becomes more
economical to
generate the
decoder minterms in
their 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
Priority when the input is D0 ON, the output will be all
zeros (00 for 4x2 Encoder and 000 for 8x3
Encoder 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
https://www.youtube.com/watch?v=s5gJpF8EKP8
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.
10/10/22
• 4
• 5
• 7
• 16
• 18
• 19
• 21
• 24
• 28
• 31
• 35
• 36
12/10/2022
•5
• 24
• 28
• 36

You might also like