DECODER is a device which does the reverse operation of an encoder. The same method used to encode is usually just reversed in order to decode. It is a combinational circuit that converts binary information from n input lines to a maximum of 2n unique output lines. WIKIPEDIA So, a decoder can take the form of a multiple-input, multiple-output logic circuit that converts coded inputs into coded outputs, where the input and output codes are different. e.g. n-to-2n decoders
A common type of decoder is the line decoder which takes an n-digit binary number and decodes it into 2n data lines. The simplest is the 1-to-2 line decoder. The truth table is
A is the address and D is the dataline. D0 is NOT A and D1 is A. The circuit looks like
If a binary decoder receives n inputs (usually grouped as a single Binary or Boolean number) it activates one and only one of its 2n outputs based on that input with all other outputs deactivated.
Then we can say that a standard combinational logic decoder is an n-to-mdecoder, where m ≤ 2n, and whose output, Q is dependent only on its present input states. In other words, a binary decoder looks at its current inputs, determines which binary code or binary number is present at its inputs and selects the appropriate output that corresponds to that binary input.So for example, an inverter ( NOT-gate ) can be classed as a 1-to-2 binary decoder as 1-input and 2-outputs (21) is possible because with an input A it can produce two outputs A and A (not-A) as shown.
Commonly available BCD-to-Decimal decoders include the TTL 7442 or the CMOS 4028. Generally a decoders output code normally has more bits than its input code and practical “binary decoder” circuits include, 2-to-4, 3-to-8 and 4-to-16 line configurations.
Only slightly more complex is the 2-to-4 line decoder. An example of a 2-to-4 line decoder along with its truth table is given below.
The example decoder circuit would be an AND gate because the output of an AND gate is "High" (1) only when all its inputs are "High." Such output is called as "active High output".
If instead of AND gate, the NAND gate is connected the output will be "Low" (0) only when all its inputs are "High". Such output is called as "active low output". For any input combination only one of the outputs is low and all others are high. The low value at the output represents the state of the input.
Then only one output can be equal to logic “0” at any given time, all other outputs are equal to logic “1”.
Examining our 2-to-4 Decoder, we can see that Larger line decoders can be designed in a similar fashion, but just like with the binary adder there is a way to make larger decoders by combining smaller decoders. An alternate circuit for the 2-to-4 line decoder is shown below.
Replacing the 1-to-2 Decoders with their actual circuits will show that both circuits are equivalent. In a similar fashion a 3-to-8 line decoder can be made from a 1-to-2 line decoder and a 2-to-4 line decoder, and a 4-to-16 line decoder can be made from two 2-to-4 line decoders.
Decoder expansion GUideLines
Combine two or more small decoders with enable inputs to form a larger decoder e.g. 3-to-8-line decoder constructed from two 2-to-4-line decoders.
Decoder with enable input can function as demultiplexer.
Let us consider a 3:8 decoder
It uses all AND gates, and therefore, the outputs are active- high. For active- low outputs, NAND gates are used. It has 3 input lines and 8 output lines. It is also called as binary to octal decoder it takes a 3-bit binary input code and activates one of the 8(octal) outputs corresponding to that code. The truth table is as follows:
Truth Table of 3:8 decoder
Logic Diagram of 3:8 decoder
Using the Decoder expansion GuideLines, let us create a 3-to-8-line decoder constructed from two 2-to-4-line decoders. The Decoder must have an enable input to function properly.
The above Truth Table simply means that we have a 2-to-4 Decoder chip available which is the 74LS139 and it is a NAND decoder since its output is Active Low.
Below is a 3-to-8 Decoder using 2 2-to-4 Decoders. The Decoder will be Active iff Enable (EN) is HIGH. This is an ACTIVE-HIGH Enable.
Assuming that we are using 2 74LS139 NAND Decoder, show the Truth Table of the above 3-to-8 Decoder.
What do you notice about the outputs from the Truth Table in Relation to its Input Values or Minterms. Draw your conclusion.
In the same manner we could build a much larger 4 (3 data plus 1 enable) to 16 line binary decoder has been implemented using two smaller 3-to-8 decoders.
From the Truth Table of a Decoder, we can see that it can Realize any Boolean function (Using the SOP of Minterms), which means with a decoder we can implement any Boolean Function or its equivalent Logic Circuit. A Decoder is also called minterm generator.
Guidelines for a Decoder to Implement Other Logic Circuits.
Since decoder produces all minterms, it is possible to implement any Boolean function with decoder.
To implement a function with n variables, select n to 2n decoder.
Decoder output produces all minterms
Select the required minterms and OR them. This gives the required function.
Ex: realize Boolean function with f (A, B, C) =∑m (1, 4, 5, 7)
Ex2: Using the same technique let us Implement the Full adder using 3 to 8 decoder.
Let us get the Boolean Expression for a Full-Adder.
for sum S = ab’c’ + a’b’c + a’bc’ + abc = Σ(1,2,4,7)
for Carry C = ab + ac + bc = ab(c + c’) + ac (b + b’) + bc (a + a’) = abc + abc’ + abc + ab’c + abc + a’bc
= abc +a’bc +ab’c+abc’= Σ (3, 5, 6, 7)
From the Minterms, we can implement a Full-Adder with a decoder as follow:
Code converters convert one form of code into another form.
For example BCD to 7-segment decoder convert is BCD number into a form that is suitable to display on 7- segment LED display.
Another form of code converter is the HEX-TO-7 SEGMENT DECODER, where the Hex codes is used to display its Hex Form that is suitable to display on 7- segment LED display.
Binary Coded Decimal (BCD or “8421” BCD) numbers are made up using just 4 data bits (a nibble or half a byte) similar to the Hexadecimal numbers in the binary system, but unlikehexadecimal numbers that range in full from 0 through to F, BCD numbers only range from 0 to 9, with the binary number patterns of 1010 through to 1111 (A to F) being invalid inputs for this type of display and so are not used as shown below.
BCD CODE
HEX CODE
7-segment decoder:
Typically 7-segment displays consist of seven individual coloured LED’s (called the segments), within one single display package. In order to produce the required numbers or HEX characters from 0 to 9and A to F respectively, on the display the correct combination of LED segments need to be illuminated .
In Digital Circuits there are two important types of 7-segment LED digital display, and by illuminating each light emitting diode individually, they can be made to display a variety of numbers or characters.
1. The Common Cathode Display (CCD) – In the common cathode display, all the cathode connections of the LED’s are joined together to logic “0” or ground. The individual segments are illuminated by application of a “HIGH”, logic “1” signal to the individual Anode terminals.
2. The Common Anode Display (CAD) – In the common anode display, all the anode connections of the LED’s are joined together to logic “1” and the individual segments are illuminated by connecting the individual Cathode terminals to a “LOW”, logic “0” signal.
A binary coded decimal (BCD) to 7-segment display decoder such as the TTL 74LS47 or 74LS48, have 4 BCD inputs and 7 output lines, one for each LED segment. This allows a smaller 4-bit binary number (half a byte) to be used to display all the denary numbers from 0 to 9 and by adding two displays together, a full range of numbers from 00 to 99 can be displayed with just a single byte of 8 data bits. 74LS47 has ACTIVE LO OUTPUTPUTS while 74LS48 has ACTIVE HI OUTPUTS.
Refer to the TRUTH Table of a (74LS47) Binary Coded Decimal to 7-segment display decoder as shown above. Note the Truth Table indicates that the outputs are active low to drive the 7-segments Display.
OPERATIONS:
BCD-to-7 Segments Decoder
To display BCD number 1, b and c LEDs (shown in above figure) should glow and remaining should be in turn off state. Similarly for remaining numbers same technique is applied.
The truth table for this is shown below.
So in order to display the number 3 for example, segments a, b, c, d and g would need to be illuminated. If we wanted to display a different number or letter then a different set of segments would need to be illuminated. Then for a 7-segment display, we can produce a truth table giving the segments that need to be illuminated in order to produce the required character as shown below.
For HEX-to-7 Segments Display, we have the following TRUTH TABLE. Note, that all Input Combinations or Minterms are Used or Valid and will have a corresponding Outputs.
ILLUSTRATIONS:
BCD = 0000 BCD = 0001
BCD = 0010 BCD = 0011
BCD = 1001
HEX = 1010 HEX = 1111
IMPLEMENTATION:
Fortunately for us, someone has already designed and developed a BCD to 7-segment Display Decoder IC such as the 74LS47 to do just that. The 74LS47 has four inputs for the BCD digits A, B, Cand D and outputs for each of the segments of the seven-segment display. Note that a standard 7-segment LED display generally has 8 input connections, one for each LED segment and one that acts as a common terminal or connection for all the internal display segments. Some displays also have a decimal point (DP) option.
The 74LS47 display decoder receives the BCD code inputs and generates the necessary signals to activate the appropriate LED segments responsible for displaying the number of pulses applied. As the 74LS47 decoder is designed for driving a common-anode display, a LOW (logic-0) output will illuminate an LED segment while a HIGH (logic-1) output will turn it “OFF”. For normal operation, the LT (Lamp test),BI/RBO (Blanking Input/Ripple Blanking Output) and RBI (Ripple Blanking Input) must all be open or connected to logic-1 (HIGH) pin numbers (3, 4, 5).
Note that while the 74LS47 has active LOW outputs and is designed to decode a common anode 7 segment LED display, the 74LS48 decoder/driver IC is exactly the same except that it has active HIGH outputs designed to decode a common cathode 7 segment display. So depending upon the type of 7-segment LED display you have you may need a 74LS47 or a 74LS48 decoder IC.
Where To get the BCD Inputs for the BCD Decoders.
There are available BCD Decade Counters such as the 7490 which could provide the Binary Code Decimal (BCD) inputs for our BCD Decoders.
We can see that BCD counters are binary counters that count from 0000 to 1001 and then resets as it has the ability to clear after the ninth count. If we connect a push-button switch (SW1) to clock input CLKA, each time the pushbutton switch is released the counter will count by one. If we connected light emitting diodes (LED’s) to the output terminals, QA, QB, QC and QD as shown, we can view the binary coded decimal count as it takes place.
Successive applications of the pushbutton switch, SW1 will increase the count up to nine, 1001. At the tenth application the outputs ABCD will reset back to zero to start a new count sequence. With such a MOD-10 round number of pulses we can use the decade counter to drive a digital display.
If we want to display the count sequence using a seven-segment display, the BCD output needs to be decoded appropriately before it can be displayed. A digital circuit that can decode the four outputs of our 74LS90 BCD counter and light up the required segments of the display is called a Decoder
Note that a 7-segment display is made of seven individual light emitting diodes to form the display. The best method of limiting the current through a seven segment display is to use a current limiting resistor in series with each of the seven LED’s as shown.
Our circuit shows a simple 0 to 9 digital counter using a 74LS90 BCD Counter and a 74LS47 7-segment display driver. To count above 10 and produce a 2-digit base-ten counter and display, we would need to cascade two separate divide-by-ten counters together. A 2-digit BCD counter would count in decimal from 00 to 99 (0000 0000 to 1001 1001) and then reset back to 00.
Likewise, if we wanted to count from 0 up to 999 (0000 0000 0000 to 1001 1001 1001), then three cascaded decade counters are required. In fact multiple decade counters can be constructed simply by cascading together individual BCD counters, one for each decade as shown.
To complete our circuit, we only need to replace SW1 with a continuous Clock Signal that will drive the Decade Counter to count continuously without manual swithcing.
555 Timer
Here is a simple pulse generator circuit or standard astable oscillator circuit for IC 555 timer, NE555N IC that can be use for our digital TIMER circuit. IC 555 use voltage supply 5V to 15V. The output frequency will be approximately 1kHz and the duty cycle 50-50, The output’s frequency is control by R1.
f=0.72/(R*C)
The values in the formula are expressed in ohms, farads, seconds and hertz. This formula is a simplified version.
.
CIRCUIT #1
CIRCUIT #2
CIRCUIT #3
END OF TOPIC: DECODER