0% found this document useful (0 votes)
22 views

Lecture6 Chapter4 - Study Decoders, Function Implementation Using Decoders

The document discusses decoders, which are combinational logic circuits that convert binary codes from n input lines to 2n unique output lines with only one output active at a time. Decoders are used for applications like memory addressing, code conversion, demultiplexing, timing signal generation, and multiplexer design. Specific decoder circuits are examined, including a 3-to-8 line decoder constructed with AND gates and decoders built with NAND gates. Implementing functions using decoders by expressing them as sums of minterms is also covered.

Uploaded by

Ayesha Hussain
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

Lecture6 Chapter4 - Study Decoders, Function Implementation Using Decoders

The document discusses decoders, which are combinational logic circuits that convert binary codes from n input lines to 2n unique output lines with only one output active at a time. Decoders are used for applications like memory addressing, code conversion, demultiplexing, timing signal generation, and multiplexer design. Specific decoder circuits are examined, including a 3-to-8 line decoder constructed with AND gates and decoders built with NAND gates. Implementing functions using decoders by expressing them as sums of minterms is also covered.

Uploaded by

Ayesha Hussain
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

Chapter4: Combinational Logic

Lecture6- Study Decoders, Function Implementation using


Decoders
Engr. Arshad Nazir, Asst Prof
Dept of Electrical Engineering
Fall 2023 SEECS 1
Objectives
• Study design and applications of Decoders
• Function implementation using Decoder blocks

Fall 2023 2
Decoders
• A decoder is a combinational circuit that converts binary information from
n input lines to a maximum of 2n unique output lines. Only one output can
be active (high) at any time.
• Decoders are a class of combinational logic circuits that convert a set of
input variables representing a code into a set of output variables
representing a different code. The relationship between the input and
output codes can be expressed in a truth table i.e 4-to-10-lines decoder
circuit.
• If the n-bit coded information has unused combinations, the decoder has
fewer than 2n outputs

Fall 2023 3
Decoder Applications
• Generate minterms/complement of minterms and are used for functions
implementation.
• Memory addressing- Decoders are widely used in the memory system of a
computer where they respond to the address code generated by the central
processor to activate a particular memory location.
• Code Conversion. Example is BCD-to-7-segment decoder.
• DeMUX function.
• Used in conjunction with counters to decode (detect) counter states and
provide timing or sequencing signals.
• Provide enabling inputs when used in the design of MUXs with tri-state gates.
• Computers communicate with peripheral devices (printers, modems, scanners,
keyboards, video monitors, external disk drives and other computers) by
sending and/or receiving data through I/O ports. Decoders are used to select
I/O as determined by the computer to receive or send data.

Fall 2023 4
Fall 2023 5
Implementation of Full Adder with a
Decoder
• There are three inputs and eight outputs so we need 3-to-8-line
decoder
• Two OR gates are required for logical sum of the desired minterms

Fall 2023 6
Fall 2023 7
Decoder Example (Code Converter)
• BCD-to-seven-segment display converter is one common example of
code converters, which converts one BCD digit into information
suitable for driving a digit-oriented display.

Fall 2023 8
Demultiplexer
• A decoder with an enable input (Figure 4-19) can function as
demultiplexer (1-to-4-line demultiplexer)
➢E is taken as data input line and A and B are takes as selection
inputs

Fall 2023 9
Timing Signals Generation using
Counters
• Counters may be used to generate timing signals to control the
sequence of operations in a digital system. 2n timing signals can
be generated using an n-bit binary counter together with an n-to-
2n-line decoder

Fall 2023 10
MUX Design using Tri-State gates
and Decoders

Fall 2023 11
3-to-8-Line Decoder
• A 3-to-8-Line Decoder is a decoder in which three inputs are
decoded into eight outputs, each representing one of the minterms
of the three input variables.
• Each one of the eight AND gates generates one of the minterms.
• A particular application of this decoder is binary-to-octal conversion,
however 3-to-8-line decoder can be used for decoding any 3-bit
code to provide eight outputs, one for each element of the code

Fall 2023 12
Fall 2023 13
3-to-8-Line Decoder Truth Table
Inputs Outputs
X Y Z D0 D1 D2 D3 D4 D5 D6 D7
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

Fall 2023 14
Decoders with NAND gates
• Some decoders are constructed with NAND gates. Since a NAND gate
produces the AND operation with inverted output, it becomes more
economical to generate the decoder minterms in their complemented
form. Decoder include one or more enable inputs to control the circuit
operation
• A 2-to4-line decoder with an enable input is shown next. (see Fig on
next slide).
➢The circuit operates with complement outputs and a complement
enable input.
➢The decoder is enabled when E is equal to 0 and disabled when E =
1
➢The output whose value is equal to 0 represents the minterm
selected by inputs A and B.
➢Only one output can be zero at any given time, all other outputs
are 1
• Some decoders have two or more enable inputs that must satisfy a
given logic condition Fall 2023 15
Decoders with NAND gates

Fall 2023 16
Demultiplexer
• A demultiplexer is a circuit that receives information from a single line
and directs it to one of 2n possible output lines.
• The selection of a specific output is controlled by the bit combination
of n selection lines.

Fall 2023 17
Constructing large Decoders
• Decoders with enable inputs can be connected together to form a
larger decoder circuit.
➢ two 3-to-8 decoder can be connected to form a 4-to-16 decoder
➢ The top decoder outputs generates minterms 0000 to 0111 and the
bottom decoder outputs generate minterms 1000 to 1111.
Generates from
0000 to 0111

Generates from
1000 to 1111

Fall 2023 18
Fall 2023 19
Combinational Logic Implementation
• A decoder provides the 2n minterms of n input variables.
• Any function is can be expressed in sum of minterms.
• Use a decoder to make the minterms and an external OR gate to make
the logical sum.
• In this way any combinational circuit with n inputs and m outputs can
be implemented with an n-to-2n line decoder and m OR gates. Such
implementation needs that the Boolean function is expressed in sum
of minterms
• For example: consider a full adder. x y z c s
➢S(x,y,z) = Σ(1,2,4,7) 0 0 0 0 0
➢C(x,y,z) = Σ (3,5,6,7) 0 0 1 0 1
0 1 0 0 1
0 1 1 1 0
1 0 0 0 1
1 0 1 1 0
1 1 0 1 0
1 1 1 1 1
Fall 2023 20
Implementation of Full Adder with a
Decoder
• There are three inputs and eight outputs so we need 3-to-8-line decoder
• Two OR gates are required for logical sum of the desired minterms

Fall 2023 21
Implementation of Full Adder with a
Decoder
• A function with long list of minterms requires an OR gate with large
number of inputs
• A function having a list of K minterms can be expressed in its
complemented form F′ with 2n-K minterms
• If the number of minterms in a function is greater than 2n/2 then Fˊ
can be expressed with fewer minterms
• In such case it is advantageous to use a NOR gate to sum the minterms
of Fˊ. The output of the NOR gate complements this sum and
generates the normal output F

Fall 2023 22
Problem Solving
Session

Fall 2023 23
Fall 2023 24
Fall 2023 25
Fall 2023 26
Fall 2023 27
Fall 2023 28
Problem: 4-25
Construct a 5-to-32 line Decoder with four 3-to-8 line Decoders with an
enable input and a 2-to-4 line Decoder. Use block diagrams for the
components.

Fall 2023 29
Fall 2023 30
Problem: 4-27
CA combinational circuit is specified by the following three Boolean
equations:-
F1 (A,B,C)=∑(2,4,7)
F2 (A,B,C)=∑(0,3)
F3 (A,B,C)=∑(0,2,3,4,7)
Implement the circuit with a Decoder constructed with NAND gates and
external NAND or AND gates connected to the Decoder outputs. Use a
block diagram for the Decoder. Minimize the number of inputs in the
external gates.

Fall 2023 31
Fall 2023 32
The End

Fall 2023 33

You might also like