Decoders

 


In digital system, decoders are used to decode the information, i.e.,  decoders decrypt or retrieve the actual data from the received code. It converts the binary input code into the desired output we need. Calculators, mobile phones, computers and other digital gadgets, all put encoder at input side for encoding and decoder at output side for decoding.

Decoder is a combinational logic circuit that converts a binary code into the desired output signals. It is called decoder as it performs the reverse process of encoder. The process of converting binary input code into desirable output format is known as decoding. Below given is the logic symbol of decoder with ‘n’ inputs and ‘m’ outputs.



A decoder has ‘n’ number of input lines and ‘m’ number of output lines. There are 2ⁿ possible input combinations and the number of outputs (m) are less than or equal to 2 .Here the number of outputs can have following relation
m <= 2ⁿ
 A decoder is a logic circuit that looks at its inputs, determines which binary number is present and activates the one output that corresponds to that number whereas all other outputs remain inactive. 

We have various types of decoders that are used in digital systems. But mainly we can classify them as:
  • Linear Decoders: They include 2 to 4 decoder, 3 to 8 decoder , 4 to 16 decoder etc.
  • Special Decoders: They include decoders such as BCD to Seven Segment Decoder. 

Linear Decoder

A linear decoder is a multiple-input and multiple output logic devices that converts coded inputs into coded output. Input and output codes are different in type and size. The linear (or binary) decoder is n-line to 2ⁿ line decoder. Typical examples are 2 to 4 line decoder, 3 to 8 decoder or 4 to 16 decoder and so on. Thus, the decoder can decode a two, three or four-bit binary number. Decoder may have less than 2ⁿ outputs e.g. BCD to decimal decoder.

2 to 4 Decoder

2 to 4 line decoder is the simplest decoder. It has only two inputs I₁ and I₀ and four outputs denoted by y₀, y₁, y₂ and y₃. Following is the block diagram of 2 to 4 line decoder.



Now lets see the truth table of 2 to 4 line decoder:



The truth table shows that each output is "1" only on a specific combination of inputs. From the truth table of 2 to 4 line decoder, we can obtain the Boolean expression for each output. 



From these boolean expressions, we will design the logic circuit for 2 to 4 line decoder. The logic circuit is generated with the help of AND gates and Inverters.



Decoders, in general, have the “enable” input .The enable input is only used for making the decoder ACTIVE or INACTIVE.
  • If the enable E is '0', then all outputs are zero regardless of the input values.
  • If E is ‘1’, then decoder performs its normal operation.
Such decoder has active HIGH enable inputs. In many decoders active LOW enable input is also preferred.

3 to 8 Decoder

In 3 to 8 (i.e. binary to octal) decoder, there are three inputs and eight outputs, as shown in the block diagram given below. I₀ is the least significant variable, while I₂ is the most significant variable. The three inputs are decoded into eight outputs namely Y₀, Y₁,…Y₇ . 



The truth table given below indicates, binary values at the input from eight combinations activate the corresponding output line. 



Input binary code makes only the respective output High and other outputs will be Low. When select inputs are 000 then the decoder generates only Y₀=1 and other outputs are 0. From the truth table it is clear that the input binary code decides which output is to be activated. Lets find the boolean expression:



Therefore as per the truth table, 3 to 8 line decoder generates 8 product terms corresponding to each binary code applied at the three inputs. And the boolean expression explains that there is a need of eight 3-input AND gates and 3 NOT gates to generate the complement of input along with un-complemented input. 



In many decoders, there is an enable function, a LOW level on input E1,E2 and a HIGH level on input E3, is required in order to make the enable gate output HIGH and to enable the decoding action.

Input binary code makes only the respective output High and other outputs will be inactive i.e. Low. When select inputs are 000 then the decoder generates only Y₀=1 and other outputs are 0. From the truth table it is clear that the input binary code decides which output is to be activated.

Special Decoders

Many digital types of equipment require some means for displaying information. The simplest and most popular methods for displaying numeric digits utilizes seven segment configuration for numbers 0 to 9 and also sometimes the hex characters A to F. We use special decoders to drive the Seven Segment display. Each segment is made up of some material that emits light when current is passed through it. Most commonly they include light emitting diode (LEDs). The seven segment display has 7 LEDs for the segments and one additional LED for decimal point.
 
There are 2 types of Seven Segment LED digital display.
  • Common Cathode Display – In common cathode display, all the cathode connections of the LEDs are connected to ground. A logic '1' applied to the anode terminal of the individual segment illuminates it.
  • Common Anode Display – In common anode display, all the anode connections of the LEDs are connected to VCC. A logic '0' applied to the cathode terminal of the individual segment illuminates it.

BCD to Seven Segment Decoder

We can select either common anode or common cathode depending on the application. The logic symbol of BCD to seven segment decoder / driver has 4 inputs and mainly 7 outputs ( total 8 including the dot ,i.e., the decimal point).



This BCD to 7 segment decoder generates a seven segment code in response to binary code for driving the seven segment display. In order to display any decimal digit, it is necessary for the decoder to activate the desired segment.
Let us now find out activated segments for displaying different digits.


Let us look at the truth table of the BCD  to Seven Segment Decoder:


From above given truth table we can find the boolean expressions with the help of K-Map:





The obtained Boolean expressions are:


Through the boolean expression we will design the logical circuit. The obtained logical circuit for a BCD to Seven Segment Decoder/Driver is given below:



Applications of Decoder

Decoders have various applications. Some of them are stated below:
  • Leading zero suppression
  • Multiplexed display
  • Time division multiplexing
  • Data decoding 
  • Function generator
  • Line coding and decoding for digital data communication 
  • Speech coding and decoding 
  • Constructing higher order decoder 
  • Memory addressing.

Post a Comment

0 Comments