15 Decoder-Encoder-Mux-DeMux
15 Decoder-Encoder-Mux-DeMux
-Decoder/Encoder – Mux/DeMux-
Decoders
A decoder is a logic circuit that detects the presence of a specific
combination of bits at its input.
Two simple decoders that detect the presence of the binary code
A3A2A1A0 = 0011 are shown. (A3 is MSB, A0 is LSB)
The first has an active HIGH output
The second has an active LOW output.
A0 A0
A1 X A1 X
A2 A2
A3 A3
Active HIGH decoder for 0011 Active LOW decoder for 0011
A0 = 0
A1 = 1
1
A2 = 0
A3 = 1
Bin/Dec
0 1
For the input 1010, what 1 1
2 1
is the output? 3 1
4 1
1 A0 5 1
6 1
4-bit binary 1 A1 7 1 Decimal
input 0 A2 8 1 outputs
9 1
1 A3 10 1
11 0
12 1
13 1
14 1
15 1
All lines are HIGH except for one active output, which is
LOW. The active outputs are 5, 6, 3, and 2 in that order.
X/Y
A specific integrated circuit decoder is 0
the 74HC154 (shown as a 4-to-16 1
2
decoder). 3
4
It includes two enable (EN) inputs which A0
5
1 6
must be active to enable the outputs. If A1 2 7
A2
any of these lines is disabled, then all the 4 8
A3 8 9
outputs are disabled. 10
11
Some chips have only one EN pin. 12
13
14
EN1 & 15
EN2 EN
74HC154
Input Output
Input = 1 A2 A1 A0
D0 0 0 0
D1 0 0 1
D2 0 1 0
D3 0 1 1
D4 1 0 0
D5 1 0 1
D6 1 1 0
D7 1 1 1
1
A0
Inputs from 1 to 9 2
3
The decimal to BCD is an encoder A1
with an input for each of the ten 4
5 A2
decimal digits and four outputs that 6
7
represent the BCD code for the active 8
digit. A3
9
Show how the decimal-to-BCD encoder converts the decimal number 3 into a
BCD 0011.
The top two OR gates have ones as indicated with the red lines.
Thus the output is 0011.
1 0 1
A0
2 0
1
3 1
A1
4 0
5 0 0
6
0
0 A2
7
8 0 0
A3
0
9
A multiplexer (MUX) selects one data line from two or more input
lines and routes data from the selected line to the output. The
particular data line that is selected is determined by the select
inputs.
D1
Remember
1. When Select lines 00 Output= D0
2. When Select lines 01 Output= D1 D2
3. When Select lines 10 Output= D2
4. When Select lines 11 Output= D3
D3
74LS138