INTRODUCTION TO HARDWARE AND SOFTWARE
(SKILL ORIENTED COURSE)
ENCODERS AND DECODERS
B.VENKATESH
(21BQ1A4907)
ENCODERS
• 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.
• Example: 8x3 Encoder
TRUTH TABLE :
LOGIC DIAGRAM :
Uses of Encoders :
1) Encoders are very common electronic circuits used
in all digital systems.
2) Encoders are used to translate the decimal values
to the binary in order to perform the binary
functions such as addition, subtraction,
multiplication, etc.
3) Other applications especially for Priority Encoders
may include detecting interrupts in microprocessor
Drawbacks of Encoders :
applications.
1) There is an ambiguity, when all outputs of
encoder are equal to zero.
2) If more than one input is active High, then the
encoder produces an output, which may not
be the correct code.
DECODERS
• 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.
• Example: 3-to-8 line decoder
Truth Table :
X Y Z D0 D1 D2 D3 D4 D5 D6 D7
0 0 0 1 0 0 0 0 0 0 0
0 0 1 0 1 0 0 0 0 0 0
0 1 0 0 0 1 0 0 0 0 0
0 1 1 0 0 0 1 0 0 0 0
1 0 0 0 0 0 0 1 0 0 0
1 0 1 0 0 0 0 0 1 0 0
1 1 0 0 0 0 0 0 0 1 0
1 1 1 0 0 0 0 0 0 0 1
Logic Diagram :
Uses of Decoders:
1) Decoders are used when we need to input data to a specific output
line. The most common application of this is in addressing core
memory in a computer, where we have a specified memory location
to store the input data.
2) They are used in code conversions like binary to decimal, like the 2
to 4 decoder.
3) It is used in data distribution as in de-multiplexing (combining
multiple input streams to one).
Drawbacks of standard Decoders:
Just like an Encoder the standard Decoder also suffers
from the same problem, if both the inputs are not
connected (logic X) the output will not remain as zero.
Instead the Decoder will consider it as logic 0 and the bit
O0 will be made high.
THE END