ECE 2372 Modern Digital System Design Section 4.2 Decoders 1
Decoders A decoder is a circuit used to “translate” a code word to another code representation. 2
Decoders n – 2n Decoder: n-input lines (n-bit word input) and 2n output lines. For each possible word, one (and only one) output is asserted to a logical 1, all other lines will remain at logical 0. 3
Decoders Parallel 2-Bit Decoder (with inputs A and B, and outputs m0, m1, m2, and m3) is described by the truth table: 4
Decoders 5
Decoders 6
Decoders Enable Controls provide a selection to either inhibit (disable) or allow (enable) the decoder output. 7
Decoders An alternative decoder structure is: 8
74139 2-Line-to-4-Line Decoder/Demultiplexer
74139 2-Line-to-4-Line Decoder/Demultiplexer 10 10
74139 2-Line-to-4-Line Decoder/Demultiplexer 11 11
74139 2-Line-to-4-Line Decoder/Demultiplexer 12 12
74139 2-Line-to-4-Line Decoder/Demultiplexer
74138 3-Line-to-8-Line Decoder/Demultiplexer 14
74138 3-Line-to-8-Line Decoder/Demultiplexer 15 15
74138 3-Line-to-8-Line Decoder/Demultiplexer 16 16
74138 3-Line-to-8-Line Decoder/Demultiplexer 17 17
74238 3-Line-to-8-Line Decoder/Demultiplexer 18 18
74138 3-Line-to-8-Line Decoder/Demultiplexer 19
74138 3-Line-to-8-Line Decoder/Demultiplexer 20
74154 4-Line-to-16-Line Decoder/Demultiplexer 21
74154 4-Line-to-16-Line Decoder/Demultiplexer 22 22
74154 4-Line-to-16-Line Decoder/Demultiplexer 23 23
74154 4-Line-to-16-Line Decoder/Demultiplexer 24 24
74154 4-Line-to-16-Line Decoder/Demultiplexer 25
74154 4-Line-to-16-Line Decoder/Demultiplexer 26
Applications of Decoders Implementing Logic Functions Using Decoders: The Decoder selects an output line corresponding to the minterm represented by the binary value of the input word. This can be used to implement any switching function, often with fewer integrated circuits. 27
Applications of Decoders Consider the (simplified) 3-Line-to-8-Line Decoder and the switching function: 28
Applications of Decoders 29
Applications of Decoders Consider the (simplified) 3-Line-to-8-Line Decoder and the switching function: 30
Applications of Decoders 31
Applications of Decoders Recall, the 4-person vote-tallying machine may be implemented by: 32
33
Applications of Decoders Address Decoding: One of 2n – 1 devices is selected when the address of that device is broadcast over a common data bus and decoded by the decoder. 34
Applications of Decoders BCD to Decimal Decoders: The input is a BCD word (DCBA), the output is one of the output lines (Y0 – Y9). The inputs are related to the outputs by the truth table (note don’t-cares). 35
36
Applications of Decoders Display Decoders: LED displays require decoders to illuminate the appropriate LED for a given code word. An LED emits light when it is forward biased and current flows from anode to cathode. Typically a current limiting resistor must be included in series with the LED. 37
Applications of Decoders A number of LEDs (as in a display) may be connected common anode (LEDs illuminate with logical 0 input). 38
Applications of Decoders A number of LEDs (as in a display) may be may be connected common cathode (LEDs illuminate with logical 1 input). 39
Applications of Decoders In a seven-segment display the individual LEDs are arranged: 40
Applications of Decoders The numerals 0 – 9 are represented by: 41
42