Monday 9 May 2011

decoders




space.gif
 ../images/main/bullet_green_ball.gifDecoders
A decoder is 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, BCD decoders.
  
space.gif
Enable inputs must be on for the decoder to function, otherwise its outputs assume a single "disabled" output code word.
  
space.gif
Decoding is necessary in applications such as data multiplexing, 7 segment display and memory address decoding. Figure below shows the pseudo block of a decoder.
  
space.gif
../images/digital/decoder_gen.gif
  
space.gif
 ../images/main/bulllet_4dots_orange.gifBasic Binary Decoder
And AND gate can be used as the basic decoding element, because its output is HIGH only when all its inputs are HIGH. For example, if the input binary number is 0110, then, to make all the inputs to the AND gate HIGH, the two outer bits must be inverted using two inverters as shown in figure below.
  
space.gif
../images/digital/simple_binary_decoder.gif
  
space.gif
 ../images/main/bulllet_4dots_orange.gifBinary n-to-2n Decoders
A binary decoder has n inputs and 2n outputs. Only one output is active at any one time, corresponding to the input value. Figure below shows a representation of Binary n-to-2n decoder
  
space.gif
../images/digital/nx1_decoder.gif
  
space.gif
  
space.gif
 ../images/main/bullet_star_pink.gifExample - 2-to-4 Binary Decoder
A 2 to 4 decoder consists of two inputs and four outputs, truth table and symbols of which is shown below.
  
space.gif
Truth Table
X
Y
F0
F1
F2
F3
0
0
1
0
0
0
0
1
0
1
0
0
1
0
0
0
1
0
1
1
0
0
0
1
  
space.gif
Symbol
../images/digital/2x1_decoder.gif
  
space.gif
To minimize the above truth table we may use kmap, but doing that you will realize that it is a waste of time. One can directly write down the function for each of the outputs. Thus we can draw the circuit as shown in figure below.
  
space.gif
Note: Each output is a 2-variable minterm (X'Y', X'Y, XY', XY)
  
space.gif
Circuit
../images/digital/2x1_decoder_ckt.gif
  
space.gif
 ../images/main/bullet_star_pink.gifExample - 3-to-8 Binary Decoder
  
space.gif
A 3 to 8 decoder consists of three inputs and eight outputs, truth table and symbols of which is shown below.
  
space.gif
Truth Table
X
Y
Z
F0
F1
F2
F3
F4
F5
F6
F7
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
1
1
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
1
0
1
0
0
0
0
0
1
0
0
1
1
0
0
0
0
0
0
0
1
0
1
1
1
0
0
0
0
0
0
0
1
  
space.gif
Symbol
../images/digital/3x8_decode_blk.gif
  
space.gif
From the truth table we can draw the circuit diagram as shown in figure below.
  
space.gif
Circuit
../images/digital/3x8_decode_ckt.gif
  
space.gif
 ../images/main/bulllet_4dots_orange.gifImplementing Functions Using Decoders
  
space.gif
  • Any n-variable logic function, in canonical sum-of-minterms form can be implemented using a single n-to-2n decoder to generate the minterms, and an OR gate to form the sum.
    • The output lines of the decoder corresponding to the minterms of the function are used as inputs to the or gate.
  • Any combinational circuit with n inputs and m outputs can be implemented with an n-to-2n decoder with m OR gates.
  • Suitable when a circuit has many outputs, and each output function is expressed with few minterms.
  
space.gif
 ../images/main/bullet_star_pink.gifExample - Full adder
  
space.gif
Equation
S(x, y, z) = (1,2,4,7)
C(x, y, z) = (3,5,6,7)
  
space.gif
Truth Table
  
space.gif
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
  
space.gif
From the truth table we know the values for which the sum (s) is active and also the carry (c) is active. Thus we have the equation as shown above and a circuit can be drawn as shown below from the equation derived.
  
space.gif
Circuit
../images/digital/add_using_dec_ckt.gif
  
space.gif
  
space.gif
  
space.gif
  
space.gif


No comments:

Post a Comment