Simplification of Boolean Expression
Simplification of Boolean Expression
Ms.R.Gayathri,
Assistant Professor (Sr.Gr.)/ECE
Boolean Algebra Summary
2
Boolean Algebra Summary
• Recall that the two binary values have different names:
– True/False
– On/Off
– Yes/No
– 1/0
• Use 1 and 0 to denote the two values.
• The three basic logical operations are:
– AND
– OR
– NOT
• AND is denoted by a dot (·).
• OR is denoted by a plus (+).
• NOT is denoted by an overbar ( ¯ ), a single quote mark (') after, or (~)
before the variable
Boolean Algebra Summary
• Examples:
– is read “Y is equal to A AND B.”
– is read “z is equal to x OR y.”
– is read “X is equal to NOT A.”
AND OR NOT
X Y Z = X·Y X Y Z = X+Y X Z
0 0 0 0 0 0 X
0 1 0 0 1 1 0 1
1 0 0 1 0 1 1 0
1 1 1 1 1 1
Boolean Operator Precedence
• The order of evaluation is:
• Parentheses
• NOT
• AND
• OR
• Identity Element
x•1=x x+0=x
x’1 = x ’ x’+ 0 = x ’
• Complement
x • x’ = 0 x + x’ = 1
Boolean Algebra Theorems
Theorem 1
– x•x=x x+x=x
• Theorem 2
– x•0 x+1=1
=0
• Theorem 3: Involution
– ( x’ )’ = x (x)=x
Boolean Algebra Theorems
• Theorem 4:
– Associative: (x•y)•z=x•(y•z)
(x+y)+z=x+(y+z)
– Distributive :
x•(y+z)=(x•y)+(x•z)
x+(y•z)=(x+y)•(x+z)
• Theorem 5: DeMorgan
– ( x • y )’ = x’ + ( x + y )’ = x’ • y’
–x•y) =x +y
y’ (x+y) = x•y
• Theorem 6: Absorption
– x•(x+y)=x
x+(x•y)=x
Truth Table to Verify DeMorgan’s
X + Y =X·Y X · Y = X + Y
X Y X·Y X+Y X Y X+Y X · Y X·Y X+Y
0 0 0 0 1 1 1 1 1 1
0 1 0 1 1 0 0 0 1 1
1 0 0 1 0 1 0 0 1 1
1 1 1 1 0 0 0 0 0 0
• Generalized DeMorgan’s Theorem:
X1 + X2 + … + X n = X1 · X2 · … · Xn
X1 · X 2 · … · X n = X1 + X 2 + … + X n
Logic Gates
• Later, vacuum tubes that open and close current paths electronically
replaced relays.
• Today, transistors are used as electronic switches that open and close
current paths.
Logic Gate Symbols
• After finding the circuit inputs and outputs, you can come up with either an
expression or a truth table to describe what the circuit does.
• You can easily convert between expressions and truth tables.
Find the circuit’s
inputs and outputs
• The design task is largely to determine what type of circuit will perform the
function described in the truth table.
• While some people seem to have a natural ability to look at a truth table and
immediately envision the necessary logic gate or relay logic circuitry for the task,
there are procedural techniques available for the rest of us.
• This problem will be solved by showing that any Boolean function can be
represented by a Boolean sum of Boolean products of the variables and their
complements or the product of sums.
• There are two ways to convert from truth tables to Boolean functions:
1. Using Sum of Products /Minterms
2. Using Product of Sums /Maxterms
Converting from Truth Table to
Boolean Function
• Minterm A B Minterm
– Product (AND function) C
– Contains all variables 0 0 0 m0 ABC
0
– Evaluates to ‘1’ for a specific
1 0 0 m1 ABC
combination 1
Example 2 0 1 m2 ABC
A B C 0
A=0 (0) • (0) • (0) 3 0 1 m3 ABC
1
B=0 4 1 0 m4 ABC
C=0 1 • 1 • 1= 0
1
5 1 0 m5 ABC
1
Converting from Truth Table to
Boolean Function
• Maxterm A B Maxterm
– Sum (OR function) C
– Contains all variables 0 0 0 M0 A B
0 C
– Evaluates to ‘0’ for a specific
1 0 0 M1 A B
combination
1 C
Example
2 0 1 M2 A B
A B C 0 C
A=1 (1) • (1) • (1) 3 0 1 M3 A B
B=1 1 C
C=1 0 • 0 • 0= 4 1 0 M4 A B
0 0 C
Converting from Truth Table to Boolean Function
• Sum of Minterms A B
C
F F
B
Z
C
D
A \A
NOR NOR
\B
B
Z NOR Z
C
\C
D NOR NOR
\D
Step 1 Step 2
conserve conserve
"bubbles" "bubbles"
Conversion Between Forms (cont’d)
D \C
NOR
\D
• Karnaugh maps, or K-maps, are often used to simplify logic problems with 2,
3 or 4 variables.
For the case of 2 variables, we form a map consisting of 22=4 cells as shown
in Figure
A A A
0 1 0 1 0 1
B B B
0 A B A B 0 00 10 0 AB AB
0 2
01 11
1 A B A B 1
1 3
1
A B AB
Maxterm Minterm
Karnaugh maps
Cell = 23=8
AB
C 00 01 11 10
0 2 6 4
0 A B C A BC ABC AB C
1 3 7 5
1 A B C A BC ABC AB C
Karnaugh maps
2 6 14 10
10
Karnaugh maps
2-variable Karnaugh maps are trivial but can be used to introduce the
methods you need to learn. The map for a 2-input OR gate looks like this:
A
0 1
B
A
Y 0 1
B
A
1 1 1
A B Y
0 0 0
B
0 1 1
1 0 1
A+B
1 1 1
Example
AC
A B C Y
0 0 0 1 AB
0 0 1 1 C 00 01 11 10
0 1 0 0 0 1 1 1
0 1 1 0
1 0 0 1 1 1 1
1 0 1 1
1 1 0 1
1 1 1 0 B
B AC
Plotting Functions on the
K-map
SOP Form
Canonical SOP Form
F A, B, C m 1,3,5, 6
Three-Variable K-Map Example
Plot 1’s (minterms) of switching function
ab
c 00 01 11 10
0 1
1 1 1 1
F a, b, c m 1,3,5, 6
Three-Variable K-Map Example
Plot 1’s (minterms) of switching function
ab
c 00 01 11 10
ab
bc
0 1
1 1 1 1
F a, b, c ab bc
Guidelines for Simplifying Functions
F a, b, c, d m 0, 2,3, 6,8,12,13,15
Four-variable K-Map
F a, b, c, d m 0, 2,3, 6,8,12,13,15
ab
cd 00 01 11 10
00
1 1 1
01
1
11
1 1
10
1 1
Four-variable K-Map
ab
cd 00 01 11 10
00
1 1 1
01
1
11
1 1
10
1 1
F m 0, 2,3, 6,8,12,13,15
Four-variable K-Map
ab
cd 00 01 11 10
00
1 1 1
01
1
11
1 1
10
1 1
F abd abc acd abd acd
Example
• Use a K-Map to simplify the following Boolean expression
F a, b, c, d m 0, 2, 6,8,12,13,15
d 3,9,10
D=Don’t care (i.e. either 1 or 0)
Four-variable K-Map
ab
cd 00 01 11 10
00
1 d 1 1
01
1 d
11
d 1
10
1 1
F a, b, c, d m 0, 2, 6,8,12,13,15 d 3, 4,9
Four-variable K-Map
ab
cd 00 01 11 10
00
1 d 1 1
01
1 d
11
d 1
10
1 1
F ac ad abd
Five variable K-map- F a, b, c, d , e
A=1
A=0
Use Two Four-variable K-Maps
bc bc
de 00 01 11 10 de 00 01 11 10
00 00
01 01
11 11
10 10
Five variable example
F a, b, c, d , e m 5, 7,13,15, 21, 23, 29,31
Use Two Four-variable K-Maps
A=0 map A=1 map
bc bc
de 00 01 11 10 de 00 01 11 10
00 00
01
1 1 01 1 1
11
1 1
11
11
10 10
F2 a ce
F1 a ce
F F1 F2 a ce a ce ce
Plotting Functions on the
K-map
POS Form
PoS Optimization
• Maxterms are grouped to find minimal PoS
expression 00 01 yz11 10
0 x +y+z x+y+z’ x+y’+z’ x+y’+z
x
1 x’ +y+z x’+y+z’ x’+y’+z’ x’+y’+z
PoS Optimization
• F(W,X,Y,Z)= ∏ M(0,1,2,4,5)
yz
00 01 11 10
F(W,X,Y,Z)= Y . (X + Z)
yz
00 01 11 10
0 0 0 1 0
x
1 0 0 1 1
PoS Optimization from SoP
F(W,X,Y,Z)= Σm(0,1,2,5,8,9,10)
= ∏ M(3,4,6,7,11,12,13,14,15)
0 0 0 Or,
1 1 1 1
1 1 1 1
Thank you