Decoder
Decoder
• WHAT IS DECODER?
Decoder is a combinational circuit that has ‘n’ input lines and maximum
of 2n output lines. One of these outputs will be active High based on the
combination of inputs present, when the decoder is enabled. That means
decoder detects a particular code.
Suppose the decoder we have got is a 3x8 decoder. So this means, that
there will be 3 inputs and 8 outputs. Each decoder has 2 main gates used
NOT & AND gates.
Consider the inputs to be A,B,C and the corresponding outputs are taken
from
D0, D1, D2, D3, D4, D5, D6, D7,
FIGURE 1:: A 3x8
Decoder circuit
diagram
Good! Now draw the wires from the corresponding inputs to the AND gate.
The inputs are drawn from the input from the Binary representation chart.
i.e. (For a 3x8 decoder, 3 bits are necessary for representation)
TABLE 1:: BINARY
REPRESENTATION USING 3 BIT
A B C
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
The Light Green line corresponds to 0 and the dark green refers to 1
Notice the difference? Now compare every input to Figure 1 and table 1 and you’ll
get the results
• Now, as you can see in the figures above, you’re seeing a high input next to
D1 while all the others are low. What is up with that? Lets find out.
Recall to the first line you read in this note. It said, a Decoder gives one
High input and all others are low.
So how do we decide which value will be high? Let us see that.
✓ Lets see the example where A,B,C all are 0. i.e. 000 and the output is
from D0.
[Note:: The previous time we considered 000 was for
desiging purpose, donot confuse with output finding ]
Now. We can see that all the inputs taken are inverted inputs
Now. We can see that the inputs taken from A,B are inverted inputs
And the input from C is original output
Here is how the rest of the circuit looks when the user
input is 001
NOTICE THAT
ONLY D1 IS HIGH
OUTPUT WHILE
THE REST HAS
LOW OUTPUT
✓ Lets see the example where A,B,C are 101 and the output is from D5.
Now. We can see that the inputs taken from A,C are original inputs
And the input from B is original value
So from A and C original value i.e. 1 is given to the AND gate and
from B the inverted value of 0 i.e 1 is sent to the AND gate
Here is how the rest of the circuit looks when the user input is 101
NOTICE THAT
ONLY D5 IS HIGH
OUTPUT WHILE
THE REST HAS
LOW OUTPUT
If we look at the outputs from every input combination of a 3x8
decoder, we can see a pattern
A B C 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
Lets see the combination 000. Here the D0 is supposed to give low output
and all other are giving high output
Lets see another example. 010. Here D2 is supposed to give a low output and all
others give high output
If we look at the outputs from every input combination of a 3x8 decoder, we can see a
pattern
A B C D0 D1 D2 D3 D4 D5 D6 D7
0 0 0 0 1 1 1 1 1 1 1
0 0 1 1 0 1 1 1 1 1 1
0 1 0 1 1 0 1 1 1 1 1
0 1 1 1 1 1 0 1 1 1 1
1 0 0 1 1 1 1 0 1 1 1
1 0 1 1 1 1 1 1 0 1 1
1 1 0 1 1 1 1 1 1 0 1
1 1 1 1 1 1 1 1 1 1 0
• REPRESENTING BOOLEAN FUNCTIONS USING
DECODER
Let us take an example. Suppose a function is described as
F=m(2,3,5,7,9,11)
If we had to design its logic circuit, we had to draw its K-map and reduce it
and then draw accordingly.
However, Using a decoder, we can easily draw the circuit.
First. We check the greatest min-term available in the given equation. Here
it is 11. 11<16. So 4 bits are enough to represent the minterms.
This means that there will be 4 inputs. Accordingly in a decoder, 4 inputs
result in 24=16 outputs.
The decoder therefore required is 4x16 decoder.
LOW ENABLE:
Low enable devices are those which work when the input given to the
Enable wire is low. The enable value is passed through a NOT gate, so the
low input is actually converted to high and the decoder is active.
CIRCUIT DIAGRAM:
Notice how
when the
enable
value is 0
(low), the
decoder is
active
CIRCUIT DIAGRAM:
Notice how
when the
enable
value is 1
(high), the
decoder is
inactive
BLOCK DIAGRAM
Notice the small bubble at the end of the enable line E. This denotes
that it is a low enable device
HIGH ENABLE:
High enable devices are those which work when the input given to the
Enable wire is high.
CIRCUIT DIAGRAM:
Notice how
when the
enable
value is
1(high), the
decoder is
active
Notice how
when the
enable
value is
0(low), the
decoder is
inactive
BLOCK DIAGRAM
So, m2 = 512.
We can choose m1 as 16,
So, (m2/m1) =(512/16)= 32.
Hence we require 32 nos. of 4x16 decoders.
Now , 32, nos of 4x16 decoders will require 32 nos. of enable lines.
The way we can get 32 enable lines is only by using a 5x32 decoder.
Thus 5 inputs would be passed to the 5X32 decoder and the rest 3 inputs would be
distributed to the 32nos of 4x16 decoders (along with enable lines for each).
So, to summarize,
32 nos. of 4x16 decoders and 1 nos. 5x32 decoder is required for a 9x512 decoder.