BIT102 SLM Library - SLM - Unit 06
BIT102 SLM Library - SLM - Unit 06
6.1 Introduction
In the previous unit, you have studied the rules and laws of Boolean algebra.
There are lots of applications that require the use of Boolean algebra. When
the Boolean expression gets complicated or large, it will be difficult for the
programmer or the designer of the digital systems to simplify the expression.
In digital system design, one of the main objectives is to implement a
Boolean function using minimum number of discrete gates. This reduces the
cost of the circuit as the number of gates used in implementing a Boolean
function reduces. Simplification of Boolean function can be performed using
a Boolean algebra. However, simplification using algebraic process can be
tedious, and at the end of process, the designer is not always sure whether
the simplest solution is obtained or not. Moreover, when the variables are
more, simplification becomes complicated and the designer should
remember all the rules and laws. This is really difficult. So instead of using
algebraic process, Boolean function can be simplified easily by plotting the
function to Karnaugh map which uses simple rules to reduce the Boolean
function. Up to six variables simplification of Boolean function using
karnaugh maps will be very straightforward. But when the number variables
are more than six, tabulation method developed by Quine and McCluskey
will be the better method to simplify the Boolean function. This method is
called Quine-McCluskey method or tabular method. In this unit we will study
In this section we will be looking only at simplification using rules and laws
of Boolean algebra. The remaining methods will be discussed in the next
section 6.3.
Now let us see some examples of simplification of given logic expressions
using rules and laws of Boolean algebra.
Example 6.1: Simplify the Boolean expression XY′Z′+XY′Z′W+XZ′
Solution: XY′Z′+XY′Z′W+XZ′
=XY′Z′ (1+W) +XZ′
=XY′Z′+XZ′ ∵ 1+W=1
=XZ′ (Y′+1)
=XZ′ ∵ Y′+1=1
Now the truth table for the simplified expression A+C is shown in the
table 6.1.
A C A+C
0 0 0
0 1 1
1 0 1
1 1 1
Example 6.7: Simplify the following Boolean expression using rules and
laws of Boolean algebra and write the truth table and logic circuit for the
simplified expression.
The truth table of the simplified logic function is shown in the table 6.2.
Table 6.2: Truth table for AB+BC+AC
A B C AB BC AC AB+BC+AC
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 1 0 1
1 0 0 0 0 0 0
1 0 1 0 0 1 1
1 1 0 1 0 0 1
1 1 1 1 1 1 1
Solution:
Self-Assessment Questions
1. Less number of gates means less power consumption. (State true or
false)
2. The Boolean expression X+X′Y+Y′+(X+Y′) X′Y after simplification yields
____________.
3. The expression (A + C)(AD + AD) + AC + C can be minimized to
_____________.
Figure 6.3: K map for 2-variables: Different styles of row and column
identification
From the figure 6.4 it is evident that there are different ways of writing a
K-map. We can write a k-map for minterms and maxterms as well but
normally minterms will be preferred. The minterm are represented in k-map
as shown in the figure 6.4(d).
K map for 3-Variables: For three variables, there are eight possible
combinations and each cell in K-map corresponds to one of the
combinations.
The figure 6.4 shows the various ways of k-map for 3 variables.
Figure 6.4: K map for 3-variables: Different styles of row and column
identification
Once we have placed the 1's in the map, there is a simple procedure that
we apply.
K map for 4-variables: The figure 6.6 shows the various ways of k-map for
4 variables.
Figure 6.5: K map for 4-variables: Different styles of row and column
identification
.
This can be transformed into K-map as shown in the figure 6.6.
The simplified logic expression obtained from a K-map is not always unique.
Groupings can be made in different ways as shown in figure 6.8. But before
drawing a K-map, the logic expression must be in canonical form. The
various ways of grouping 1’s are shown below:
Opposite corner cells form a group.
Groups may wrap around. The leftmost cell in a row may be grouped
with the rightmost cell and the top cell in a column may be grouped with
the bottom cell.
Now let see some of the examples for simplification of given Boolean
expressions using K-map method.
As you can observe horizontally, the corresponding variables X and X' get
cancelled and when we observe the group vertically it corresponds to
only Y. So final simplified expression is F = Y
Example 6.10: Simplify F= X'Y+XY+XY' using K map.
In this example there are two variables X and Y. It requires a 2 variable
K-map. We draw the k-map with marking 1 for X'Y, XY and XY positions.
Now combine two 1's as shown in figure 6.9 to form two single terms.
F=X+Y
Figure 6.9: K map for X'Y+XY+XY'
Solution: Since there are three variables, we use a three variables k-map
as shown in the figure 6.10.
F = AB + BC
Figure 6.10: K-map for Example 6.11
F=X+Z
Figure 6.11: K-map for Example 6.12
Example 6.14: Simplify the following expression using K-map and write the
logic circuit for the simplified expression. Also write the truth table.
Solution: The k-map is drawn as shown in figure 6.13. The table 6.4 shows
the truth table of
The logic diagram for the expression F= AB+CD is shown in figure 6.14.
The table 6.4 shows its corresponding truth table.
Now group the 1’s starting from groups of eight 1’s, then four 1’s, two 1’s as
shown in figure 6.16.
Finally we get,
f = aIdI + bdI+ aIbc+abId + cIdI
Example 6.16: Simplify the following expression using K-Map.
In the figure 6.18, A'B'C', A'BC', A'BC, ABC, A'C', A'B, and BC are the
implicants
Prime implicant: A prime implicant is an implicant of the function that is
not included in any other implicant of the function. The figure 6.19 illustrates
this concept.
We can observe that figure 6.20(a) shows all prime implicants, but the figure
6.20(b) shows only the essential prime implicants that have at least one ‘1’
and that are not included in any other prime implicants.
Redundant Group: In a redundant group all its elements (all 1’s) are
covered by other groups. The figure 6.21 illustrates this concept.
Don’t Cares:
In some digital systems, certain input conditions never occur during normal
operations and hence the corresponding output never appears. Since the
output does not appear it is indicated by an X or d in the truth table. A "don't
care" condition is a combination of inputs for which the designer doesn't
care what the output is. Therefore "don't care" conditions can either be
included in or excluded from any rectangular group, whichever makes it
larger. Don’t care conditions are indicated on the map with a dash or X. This
X can be 0 or 1. This means don’t cares can be treated as 0’s and 1’s
whichever is more convenient in the process of k-map simplification.
Karnaugh maps also allow easy minimizations of functions whose truth
tables include "don't care" conditions.
Consider the truth table shown in the table 6.5 in which the output is low for
all input entries from 1001 and ‘X’ from 1010 through 1111. The don’t care
conditions are denoted by ’X’.
The K-map for the truth table 6.5 is shown in the figure 6.22.
Here three don’t cares are treated as 1’s to get a quad which eliminates two
variables. The remaining don’t cares are treated as 0’s.
Steps to be followed to apply don’t care conditions:
1. For the given truth table, draw a K-map with 0’s, 1’s and don’t cares.
2. Encircle the actual 1’s on the K-map in the largest groups, by treating
don’t cares as 1’s.
3. After the actual 1’s have been included in groups discard the remaining
don’t cares visualizing them as 0’s.
Example 6.17: Minimize the function
F (A, B, C, D) = ∑ (1, 3,7,11,15) + d(0,2,5).
Solution: The figure 6.23 shows the Karnaugh map for the above function.
F= A’B’+CD
Figure 6.23: K map for example 6.17
In the Karnaugh map of figure 6.23, the minterm m0 and m2 i.e., A′B′C′D′
and A′B′CD′, are don’t care terms and its value is assumed as 1s, while
making a quad. The simplified SOP expression of the above function can
be written as
F= A’B’+CD.
Example 6.18: Example: Simplify the Boolean function
F(w, x, y, z) = S(1,3,7,11,15)+ d(w, x, y, z) = S(0,2,5)
Solution: The figure 6.24 shows the Karnaugh map for the above function.
Activity 1:
Write Boolean expression that has minimum of 4 minterms with 2 don’t
care conditions and simplify it using a K-map.
algorithms, and it also gives a deterministic way to check that the minimal
form of a Boolean function has been reached.
The method involves two steps:
1. Finding all prime implicants of the function.
2. Use those prime implicants in a prime implicant chart to find the
essential prime implicants of the function, as well as other prime
implicants that are necessary to cover the function.
Now we consider the following example 6.20 to explain Quine-McCluskey
method of solving given Boolean expressions.
Solution:
The following steps are followed to simplify the given Boolean expression
using Quine-McCluskey method.
Step 1: If the function is not given in binary minterm form, then translate the
decimal values to binary notation of minterms.
The F(A,B,C,D) = ∑m(0,2,3,6,7,8,9,10,13) can be written as
F(A,B,C,D) = ∑m(0000, 0010, 0011, 0110, 0111, 1000, 1001, 1010, 1101)
Step 2: Minterms are grouped depending upon number of one’s they have
and entered in table form as shown in the table 6.6
Step 3: The minterms in the adjacent blocks are compared to determine the
minterms which are differed by only one bit. Replace the missing literal
by – and place the minterms in the next column. The minterms in the
present column which are combined are placed with a check mark as shown
in the table 6.7.
Table 6.7: Quine-McCluskey Method for Step 3
Step 4: The minterms in the adjacent blocks are compared to determine the
minterms which are differed by only one bit. Note -’s must line up. Replace
the missing literal by – and place the minterms in the next column. The
minterms in the present column which are combined are placed with a
check mark. This step is shown in the table 6.8. This process is completed
until further comparison is not possible. This completes the first phase of
Q-M method.
Table 6.8: Quine-McCluskey Method for Step 4
The terms which are not marked with ‘√’ are the Prime implicants. From the
table 6.8 the prime implicants and corresponding literals (or variables) are:
(8, 9) 100-
(9, 13) 1-01
(0, 2, 8, 10) 0-0-
(2, 6, 3,7 ) 0-1-
But all the prime implicants may not be necessary. To find out the essential
prime implicants, follow the step 5 and 6.
Step 5: The prime implicant chart is to be formed with minterms in a row
and prime implicants in column. When there is intersection of minterm and
the prime implicant, the placed as shown in the table table 6.9.
Table 6.9: Quine-McCluskey Method for Step 5
Step 6: Select prime implicants for minterms with only one in a column as
shown in the table 6.10
Table 6.10: Quine-McCluskey Method for Step 6
The minterms with only one are the essential prime implicants as they are
absolutely necessary to form the minimized Boolean expression. So
minterms (0, 2, 8,10) and (2,3,6,7) are essential prime implicants. Note that
the minterms already covered are dropped. For example, the single tick
mark() is selected for column 0 and 3 and corresponding minterms are
marked with star mark (*). The remaining single tick marks() for the
columns 3, 6,7,10 and 13 have been dropped since the corresponding
minterms are already covered.
Step 7: Repeat step 6 for minterms with only two in a column. If the
minterms of those colums are already included, then not required to be
considered. This step is shown in the table 6.11. This step is required to
include some minterms that are still not covered.
Table 6.11: Quine-McCluskey Method for Step 7
Step 8: Repeat step 7 for minterms with only two in a column. If the
minterms of those colums are already included, then not required to be
considered. This step is shown in the table 6.14
Table 6.14: Step 8 of example 6.21.
Figure 6.26 shows the AND gates are replaced by NAND gates and the OR
gate is replaced by a bubbled OR gate.
The NAND gate with same inputs gives complemented result; therefore F′ is
replaced by NAND gate with F input to its both inputs. Thus all the three
implementations of the Boolean function are equivalent.
From the above example we can summarize the rules for obtaining the
NAND-NAND logic diagram from a Boolean function as follows:
Simplify the given Boolean function and express it in sum of products
form (SOP form).
Draw a NAND gate for each product term of the function that has two or
more literals. The inputs to each NAND gate are the literals of the term.
This constitutes a group of first-level gates.
If Boolean function includes any single literal or literals draw NAND
gates for each single literal and connect corresponding literal as an input
to the NAND gate.
Draw a single NAND gate in the second level, with inputs coming from
outputs of first level gates.
In figure 6.29, the OR gates are replaced by NOR gates and the AND gate
is replaced by a bubbled AND gate.
The NOR gate with same inputs gives complemented result. Therefore, F is
replaced by NOR gate with F input to its both inputs. Thus all the three
implementations of the Boolean function are equivalent.
From the above example, we can summarize the rules for obtaining the
NOR-NOR logic diagram from a Boolean function as follows:
Simplify the given Boolean function and express it in product of sums
form(POS form)
Draw a NOR gate for each sum term of the function that has two or
more literals. The inputs to each NOR gate are the literals of term. This
constitutes a group of first level gates.
If Boolean function includes any single literal or literals, draw NOR gate
for each single literal and connect corresponding literal as an input to the
NOR gate.
Draw a single NOR gate in the second level, with inputs coming from
outputs of first level gates.
Activity 2:
Write Boolean expressions of any digital circuit that involves six variables
and simplify using Quine–McCluskey (Q-M) method.
Self-Assessment Questions
10. The implementation of a Boolean function with __________logic
requires that the function be simplified in the sum of product form.
11. The NOR function is a dual of the ___________ function.
12. In product of sums form, we implement all sum terms using AND gates.
(State true or false)
6.6 Summary
Let us recapitulate the important concepts discussed in this unit:
Simplification of Boolean expressions is mainly used to reduce the gate
count of a design.
The ways to simplify a logic design are: Boolean algebra, Karnaugh
Map, and Quine-Mc Cluskey method.
A Karnaugh map (K-map) is a visual representation of a Boolean
function.
K-map consists of a grid of squares called Cells and each square (or
cell ) represents either a minterm or maxterm.
A group of eight 1’s is called an octet.
In K-map, groups may be horizontal or vertical, but not diagonal.
A prime implicant is an implicant of the function that is not included in
any other implicant of the function.
An essential prime implicant is a prime implicant that includes at least
one 1 that is not included in any other prime implicant.
When a Boolean expression contains more than six variables, then in
such cases the Quine–McCluskey(Q-M) method can be used to solve
Boolean equations.
Glossary:
A Karnaugh map (K-map): A visual representation of a Boolean function.
Pair: A group of two 1’s is.
Quad: A group of four 1’s.
Octet: A group of eight 1’s.
Implicant: A product term that is included in the function.
Prime implicant: An implicant of the function that is not included in any
other implicant of the function.
Essential prime implicant: A prime implicant that includes at least one 1
that is not included in any other prime implicant.
Don’t Cares : A condition that exists for a combination of inputs for which
the designer doesn't care what the output is.
6.8 Answers
Self-Assessment Questions
1. True
2. 1
3. A+C
4. Karnaugh map (K-map)
5. Octet
6. 1, 0
7. F= AB+BC
8. Prime implicant
9. True
10. NAND-NAND
11. NAND
12. False
Terminal Questions
1. XY′Z′+XY′Z′W+XZ′ = XZ′. Refer to section 6.2 for more details.
2. AB(A + B)(B + B) = A. Refer to section 6.2 for more details.
3. A Karnaugh map (K-map) is a visual representation of a Boolean
function. Refer to sub-section 6.3.1 for more details.
6. A condition that exists for a combination of inputs for which the designer
doesn't care what the output is. Refer to sub-section 6.3.1 for more
details.
7. When a Boolean expression contains more than six variables, then it
becomes very difficult to solve the expression using Karnaugh map
method. In such cases the Quine–McCluskey (Q-M) method can be
used to solve Boolean equations. Refer to sub-section 6.3.2 for more
details.