Encoders and Decoders: Details and Design Issues
Encoders and Decoders: Details and Design Issues
If we really needed an indicator that a button had been pushed, we would have a
number of valid options. What we do is ignore the problem.
The truth table for an active–high 2–to–4 decoder that is enabled high follows.
Enable X1 X0 Y0 Y1 Y2 Y3
0 d d 0 0 0 0
1 0 0 1 0 0 0
1 0 1 0 1 0 0
1 1 0 0 0 1 0
1 1 1 0 0 0 1
The “d” indicates that when Enable = 0, all outputs are 0 independent of X0, X1
In the circuit at left, only the selected output illuminates its LED.
It is active high.
In the circuit at right, every output but the selected output illuminates its LED.
It is active low.
In many circuits, active low appears to be the preferred mode.
Look at the circuit to the left. The control signals C1,C0 select the output to
receive the input X. This is exactly equivalent to a decoder.
In the circuit at right, the selected output gets the input, now called “Enable”.
For the demultiplexers we use, the other outputs get a logic 1.
Here is an answer to one of the homework problems: use a 2–to–4 decoder for
XOR. The function is either (1, 2) or (0, 3).
The two types of decoders are active high and active low.
Just connect the numbered outputs into an OR gate and get the function.
Seeking a gate that outputs 1 if at least one of its inputs is 1, we are led to the OR gate.
F2 is 1 if and only if none of the outputs Y0, Y1, Y2, or Y4 are selected. Specifically, each
of those outputs must be a logic 1. This leads to an AND gate implementation.