Simplification of Boolean Expressionsq
Simplification of Boolean Expressionsq
• Often in the design and development of digital circuits, the designer will start
with simple logic requirements but add more and more complex gating making
the final design a complex combination of several gates, some have the same
inputs.
• At some point the designer must step back from the design and review the
combinational logic circuit that has been developed and see of there are ways of
reducing the number of gates without changing the function of the circuit.
Example 1
• The logic circuit used to turn on a warning buzzer at X based on the input
conditions at A, B and C. A simplified equivalent circuit that will perform the
same function can be formed by using Boolean Algebra.
B B.(A+C)
A
C A+C X Buzzer
C
X B ( A C ) C
BA BC C
BA C ( B 1)
BA C
Thus draw the simplified circuit:
A X
B
C BC
B B.(A+C)
A
C A+C X Buzzer
C
Simplification of Boolean Expressions …/cont’d
Example 2
X
A A+B
B
BC.(A+B)
C B.C
X BC ( A B ) A
ABC BBC A
ABC BC A
BC ( A 1) A
BC A
Using rules B
B.Band A 1 1
X AB AC BC AB BC
Applying Boolean Algebra is fine but can be error prone and a lengthy process.
• There is a simpler graphical method using a Karnaugh map, which is a
particularly representation of a truth table
more systematic
Simplification of Boolean Expressions …/cont’d
Each map lists the product terms that can be formed from n variables, each in a
different square.
n
A map of n variables will have 2 squares, each representing a minterm.
• The minterm in each square or element of the map is the product of the
variables listed at row and column of the element
xyz is at the intersectionxy
of and z
The map is filled by placing 1’s in the squares for terms that lead to a 1 output.
B
A 0 1
0 0 1
Z AB AB 1 1 0
However its usefulness is chiefly due to the arrangement of the cells or squares.
• Each cell differs from the adjacent cell by having exactly one variable
complemented in the minterm.
• The expression must be written in canonical form each term in the expression
must contain each variable.
E.g. Z ABC A BC AB C AB C
Simplification of Boolean Expressions …/cont’d
BC
A 00 01 11 10
0 0 0 1 0
1 1 1 1 0
The top row BC is numbered such that only 1-bit changes at a time, as we move
from box to box
• known as a Grey Code (code where only one bit changes at a time)
i.e. not numbered as in the usual sequence, but done to show the
relationship between variables.
If we consider a grouping of two of the circled terms which are adjacent we can
see that
AB C AB C AB C C AB
• A is constant = 1
• B is constant = 0
• C changes and will not be in the final expression.
Simplification of Boolean Expressions …/cont’d
So to simplify an expression using a Karnaugh Map we circle all the ones together
that we can using circles of:
• 2
• 4
• 8
• 16
BC
A 00 01 11 10
0 0 0 1 0
1 1 1 1 0
Simplification of Boolean Expressions …/cont’d
minimum expression :
Z AB BC
Z AB AC BC
CD
AB 00 01 11 10
00 0 0 1 0
01 1 1 1 0
11 0 1 1 0
10 0 0 1 0
Z CD BD ABC
Simplification of Boolean Expressions …/cont’d
A A.B.C
B.D
C
C.D
D
Simplification of Boolean Expressions …/cont’d
00 0 0 1 0
01 1 1 1 0
11 0 1 1 0
10 0 0 1 0
Z CD C B AD
Simplification of Boolean Expressions …/cont’d
Z
B
B
Z
Z CD C B AD C
Z C D C B A D
Simplification of Boolean Expressions …/cont’d
A A
Z Z
B B
A A
Z Z
B B
A A
Z Z
B B
A A
Z Z
B B
A A
Z Z
B B
Simplification of Boolean Expressions …/cont’d
B
Z
C
B Z
C
The main reason is that a NAND can be made to yield AND and OR gates
an AND gate can be formed from 2 NAND gates
and
2-input OR can be formed from 3 NAND gates
A
A B A B
B
A A
A
AB
B B
B
Simplification of Boolean Expressions …/cont’d
Thus a set of NAND’s can thus be used to make any combinational network by
substituting the above for AND and OR blocks
A A. B A+B
B
A A
AB
B B
CD
AB 00 01 11 10
00 1 1 0 1
01 0 1 1 1
11 0 1 1 1
10 1 1 0 0
Minimum expression
Z B C C D BC A CD eqn (1)
Sum of Products
or Z B C BD BC A CD
BD is the not an essential prime implicant
Simplification of Boolean Expressions …/cont’d
CD
AB 00 01 11 10
00 1 1 0 1
01 0 1 1 1
11 0 1 1 1
10 1 1 0 0
Z BC D AB C B CD
Simplification of Boolean Expressions …/cont’d
Z BC D AB C B CD
Z B C D A B C B C D eqn (3)
Product of sums Use OR and AND
Z BC D AB C B CD
Z B C C D BC A CD
eqn (5)
Z B C C D BC A CD
Use NAND
Simplification of Boolean Expressions …/cont’d
or Egn. 5 as in Figure E
i.e. only NAND gates
Simplification of Boolean Expressions …/cont’d
• between the output of the OR gates and input of the AND gate
• obviously has no effect on the output
• now each OR + NOT makes it a NOR
And
A C D
A
B C
B
Z
C
B C
D
C D
Z BC C D BC ACD
Simplification of Boolean Expressions …/cont’d
A B C
B
B C D Z
D
B C D
Z B C D A B C B C D
Simplification of Boolean Expressions …/cont’d
A B C
B B C D Z
D
B C D
Z BC D ABC BCD
Simplification of Boolean Expressions …/cont’d
B
B C D Z
D
B C D
Z B C D A B C B C D
Simplification of Boolean Expressions …/cont’d
A
B C
B
Z
C
B C
D
C D
Z BC C D BC ACD
Simplification of Boolean Expressions …/cont’d
B B C D Z
D
B C D
Z B C D A B C B C D