際際滷

際際滷Share a Scribd company logo
LECTURE 8
Introduction
 A decoder is a special case of a demultiplexer without
the input line. It is a combination logic circuit that
accepts a set of inputs which represents a binary number
and activates only the output that corresponds to the
input number. A decoder can generate a maximum of 2
possible minterms with an n-bit binary code. In other
words, a decoder circuit looks at its inputs, determines
which binary number is present there, and activates the
one output that corresponds to that number- all other
outputs remain inactive.
Decoders
 A decoder is a combinational logic circuit with a
number of output lines one of which is active at any
one time.
 The active output line is dependent on the pattern of
the input lines. In general a decoder has n input lines
and 2n output lines. Below is a logic circuit of a 2 to 4
decoder.
Lecture 8 Decoders & Encoders (combinational circuits)
Lecture 8 Decoders & Encoders (combinational circuits)
The truth table for the above decoder can be
produced by tracing the input signals from
input to output noting the respective values
of each output line, or can be produced by
substituting the binary values of each input
combination in the above Boolean
expressions.
Lecture 8 Decoders & Encoders (combinational circuits)
Decoders have many uses in digital computers.
They can be used to control other circuits.
For example if no changes are needed in other
circuits, the enable line can simply be set to
zero (0).
The other example where decoders are used is
in memory address decoding.
Address Chip
 0000-00FF 0
 0100-01FF 1
 0200-02FF 2
 0300-03FF 3
So each chip requires eight (8) address lines and
these are supplied by the bits 0- 7 bit lines.
The higher- order 2 bits, 8 and 9 are used to
select one of the four chips by using the 2 to 4
decoder.
The outputs of the decoder enable only one of
the four chips at a time.
Lecture 8 Decoders & Encoders (combinational circuits)
Address decoding
The block diagram operates as follows:
 To read or store data to a particular memory location,
the 2 to 4 decoder is used to select the chip.
 For example if A8 = 0 and A9 = 0 then chip 0 will be
selected by enable line 0 at the output of the decoder
to a 1.
 The address lines A0 A7 are then used to identify the
unique memory location where data can be written to
or read from. Only one chip operate at a time in the
above arrangement.
Encoders
An encoder is a logic circuit that converts information
or data from one form to another or from one code
to another, for example changing an octal code
number to a binary number.
The encoders are exactly the opposite of decoders.
In general an encoder has m inputs and n output lines.
Of the m input line only one is activated at a time.
Introduction
 An encoder is a multiplexer without its single output
line. It is a combinational logic function that has 2
(or
fewer) input lines and  output lines, which correspond
to selection lines in a multiplexer. The  output lines
generate the binary code for the possible 2 input lines.
For a an encoder with  = 2, there are four input lines
and two output lines.
 Figure 4-12 is the general diagram for an encoder with
 inputs and  outputs. The inputs here active HIGH,
which means they are normally LOW.
 4-12 General encoder diagram
 4 to 2 Encoder
 A 4 to 2 encoder has four inputs 3, 2, 1 and 0 and
two outputs 1 and 0. A block diagram of 4 to 2
Encoder
 is shown in the following figure 4-13.
 Fig. 4-12 4 to 2 encoder diagram
 At any time, only one of these 4 inputs can be 1 in
order to get the respective binary code at the output.
The Truth table is shown below.
 From Truth table, we can write the Boolean functions for
each output is as follows;
 A1=Y3+Y2
 A0=Y3+Y1
 Implementation of the above Boolean expressions is
shown in the following circuit diagram.

 Fig 4-13 4 to 2 Circuit diagram
Encoders can also be used for security
(data inscription) and saving memory
space (data compression). An example of
a basic encoder logic circuit is shown
below:
Lecture 8 Decoders & Encoders (combinational circuits)
Octal to Binary Encoder
 Octal to Binary Encoder
 An octal to binary encoder would have eight input
lines, each representing an octal digit, and three
output lines representing the three-bit binary
equivalent. The eight inputs are 7 to 0 and three
outputs 2, 1 and 0. Octal to binary encoder is
nothing but 8 to 3 encoder. The block diagram is
shown in Fig. 4-14 below.
Octal to Binary Encoder block diagram
Lecture 8 Decoders & Encoders (combinational circuits)
Lecture 8 Decoders & Encoders (combinational circuits)
Lecture 8 Decoders & Encoders (combinational circuits)
 The eight input lines would have 28 = 256 possible
combinations. However, in the case of an octal-to-
binary encoder, only eight of these 256 combinations
would have any meaning. The remaining combinations
of input variables are   input combinations.
Also, only one of the input lines at a time is in logic 1
state.
Disadvantages of an encoder
 There is an ambiguity, when all outputs of encoder are
equal to zero. Because, it could be the code
corresponding to the inputs, when only least significant
input is one or when all inputs are zero.
 If more than one input is active High, then the encoder
produces an output, which may not be the correct code.
For example, if both 3 and 6 are 1, then the encoder
produces 111 at the output. This is neither equivalent
code corresponding to 3, when it is 1 nor the
equivalent code corresponding to 6, when it is 1.
 So, to overcome these difficulties, we should assign
priorities to each input of encoder. Then, the output of
encoder will be the binary code corresponding to the
active HIGH inputs, which has higher priority. The
encoder is known as priority encoder.
 When more than one input is simultaneously active,
the input with the highest priority is encoded.
Lecture 8 Decoders & Encoders (combinational circuits)
Ad

Recommended

Presentation1DigitalTechniquesMSBTEImportantnotes
Presentation1DigitalTechniquesMSBTEImportantnotes
KrupaSawarkar
DECODER AND ENCODER (1).pptx
DECODER AND ENCODER (1).pptx
FATHIMATHASLIMAMScCo
Encoder.pptx
Encoder.pptx
Pooja Dixit
Decoders
Decoders
Pooja Dixit
Presentation123 DigitalTechniguesPDF.pdf
Presentation123 DigitalTechniguesPDF.pdf
KrupaSawarkar
SESSION 2.ppt
SESSION 2.ppt
Saranya S
Encoders anaaaaaaaaaaaaaaad decoders.pdf
Encoders anaaaaaaaaaaaaaaad decoders.pdf
AdityaGupta221734
digital-electronics_9 encoder and decoder pdf
digital-electronics_9 encoder and decoder pdf
somanathbtech
Decodder presentation by ibrar
Decodder presentation by ibrar
ibrar562
Encoders
Encoders
Daffodil International University
Decoders decoderand design with their.pptx
Decoders decoderand design with their.pptx
ssuser67a684
B sc3 unit 4 combi..lckt
B sc3 unit 4 combi..lckt
MahiboobAliMulla
Encoders and decoders
Encoders and decoders
Jher Carlson Atasan
Combinational Circuits - II (Encoders, Decoders, Multiplexers & PIDs).pdf
Combinational Circuits - II (Encoders, Decoders, Multiplexers & PIDs).pdf
AarushiPublications
Digital Logic Design Lectures on Flip-flops and latches and counters
Digital Logic Design Lectures on Flip-flops and latches and counters
ssuserb29fcb
multiplexer and d-multiplexer
multiplexer and d-multiplexer
malikwaqar75033149
Encoder_decoder_si.pdf
Encoder_decoder_si.pdf
simmis5
Computer Architecture_Encoders NOTES.docx
Computer Architecture_Encoders NOTES.docx
SangitaBose2
Combinational Circuits PPT.pdf
Combinational Circuits PPT.pdf
ANKITKUMARSINGH963335
Encoder
Encoder
Mahmudul Hasan
decoder and encoder
decoder and encoder
Unsa Shakir
4,encoder & decoder MUX and DEMUX EEng - Copy.pdf
4,encoder & decoder MUX and DEMUX EEng - Copy.pdf
DamotTesfaye
encoder
encoder
AshikUlMoula
STLD-Combinational logic design
STLD-Combinational logic design
Abhinay Potlabathini
Mini Project 1 - 2-to-4 Decoder with Enable Input E and 4-to-2 Line Priority...
Mini Project 1 - 2-to-4 Decoder with Enable Input E and 4-to-2 Line Priority...
AIMST University
Encoder
Encoder
SajedAbir
Digital VLSI - Unit 2.pptx
Digital VLSI - Unit 2.pptx
SanjaiPrasad
ENG 202 Digital Electronics 1 - Chapter 4 (1).pptx
ENG 202 Digital Electronics 1 - Chapter 4 (1).pptx
Aishah928448
Crypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdf
Stephen Perrenod
From Manual to Auto Searching- FME in the Driver's Seat
From Manual to Auto Searching- FME in the Driver's Seat
Safe Software

More Related Content

Similar to Lecture 8 Decoders & Encoders (combinational circuits) (20)

Decodder presentation by ibrar
Decodder presentation by ibrar
ibrar562
Encoders
Encoders
Daffodil International University
Decoders decoderand design with their.pptx
Decoders decoderand design with their.pptx
ssuser67a684
B sc3 unit 4 combi..lckt
B sc3 unit 4 combi..lckt
MahiboobAliMulla
Encoders and decoders
Encoders and decoders
Jher Carlson Atasan
Combinational Circuits - II (Encoders, Decoders, Multiplexers & PIDs).pdf
Combinational Circuits - II (Encoders, Decoders, Multiplexers & PIDs).pdf
AarushiPublications
Digital Logic Design Lectures on Flip-flops and latches and counters
Digital Logic Design Lectures on Flip-flops and latches and counters
ssuserb29fcb
multiplexer and d-multiplexer
multiplexer and d-multiplexer
malikwaqar75033149
Encoder_decoder_si.pdf
Encoder_decoder_si.pdf
simmis5
Computer Architecture_Encoders NOTES.docx
Computer Architecture_Encoders NOTES.docx
SangitaBose2
Combinational Circuits PPT.pdf
Combinational Circuits PPT.pdf
ANKITKUMARSINGH963335
Encoder
Encoder
Mahmudul Hasan
decoder and encoder
decoder and encoder
Unsa Shakir
4,encoder & decoder MUX and DEMUX EEng - Copy.pdf
4,encoder & decoder MUX and DEMUX EEng - Copy.pdf
DamotTesfaye
encoder
encoder
AshikUlMoula
STLD-Combinational logic design
STLD-Combinational logic design
Abhinay Potlabathini
Mini Project 1 - 2-to-4 Decoder with Enable Input E and 4-to-2 Line Priority...
Mini Project 1 - 2-to-4 Decoder with Enable Input E and 4-to-2 Line Priority...
AIMST University
Encoder
Encoder
SajedAbir
Digital VLSI - Unit 2.pptx
Digital VLSI - Unit 2.pptx
SanjaiPrasad
ENG 202 Digital Electronics 1 - Chapter 4 (1).pptx
ENG 202 Digital Electronics 1 - Chapter 4 (1).pptx
Aishah928448
Decodder presentation by ibrar
Decodder presentation by ibrar
ibrar562
Decoders decoderand design with their.pptx
Decoders decoderand design with their.pptx
ssuser67a684
B sc3 unit 4 combi..lckt
B sc3 unit 4 combi..lckt
MahiboobAliMulla
Combinational Circuits - II (Encoders, Decoders, Multiplexers & PIDs).pdf
Combinational Circuits - II (Encoders, Decoders, Multiplexers & PIDs).pdf
AarushiPublications
Digital Logic Design Lectures on Flip-flops and latches and counters
Digital Logic Design Lectures on Flip-flops and latches and counters
ssuserb29fcb
multiplexer and d-multiplexer
multiplexer and d-multiplexer
malikwaqar75033149
Encoder_decoder_si.pdf
Encoder_decoder_si.pdf
simmis5
Computer Architecture_Encoders NOTES.docx
Computer Architecture_Encoders NOTES.docx
SangitaBose2
decoder and encoder
decoder and encoder
Unsa Shakir
4,encoder & decoder MUX and DEMUX EEng - Copy.pdf
4,encoder & decoder MUX and DEMUX EEng - Copy.pdf
DamotTesfaye
STLD-Combinational logic design
STLD-Combinational logic design
Abhinay Potlabathini
Mini Project 1 - 2-to-4 Decoder with Enable Input E and 4-to-2 Line Priority...
Mini Project 1 - 2-to-4 Decoder with Enable Input E and 4-to-2 Line Priority...
AIMST University
Digital VLSI - Unit 2.pptx
Digital VLSI - Unit 2.pptx
SanjaiPrasad
ENG 202 Digital Electronics 1 - Chapter 4 (1).pptx
ENG 202 Digital Electronics 1 - Chapter 4 (1).pptx
Aishah928448

Recently uploaded (20)

Crypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdf
Stephen Perrenod
From Manual to Auto Searching- FME in the Driver's Seat
From Manual to Auto Searching- FME in the Driver's Seat
Safe Software
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
caoyixuan2019
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
pcprocore
Connecting Data and Intelligence: The Role of FME in Machine Learning
Connecting Data and Intelligence: The Role of FME in Machine Learning
Safe Software
9-1-1 Addressing: End-to-End Automation Using FME
9-1-1 Addressing: End-to-End Automation Using FME
Safe Software
"Database isolation: how we deal with hundreds of direct connections to the d...
"Database isolation: how we deal with hundreds of direct connections to the d...
Fwdays
Powering Multi-Page Web Applications Using Flow Apps and FME Data Streaming
Powering Multi-Page Web Applications Using Flow Apps and FME Data Streaming
Safe Software
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
revolcs10
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
10 Key Challenges for AI within the EU Data Protection Framework.pdf
10 Key Challenges for AI within the EU Data Protection Framework.pdf
Priyanka Aash
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
The Future of Data, AI, and AR: Innovation Inspired by You.pdf
The Future of Data, AI, and AR: Innovation Inspired by You.pdf
Safe Software
Security Tips for Enterprise Azure Solutions
Security Tips for Enterprise Azure Solutions
Michele Leroux Bustamante
The Future of AI Agent Development Trends to Watch.pptx
The Future of AI Agent Development Trends to Watch.pptx
Lisa ward
cnc-processing-centers-centateq-p-110-en.pdf
cnc-processing-centers-centateq-p-110-en.pdf
AmirStern2
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik
Coordinated Disclosure for ML - What's Different and What's the Same.pdf
Coordinated Disclosure for ML - What's Different and What's the Same.pdf
Priyanka Aash
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Nilesh Gule
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Alliance
Crypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdf
Stephen Perrenod
From Manual to Auto Searching- FME in the Driver's Seat
From Manual to Auto Searching- FME in the Driver's Seat
Safe Software
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
caoyixuan2019
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
pcprocore
Connecting Data and Intelligence: The Role of FME in Machine Learning
Connecting Data and Intelligence: The Role of FME in Machine Learning
Safe Software
9-1-1 Addressing: End-to-End Automation Using FME
9-1-1 Addressing: End-to-End Automation Using FME
Safe Software
"Database isolation: how we deal with hundreds of direct connections to the d...
"Database isolation: how we deal with hundreds of direct connections to the d...
Fwdays
Powering Multi-Page Web Applications Using Flow Apps and FME Data Streaming
Powering Multi-Page Web Applications Using Flow Apps and FME Data Streaming
Safe Software
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
revolcs10
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
10 Key Challenges for AI within the EU Data Protection Framework.pdf
10 Key Challenges for AI within the EU Data Protection Framework.pdf
Priyanka Aash
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
The Future of Data, AI, and AR: Innovation Inspired by You.pdf
The Future of Data, AI, and AR: Innovation Inspired by You.pdf
Safe Software
Security Tips for Enterprise Azure Solutions
Security Tips for Enterprise Azure Solutions
Michele Leroux Bustamante
The Future of AI Agent Development Trends to Watch.pptx
The Future of AI Agent Development Trends to Watch.pptx
Lisa ward
cnc-processing-centers-centateq-p-110-en.pdf
cnc-processing-centers-centateq-p-110-en.pdf
AmirStern2
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik
Coordinated Disclosure for ML - What's Different and What's the Same.pdf
Coordinated Disclosure for ML - What's Different and What's the Same.pdf
Priyanka Aash
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Nilesh Gule
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Alliance
Ad

Lecture 8 Decoders & Encoders (combinational circuits)

  • 2. Introduction A decoder is a special case of a demultiplexer without the input line. It is a combination logic circuit that accepts a set of inputs which represents a binary number and activates only the output that corresponds to the input number. A decoder can generate a maximum of 2 possible minterms with an n-bit binary code. In other words, a decoder circuit looks at its inputs, determines which binary number is present there, and activates the one output that corresponds to that number- all other outputs remain inactive.
  • 3. Decoders A decoder is a combinational logic circuit with a number of output lines one of which is active at any one time. The active output line is dependent on the pattern of the input lines. In general a decoder has n input lines and 2n output lines. Below is a logic circuit of a 2 to 4 decoder.
  • 6. The truth table for the above decoder can be produced by tracing the input signals from input to output noting the respective values of each output line, or can be produced by substituting the binary values of each input combination in the above Boolean expressions.
  • 8. Decoders have many uses in digital computers. They can be used to control other circuits. For example if no changes are needed in other circuits, the enable line can simply be set to zero (0). The other example where decoders are used is in memory address decoding.
  • 9. Address Chip 0000-00FF 0 0100-01FF 1 0200-02FF 2 0300-03FF 3
  • 10. So each chip requires eight (8) address lines and these are supplied by the bits 0- 7 bit lines. The higher- order 2 bits, 8 and 9 are used to select one of the four chips by using the 2 to 4 decoder. The outputs of the decoder enable only one of the four chips at a time.
  • 12. Address decoding The block diagram operates as follows: To read or store data to a particular memory location, the 2 to 4 decoder is used to select the chip. For example if A8 = 0 and A9 = 0 then chip 0 will be selected by enable line 0 at the output of the decoder to a 1. The address lines A0 A7 are then used to identify the unique memory location where data can be written to or read from. Only one chip operate at a time in the above arrangement.
  • 13. Encoders An encoder is a logic circuit that converts information or data from one form to another or from one code to another, for example changing an octal code number to a binary number. The encoders are exactly the opposite of decoders. In general an encoder has m inputs and n output lines. Of the m input line only one is activated at a time.
  • 14. Introduction An encoder is a multiplexer without its single output line. It is a combinational logic function that has 2 (or fewer) input lines and output lines, which correspond to selection lines in a multiplexer. The output lines generate the binary code for the possible 2 input lines. For a an encoder with = 2, there are four input lines and two output lines. Figure 4-12 is the general diagram for an encoder with inputs and outputs. The inputs here active HIGH, which means they are normally LOW.
  • 15. 4-12 General encoder diagram
  • 16. 4 to 2 Encoder A 4 to 2 encoder has four inputs 3, 2, 1 and 0 and two outputs 1 and 0. A block diagram of 4 to 2 Encoder is shown in the following figure 4-13. Fig. 4-12 4 to 2 encoder diagram
  • 17. At any time, only one of these 4 inputs can be 1 in order to get the respective binary code at the output. The Truth table is shown below.
  • 18. From Truth table, we can write the Boolean functions for each output is as follows; A1=Y3+Y2 A0=Y3+Y1 Implementation of the above Boolean expressions is shown in the following circuit diagram. Fig 4-13 4 to 2 Circuit diagram
  • 19. Encoders can also be used for security (data inscription) and saving memory space (data compression). An example of a basic encoder logic circuit is shown below:
  • 21. Octal to Binary Encoder Octal to Binary Encoder An octal to binary encoder would have eight input lines, each representing an octal digit, and three output lines representing the three-bit binary equivalent. The eight inputs are 7 to 0 and three outputs 2, 1 and 0. Octal to binary encoder is nothing but 8 to 3 encoder. The block diagram is shown in Fig. 4-14 below.
  • 22. Octal to Binary Encoder block diagram
  • 26. The eight input lines would have 28 = 256 possible combinations. However, in the case of an octal-to- binary encoder, only eight of these 256 combinations would have any meaning. The remaining combinations of input variables are input combinations. Also, only one of the input lines at a time is in logic 1 state.
  • 27. Disadvantages of an encoder There is an ambiguity, when all outputs of encoder are equal to zero. Because, it could be the code corresponding to the inputs, when only least significant input is one or when all inputs are zero. If more than one input is active High, then the encoder produces an output, which may not be the correct code. For example, if both 3 and 6 are 1, then the encoder produces 111 at the output. This is neither equivalent code corresponding to 3, when it is 1 nor the equivalent code corresponding to 6, when it is 1.
  • 28. So, to overcome these difficulties, we should assign priorities to each input of encoder. Then, the output of encoder will be the binary code corresponding to the active HIGH inputs, which has higher priority. The encoder is known as priority encoder. When more than one input is simultaneously active, the input with the highest priority is encoded.