4.decoder and Encoder
4.decoder and Encoder
Decoders
Digital information represented in some binary form must be
converted into some alternate binary form.
𝑛 to 2^𝑛-line decoder.
Only one of the 2^𝑛 output lines responds, with a logic-1, to a given
input combination of values on its 𝑛-input lines.
Decoders
Definition:
A decoder is a combinational circuit that converts binary
information from n input lines to a maximum of unique output
lines.
The three inputs are decoded into eight outputs, each output representing
one of the minterms of the 3-input variables.
3 to 8 LINE DECODER
Decoders
Truth Table of 3 X 8 line decoder:
From the truth table it is observed that the output variables are mutually exclusive
because only one output can be equal to 1 at any one time. The output line whose
value is equal to 1 represents the minterm equivalent of the binary number presently
available in the input lines.
Encoders
An encoder has a number of input lines, only one of which input is
activated at a given time and produces an N-bit output code,
depending on which input is activated.
Encoders
Encoder 8 x 3
X = D4 + D5 + D6 + D7
Y = D2 +D3 + D6 + D7
Z = D1 + D3 + D5 + D7
Encoders
If two or more inputs are equal to 1 at the same time, the input having
the highest priority will take precedence.
2-4 decoder with enable
3 to 8 decoder using 2 to 4 decoder
4 to 16 decoder using 2 to 4 decoder
Decoders
Combinational Logic Implementation
Decoder provides minterms of n input variables.
Since any Boolean function can be expressed in sum of minterms
canonical form, one can use a decoder to generate the minterms and
an external OR gate to form the sum.
Decoders
Example: Minterms using OR
Gates
f1(x, y, z) = ∑ (1, 2, 4, 5)
f2(x, y, z) = ∑ (1,5,7)
Decoders
Example: Implement a full adder circuit with a decoder and two OR gates.
S(x, y, z) = ∑ (1, 2, 4, 7)
C(x, y, z) = ∑ (3, 5, 6, 7)