Page 1
7-1Logic System Design I
Decoders and Encoders
ECGR2181
�������� ������������ �
Page 2
Logic System Design I 7-2
Decoders
General decoder structure
Typically n inputs, 2n outputs– 2-to-4, 3-to-8, 4-to-16, etc.
Page 3
Logic System Design I 7-3
Binary 2-to-4 decoder
Note “x” (don’t care) notation.
Page 4
Logic System Design I 7-4
2-to-4-decoder logic diagram
Page 5
Logic System Design I 7-5
Decoder Symbol
Page 6
Logic System Design I 7-6
MSI 2-to-4 decoder
Input buffering (less load)NAND gates (faster)
Page 7
Logic System Design I 7-7
Complete 74x139 Decoder
Page 8
Logic System Design I 7-8
3-to-8 decoder
Page 9
Logic System Design I 7-9
74x138 3-to-8-decoder symbol
Page 10
Logic System Design I 7-10
Decoder cascading
4-to-16 decoder
Page 11
Logic System Design I 7-11
More cascading
5-to-32 decoder
Page 12
Logic System Design I 7-12
Decoder applications
Microprocessor memory systems– selecting different banks of memory
Microprocessor input/output systems– selecting different devices
Microprocessor instruction decoding– enabling different functional units
Memory chips– enabling different rows of memory depending on address
Page 13
Logic System Design I 7-13
Encoders vs. Decoders
Decoder Encoder
Page 14
Logic System Design I 7-14
Binary encoders
Page 15
Logic System Design I 7-15
Need priority in most applications
Page 16
Logic System Design I 7-16
8-input priority encoder
Page 17
Logic System Design I 7-17
Priority-encoder logic equations
Page 18
Logic System Design I 7-18
74x148 8-input priority encoder
– Active-low I/O– Enable Input– “Got Something”– Enable Output
Page 19
Logic System Design I 7-19
74x148 circuit
Page 20
Logic System Design I 7-20
74x148 Truth Table
Page 21
Logic System Design I 7-21
Cascading priority encoders
32-inputpriority encoder