際際滷

際際滷Share a Scribd company logo
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
decoders outputs are 0.
 We can include this additional input in the decoders 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 xs 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 (20)

Shift Registers
Shift RegistersShift Registers
Shift Registers
Abhilash Nair
Latches and flip flop
Latches and flip flopLatches and flip flop
Latches and flip flop
Shuaib Hotak
Multiplexers
MultiplexersMultiplexers
Multiplexers
DrSonali Vyas
Combinational Circuits & Sequential Circuits
Combinational Circuits & Sequential CircuitsCombinational Circuits & Sequential Circuits
Combinational Circuits & Sequential Circuits
gourav kottawar
Half adder & full adder
Half adder & full adderHalf adder & full adder
Half adder & full adder
Gaditek
Encoders and decoders
Encoders and decodersEncoders and decoders
Encoders and decoders
Gaditek
SHIFT REGISTERS
SHIFT REGISTERSSHIFT REGISTERS
SHIFT REGISTERS
kumari36
Encoder and decoder
Encoder and decoderEncoder and decoder
Encoder and decoder
Abid Ali
Multiplexers & Demultiplexers
Multiplexers & DemultiplexersMultiplexers & Demultiplexers
Multiplexers & Demultiplexers
Jayanshu Gundaniya
Introduction to Counters
Introduction to CountersIntroduction to Counters
Introduction to Counters
ISMT College
decoder and encoder
 decoder and encoder decoder and encoder
decoder and encoder
Unsa Shakir
Counters
CountersCounters
Counters
Ketaki_Pattani
Encoder.pptx
Encoder.pptxEncoder.pptx
Encoder.pptx
Pooja Dixit
Register in Digital Logic
Register in Digital LogicRegister in Digital Logic
Register in Digital Logic
ISMT College
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuits
SARITHA REDDY
Encoder and decoder
Encoder and decoderEncoder and decoder
Encoder and decoder
Then Murugeshwari
Encoders and decoders
Encoders and decodersEncoders and decoders
Encoders and decoders
DeepikaDG1
Combinational circuits
Combinational circuits Combinational circuits
Combinational circuits
DrSonali Vyas
Registers and counters
Registers and countersRegisters and counters
Registers and counters
Heman Pathak
Logic gates and NAND and NOR univarsal gates
Logic gates and NAND and NOR univarsal gatesLogic gates and NAND and NOR univarsal gates
Logic gates and NAND and NOR univarsal gates
Dhwanil Champaneria
Latches and flip flop
Latches and flip flopLatches and flip flop
Latches and flip flop
Shuaib Hotak
Combinational Circuits & Sequential Circuits
Combinational Circuits & Sequential CircuitsCombinational Circuits & Sequential Circuits
Combinational Circuits & Sequential Circuits
gourav kottawar
Half adder & full adder
Half adder & full adderHalf adder & full adder
Half adder & full adder
Gaditek
Encoders and decoders
Encoders and decodersEncoders and decoders
Encoders and decoders
Gaditek
SHIFT REGISTERS
SHIFT REGISTERSSHIFT REGISTERS
SHIFT REGISTERS
kumari36
Encoder and decoder
Encoder and decoderEncoder and decoder
Encoder and decoder
Abid Ali
Multiplexers & Demultiplexers
Multiplexers & DemultiplexersMultiplexers & Demultiplexers
Multiplexers & Demultiplexers
Jayanshu Gundaniya
Introduction to Counters
Introduction to CountersIntroduction to Counters
Introduction to Counters
ISMT College
decoder and encoder
 decoder and encoder decoder and encoder
decoder and encoder
Unsa Shakir
Register in Digital Logic
Register in Digital LogicRegister in Digital Logic
Register in Digital Logic
ISMT College
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuits
SARITHA REDDY
Encoders and decoders
Encoders and decodersEncoders and decoders
Encoders and decoders
DeepikaDG1
Combinational circuits
Combinational circuits Combinational circuits
Combinational circuits
DrSonali Vyas
Registers and counters
Registers and countersRegisters and counters
Registers and counters
Heman Pathak
Logic gates and NAND and NOR univarsal gates
Logic gates and NAND and NOR univarsal gatesLogic gates and NAND and NOR univarsal gates
Logic gates and NAND and NOR univarsal gates
Dhwanil Champaneria

Similar to Decoders (20)

Digital Logic Design Lectures on Flip-flops and latches and counters
Digital Logic Design Lectures on Flip-flops and latches and countersDigital Logic Design Lectures on Flip-flops and latches and counters
Digital Logic Design Lectures on Flip-flops and latches and counters
ssuserb29fcb
ATT SMK.pptx
ATT SMK.pptxATT SMK.pptx
ATT SMK.pptx
MadhavKarve
STLD-Combinational logic design
STLD-Combinational  logic design STLD-Combinational  logic design
STLD-Combinational logic design
Abhinay Potlabathini
Chapter-04.pdf
Chapter-04.pdfChapter-04.pdf
Chapter-04.pdf
ssuserf7cd2b
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
multiplexer and d-multiplexer
multiplexer and d-multiplexermultiplexer and d-multiplexer
multiplexer and d-multiplexer
malikwaqar75033149
UNIT3.3.pdf
UNIT3.3.pdfUNIT3.3.pdf
UNIT3.3.pdf
BunnyYadav7
Ceng232 Decoder Multiplexer Adder
Ceng232 Decoder Multiplexer AdderCeng232 Decoder Multiplexer Adder
Ceng232 Decoder Multiplexer Adder
gueste731a4
encoder
encoder encoder
encoder
AshikUlMoula
Switching theory unit 2
Switching theory unit 2Switching theory unit 2
Switching theory unit 2
Dr. SURBHI SAROHA
digital electronics..
digital electronics..digital electronics..
digital electronics..
Saurav Roy
SESSION 2.ppt
SESSION 2.pptSESSION 2.ppt
SESSION 2.ppt
Saranya S
08 decoder
08 decoder08 decoder
08 decoder
Aamina Aslam
Encoder_decoder_si.pdf
Encoder_decoder_si.pdfEncoder_decoder_si.pdf
Encoder_decoder_si.pdf
simmis5
Digital Logic Design Lecture on Counters and
Digital Logic Design Lecture on Counters andDigital Logic Design Lecture on Counters and
Digital Logic Design Lecture on Counters and
ssuserb29fcb
Computer Organization And Architecture lab manual
Computer Organization And Architecture lab manualComputer Organization And Architecture lab manual
Computer Organization And Architecture lab manual
Nitesh Dubey
Encoder-and-decoder.pptx
Encoder-and-decoder.pptxEncoder-and-decoder.pptx
Encoder-and-decoder.pptx
KamranAli649587
Lecture 8 Decoders & Encoders (combinational circuits)
Lecture 8 Decoders & Encoders (combinational circuits)Lecture 8 Decoders & Encoders (combinational circuits)
Lecture 8 Decoders & Encoders (combinational circuits)
andrewzimba02
Combinational Circuits encoders and decoders
Combinational Circuits encoders and decodersCombinational Circuits encoders and decoders
Combinational Circuits encoders and decoders
sivaramakrishnachava
Digital logic-formula-notes-final-1
Digital logic-formula-notes-final-1Digital logic-formula-notes-final-1
Digital logic-formula-notes-final-1
Kshitij Singh
Digital Logic Design Lectures on Flip-flops and latches and counters
Digital Logic Design Lectures on Flip-flops and latches and countersDigital Logic Design Lectures on Flip-flops and latches and counters
Digital Logic Design Lectures on Flip-flops and latches and counters
ssuserb29fcb
STLD-Combinational logic design
STLD-Combinational  logic design STLD-Combinational  logic design
STLD-Combinational logic design
Abhinay Potlabathini
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
multiplexer and d-multiplexer
multiplexer and d-multiplexermultiplexer and d-multiplexer
multiplexer and d-multiplexer
malikwaqar75033149
Ceng232 Decoder Multiplexer Adder
Ceng232 Decoder Multiplexer AdderCeng232 Decoder Multiplexer Adder
Ceng232 Decoder Multiplexer Adder
gueste731a4
digital electronics..
digital electronics..digital electronics..
digital electronics..
Saurav Roy
SESSION 2.ppt
SESSION 2.pptSESSION 2.ppt
SESSION 2.ppt
Saranya S
Encoder_decoder_si.pdf
Encoder_decoder_si.pdfEncoder_decoder_si.pdf
Encoder_decoder_si.pdf
simmis5
Digital Logic Design Lecture on Counters and
Digital Logic Design Lecture on Counters andDigital Logic Design Lecture on Counters and
Digital Logic Design Lecture on Counters and
ssuserb29fcb
Computer Organization And Architecture lab manual
Computer Organization And Architecture lab manualComputer Organization And Architecture lab manual
Computer Organization And Architecture lab manual
Nitesh Dubey
Encoder-and-decoder.pptx
Encoder-and-decoder.pptxEncoder-and-decoder.pptx
Encoder-and-decoder.pptx
KamranAli649587
Lecture 8 Decoders & Encoders (combinational circuits)
Lecture 8 Decoders & Encoders (combinational circuits)Lecture 8 Decoders & Encoders (combinational circuits)
Lecture 8 Decoders & Encoders (combinational circuits)
andrewzimba02
Combinational Circuits encoders and decoders
Combinational Circuits encoders and decodersCombinational Circuits encoders and decoders
Combinational Circuits encoders and decoders
sivaramakrishnachava
Digital logic-formula-notes-final-1
Digital logic-formula-notes-final-1Digital logic-formula-notes-final-1
Digital logic-formula-notes-final-1
Kshitij Singh

Recently uploaded (20)

Cloud Computing concepts and technologies
Cloud Computing concepts and technologiesCloud Computing concepts and technologies
Cloud Computing concepts and technologies
ssuser4c9444
How Engineering Model Making Brings Designs to Life.pdf
How Engineering Model Making Brings Designs to Life.pdfHow Engineering Model Making Brings Designs to Life.pdf
How Engineering Model Making Brings Designs to Life.pdf
Maadhu Creatives-Model Making Company
CFOT Fiber Optics FOA CERTIFICATION.pptx
CFOT Fiber Optics FOA CERTIFICATION.pptxCFOT Fiber Optics FOA CERTIFICATION.pptx
CFOT Fiber Optics FOA CERTIFICATION.pptx
MohamedShabana37
RAMSES- EDITORIAL SAMPLE FOR DSSPC C.pptx
RAMSES- EDITORIAL SAMPLE FOR DSSPC C.pptxRAMSES- EDITORIAL SAMPLE FOR DSSPC C.pptx
RAMSES- EDITORIAL SAMPLE FOR DSSPC C.pptx
JenTeruel1
US Patented ReGenX Generator, ReGen-X Quatum Motor EV Regenerative Accelerati...
US Patented ReGenX Generator, ReGen-X Quatum Motor EV Regenerative Accelerati...US Patented ReGenX Generator, ReGen-X Quatum Motor EV Regenerative Accelerati...
US Patented ReGenX Generator, ReGen-X Quatum Motor EV Regenerative Accelerati...
Thane Heins NOBEL PRIZE WINNING ENERGY RESEARCHER
Mathematics behind machine learning INT255 INT255__Unit 3__PPT-1.pptx
Mathematics behind machine learning INT255 INT255__Unit 3__PPT-1.pptxMathematics behind machine learning INT255 INT255__Unit 3__PPT-1.pptx
Mathematics behind machine learning INT255 INT255__Unit 3__PPT-1.pptx
ppkmurthy2006
Lectureof nano 1588236675-biosensors (1).ppt
Lectureof nano 1588236675-biosensors (1).pptLectureof nano 1588236675-biosensors (1).ppt
Lectureof nano 1588236675-biosensors (1).ppt
SherifElGohary7
Unit II: Design of Static Equipment Foundations
Unit II: Design of Static Equipment FoundationsUnit II: Design of Static Equipment Foundations
Unit II: Design of Static Equipment Foundations
Sanjivani College of Engineering, Kopargaon
Best KNow Hydrogen Fuel Production in the World The cost in USD kwh for H2
Best KNow  Hydrogen Fuel Production in the World The cost in USD kwh for H2Best KNow  Hydrogen Fuel Production in the World The cost in USD kwh for H2
Best KNow Hydrogen Fuel Production in the World The cost in USD kwh for H2
Daniel Donatelli
GROUP-3-GRID-CODE-AND-DISTRIBUTION-CODE.pptx
GROUP-3-GRID-CODE-AND-DISTRIBUTION-CODE.pptxGROUP-3-GRID-CODE-AND-DISTRIBUTION-CODE.pptx
GROUP-3-GRID-CODE-AND-DISTRIBUTION-CODE.pptx
meneememoo
15. Smart Cities Big Data, Civic Hackers, and the Quest for a New Utopia.pdf
15. Smart Cities Big Data, Civic Hackers, and the Quest for a New Utopia.pdf15. Smart Cities Big Data, Civic Hackers, and the Quest for a New Utopia.pdf
15. Smart Cities Big Data, Civic Hackers, and the Quest for a New Utopia.pdf
NgocThang9
decarbonization steel industry rev1.pptx
decarbonization steel industry rev1.pptxdecarbonization steel industry rev1.pptx
decarbonization steel industry rev1.pptx
gonzalezolabarriaped
only history of java.pptx real bihind the name java
only history of java.pptx real bihind the name javaonly history of java.pptx real bihind the name java
only history of java.pptx real bihind the name java
mushtaqsaliq9
autonomous vehicle project for engineering.pdf
autonomous vehicle project for engineering.pdfautonomous vehicle project for engineering.pdf
autonomous vehicle project for engineering.pdf
JyotiLohar6
TM-ASP-101-RF_Air Press manual crimping machine.pdf
TM-ASP-101-RF_Air Press manual crimping machine.pdfTM-ASP-101-RF_Air Press manual crimping machine.pdf
TM-ASP-101-RF_Air Press manual crimping machine.pdf
ChungLe60
Industrial Construction shed PEB MFG.pdf
Industrial Construction shed PEB MFG.pdfIndustrial Construction shed PEB MFG.pdf
Industrial Construction shed PEB MFG.pdf
PLINTH & ROOFS
Optimization of Cumulative Energy, Exergy Consumption and Environmental Life ...
Optimization of Cumulative Energy, Exergy Consumption and Environmental Life ...Optimization of Cumulative Energy, Exergy Consumption and Environmental Life ...
Optimization of Cumulative Energy, Exergy Consumption and Environmental Life ...
J. Agricultural Machinery
Multi objective genetic approach with Ranking
Multi objective genetic approach with RankingMulti objective genetic approach with Ranking
Multi objective genetic approach with Ranking
namisha18
google_developer_group_ramdeobaba_university_EXPLORE_PPT
google_developer_group_ramdeobaba_university_EXPLORE_PPTgoogle_developer_group_ramdeobaba_university_EXPLORE_PPT
google_developer_group_ramdeobaba_university_EXPLORE_PPT
JayeshShete1
decarbonization steel industry rev1.pptx
decarbonization steel industry rev1.pptxdecarbonization steel industry rev1.pptx
decarbonization steel industry rev1.pptx
gonzalezolabarriaped
Cloud Computing concepts and technologies
Cloud Computing concepts and technologiesCloud Computing concepts and technologies
Cloud Computing concepts and technologies
ssuser4c9444
CFOT Fiber Optics FOA CERTIFICATION.pptx
CFOT Fiber Optics FOA CERTIFICATION.pptxCFOT Fiber Optics FOA CERTIFICATION.pptx
CFOT Fiber Optics FOA CERTIFICATION.pptx
MohamedShabana37
RAMSES- EDITORIAL SAMPLE FOR DSSPC C.pptx
RAMSES- EDITORIAL SAMPLE FOR DSSPC C.pptxRAMSES- EDITORIAL SAMPLE FOR DSSPC C.pptx
RAMSES- EDITORIAL SAMPLE FOR DSSPC C.pptx
JenTeruel1
Mathematics behind machine learning INT255 INT255__Unit 3__PPT-1.pptx
Mathematics behind machine learning INT255 INT255__Unit 3__PPT-1.pptxMathematics behind machine learning INT255 INT255__Unit 3__PPT-1.pptx
Mathematics behind machine learning INT255 INT255__Unit 3__PPT-1.pptx
ppkmurthy2006
Lectureof nano 1588236675-biosensors (1).ppt
Lectureof nano 1588236675-biosensors (1).pptLectureof nano 1588236675-biosensors (1).ppt
Lectureof nano 1588236675-biosensors (1).ppt
SherifElGohary7
Best KNow Hydrogen Fuel Production in the World The cost in USD kwh for H2
Best KNow  Hydrogen Fuel Production in the World The cost in USD kwh for H2Best KNow  Hydrogen Fuel Production in the World The cost in USD kwh for H2
Best KNow Hydrogen Fuel Production in the World The cost in USD kwh for H2
Daniel Donatelli
GROUP-3-GRID-CODE-AND-DISTRIBUTION-CODE.pptx
GROUP-3-GRID-CODE-AND-DISTRIBUTION-CODE.pptxGROUP-3-GRID-CODE-AND-DISTRIBUTION-CODE.pptx
GROUP-3-GRID-CODE-AND-DISTRIBUTION-CODE.pptx
meneememoo
15. Smart Cities Big Data, Civic Hackers, and the Quest for a New Utopia.pdf
15. Smart Cities Big Data, Civic Hackers, and the Quest for a New Utopia.pdf15. Smart Cities Big Data, Civic Hackers, and the Quest for a New Utopia.pdf
15. Smart Cities Big Data, Civic Hackers, and the Quest for a New Utopia.pdf
NgocThang9
decarbonization steel industry rev1.pptx
decarbonization steel industry rev1.pptxdecarbonization steel industry rev1.pptx
decarbonization steel industry rev1.pptx
gonzalezolabarriaped
only history of java.pptx real bihind the name java
only history of java.pptx real bihind the name javaonly history of java.pptx real bihind the name java
only history of java.pptx real bihind the name java
mushtaqsaliq9
autonomous vehicle project for engineering.pdf
autonomous vehicle project for engineering.pdfautonomous vehicle project for engineering.pdf
autonomous vehicle project for engineering.pdf
JyotiLohar6
TM-ASP-101-RF_Air Press manual crimping machine.pdf
TM-ASP-101-RF_Air Press manual crimping machine.pdfTM-ASP-101-RF_Air Press manual crimping machine.pdf
TM-ASP-101-RF_Air Press manual crimping machine.pdf
ChungLe60
Industrial Construction shed PEB MFG.pdf
Industrial Construction shed PEB MFG.pdfIndustrial Construction shed PEB MFG.pdf
Industrial Construction shed PEB MFG.pdf
PLINTH & ROOFS
Optimization of Cumulative Energy, Exergy Consumption and Environmental Life ...
Optimization of Cumulative Energy, Exergy Consumption and Environmental Life ...Optimization of Cumulative Energy, Exergy Consumption and Environmental Life ...
Optimization of Cumulative Energy, Exergy Consumption and Environmental Life ...
J. Agricultural Machinery
Multi objective genetic approach with Ranking
Multi objective genetic approach with RankingMulti objective genetic approach with Ranking
Multi objective genetic approach with Ranking
namisha18
google_developer_group_ramdeobaba_university_EXPLORE_PPT
google_developer_group_ramdeobaba_university_EXPLORE_PPTgoogle_developer_group_ramdeobaba_university_EXPLORE_PPT
google_developer_group_ramdeobaba_university_EXPLORE_PPT
JayeshShete1
decarbonization steel industry rev1.pptx
decarbonization steel industry rev1.pptxdecarbonization steel industry rev1.pptx
decarbonization steel industry rev1.pptx
gonzalezolabarriaped

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 decoders outputs are 0. We can include this additional input in the decoders 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 xs 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.