Decoders and - Encoders
Decoders and - Encoders
Decoders and - Encoders
DECODER
•A decoder is a logic circuit that accepts a set of inputs that
represents a binary number and activates only the output that
corresponds to the input number.
•In other words, a decoder circuit looks at its inputs,
determines which binary number is present there, and activates
the one output that corresponds to that number ; all other
outputs remain inactive
1
DIGITAL SYSTEMS TCE1111
Decoding logic for the binary code 1001 with an active-HIGH output.
3
DIGITAL SYSTEMS TCE1111
General decoder diagram
2-to-4-Line Decoder
(with Enable input)-Active LOW output (2)
5
DIGITAL SYSTEMS TCE1111
6
DIGITAL SYSTEMS TCE1111
7
DIGITAL SYSTEMS TCE1111
• If the enable gate is not activated then all eight decoder outputs will
be HIGH regardless of the states of the three input variables A0, A1,
and A2 .
8
DIGITAL SYSTEMS TCE1111
9
DIGITAL SYSTEMS TCE1111
10
DIGITAL SYSTEMS TCE1111
• When w=0, the top decoder is enabled and the other is disabled.
The bottom decoder outputs are all 0’s , and the top eight outputs
generate min-terms 0000 to 0111.
• When w=1, the enable conditions are reversed. The bottom
decoder outputs generate min-terms 1000 to 1111, while the
outputs of the top decoder are all 0’s.
11
DIGITAL SYSTEMS TCE1111
Application example
A simplified computer I/O port system with a port address decoder with only four address
lines shown.
12
DIGITAL SYSTEMS TCE1111
•Binary data are transferred within the computer on a data bus, which is
13
a set of parallel lines
DIGITAL SYSTEMS TCE1111
14
DIGITAL SYSTEMS TCE1111
Logic diagram of BCD - decimal decoder
(Active LOW output)
15
DIGITAL SYSTEMS TCE1111
17
DIGITAL SYSTEMS TCE1111
18
DIGITAL SYSTEMS TCE1111
BCD-7segment decoders/drivers
19
DIGITAL SYSTEMS TCE1111
7-segment decoder
21
DIGITAL SYSTEMS TCE1111
22
DIGITAL SYSTEMS TCE1111
23
DIGITAL SYSTEMS TCE1111
Common Cathode
GND
24
DIGITAL SYSTEMS TCE1111
25
DIGITAL SYSTEMS TCE1111
Combinational Logic Circuit Implementation
using a Decoder - An example (1)
• From the truth table of the full adder,
x y Z C S
0 0 0 0 0
0 0 1 0 1
0 1 0 0 1
0 1 1 1 0
1 0 0 0 1
1 0 1 1 0
1 1 0 1 0
1 1 1 1 1
27
DIGITAL SYSTEMS TCE1111
Encoder
29
DIGITAL SYSTEMS TCE1111
30
DIGITAL SYSTEMS TCE1111
31
DIGITAL SYSTEMS TCE1111
Logic circuit for octal-to binary encoder [8-
line- 3-line ]
32
DIGITAL SYSTEMS TCE1111
A low at any single input will produce the output binary code corresponding to that
input. For instance , a low at A3’ will produce O2 =0, O1=1 and O0 =1, which is
binary code for 3. Ao’ is not connected to the logic gates because the encoder
outputs always be normally at 0000 when none of the inputs is LOW 33
DIGITAL SYSTEMS TCE1111
35
DIGITAL SYSTEMS TCE1111
V=D0+D1+D2+D3
K-Maps for 4-input Priority Encoder 36
DIGITAL SYSTEMS TCE1111
37