SlideShare a Scribd company logo
1 of 21
Download to read offline
DECODERS
PRESENTED BY
GHOLAMREZA KAKAMANSHADI
PANJAB UNIVERSITY, CHD, INDIA
JUL,2013
Definition:
• An important part of the system which selects
the cells to be read from and written into is the
decoder.
– Accepts a value and decodes it
• Output corresponds to value of n inputs
• It also is called many-to-one decoder, a
decoder matrix or simply a decoder.
A decoder consists of:
• Inputs (n)
• Outputs (2n , numbered from 0  2n - 1)
• Selectors / Enable (active high or active low)
• The decoder has the characteristic that for each
of the possible 2 𝑛
binary input numbers which
can be taken by the n input cells, the matrix
will have a unique one of its 2 𝑛
output lines
selected.
Input
n=2
Output
22=4
Input
n=3
Output
23
=8
n
Input
𝟐 𝒏
Out putDecoder
n is the number of input flip-flop
being decoded.
Number of AND gates is equal to
number of output lines
Q0 = S1 S0
Q1 = S1 S0
Q2 = S1 S0
Q3 = S1 S0
Input
n=2
Output
22
=4
What a decoder does
• A n-to-2
n
decoder takes an n-bit input and produces 2
n
outputs. The
n inputs represent a binary number that determines which of the 2
n
outputs is uniquely true.
• A 2-to-4 decoder operates according to the following truth table.
– The 2-bit input is called S1S0, and the four outputs are Q0-Q3.
– If the input is the binary number i, then output Qi is uniquely true.
• For example, if the input S1 S0 = 10, then output Q2 is true, and Q0,
Q1, Q3 are all false.
• This circuit “decodes” a binary number into a “one-of-four” code.
S1 S0 Q0 Q1 Q2 Q3
0 0 1 0 0 0
0 1 0 1 0 0
1 0 0 0 1 0
1 1 0 0 0 1
How can you build a 2-to-4 decoder?
• Follow the design procedures from last time! We have a truth
table, so we can write equations for each of the four outputs
(Q0-Q3), based on the two inputs (S0-S1).
• Here are the equations:
S1 S0 Q0 Q1 Q2 Q3
0 0 1 0 0 0
0 1 0 1 0 0
1 0 0 0 1 0
1 1 0 0 0 1
Q0 = S1 S0
Q1 = S1 S0
Q2 = S1 S0
Q3 = S1 S0
A picture of a 2-to-4 decoder
S1 S0 Q0 Q1 Q2 Q3
0 0 1 0 0 0
0 1 0 1 0 0
1 0 0 0 1 0
1 1 0 0 0 1
2-to-4 Decoder
Enable inputs
• Many devices have an additional enable input, which is used to
“activate” or “deactivate” the device.
• For a decoder,
– EN=1 activates the decoder, so it behaves as specified earlier. Exactly
one of the outputs will be 1.
– EN=0 “deactivates” the decoder. By convention, that means all of the
decoder’s outputs are 0.
• We can include this additional input in the decoder’s truth table:
EN S1 S0 Q0 Q1 Q2 Q3
0 0 0 0 0 0 0
0 0 1 0 0 0 0
0 1 0 0 0 0 0
0 1 1 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
• In this table, note that whenever
EN=0, the outputs are always 0,
regardless of inputs S1 and S0.
• We can abbreviate the table by
writing x’s in the input columns
for S1 and S0.
EN S1 S0 Q0 Q1 Q2 Q3
0 0 0 0 0 0 0
0 0 1 0 0 0 0
0 1 0 0 0 0 0
0 1 1 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
EN S1 S0 Q0 Q1 Q2 Q3
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
A 3-to-8 decoder
• Larger decoders are similar. Here is a 3-to-8
decoder.
– The block symbol is on the right.
– A truth table (without EN) is below.
– Output equations are at the bottom right.
• Again, only one output is true for any input
combination.
S2 S1 S0 Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7
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
Q0 = S2’ S1’ S0’
Q1 = S2’ S1’ S0
Q2 = S2’ S1 S0’
Q3 = S2’ S1 S0
Q4 = S2 S1’ S0’
Q5 = S2 S1’ S0
Q6 = S2 S1 S0’
Q7 = S2 S1 S0
Design a 3-to-8 decoderAssignment
• The decoder is often constructed by using
diodes or transistors in the AND gates.
• The number of diodes used in each AND gate
is equal to the number of input to each and
gate. The number of AND gates is equal to
number of output (2 𝑛
).
So total number of diodes is: n* 2 𝑛
• Number of diodes required increases sharply
with number of inputs to the network.
Example: To decode an eight flip-flop register we would
require 8*28
= 2048 diodes if the decoder were constructed
in this manner.
• Several types of structures are often used in
building of decoder networks.
Example:
 Parallel decoder
 Balanced decoder
 Tree decoder
Parallel decoder
X2 X2 X3 X3
X1
X1
X1 X2 X3
X1 X2 X3
X1 X2 X3
0 0 0
0 0 1
1 1 1
23
*3=24 diodes would be require to build the parallel decoder
• In tree network decoders there is four flip-
flops and so has 24
=16 output lines.
An examination will show that 56 diodes are
required to build it. There is another type of
decoder which is called a balanced decoder
network. This network requires only 48 diodes.
And it shown that this type of decoder network
requires the minimum number of diodes.
Tree Decoder
Balanced decoder
• The difference in the number of diodes or
decoding elements to build a network such as
balance decoders compared with parallel or
tree decoders becomes more significant as the
number of flip-flops to decoded increases.
• Parallel decoder network has the advantage of
being fastest and most regular in construction
of the three types.
The End

More Related Content

What's hot

encoder and decoder in digital electronics
encoder and decoder in digital electronicsencoder and decoder in digital electronics
encoder and decoder in digital electronicsvikram rajpurohit
 
basic logic gates
 basic logic gates basic logic gates
basic logic gatesvishal gupta
 
Presentation on Flip Flop
Presentation  on Flip FlopPresentation  on Flip Flop
Presentation on Flip FlopNahian Ahmed
 
decoder and encoder
 decoder and encoder decoder and encoder
decoder and encoderUnsa Shakir
 
Encoder & Decoder
Encoder & DecoderEncoder & Decoder
Encoder & DecoderSyed Saeed
 
Combinational circuits
Combinational circuits Combinational circuits
Combinational circuits DrSonali Vyas
 
Latches and flip flop
Latches and flip flopLatches and flip flop
Latches and flip flopShuaib Hotak
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuitsSARITHA REDDY
 
Digital Logic & Design (DLD) presentation
Digital Logic & Design (DLD) presentationDigital Logic & Design (DLD) presentation
Digital Logic & Design (DLD) presentationfoyez ahammad
 
Combinational Circuits & Sequential Circuits
Combinational Circuits & Sequential CircuitsCombinational Circuits & Sequential Circuits
Combinational Circuits & Sequential Circuitsgourav kottawar
 
Encoder and decoder
Encoder and decoderEncoder and decoder
Encoder and decoderAbid Ali
 

What's hot (20)

Combinational circuit
Combinational circuitCombinational circuit
Combinational circuit
 
encoder and decoder in digital electronics
encoder and decoder in digital electronicsencoder and decoder in digital electronics
encoder and decoder in digital electronics
 
basic logic gates
 basic logic gates basic logic gates
basic logic gates
 
Presentation on Flip Flop
Presentation  on Flip FlopPresentation  on Flip Flop
Presentation on Flip Flop
 
decoder and encoder
 decoder and encoder decoder and encoder
decoder and encoder
 
Digital Logic circuit
Digital Logic circuitDigital Logic circuit
Digital Logic circuit
 
Encoder & Decoder
Encoder & DecoderEncoder & Decoder
Encoder & Decoder
 
Combinational circuits
Combinational circuits Combinational circuits
Combinational circuits
 
Counters
CountersCounters
Counters
 
Latches and flip flop
Latches and flip flopLatches and flip flop
Latches and flip flop
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuits
 
Digital Logic & Design (DLD) presentation
Digital Logic & Design (DLD) presentationDigital Logic & Design (DLD) presentation
Digital Logic & Design (DLD) presentation
 
Flipflop
FlipflopFlipflop
Flipflop
 
Combinational Circuits & Sequential Circuits
Combinational Circuits & Sequential CircuitsCombinational Circuits & Sequential Circuits
Combinational Circuits & Sequential Circuits
 
Registers
RegistersRegisters
Registers
 
Encoder and decoder
Encoder and decoderEncoder and decoder
Encoder and decoder
 
Encoder and decoder
Encoder and decoderEncoder and decoder
Encoder and decoder
 
Subtractor
SubtractorSubtractor
Subtractor
 
Counters
CountersCounters
Counters
 
Chapter 6 register
Chapter 6 registerChapter 6 register
Chapter 6 register
 

Similar to Decoders

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.pptxSaveraAyub2
 
Ceng232 Decoder Multiplexer Adder
Ceng232 Decoder Multiplexer AdderCeng232 Decoder Multiplexer Adder
Ceng232 Decoder Multiplexer Addergueste731a4
 
Switching theory unit 2
Switching theory unit 2Switching theory unit 2
Switching theory unit 2SURBHI SAROHA
 
digital electronics..
digital electronics..digital electronics..
digital electronics..Saurav Roy
 
SESSION 2.ppt
SESSION 2.pptSESSION 2.ppt
SESSION 2.pptSaranya S
 
Encoder_decoder_si.pdf
Encoder_decoder_si.pdfEncoder_decoder_si.pdf
Encoder_decoder_si.pdfsimmis5
 
Computer Organization And Architecture lab manual
Computer Organization And Architecture lab manualComputer Organization And Architecture lab manual
Computer Organization And Architecture lab manualNitesh Dubey
 
Encoder-and-decoder.pptx
Encoder-and-decoder.pptxEncoder-and-decoder.pptx
Encoder-and-decoder.pptxKamranAli649587
 
Digital logic-formula-notes-final-1
Digital logic-formula-notes-final-1Digital logic-formula-notes-final-1
Digital logic-formula-notes-final-1Kshitij Singh
 
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).pptxAishah928448
 
4,encoder & decoder MUX and DEMUX EEng - Copy.pdf
4,encoder & decoder MUX and DEMUX EEng - Copy.pdf4,encoder & decoder MUX and DEMUX EEng - Copy.pdf
4,encoder & decoder MUX and DEMUX EEng - Copy.pdfDamotTesfaye
 
Decodder presentation by ibrar
Decodder presentation by ibrarDecodder presentation by ibrar
Decodder presentation by ibraribrar562
 

Similar to Decoders (20)

ATT SMK.pptx
ATT SMK.pptxATT SMK.pptx
ATT SMK.pptx
 
STLD-Combinational logic design
STLD-Combinational  logic design STLD-Combinational  logic design
STLD-Combinational logic design
 
Chapter-04.pdf
Chapter-04.pdfChapter-04.pdf
Chapter-04.pdf
 
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
 
multiplexer and d-multiplexer
multiplexer and d-multiplexermultiplexer and d-multiplexer
multiplexer and d-multiplexer
 
UNIT3.3.pdf
UNIT3.3.pdfUNIT3.3.pdf
UNIT3.3.pdf
 
Ceng232 Decoder Multiplexer Adder
Ceng232 Decoder Multiplexer AdderCeng232 Decoder Multiplexer Adder
Ceng232 Decoder Multiplexer Adder
 
encoder
encoder encoder
encoder
 
Switching theory unit 2
Switching theory unit 2Switching theory unit 2
Switching theory unit 2
 
digital electronics..
digital electronics..digital electronics..
digital electronics..
 
SESSION 2.ppt
SESSION 2.pptSESSION 2.ppt
SESSION 2.ppt
 
08 decoder
08 decoder08 decoder
08 decoder
 
Encoder_decoder_si.pdf
Encoder_decoder_si.pdfEncoder_decoder_si.pdf
Encoder_decoder_si.pdf
 
Computer Organization And Architecture lab manual
Computer Organization And Architecture lab manualComputer Organization And Architecture lab manual
Computer Organization And Architecture lab manual
 
Encoder-and-decoder.pptx
Encoder-and-decoder.pptxEncoder-and-decoder.pptx
Encoder-and-decoder.pptx
 
Digital logic-formula-notes-final-1
Digital logic-formula-notes-final-1Digital logic-formula-notes-final-1
Digital logic-formula-notes-final-1
 
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
 
4,encoder & decoder MUX and DEMUX EEng - Copy.pdf
4,encoder & decoder MUX and DEMUX EEng - Copy.pdf4,encoder & decoder MUX and DEMUX EEng - Copy.pdf
4,encoder & decoder MUX and DEMUX EEng - Copy.pdf
 
Decodder presentation by ibrar
Decodder presentation by ibrarDecodder presentation by ibrar
Decodder presentation by ibrar
 
B sc3 unit 4 combi..lckt
B sc3 unit 4 combi..lcktB sc3 unit 4 combi..lckt
B sc3 unit 4 combi..lckt
 

Recently uploaded

OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxvipinkmenon1
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 

Recently uploaded (20)

OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptx
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 

Decoders

  • 2. Definition: • An important part of the system which selects the cells to be read from and written into is the decoder. – Accepts a value and decodes it • Output corresponds to value of n inputs • It also is called many-to-one decoder, a decoder matrix or simply a decoder.
  • 3. A decoder consists of: • Inputs (n) • Outputs (2n , numbered from 0  2n - 1) • Selectors / Enable (active high or active low) • The decoder has the characteristic that for each of the possible 2 𝑛 binary input numbers which can be taken by the n input cells, the matrix will have a unique one of its 2 𝑛 output lines selected. Input n=2 Output 22=4 Input n=3 Output 23 =8
  • 4. n Input 𝟐 𝒏 Out putDecoder n is the number of input flip-flop being decoded. Number of AND gates is equal to number of output lines
  • 5. Q0 = S1 S0 Q1 = S1 S0 Q2 = S1 S0 Q3 = S1 S0 Input n=2 Output 22 =4
  • 6. What a decoder does • A n-to-2 n decoder takes an n-bit input and produces 2 n outputs. The n inputs represent a binary number that determines which of the 2 n outputs is uniquely true. • A 2-to-4 decoder operates according to the following truth table. – The 2-bit input is called S1S0, and the four outputs are Q0-Q3. – If the input is the binary number i, then output Qi is uniquely true. • For example, if the input S1 S0 = 10, then output Q2 is true, and Q0, Q1, Q3 are all false. • This circuit “decodes” a binary number into a “one-of-four” code. S1 S0 Q0 Q1 Q2 Q3 0 0 1 0 0 0 0 1 0 1 0 0 1 0 0 0 1 0 1 1 0 0 0 1
  • 7. How can you build a 2-to-4 decoder? • Follow the design procedures from last time! We have a truth table, so we can write equations for each of the four outputs (Q0-Q3), based on the two inputs (S0-S1). • Here are the equations: S1 S0 Q0 Q1 Q2 Q3 0 0 1 0 0 0 0 1 0 1 0 0 1 0 0 0 1 0 1 1 0 0 0 1 Q0 = S1 S0 Q1 = S1 S0 Q2 = S1 S0 Q3 = S1 S0
  • 8. A picture of a 2-to-4 decoder S1 S0 Q0 Q1 Q2 Q3 0 0 1 0 0 0 0 1 0 1 0 0 1 0 0 0 1 0 1 1 0 0 0 1
  • 10. Enable inputs • Many devices have an additional enable input, which is used to “activate” or “deactivate” the device. • For a decoder, – EN=1 activates the decoder, so it behaves as specified earlier. Exactly one of the outputs will be 1. – EN=0 “deactivates” the decoder. By convention, that means all of the decoder’s outputs are 0. • We can include this additional input in the decoder’s truth table: EN S1 S0 Q0 Q1 Q2 Q3 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 1 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
  • 11. • In this table, note that whenever EN=0, the outputs are always 0, regardless of inputs S1 and S0. • We can abbreviate the table by writing x’s in the input columns for S1 and S0. EN S1 S0 Q0 Q1 Q2 Q3 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 1 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 EN S1 S0 Q0 Q1 Q2 Q3 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
  • 12. A 3-to-8 decoder • Larger decoders are similar. Here is a 3-to-8 decoder. – The block symbol is on the right. – A truth table (without EN) is below. – Output equations are at the bottom right. • Again, only one output is true for any input combination. S2 S1 S0 Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7 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 Q0 = S2’ S1’ S0’ Q1 = S2’ S1’ S0 Q2 = S2’ S1 S0’ Q3 = S2’ S1 S0 Q4 = S2 S1’ S0’ Q5 = S2 S1’ S0 Q6 = S2 S1 S0’ Q7 = S2 S1 S0 Design a 3-to-8 decoderAssignment
  • 13. • The decoder is often constructed by using diodes or transistors in the AND gates. • The number of diodes used in each AND gate is equal to the number of input to each and gate. The number of AND gates is equal to number of output (2 𝑛 ). So total number of diodes is: n* 2 𝑛
  • 14. • Number of diodes required increases sharply with number of inputs to the network. Example: To decode an eight flip-flop register we would require 8*28 = 2048 diodes if the decoder were constructed in this manner.
  • 15. • Several types of structures are often used in building of decoder networks. Example:  Parallel decoder  Balanced decoder  Tree decoder
  • 16. Parallel decoder X2 X2 X3 X3 X1 X1 X1 X2 X3 X1 X2 X3 X1 X2 X3 0 0 0 0 0 1 1 1 1 23 *3=24 diodes would be require to build the parallel decoder
  • 17. • In tree network decoders there is four flip- flops and so has 24 =16 output lines. An examination will show that 56 diodes are required to build it. There is another type of decoder which is called a balanced decoder network. This network requires only 48 diodes. And it shown that this type of decoder network requires the minimum number of diodes.
  • 20. • The difference in the number of diodes or decoding elements to build a network such as balance decoders compared with parallel or tree decoders becomes more significant as the number of flip-flops to decoded increases. • Parallel decoder network has the advantage of being fastest and most regular in construction of the three types.