Unit II - Combinational Logic Design - SBP
Unit II - Combinational Logic Design - SBP
Syllabus:
Combinational circuit consists of logic gates whose output at any time is determined
from the present combination of inputs. The logic gate is the most basic building block of
combinational logic. The logical function performed by a combinational circuit is fully
defined by a set of Boolean expressions.
Boolean Function Boolean algebra is an algebra that deals with binary variables and logic
operations. A Boolean function described by an algebraic expression consists of binary
variables, the constants 0 and 1, and the logic operation symbols.
For a given value of the binary variables, the function can be equal to either 1 or 0.
F(vars) = expression
F1 = x + y’z
A Boolean function expresses the logical relationship between binary variables and is
evaluated by determining the binary value of the expression for all possible values of the
variables.
A Boolean function can be represented in a truth table. The number of rows in the truth
table is 2n, where n is the number of variables in the function. The binary combinations
for the truth table are obtained from the binary numbers by counting from 0 through 2n -
1.
Truth Tables
• The corresponding truth tables for F() and G() are shown below. They are identical.
• Thus, F() = G( )
2.2 Canonical and Standard Forms
Definitions
Minterm: a product term in which all the variables appear exactly once, either
complemented or uncomplemented
Maxterm: a sum term in which all the variables appear exactly once, either
complemented or uncomplemented.
Minterm
Example: Assume 3 variables (A, B, C), and j=3. Then, bj = 011 and its corresponding
minterm is denoted by mj =A’BC
Maxterm
• Represents exactly one combination in the truth table.
• Denoted by Mj, where j is the decimal equivalent of the maxterm’s
corresponding binary combination (bj).
• A variable in Mj is complemented if its value in bj is 1, otherwise is
uncomplemented.
Example: Assume 3 variables (A, B, C), and j=3. Then, bj = 011 and its corresponding
maxterm is denoted by Mj =A+B’+C’
Canonical Forms:
Every function F() has two canonical forms:
– Canonical Sum-Of-Products (sum of minterms)
– Canonical Product-Of-Sums (product of maxterms)
Canonical Sum-Of-Products: The minterms included are those mj such that F( ) = 1 in
row j of the truth table for F( ).
Canonical Product-Of-Sums: The maxterms included are those Mj such that F( ) = 0 in
row j of the truth table for F( ).
Example Consider a Truth table for f1(a,b,c) given below.
The canonical sum-of-products form for f1 is
f1(a,b,c) = m1 + m2 + m4 + m6 = a’b’c + a’bc’ + ab’c’ + abc’
The canonical product-of-sums form for f1 is
f1(a,b,c) = M0 • M3 • M5 • M7 = (a+b+c)•(a+b’+c’)• (a’+b+c’)•(a’+b’+c’).
Shorthand: ∑ and ∏
• f1(a,b,c) = ∑ m(1,2,4,6), where ∑ indicates that this is a sum-of-products
form, and m(1,2,4,6) indicates that the minterms to be included are m1, m2,
m4, andm6.
• f1(a,b,c) = ∏ M(0,3,5,7), where ∏ indicates that this is a product-of-sums
form, and M(0,3,5,7) indicates that the maxterms to be included are M0,
M3, M5, andM7.
• Since mj = Mj’ for any j, ∑ m(1,2,4,6) = ∏ M(0,3,5,7) = f1(a,b,c)
Conversion between Canonical Forms
• Replace ∑ with ∏ (or vice versa) and replace those j’s that appeared in the
original form with those that do not.
• Example:
f1(a,b,c)= a’b’c + a’bc’ + ab’c’ + abc’
= m1 + m2 + m4 + m6
= ∑(1,2,4,6)
= ∏(0,3,5,7)
= (a+b+c)•(a+b’+c’)•(a’+b+c’)•(a’+b’+c’)
Standard Forms
➢ Another way to express Boolean functions is in standard form.
➢ In this configuration, the terms that form the function may contain one, two, or any
number of literals.
➢ There are two types of standard forms: the sum of products and products of sums.
➢ The sum of products is a Boolean expression containing AND terms, called product
terms, with one or more literals each.
➢ The sum denotes the ORing of these terms.
➢ An example of a function expressed as a sum of products is F1 = y’ + xy + x’yz’
➢ The expression has three product terms, with one, two, and three literals.
➢ Their sum is, in effect, an OR operation. A product of sums is a Boolean expression
containing OR terms, called sum terms. Each term may have any number of literals.
➢ The product denotes the ANDing of these terms.
➢ An example of a function expressed as a product of sums is F2 = x(y’ + z)(x’ + y +
z’)
➢ This expression has three sum terms, with one, two, and three literals. The product
is an AND operation.
Karnaugh map method gives us a systematic approach for simplifying a Boolean expression.
Karnaugh map method was first proposed by Veitch and modified by Karnaugh, hence it is known
as Karnaugh Map or K-map. K-map contains boxes called cells. Each of the cell represents one of
the 2n possible products that can be formed from n variables. A two-variable k-map contains 22
=4 cells, a three variable contains 23 =8 cells and four variable contain 24 =16 cells. The figure 2.1
shows the outline of 1, 2, 3 and 4 variable maps.
Fig. 2.1
The product term(minterm) assigned to the cells of K-map by labelling each row and column is
shown in 1, 2, 3 and 4 variable map and the product term(minterm) corresponding to each cell is
shown in the below figure (a),(b),(c) and (d) of fig. 2.2.
Fig. 2.2
The labelling of the rows and columns of a 1, 2, 3 and 4 variable K-map using Gray code and the
product terms(minterm) corresponding to each cell is shown in the figure 2.3 (a) (b) (c) and (d).
Fig. 2.3
The sum term(maxterm) assigned to the cells of K-map by labelling each row and column is shown
in 1, 2, 3 and 4 variable map and the sum term(maxterm) corresponding to each cell is shown in
the below figure 2.4 (a),(b),(c) and (d).
Figure 2.4
The labelling of the rows and columns of a 1, 2, 3 and 4 variable K-map using Gray code and the
sum terms(maxterm) corresponding to each cell is shown in the figure 2.5 (a) (b) (c) and (d)
Figure 2.5
Plotting a Karnaugh Map
Representation of truth table on K-map
Figure 2.6
The representation of a two and three variable truth table on a Karnaugh map is shown in fig. 2.6
& 2.7 respectively
Figure 2.7
The representation of a four variable truth table on a Karnaugh map is shown below in fig. 2.8
Fig. 2.8
Representation standard SOP on K-map
Example 1: Plot Boolean expression Y=ABC’ +ABC+A’ B ’ C on the Karnaugh map
Example 2: Plot Boolean expression Y=A’ BC’ D ’ + AB’CD’ +A’ BCD’ +AB’ CD+ABC’ D on the
karnaugh map.
Grouping Cells for Simplification
1. Grouping Two adjacent Pairs & Grouping Four adjacent ones (Quad)
2. Grouping Eight adjacent ones (Octet)
Simplification of Sum of Products Expression (SOP)
Example 1: Minimize the Boolean expression Y=A’ BC’D ’ + A’ BC’D +ABC’D ’ + ABC’D +AB’ C ’D +
A’ B ’ CD’ on Karnaugh map
In the part of the diagram, don’t care minterm 0 and 2 is included the units 1’s and the
simplified function is now
F = yz+w’x’
In the second don’t care minterm 5 is included with the 1’s , and the simplified function is
now
F = yz + w’z
2.5 NAND AND NOR IMPLIMENTATION
Digital circuits are frequently constructed with NAND and NOR gates rather than with
AND and OR gates. NAND and NOR gates are easier to fabricate. So, rules and procedures
have been developed for the conversion from Boolean functions given in terms of AND,
OR and NOT into equivalent NAND and NOR logic diagrams.
Two level NAND- NAND implementation
To facilitate the conversion to NAND logic, it is convenient to define an alternative graphic
symbol for the gate. The alternate representation of NAND gate is shown in fig. according
to De Morgan’s theorem
Steps to be followed
1. Simplify the given logic expression and convert it in the SOP form
2. Draw the logic circuit using AND, OR and NOT gate
3. Replace every AND gate by a NAND gate, Every OR gate by a bubbled OR gate and
NOT gate by a NAND inverter.
4. Replace bubbled-OR gate by NAND gate.
Example: Implement the following Boolean equation using only NAND gates
Y=AB+CDE+F
Solution:
Step 1: realization using basic gates
Step 2: replace AND →NAND, OR →bubbled – OR, NOT →NAND inverter
Step 3: draw the logic circuit using only NAND gates
Step 2: Replace OR → NOR AND → invert AND NOT → NOR invert Step 3: Replace invert
AND gate by NOR gate shown in fig.
Step 3: Check each line has even number of bubbles. If any line does not have even number
of bubbles the insert bubble (i.e. input A, B’,A’, B has odd number of bubbles. Therefore,
apply the inverted inputs to make even numbers of bubbles).
A combinational circuit consists of input variables, logic gates, and output variables. The
logic gates accept signals from inputs and output signals are generated according to the
logic circuits employed in it. Binary information from the given data transforms to desired
output data in this process. Both input and output are obviously the binary signals, i.e.,
both the input and output signals are of two possible states, logic 1 and logic 0. [Fig. 2.9]
Fig. 2.9
For n number of input variables to a combinational circuit, 2n possible combinations of
binary input states are possible. For each possible combination, there is one and only one
possible output combination. A combinational logic circuit can be described by m Boolean
functions and each output can be expressed in terms of n input variables.
DESIGN PROCEDURE:
Any combinational circuit can be designed by the following steps of design procedure.
1. The problem is stated.
2. Identify the input and output variables.
3. The input and output variables are assigned letter symbols.
4. Construction of a truth table to meet input -output requirements.
5. Writing Boolean expressions for various output variables in terms of input
variables.
6. The simplified Boolean expression is obtained by any method of minimization—
algebraic method, Karnaugh map method, or tabulation method.
7. A logic diagram is realized from the simplified boolean expression using logic
gates.
The following guidelines should be followed while choosing the preferred form for
hardware implementation:
1. The implementation should have the minimum number of gates, with the gates
used having the minimum number of inputs.
2. There should be a minimum number of interconnections.
3. Limitation on the driving capability of the gates should not be ignored.
2.7 ARITHMETIC CIRCUITS:
In this section, we will discuss those combinational logic building blocks that can be used
to perform addition and subtraction operations on binary numbers. Addition and
subtraction are the two most commonly used arithmetic operations, as the other two,
namely multiplication and division, are respectively the processes of repeated addition
and repeated subtraction.
The basic building blocks that form the basis of all hardware used to perform the
arithmetic operations on binary numbers are half-adder, full adder, half-subtractor, full-
subtractor.
A. HALF-ADDER:
A half-adder is a combinational circuit that can be used to add two binary bits. It has two
inputs that represent the two bits to be added and two outputs, with one producing the
SUM output and the other producing the CARRY.
The truth table of a half-adder, showing all possible input combinations and the
corresponding outputs are shown below.
B. FULL-ADDER:
Logic Implementation of Half-adder A full adder is a combinational circuit that forms the
arithmetic sum of three input bits. It consists of 3 inputs and 2 outputs. Two of the input
variables, represent the significant bits to be added. The third input represents the carry
from previous lower significant position. The block diagram of full adder is given by,
The full adder circuit overcomes the limitation of the half-adder, which can be used to add
two bits only. As there are three input variables, eight different input combinations are
possible. The truth table is shown below,
To derive the simplified Boolean expression from the truth table, the Karnaugh map
method is adopted as,
The Boolean expressions for the SUM and CARRY outputs are given by the equations,
Sum, S = A’B’Cin+ A’BC’in + AB’C’in + ABCin
Carry, Cout = AB+ ACin + BCin .
The logic diagram for the above functions is shown as,
The logic diagram of the full adder can also be implemented with two halfadders and one
OR gate. The S output from the second half adder is the exclusive-OR of Cin and the output
of the first half-adder, giving
A group of four bits is called a nibble. A basic 4-bit parallel adder is implemented with
four full-adder stages as shown in Figure (2.10).
Fig. 2.10
• A binary parallel adder is a digital circuit that adds two binary numbers in parallel
form and produces the arithmetic sum of those numbers in parallel form.
• It consists of full adders connected in a chain , with the output carry from each full-
adder connected to the input carry of the next full-adder in the chain.
• The interconnection of four full-adder (FA) circuits to provide a 4-bit parallel
adder. The augends bits of A and addend bits of B are designated by subscript
numbers from right to left, with subscript 1 denoting the lower –order bit. The
carries are connected in a chain through the full-adders. The input carry to the
adder is Cin and the output carry is C4. The S output generates the required sum
bits.
• When the 4-bit full-adder circuit is enclosed within an IC package, it has four
terminals for the augends bits, four terminals for the addend bits, four terminals
for the sum bits, and two terminals for the input and output carries. [Fig. 2.11]
• AN n-bit parallel adder requires n-full adders. It can be constructed from 4-bit, 2-
bit and 1-bit full adder ICs by cascading several packages. The output carry from
one package must be connected to the input carry of the one with the next higher
–order bits. The 4-bit full adder is a typical example of an MSI function
Fig. 2.11
2.9 MAGNITUDE COMPARATOR:
Fig. 2.12
For comparison of two n-bit numbers, the classical method to achieve the Boolean
expressions requires a truth table of 22n entries and becomes too lengthy and
cumbersome.
1-Bit Magnitude Comparator
A comparator used to compare two bits is called a single-bit comparator. It consists of two
inputs each for two single-bit numbers and three outputs to generate less than, equal to,
and greater than between two binary numbers.
The truth table for a 1-bit comparator is given below.
From the above truth table logical expressions for each output can be expressed as
follows.
A>B: AB’
A<B: A’B
A=B: A’B’+AB
From the above expressions, we can derive the following formula.
By using these Boolean expressions, we can implement a logic circuit for this comparator
as given below.
Fig. 2.13
2-bit Magnitude Comparator:
The truth table of 2-bit comparator is given in table below—
K-map Simplification:
Logic Diagram:
2.10 MULTIPLEXER: (DATA SELECTOR)
A multiplexer or MUX, is a combinational circuit with more than one input line, one output
line and more than one selection line. A multiplexer selects binary information present
from one of many input lines, depending upon the logic status of the selection inputs, and
routes it to the output line. Normally, there are 2n input lines and n selection lines whose
bit combinations determine which input is selected. The multiplexer is often labelled as
MUX in block diagrams.
A multiplexer is also called a data selector, since it selects one of many inputs and steers
the binary information to the output line.
Fig. 2.13
2-to-1- line Multiplexer:
The circuit has two data input lines, one output line and one selection line, S.
When S= 0, the upper AND gate is enabled and I0 has a path to the output.
When S=1, the lower AND gate is enabled and I1 has a path to the output.
The multiplexer acts like an electronic switch that selects one of the two sources.
Truth table:
4-to-1-line Multiplexer:
A 4-to-1-line multiplexer has four (2n) input lines, two (n) select lines and one output
line. It is the multiplexer consisting of four input channels and information of one of the
channels can be selected and transmitted to an output line according to the select inputs
combinations. Selection of one of the four input channel is possible by two selection
inputs.
Each of the four inputs I0 through I3, is applied to one input of AND gate. Selection lines
S1 and S0 are decoded to select a particular AND gate. The outputs of the AND gate are
applied to a single OR gate that provides the 1-line output.
Truth table:
To demonstrate the circuit operation, consider the case when S1S0= 10. The AND gate
associated with input I2 has two of its inputs equal to 1 and the third input connected to
I2. The other three AND gates have at least one input equal to 0, which makes their outputs
equal to 0. The OR output is now equal to the value of I2, providing a path from the selected
input to the output.
When these terms are ORed, the total expression for the data output is,
As in decoder, multiplexers may have an enable input to control the operation of the unit.
When the enable input is in the inactive state, the outputs are disabled, and when it is in
the active state, the circuit functions as a normal multiplexer.
Quadruple 2-to-1 Line Multiplexer:
This circuit has four multiplexers, each capable of selecting one of two input lines. Output
Y0 can be selected to come from either A0 or B0. Similarly, output Y1 may have the value of
A1 or B1, and so on. Input selection line, S selects one of the lines in each of the four
multiplexers. The enable input E must be active for normal operation.
Although the circuit contains four 2-to-1-Line multiplexers, it is viewed as a circuit that
selects one of two 4-bit sets of data lines. The unit is enabled when E= 0. Then if S= 0, the
four A inputs have a path to the four outputs. On the other hand, if S=1, the four B inputs
are applied to the outputs. The outputs have all 0‘s when E= 1, regardless of the value of
S.
Application:
The multiplexer is a very useful MSI function and has various ranges of applications in
data communication. Signal routing and data communication are the important
applications of a multiplexer. It is used for connecting two or more sources to guide to a
single destination among computer units and it is useful for constructing a common bus
system. One of the general properties of a multiplexer is that Boolean functions can be
implemented by this device.
Multiplexer Implementation:
2. 2. F (x, y, z) = ∑m (1, 2, 6, 7)
Solution:
Implementation table
Multiplexer Implementation:
3. 3. F ( A, B, C) = ∑m (1, 2, 4, 5)
Solution:
Variables, n= 3 (A, B, C)
Select lines= n-1 = 2 (S1, S0)
2 n-1 to MUX i.e., 22 to 1 = 4 to 1 MUX
Input lines= 2n-1 = 22 = 4 (D0, D1, D2, D3)
Implementation table:
Multiplexer Implementation:
Implementation:
5. Implement the Boolean function using 8: 1 and also using 4:1 multiplexer
F (A, B, C, D) = ∑m (0, 1, 2, 4, 6, 9, 12, 14)
Solution:
Variables, n= 4 (A, B, C, D)
Select lines= n-1 = 3 (S2, S1, S0)
2n-1 to MUX i.e., 23 to 1 = 8 to 1 MUX
Input lines= 2n-1 = 23 = 8 (D0, D1, D2, D3, D4, D5, D6, D7)
Implementation table:
Implementation (Using 8: 1 MUX):
Using 4: 1 MUX:
8. Implement the Boolean function using 8: 1 and also using 4:1 multiplexer
F (w, x, y, z) = ∑m (1, 2, 3, 6, 7, 8, 11, 12, 14)
Solution:
Variables, n= 4 (w, x, y, z)
Select lines= n-1 = 3 (S2, S1, S0)
2n-1 to MUX i.e., 23 to 1 = 8 to 1 MUX
Input lines= 2n-1 = 23 = 8 (D0, D1, D2, D3, D4, D5, D6, D7)
Implementation table:
Multiplexer Implementation (Using 8:1 MUX):
Multiplexer Implementation:
11. An 8×1 multiplexer has inputs A, B and C connected to the selection inputs S2, S1, and
S0 respectively. The data inputs I0 to I7 are as follows I1=I2=I7= 0; I3=I5= 1; I0=I4= D and
I6= D'. Determine the Boolean function that the multiplexer implements.
Multiplexer Implementation:
Implementation table:
I0 I1 I2 I3 I4 I5 I6 I7
̅
𝑫 0 2 4 6 8 10 12 14
D 1 3 5 7 9 11 13 15
D 0 0 1 D 1 ̅
𝑫 0
Fig. 2.14
The block diagram of a demultiplexer which is opposite to a multiplexer in its
operation is shown above. The circuit has one input signal, ‗n‘ select signals and 2 n
output signals. The select inputs determine to which output the data input will be
connected. As the serial data is changed to parallel data, i.e., the input caused to appear
on one of the n output lines, the demultiplexer is also called a ―data distributer or a
―serial-to-parallel converter.
1-to-4 Demultiplexer:
A 1-to-4 demultiplexer has a single input, Din, four outputs (Y0 to Y3) and two select
inputs (S1 and S0).
The input variable Din has a path to all four outputs, but the input information is
directed to only one of the output lines.
The truth table of the 1-to-4 demultiplexer is shown below.
From the truth table, it is clear that the data input, Din is connected to the output Y0,
when S1= 0 and S0= 0 and the data input is connected to output Y1 when S1= 0 and S0=
1. Similarly, the data input is connected to output Y2 and Y3 when S1= 1 and S0= 0 and
when S1= 1 and S0= 1, respectively. Also, from the truth table, the expression for
outputs can be written as follows,
Y0= S1’S0’Din
Y1= S1’S0Din
Y2= S1S0’Din
Y3= S1S0Din
Now, using the above expressions, a 1-to-4 demultiplexer can be implemented using
four 3-input AND gates and two NOT gates. Here, the input data line Din, is connected
to all the AND gates. The two select lines S1, S0 enable only one gate at a time and the
data that appears on the input line passes through the selected gate to the associated
output line.
1-to-8 Demultiplexer:
A 1-to-8 demultiplexer has a single input, Din, eight outputs (Y0 to Y7) and three select
inputs (S2, S1 and S0). It distributes one input line to eight output lines based on the
select inputs. The truth table of 1-to-8 demultiplexer is shown below.
From the above truth table, it is clear that the data input is connected with one of the
eight outputs based on the select inputs. Now from this truth table, the expression for
eight outputs can be written as follows:
Y0= S2‘S1‘S0‘Din Y4= S2 S1‘S0‘Din
Y1= S2‘S1‘S0Din Y5= S2 S1‘S0Din
Y2= S2‘S1S0‘Din Y6= S2 S1S0‘Din
Y3= S2‘S1S0Din Y7= S2S1S0Din
Now using the above expressions, the logic diagram of a 1-to-8 demultiplexer can be
drawn as shown below. Here, the single data line, Din is connected to all the eight AND
gates, but only one of the eight AND gates will be enabled by the select input lines. For
example, if S2S1S0= 000, then only AND gate-0 will be enabled and thereby the data
input, Din will appear at Y0. Similarly, the different combinations of the select inputs,
the input Din will appear at the respective output.
1. Design 1:8 demultiplexer using two 1:4 DEMUX.
2. Implement full subtractor using demultiplexer.
2.12 DECODERS:
A decoder is a combinational circuit that converts binary information from ‗n‘ input lines
to a maximum of ‗2n‘ unique output lines. The general structure of decoder circuit is –
Fig. 2.15
The encoded information is presented as ‗n‘ inputs producing ‗2n‘ possible outputs. The
2n output values are from 0 through 2n-1. A decoder is provided with enable inputs to
activate decoded output based on data inputs. When any one enable input is unasserted,
all outputs of decoder are disabled.
Binary Decoder (2 to 4 decoder):
A binary decoder has ‗n‘ bit binary input and a one activated output out of 2n outputs. A
binary decoder is used when it is necessary to activate exactly one of 2n outputs based on
an n-bit input value.
As shown in the truth table, if enable input is 1 (EN= 1) only one of the outputs (Y 0 – Y3),
is active for a given input.
The output Y0 is active, ie., Y0= 1 when inputs A= B= 0,
Y1 is active when inputs, A= 0 and B= 1,
Y2 is active, when input A= 1 and B= 0,
Y3 is active, when inputs A= B= 1.
3-to-8 Line Decoder:
A 3-to-8 line decoder has three inputs (A, B, C) and eight outputs (Y0- Y7). Based on the 3
inputs one of the eight outputs is selected.
The three inputs are decoded into eight outputs, each output representing one of the
minterms of the 3-input variables. This decoder is used for binary-to-octal conversion.
The input variables may represent a binary number and the outputs will represent the
eight digits in the octal number system. The output variables are mutually exclusive
because only one output can be equal to 1 at any one time. The output line whose value is
equal to 1 represents the minterm equivalent of the binary number presently available in
the input lines.
Applications of decoders:
1. Decoders are used in counter system.
2. They are used in analog to digital converter.
3. Decoder outputs can be used to drive a display system.
2.13 ENCODERS:
An encoder is a digital circuit that performs the inverse operation of a decoder. Hence, the
opposite of the decoding process is called encoding. An encoder is a combinational circuit
that converts binary information from 2n input lines to a maximum of ‗n‘ unique output
lines. The general structure of encoder circuit is –
Fig. 2.16
It has 2n input lines, only one which 1 is active at any time and ‗n‘ output lines. It encodes
one of the active inputs to a coded binary output with ‗n‘ bits. In an encoder, the number
of outputs is less than the number of inputs.
Octal-to-Binary Encoder:
It has eight inputs (one for each of the octal digits) and the three outputs that generate
the corresponding binary number. It is assumed that only one input has a value of 1 at any
given time.
The encoder can be implemented with OR gates whose inputs are determined directly
from the truth table. Output z is equal to 1, when the input octal digit is 1 or 3 or 5 or 7.
Output y is 1 for octal digits 2, 3, 6, or 7 and the output is 1 for digits 4, 5, 6 or 7. These
conditions can be expressed by the following output Boolean functions:
z= D1+ D3+ D5+ D7
y= D2+ D3+ D6+ D7
x= D4+ D5+ D6+ D7
The encoder can be implemented with three OR gates. The encoder defined in the below
table, has the limitation that only one input can be active at any given time. If two inputs
are active simultaneously, the output produces an undefined combination.
For eg., if D3 and D6 are 1 simultaneously, the output of the encoder may be 111. This does
not represent either D6 or D3. To resolve this problem, encoder circuits must establish an
input priority to ensure that only one input is encoded. If we establish a higher priority
for inputs with higher subscript numbers and if D3 and D6 are 1 at the same time, the
output will be 110 because D6 has higher priority than D3.
Another problem in the octal-to-binary encoder is that an output with all 0‘s is generated
when all the inputs are 0; this output is same as when D0 is equal to 1. The discrepancy
can be resolved by providing one more output to indicate that atleast one input is equal
to 1.
2.14 Priority Encoder:
A priority encoder is an encoder circuit that includes the priority function. In priority
encoder, if two or more inputs are equal to 1 at the same time, the input having the highest
priority will take precedence.
In addition to the two outputs x and y, the circuit has a third output, V (valid bit indicator).
It is set to 1 when one or more inputs are equal to 1. If all inputs are 0, there is no valid
input and V is equal to 0.
The higher the subscript number, higher the priority of the input. Input D3, has the highest
priority. So, regardless of the values of the other inputs, when D3 is 1, the output for xy is
11.
D2 has the next priority level. The output is 10, if D2= 1 provided D3= 0. The output for D1
is generated only if higher priority inputs are 0, and so on down the priority levels.
Truth table:
Although the above table has only five rows, when each don‘t care condition is replaced
first by 0 and then by 1, we obtain all 16 possible input combinations. For example, the
third row in the table with X100 represents minterms 0100 and 1100. The don‘t care
condition is replaced by 0 and 1 as shown in the table below.