SlideShare ist ein Scribd-Unternehmen logo
1 von 5
Downloaden Sie, um offline zu lesen
Experiment (6)

                                      Decoders / Encoders
8.1 Objectives :
     •   To study the basic operation and design of both decoder and encoder circuits.
     •   To describe the concept of active –low and active-high logic signals.
     •   To learn how to use the n-to-2n type decoders to implement a given Boolean function.
     •   To learn how to use 7-segment LED display along with a seven-segment decoder to create
         decimal digits.


8.2 Background Information :
     Decoders :
     A decoder is a combinational circuit that converts coded inputs to another coded outputs.
     The famous examples of decoders are binary n-to-2n decoders and seven-segment
     decoders.
     A binary decoder has n inputs and a maximum of 2n outputs. As we know, an n-bit binary
     number provides 2n minterms or maxterms. This type of decoder produces one of the 2n
     minterms or maxterms at the outputs based on the input combinations.
     Lets take the 2-to-4 decoder as an example, the block diagram and the truth table of this
     decoder is shown in Figure 8.1 and Table 8.1 respectively.

                                           x                                        D0
                                                           2- to – 4                D1
                                           y
                                                           Decoder
                                                                                    D2
                               E (Enable)                                           D3


                                    Figure 8.1 Block Diagram of 2-to-4 Decoder



                                E      x       y      D0       D1      D2      D3
                                0      X       X       0       0       0       0
                                1      0       0       1       0       0       0
                                1      0       1       0       1       0       0
                                1      1       0       0       0       1       0
                                1      1       1       0       0       0       1
                                     Table 8.1 Truth table of 2-to-4 Decoder



From the truth table, you can observe the basic operation of n-to-2n decoders, there
      is only one active output ( minterm ) for each input combination. The Boolean
                                                expression of the output signals are :
                          D0 = E x' y', D1 = E x' y, D2 = E x y' and D3 = E x y
     Now, the logic diagram for the 2-to-4 decoder can obtained as shown in Figure 8.2.
Umm Al-Qura University                                                                  Digital Design Lab Manual
Computer Engineering Department




          In the same way, we can obtained the logic diagram for any n-to-2n type decoder.
          The commercially available decoders are normally built using NAND gates instead of using
          AND gates because they are easy and less expensive to build. An example of a commercial
          n-to-2n line decoder is the 74139 chip. This chip has two 2-to-4 decoders with active low
          enable for each , They constructed using the NAND gates (see its pinout diagram and
          Function Table )

          Because any Boolean function can be expressed as a sum of products (minterms) or a
          product of sums (maxterms), we can use a decoder to implement any Boolean function. For
          example, consider the full-adder circuit illustrated in figure 4.6. The Boolean expressions for
          the outputs S and C are :
                                           S = x' y ' z + x' yz '+ xy ' z '+ xyz
                                           C = x' yz + xy ' z + xyz '+ xyz

          The above expressions can be implemented by ORING the appropriate combination of
          output minterms of a 3-to-8 decoder :
                                            S = D1 + D2 + D4 + D7
                                            C = D3 + D5 + D6 + D7

          Seven-Segment Display
          Another common type of decoder is the seven-segment decoder. This decoder is used along
          with seven-segment LED display to create a decimal or hexadecimal digits. The Seven-
          segment LED display is commonly used for numerical display as in multimeters and
          calculators, it contains seven independent LEDs arranged as shown in Figure 8.3.




                                         Figure 8.3 A Seven-Segment Display

          There are two main types of seven-segment LEDs, the common cathode (CC) and the
          common anode (CA). In the CC type, the cathodes for all segments are joined in a single
          node. On the other hand in CA type, the anodes are joined together in a single node. ( see
          Figure 8.4)




                                                         1
Umm Al-Qura University                                                              Digital Design Lab Manual
Computer Engineering Department




                                      Figure 8.4 Types of 7-Segment Display


          All decimal or hexadecimal numbers can be displayed by controlling the state of the
          appropriate segments ON or OFF. This can be done using a seven-segment decoder, a
          seven-segment decoder accepts four binary inputs and provides seven outputs that
          determines which of the segments on a seven-segment LED display should be on or off to
          create a decimal or hexadecimal digits.

          As an example of the commercial 7-segment decoder is the 7447 chip, This is a BCD to
          seven-segment decoder which used for displaying the numbers from 0 trough 9 based on
          the corresponding input BCD number. This chip is design for use with to a common anode
          seven segment display. It has active-low outputs (see Pin-Out Diagram and Function Table).


          The circuit for the BCD to 7-Segment is shown in Figure 8.5




          Encoders:
          The encoder is a combinational circuit that performs the reverse operation of the decoder.
          The encoder has a maximum of 2n inputs and n outputs. The block diagram and the truth
          table of a 4-to-2 encoder are shown in Figure8.6 and Table8.2 respectively.


                                         D0
                                         D1               4-to-2               x
                                                         Encoder
                                         D2                                    y
                                         D3



                                        Figure 8.6 Block Diagram of 4-to-2 Encoder




                                                        2
Umm Al-Qura University                                                                              Digital Design Lab Manual
Computer Engineering Department


                                          D0       D1       D2        D3           x        y
                                           1       0        0             0        0        0
                                           0       1        0             0        0        1
                                           0       0        1             0        1        0
                                           0       0        0             1        1        1
                                         Table 8.2 truth table For the 4-to-2 encoder


          From the truth table, we can expressed the outputs as :
                                                                 x = D2 + D3
                                                                 y = D1 + D3
          Therefore, the logic diagram for the 4-to-2 Encoder can be obtained as shown in Figure 8.7.




   8.3 Equipments Required :
          Universal Breadboard
          Jumper wire kit
          2x 7411 TRIPLE 3-INPUT AND
          1x 7404 HEX INVERTERS
          1x 7447 BCD-TO-SEVEN SEGMENT DECODERS/DRIVERS
          1x Common Anode (CA) Seven-Segment LED Display (MAN72A)
          4x Toggle Switches
          7x Carbon-film Resistors (470Ω)
          4x LEDs


   8.4 Procedure :
          Step 1 :
                1. Construct the logic circuit of 2-to-4 Decoder that shown in Figure 8.2.
                2. Try all input combinations and fill in the following truth table :

                                     E         x        y        D0           D1       D2       D3
                                     0         X        X
                                     1         0        0
                                     1         0        1
                                     1         1        0
                                     1         1        1

          Step 2 :
                1. Construct the circuit of BCD to 7-segment LED display.
                2. Verify the function of the circuit by applying different BCD numbers and monitoring
                   the corresponding decimal digits on the 7-segment LED display,
                3. Complete the following table by filling in the segments.



                                                                      3
Umm Al-Qura University                                                                       Digital Design Lab Manual
Computer Engineering Department




                       A3   A2    A1   A0     Fill in Seg's       A3   A2   A1   A0   Fill in Seg's

                       0     0    0    0                          0    1    1    1



                       0     0    0    1                          1    0    0    0



                       0     0    1    0                          1    0    0    1



                       0     0    1    1                          1    0    1    0



                       0     1    0    0                          1    0    1    1



                       0     1    0    1                          1    1    0    0



                       0     1    1    0                          1    1    0    1




   Questions :
        1. Design a 3-to-8 decoder with active low enable input E. When E is low, the decoder
           will function normally, when E is high, all outputs should be high regardless of the
           inputs.
        2. Derive the simplified Boolean expressions for the seven outputs (a,b,c,d,e,f & g) of the
           7447 decoder. ( Remember, the selected outputs are LOW signals in this decoder )
        3. Implement the following Boolean functions using a decoder and external gates:
                                            F1 (A,B,C) = A'B'C' + AB'C + AB'
                                            F2 (A,B,C) = ABC + ABC'
        4. Give summary of the points you have learned from the experiment.




                                                              4

Weitere ähnliche Inhalte

Was ist angesagt?

3.bipolar junction transistor (bjt)
3.bipolar junction transistor (bjt)3.bipolar junction transistor (bjt)
3.bipolar junction transistor (bjt)
firozamin
 
Decoders
DecodersDecoders
Decoders
Re Man
 

Was ist angesagt? (20)

3.bipolar junction transistor (bjt)
3.bipolar junction transistor (bjt)3.bipolar junction transistor (bjt)
3.bipolar junction transistor (bjt)
 
Binary multipliers
Binary multipliersBinary multipliers
Binary multipliers
 
Feedback amplifiers
Feedback  amplifiersFeedback  amplifiers
Feedback amplifiers
 
Amplitude modulation & demodulation
Amplitude modulation & demodulation Amplitude modulation & demodulation
Amplitude modulation & demodulation
 
Unit v waveform generators
Unit v   waveform generatorsUnit v   waveform generators
Unit v waveform generators
 
Operational Amplifier Part 1
Operational Amplifier Part 1Operational Amplifier Part 1
Operational Amplifier Part 1
 
decoder and encoder
 decoder and encoder decoder and encoder
decoder and encoder
 
Differential amplifier
Differential amplifierDifferential amplifier
Differential amplifier
 
Tuned amplifire
Tuned amplifireTuned amplifire
Tuned amplifire
 
Pulse Code Modulation
Pulse Code ModulationPulse Code Modulation
Pulse Code Modulation
 
Encoder
EncoderEncoder
Encoder
 
integrator and differentiator op-amp
integrator and differentiator op-ampintegrator and differentiator op-amp
integrator and differentiator op-amp
 
Decoders
DecodersDecoders
Decoders
 
Full custom digital ic design of priority encoder
Full custom digital ic design of priority encoderFull custom digital ic design of priority encoder
Full custom digital ic design of priority encoder
 
Pn sequence
Pn sequencePn sequence
Pn sequence
 
Ripple counter
Ripple counterRipple counter
Ripple counter
 
Ssb generation method
Ssb generation methodSsb generation method
Ssb generation method
 
MOSFET and Short channel effects
MOSFET and Short channel effectsMOSFET and Short channel effects
MOSFET and Short channel effects
 
Parity generator & checker
Parity generator & checkerParity generator & checker
Parity generator & checker
 
Code Converters & Parity Checker
Code Converters & Parity CheckerCode Converters & Parity Checker
Code Converters & Parity Checker
 

Andere mochten auch

Encoders and Decoders
Encoders and DecodersEncoders and Decoders
Encoders and Decoders
Nic JM
 
Ise iv-computer organization [10 cs46]-notes new
Ise iv-computer  organization [10 cs46]-notes newIse iv-computer  organization [10 cs46]-notes new
Ise iv-computer organization [10 cs46]-notes new
dilshad begum
 
Computer Organization (Unit-1)
Computer Organization (Unit-1)Computer Organization (Unit-1)
Computer Organization (Unit-1)
Harsh Pandya
 
computer notes - Memory organization
computer notes - Memory organizationcomputer notes - Memory organization
computer notes - Memory organization
ecomputernotes
 
Decoder for digital electronics
Decoder for digital electronicsDecoder for digital electronics
Decoder for digital electronics
IIT, KANPUR INDIA
 
combinational_circuits
combinational_circuitscombinational_circuits
combinational_circuits
Bindu Madhavi
 

Andere mochten auch (20)

Encoder and decoder
Encoder and decoderEncoder and decoder
Encoder and decoder
 
Encoders and Decoders
Encoders and DecodersEncoders and Decoders
Encoders and Decoders
 
Encoders and decoders
Encoders and decodersEncoders and decoders
Encoders and decoders
 
Multiplexers & Demultiplexers
Multiplexers & DemultiplexersMultiplexers & Demultiplexers
Multiplexers & Demultiplexers
 
Encoders
EncodersEncoders
Encoders
 
310471266 chapter-7-notes-computer-organization
310471266 chapter-7-notes-computer-organization310471266 chapter-7-notes-computer-organization
310471266 chapter-7-notes-computer-organization
 
R statistics
R statisticsR statistics
R statistics
 
Saur lecture 16
Saur lecture 16Saur lecture 16
Saur lecture 16
 
Ise iv-computer organization [10 cs46]-notes new
Ise iv-computer  organization [10 cs46]-notes newIse iv-computer  organization [10 cs46]-notes new
Ise iv-computer organization [10 cs46]-notes new
 
Computer Organization and 8085 microprocessor notes
Computer Organization and 8085 microprocessor notesComputer Organization and 8085 microprocessor notes
Computer Organization and 8085 microprocessor notes
 
Computer Organization (Unit-1)
Computer Organization (Unit-1)Computer Organization (Unit-1)
Computer Organization (Unit-1)
 
computer notes - Memory organization
computer notes - Memory organizationcomputer notes - Memory organization
computer notes - Memory organization
 
Computer organization memory
Computer organization memoryComputer organization memory
Computer organization memory
 
MULTIPLEXER
MULTIPLEXERMULTIPLEXER
MULTIPLEXER
 
Decoder for digital electronics
Decoder for digital electronicsDecoder for digital electronics
Decoder for digital electronics
 
Computer Organization Lecture Notes
Computer Organization Lecture NotesComputer Organization Lecture Notes
Computer Organization Lecture Notes
 
combinational_circuits
combinational_circuitscombinational_circuits
combinational_circuits
 
basic computer programming and micro programmed control
basic computer programming and micro programmed controlbasic computer programming and micro programmed control
basic computer programming and micro programmed control
 
2.computer org.
2.computer org.2.computer org.
2.computer org.
 
Multiplexer & de multiplexer
Multiplexer & de multiplexerMultiplexer & de multiplexer
Multiplexer & de multiplexer
 

Ähnlich wie Decoders and encoders

ENG 202 – Digital Electronics 1 - Chapter 4 (1).pptx
ENG 202 – Digital Electronics 1 - Chapter 4 (1).pptxENG 202 – Digital Electronics 1 - Chapter 4 (1).pptx
ENG 202 – Digital Electronics 1 - Chapter 4 (1).pptx
Aishah928448
 
DLD Lecture No 22 Decoder Circuit and Types of Decoder.pptx
DLD Lecture No 22 Decoder Circuit and Types of Decoder.pptxDLD Lecture No 22 Decoder Circuit and Types of Decoder.pptx
DLD Lecture No 22 Decoder Circuit and Types of Decoder.pptx
SaveraAyub2
 
Logic Design - Chapter 5: Part1 Combinattional Logic
Logic Design - Chapter 5: Part1 Combinattional LogicLogic Design - Chapter 5: Part1 Combinattional Logic
Logic Design - Chapter 5: Part1 Combinattional Logic
Gouda Mando
 

Ähnlich wie Decoders and encoders (20)

multiplexer and d-multiplexer
multiplexer and d-multiplexermultiplexer and d-multiplexer
multiplexer and d-multiplexer
 
Digital electronics digital coders decoder encoder adder
Digital electronics digital coders decoder encoder adderDigital electronics digital coders decoder encoder adder
Digital electronics digital coders decoder encoder adder
 
08 decoder
08 decoder08 decoder
08 decoder
 
Combinational Logic Circuits
Combinational Logic CircuitsCombinational Logic Circuits
Combinational Logic Circuits
 
Chapter-04.pdf
Chapter-04.pdfChapter-04.pdf
Chapter-04.pdf
 
ENG 202 – Digital Electronics 1 - Chapter 4 (1).pptx
ENG 202 – Digital Electronics 1 - Chapter 4 (1).pptxENG 202 – Digital Electronics 1 - Chapter 4 (1).pptx
ENG 202 – Digital Electronics 1 - Chapter 4 (1).pptx
 
Decoders.pptx
Decoders.pptxDecoders.pptx
Decoders.pptx
 
DLD Lecture No 22 Decoder Circuit and Types of Decoder.pptx
DLD Lecture No 22 Decoder Circuit and Types of Decoder.pptxDLD Lecture No 22 Decoder Circuit and Types of Decoder.pptx
DLD Lecture No 22 Decoder Circuit and Types of Decoder.pptx
 
Logic Design - Chapter 5: Part1 Combinattional Logic
Logic Design - Chapter 5: Part1 Combinattional LogicLogic Design - Chapter 5: Part1 Combinattional Logic
Logic Design - Chapter 5: Part1 Combinattional Logic
 
15CS32 ADE Module 3
15CS32 ADE Module 315CS32 ADE Module 3
15CS32 ADE Module 3
 
Decodder presentation by ibrar
Decodder presentation by ibrarDecodder presentation by ibrar
Decodder presentation by ibrar
 
STLD-Combinational logic design
STLD-Combinational  logic design STLD-Combinational  logic design
STLD-Combinational logic design
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
 
Decoders
DecodersDecoders
Decoders
 
Chapter 06 Combinational Logic Functions
Chapter 06 Combinational Logic FunctionsChapter 06 Combinational Logic Functions
Chapter 06 Combinational Logic Functions
 
B sc3 unit 4 combi..lckt
B sc3 unit 4 combi..lcktB sc3 unit 4 combi..lckt
B sc3 unit 4 combi..lckt
 
Digital VLSI - Unit 2.pptx
Digital VLSI - Unit 2.pptxDigital VLSI - Unit 2.pptx
Digital VLSI - Unit 2.pptx
 
digital electronics..
digital electronics..digital electronics..
digital electronics..
 
seven segment display using 74LS78 IC decoder
seven segment display using 74LS78 IC decoderseven segment display using 74LS78 IC decoder
seven segment display using 74LS78 IC decoder
 
Encoders and types of encodrs
Encoders and types of encodrs Encoders and types of encodrs
Encoders and types of encodrs
 

Decoders and encoders

  • 1. Experiment (6) Decoders / Encoders 8.1 Objectives : • To study the basic operation and design of both decoder and encoder circuits. • To describe the concept of active –low and active-high logic signals. • To learn how to use the n-to-2n type decoders to implement a given Boolean function. • To learn how to use 7-segment LED display along with a seven-segment decoder to create decimal digits. 8.2 Background Information : Decoders : A decoder is a combinational circuit that converts coded inputs to another coded outputs. The famous examples of decoders are binary n-to-2n decoders and seven-segment decoders. A binary decoder has n inputs and a maximum of 2n outputs. As we know, an n-bit binary number provides 2n minterms or maxterms. This type of decoder produces one of the 2n minterms or maxterms at the outputs based on the input combinations. Lets take the 2-to-4 decoder as an example, the block diagram and the truth table of this decoder is shown in Figure 8.1 and Table 8.1 respectively. x D0 2- to – 4 D1 y Decoder D2 E (Enable) D3 Figure 8.1 Block Diagram of 2-to-4 Decoder E x y D0 D1 D2 D3 0 X X 0 0 0 0 1 0 0 1 0 0 0 1 0 1 0 1 0 0 1 1 0 0 0 1 0 1 1 1 0 0 0 1 Table 8.1 Truth table of 2-to-4 Decoder From the truth table, you can observe the basic operation of n-to-2n decoders, there is only one active output ( minterm ) for each input combination. The Boolean expression of the output signals are : D0 = E x' y', D1 = E x' y, D2 = E x y' and D3 = E x y Now, the logic diagram for the 2-to-4 decoder can obtained as shown in Figure 8.2.
  • 2. Umm Al-Qura University Digital Design Lab Manual Computer Engineering Department In the same way, we can obtained the logic diagram for any n-to-2n type decoder. The commercially available decoders are normally built using NAND gates instead of using AND gates because they are easy and less expensive to build. An example of a commercial n-to-2n line decoder is the 74139 chip. This chip has two 2-to-4 decoders with active low enable for each , They constructed using the NAND gates (see its pinout diagram and Function Table ) Because any Boolean function can be expressed as a sum of products (minterms) or a product of sums (maxterms), we can use a decoder to implement any Boolean function. For example, consider the full-adder circuit illustrated in figure 4.6. The Boolean expressions for the outputs S and C are : S = x' y ' z + x' yz '+ xy ' z '+ xyz C = x' yz + xy ' z + xyz '+ xyz The above expressions can be implemented by ORING the appropriate combination of output minterms of a 3-to-8 decoder : S = D1 + D2 + D4 + D7 C = D3 + D5 + D6 + D7 Seven-Segment Display Another common type of decoder is the seven-segment decoder. This decoder is used along with seven-segment LED display to create a decimal or hexadecimal digits. The Seven- segment LED display is commonly used for numerical display as in multimeters and calculators, it contains seven independent LEDs arranged as shown in Figure 8.3. Figure 8.3 A Seven-Segment Display There are two main types of seven-segment LEDs, the common cathode (CC) and the common anode (CA). In the CC type, the cathodes for all segments are joined in a single node. On the other hand in CA type, the anodes are joined together in a single node. ( see Figure 8.4) 1
  • 3. Umm Al-Qura University Digital Design Lab Manual Computer Engineering Department Figure 8.4 Types of 7-Segment Display All decimal or hexadecimal numbers can be displayed by controlling the state of the appropriate segments ON or OFF. This can be done using a seven-segment decoder, a seven-segment decoder accepts four binary inputs and provides seven outputs that determines which of the segments on a seven-segment LED display should be on or off to create a decimal or hexadecimal digits. As an example of the commercial 7-segment decoder is the 7447 chip, This is a BCD to seven-segment decoder which used for displaying the numbers from 0 trough 9 based on the corresponding input BCD number. This chip is design for use with to a common anode seven segment display. It has active-low outputs (see Pin-Out Diagram and Function Table). The circuit for the BCD to 7-Segment is shown in Figure 8.5 Encoders: The encoder is a combinational circuit that performs the reverse operation of the decoder. The encoder has a maximum of 2n inputs and n outputs. The block diagram and the truth table of a 4-to-2 encoder are shown in Figure8.6 and Table8.2 respectively. D0 D1 4-to-2 x Encoder D2 y D3 Figure 8.6 Block Diagram of 4-to-2 Encoder 2
  • 4. Umm Al-Qura University Digital Design Lab Manual Computer Engineering Department D0 D1 D2 D3 x y 1 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 1 0 0 0 0 1 1 1 Table 8.2 truth table For the 4-to-2 encoder From the truth table, we can expressed the outputs as : x = D2 + D3 y = D1 + D3 Therefore, the logic diagram for the 4-to-2 Encoder can be obtained as shown in Figure 8.7. 8.3 Equipments Required : Universal Breadboard Jumper wire kit 2x 7411 TRIPLE 3-INPUT AND 1x 7404 HEX INVERTERS 1x 7447 BCD-TO-SEVEN SEGMENT DECODERS/DRIVERS 1x Common Anode (CA) Seven-Segment LED Display (MAN72A) 4x Toggle Switches 7x Carbon-film Resistors (470Ω) 4x LEDs 8.4 Procedure : Step 1 : 1. Construct the logic circuit of 2-to-4 Decoder that shown in Figure 8.2. 2. Try all input combinations and fill in the following truth table : E x y D0 D1 D2 D3 0 X X 1 0 0 1 0 1 1 1 0 1 1 1 Step 2 : 1. Construct the circuit of BCD to 7-segment LED display. 2. Verify the function of the circuit by applying different BCD numbers and monitoring the corresponding decimal digits on the 7-segment LED display, 3. Complete the following table by filling in the segments. 3
  • 5. Umm Al-Qura University Digital Design Lab Manual Computer Engineering Department A3 A2 A1 A0 Fill in Seg's A3 A2 A1 A0 Fill in Seg's 0 0 0 0 0 1 1 1 0 0 0 1 1 0 0 0 0 0 1 0 1 0 0 1 0 0 1 1 1 0 1 0 0 1 0 0 1 0 1 1 0 1 0 1 1 1 0 0 0 1 1 0 1 1 0 1 Questions : 1. Design a 3-to-8 decoder with active low enable input E. When E is low, the decoder will function normally, when E is high, all outputs should be high regardless of the inputs. 2. Derive the simplified Boolean expressions for the seven outputs (a,b,c,d,e,f & g) of the 7447 decoder. ( Remember, the selected outputs are LOW signals in this decoder ) 3. Implement the following Boolean functions using a decoder and external gates: F1 (A,B,C) = A'B'C' + AB'C + AB' F2 (A,B,C) = ABC + ABC' 4. Give summary of the points you have learned from the experiment. 4