You are on page 1of 40

Boolean expression

• Given a Boolean expression, we can construct a functionally


equivalent logic circuit (not unique).
• Given a logic circuit, we can derive a Boolean expression of the
corresponding Boolean function.
• Given a Boolean expression or logic circuit, we can derive the truth
table of the corresponding Boolean function
Simplification of Boolean functions

Example 1:Simplify the following function


F = A.B + A.B + B.C
= A. (B + B) + B.C How many gates do you save
= A.1 + B.C from this simplification?
= A + B.C
Simplification
There are many ways to simplify a logic design, some of them are given
below. We will be looking at each of these in detail in the next few
pages.
• Algebraic Simplification.
• Simplify symbolically using theorems/postulates.
• Requires good skills
• Karnaugh Maps.
• Diagrammatic technique using 'Venn-like diagram'.
• Limited to no more than 6 variables.
Karnaugh Maps (K maps)
Introduction to K-maps

• In 1953, Maurice Karnaugh was a


telecommunications engineer at Bell Labs.
• While exploring the new field of digital logic and its
application to the design of telephone circuits, he
invented a graphical way of visualizing and then
simplifying Boolean expressions.
• This graphical representation, now known as a
Karnaugh map, or Kmap, is named in his honor.

8
What are Karnaugh1 maps?
• Karnaugh maps provide an alternative way of simplifying
logic circuits.
• Instead of using Boolean algebra simplification
techniques, you can transfer logic values from a Boolean
statement or a truth table into a Karnaugh map.
• The arrangement of 0's and 1's within the map helps you
to visualise the logic relationships between the variables
and leads directly to a simplified Boolean statement.

Named for the American electrical engineer Maurice Karnaugh.


1
Description of Kmaps and Terminology

• A Kmap is a matrix consisting of rows and columns


that represent the output values of a Boolean
function.
• The output values placed in each cell are derived
from the minterms of a Boolean function.
• A minterm is a product term that contains all of the
function’s variables exactly once, either
complemented or not complemented.
• For example, the minterms for a function having the
inputs x and y are:

10
Sum Of Product (SOP)
Sum of product form is a form of expression in Boolean algebra in
which different product terms of inputs are being summed together.
This product is not arithmetical multiply but it is Boolean logical AND
and the Sum is Boolean logical OR.
Eg (A.B.C)+(C.D.E)
Product of Sums (POS)
• it is formed by multiplying(AND operation) the sum(OR) terms.
• Eg (A+B).(C+D)
Types of K-maps
1. Two input K map
2. Three input K map
3. Four input Kmap

Karnaugh maps, or K-maps, are often used to simplify logic problems


with 2, 3 or 4 variables.
Cell = 2n ,where n is a number of variables
Karnaugh maps
1. Two input K map

For the case of 2 variables, we form a map consisting of 2 2=4 cells


as shown in Figure
A
0 1
B
0 AB AB
1
A B AB
Karnaugh maps
• 3 variables Karnaugh map

Cell = 23=8
4-variable Karnaugh
• The 4-variable Karnaugh map is an
array of sixteen cells, as shown in
Fig.
• Binary values of A and B are along
the left side and the values of C and
D are across the top.
• The value of a given cell is the
binary values of A and B at the left
in the same row combined with the
binary values of C and D at the top
in the same column.
Four variable K map
Karnaugh maps
• The Karnaugh map is completed by entering a '1‘(or
‘0’) in each of the appropriate cells.
• Within the map, adjacent cells containing 1's (or 0’s)
are grouped together in twos, fours, or eights.
K-Map Simplification Process
1. Construct a label for the K-Map. Place 1s in cells corresponding to
the 1s in the truth table. Place 0s in the other cells.
2. Identify and group all isolated 1’s. Isolated 1’s are ones that cannot
be grouped with any other one, or can only be grouped with one
other adjacent one.
3. Group any 16 adjacent of 1’s .
4. Group any 8 adjacent , even if it contains some 1s already grouped
but not enclosed in a 16 adjacent .
5. Group any 4 adjacent , even if it contains some 1s already grouped
but not enclosed in a 16 or 8 adjacent.
6. Group any pair, even if it contains some 1s already grouped but not
enclosed in a 16, 8, or 4 ajacent.
7. OR together all terms to generate the SOP equation.

19
Kmap Simplification for Two
Variables
• Of course, the minterm function that we derived
from our Kmap was not in simplest terms.
• That’s what we started with in this example.
• We can, however, reduce our complicated
expression to its simplest terms by finding adjacent
1s in the Kmap that can be collected into groups
that are powers of two.

• In our example, we have two


such groups.
– Can you find them?

20
Kmap Simplification for Two
Variables
• The best way of selecting two groups of 1s
form our simple Kmap is shown below.
• We see that both groups are powers of two
and that the groups overlap.
• The next slide gives guidance for selecting
Kmap groups.

21
Kmap Simplification for Two
Variables

The rules of Kmap simplification are:


• Groupings can contain only 1s; no 0s.
• Groups can be formed only at right angles;
diagonal groups are not allowed.
• The number of 1s in a group must be a power
of 2 – even if it contains a single 1.
• The groups must be made as large as possible.
• Groups can overlap and wrap around the sides
of the Kmap.

22
Kmap Simplification for Three
Variables
• A Kmap for three variables is constructed as
shown in the diagram below.
• We have placed each minterm in the cell that will
hold its value.
• Notice that the values for the yz combination at the top
of the matrix form a pattern that is not a normal binary
sequence.

23
Kmap Simplification for Three
Variables
• Thus, the first row of the Kmap contains all
minterms where x has a value of zero.
• The first column contains all minterms where y
and z both have a value of zero.

24
Kmap Simplification for Three
Variables
• Consider the function:

• Its Kmap is given below.


• What is the largest group of 1s that is a power of 2?

25
Kmap Simplification for Three
Variables
• This grouping tells us that changes in the
variables x and y have no influence upon the
value of the function: They are irrelevant.
• This means that the function,

reduces to F(x) = z.

You could verify


this reduction
with identities or
a truth table.

26
Kmap Simplification for Three
Variables
• Now for a more complicated Kmap. Consider the
function:

• Its Kmap is shown below. There are (only) two


groupings of 1s.
• Can you find them?

27
Kmap Simplification for Three
Variables
• In this Kmap, we see an example of a group that
wraps around the sides of a Kmap.
• This group tells us that the values of x and y are not
relevant to the term of the function that is
encompassed by the group.
• What does this tell us about this term of the function?

What about the


green group in
the top row?

28
Kmap Simplification for Three
Variables

• The green group in the top row tells us that only the
value of x is significant in that group.
• We see that it is complemented in that row, so the
other term of the reduced function is .
• Our reduced function is:

Recall that we had


six minterms in our
original function!

29
K-map of 3 variables-
Z(A,B,C)= ∑ (1,3,6,7)
Kmap Simplification for Four Variables
• Our model can be extended to accommodate the 16
minterms that are produced by a four-input function.
• This is the format for a 16-minterm Kmap.

31
Kmap Simplification for Four Variables
• We have populated the Kmap shown below with the nonzero
minterms from the function:

• Can you identify (only) three groups in this Kmap?

Recall that
groups can
overlap.

32
Kmap Simplification for Four Variables
• Our three groups consist of:
• A purple group entirely within the Kmap at the right.
• A pink group that wraps the top and bottom.
• A green group that spans the corners.
• Thus we have three terms in our final function:

33
Kmap Simplification for Four Variables
• It is possible to have a choice as to how to pick
groups within a Kmap, while keeping the groups
as large as possible.
• The (different) functions that result from the
groupings below are logically equivalent.

34
How to group adjacent cells

You might also like