Boolean Algebra (Compatibility Mode)
Boolean Algebra (Compatibility Mode)
X+0= X
X+1 =1
X+X = X
X+X = 1
2.
4.
6.
8.
X .1 =X
Identity element
X 0=0
X .X = X
Idempotence
X .X = 0
Complement
X=X
X + Y =Y + X
(X + Y) + Z = X + (Y + Z)
X(Y + Z) = XY + XZ
X + Y =X . Y
Involution
11. XY = YX
Commutative
Associative
13. (XY) Z = X(YZ)
15. X + YZ = (X + Y) (X + Z) Distributive
DeMorgans
17. X . Y = X + Y
(Absorption Theorem)
Justification
Identity element: A 1 = A
Distributive
1+B=1
Identity element
Useful Theorems
Minimization
XY+XY=Y
Minimization (dual)
(X+Y)(X+Y) = Y
Absorption
X+XY=X
Absorption (dual)
X (X + Y) = X
Simplification
X+XY=X+Y
Simplification (dual)
X (X + Y) = X Y
DeMorgans
X+Y=XY
DeMorgans (dual)
XY=X+Y
Boolean Algebra and Logic Gates 7
X+Y=XY
XY=X+Y
0
1
0
1
0
0
0
1
0
1
1
1
1
1
0
0
1
0
1
0
1
0
0
0
1
0
0
0
1
1
1
0
1
1
1
0
Complementing Functions
Use DeMorgan's Theorem:
1. Interchange AND and OR operators
2. Complement each constant and literal
Example: Complement F = xy z + x y z
F = (x + y + z)(x + y + z)
Example: Complement G = (a + bc)d + e
G = (a (b + c) + d) e
Boolean Algebra and Logic Gates 9
Expression Simplification
An application of Boolean algebra
Simplify to contain the smallest number
of literals (variables that may or may not
be complemented)
A B + A CD + A BD + A C D + A BCD
= AB + ABCD + A C D + A C D + A B D
= AB + AB(CD) + A C (D + D) + A B D
= AB + A C + A B D = B(A + AD) +AC
= B (A + D) + A C (has only 5 literals)
Boolean Algebra and Logic Gates 10
Minterms
Minterms are AND terms with every variable
present in either true or complemented form.
Given that each binary variable may appear
normal (e.g., x) or complemented (e.g., x), there
are 2n minterms for n variables.
Example: Two variables (X and Y) produce
2 x 2 = 4 combinations:
XY (both normal)
X Y (X normal, Y complemented)
XY (X complemented, Y normal)
X Y (both complemented)
Thus there are four minterms of two variables.
Boolean Algebra and Logic Gates 12
Maxterms
Maxterms are OR terms with every variable in
true or complemented form.
Given that each binary variable may appear
normal (e.g., x) or complemented (e.g., x), there
are 2n maxterms for n variables.
Example: Two variables (X and Y) produce
2 x 2 = 4 combinations:
X + Y (both normal)
X + Y (x normal, y complemented)
X + Y (x complemented, y normal)
X + Y (both complemented)
Boolean Algebra and Logic Gates 13
Index
Minterm
Maxterm
m0 = x y
M0 = x + y
m1 = x y
M1 = x + y
m2 = x y
M2 = x + y
m3 = x y
M3 = x + y
y
0
0
1
1
0
0
1
1
z
0
1
0
1
0
1
0
1
Index
0
1
2
3
4
5
6
7
Minterm
m0 = x y z
m1 = x y z
m2 = x y z
m3 = x y z
m4 = x y z
m5 = x y z
m6 = x y z
m7 = x y z
Maxterm
M0 = x + y + z
M1 = x + y + z
M2 = x + y + z
M3 = x + y + z
M4 = x + y + z
M5 = x + y + z
M6 = x + y + z
M7 = x + y + z
For Maxterms:
0 means the variable is Not Complemented and
1 means the variable is Complemented.
Standard Order
All variables should be present in a minterm or
maxterm and should be listed in the same order
(usually alphabetically)
Example: For variables a, b, c:
Maxterms (a + b + c), (a + b + c) are in standard order
However, (b + a + c) is NOT in standard order
(a + c) does NOT contain all variables
Minterms (a b c) and (a b c) are in standard order
However, (b a c) is not in standard order
(a c) does not contain all variables
Boolean Algebra and Logic Gates 17
Sum-Of-Minterm (SOM)
Sum-Of-Minterm (SOM) canonical form:
Sum of minterms of entries that evaluate to 1
x
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
0
1
0
0
0
0
1
1
Minterm
m1 = x y z
Focus on the
1 entries
m6 = x y z
m7 = x y z
F = m1 + m6 + m7 = (1, 6, 7) = x y z + x y z + x y z
Boolean Algebra and Logic Gates 18
Sum-Of-Minterm Examples
F(a, b, c, d) = (2, 3, 6, 10, 11)
F(a, b, c, d) = m2 + m3 + m6 + m10 + m11
abcd+abcd+abcd+abcd+abcd
G(a, b, c, d) = (0, 1, 12, 15)
G(a, b, c, d) = m0 + m1 + m12 + m15
abcd+abcd+abcd+abcd
Boolean Algebra and Logic Gates 19
Product-Of-Maxterm (POM)
Product-Of-Maxterm (POM) canonical form:
Product of maxterms of entries that evaluate to 0
x
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
1
1
0
1
0
1
0
1
Maxterm
M2 = (x + y + z)
Focus on the
0 entries
M4 = (x + y + z)
M6 = (x + y + z)
10
Product-Of-Maxterm Examples
F(a, b, c, d) = (1, 3, 6, 11)
F(a, b, c, d) = M1 M3 M6 M11
(a+b+c+d) (a+b+c+d) (a+b+c+d) (a+b+c+d)
G(a, b, c, d) = (0, 4, 12, 15)
G(a, b, c, d) = M0 M4 M12 M15
(a+b+c+d) (a+b+c+d) (a+b+c+d) (a+b+c+d)
Boolean Algebra and Logic Gates 21
Observations
We can implement any function by "ORing" the minterms
corresponding to the 1 entries in the function table. A
minterm evaluates to 1 for its corresponding entry.
We can implement any function by "ANDing" the maxterms
corresponding to 0 entries in the function table. A maxterm
evaluates to 0 for its corresponding entry.
The same Boolean function can be expressed in two
canonical ways: Sum-of-Minterms (SOM) and Product-ofMaxterms (POM).
If a Boolean function has fewer 1 entries then the SOM
canonical form will contain fewer literals than POM.
However, if it has fewer 0 entries then the POM form will
have fewer literals than SOM.
Boolean Algebra and Logic Gates 22
11
Minterm
0
0
0
0
1
1
1
1
0
1
0
1
0
1
0
1
1
1
1
0
1
1
0
0
m0 = x y z
m1 = x y z
m2 = x y z
m0 + m1 + m2 + m4 + m5 =
m4 = x y z
m5 = x y z
xyz+xyz
0
0
1
1
0
0
1
1
F = (0, 1, 2, 4, 5) =
xyz+xyz+xyz+
0
0
0
0
1
1
1
1
0
1
0
1
0
1
0
1
1
1
1
0
1
1
0
0
0
0
1
1
0
0
1
1
Minterm
F = (3, 6, 7) =
M3 M6 M7 =
M3 = (x+y+z)
M6 = (x+y+z)
M7 = (x+y+z)
Boolean Algebra and Logic Gates 24
12
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
0
1
1
1
0
1
0
1
Minterm
Maxterm
M0 = (x + y + z)
m1 = x y z
m2 = x y z
m3 = x y z
M4 = (x + y + z)
m5 = x y z
M6 = (x + y + z)
m7 = x y z
F = m1+m2+m3+m5+m7 = (1, 2, 3, 5, 7) =
xyz+xyz+xyz+xyz+xyz
F = M0 M4 M6 = (0, 4, 6) =
(x+y+z)(x+y+z)(x+y+z)
Boolean Algebra and Logic Gates 25
13
Function Complements
The complement of a function expressed as a
sum of minterms is constructed by selecting the
minterms missing in the sum-of-minterms
canonical form
Alternatively, the complement of a function
expressed by a Sum of Minterms form is simply
the Product of Maxterms with the same indices
Example: Given F(x, y, z) = (1, 3, 5, 7)
F(x, y, z) = (0, 2, 4, 6)
F(x, y, z) = (1, 3, 5, 7)
Boolean Algebra and Logic Gates 28
14
Standard Forms
Standard Sum-of-Products (SOP) form:
equations are written as an OR of AND terms
Standard Product-of-Sums (POS) form:
equations are written as an AND of OR terms
Examples:
SOP: A B C + A B C + B
POS: (A + B) (A+ B + C ) C
These mixed forms are neither SOP nor POS
(A B + C) (A + C)
A B C + A C (A + B)
Boolean Algebra and Logic Gates 30
15
F( A, B, C) =
S (1,4,5,6,7)
16
B
C
It is quite
apparent which
is simpler!
Questions:
How can we attain a simplest expression?
Is there only one minimum cost circuit?
The next part will deal with these issues
Boolean Algebra and Logic Gates 34
17
Terms of Use
All (or portions) of this material 2008 by Pearson
Education, Inc.
Permission is given to incorporate this material or
adaptations thereof into classroom presentations and
handouts to instructors in courses adopting the latest
edition of Logic and Computer Design Fundamentals
as the course textbook.
These materials or adaptations thereof are not to be
sold or otherwise offered for consideration.
This Terms of Use slide or page is to be included within
the original materials or any adaptations thereof.
18
Binary Variables
Recall that the two binary values have
different names:
True/False
On/Off
Yes/No
1/0
Logical Operations
The three basic logical operations are:
AND
OR
NOT
19
Notation Examples
Examples:
Y = A B is read Y is equal to A AND B.
z = x + y is read z is equal to x OR y.
X = A is read X is equal to NOT A.
Operator Definitions
Operations are defined on the values
"0" and "1" for each operator:
AND
00=0
01=0
10=0
11=1
OR
NOT
0+0=0
0+1=1
1+0=1
1+1=1
0=1
1=0
20
Truth Tables
Tabular listing of the values of a function for all
possible combinations of values on its arguments
Example: Truth tables for the basic logic operations:
X
0
0
1
1
AND
Y Z = XY
0
0
1
0
0
0
1
1
X
0
0
1
1
Y
0
1
0
1
NOT
OR
Z = X+Y
0
1
1
1
Z=X
X
0
1
1
0
XY
YZ
F=XY+YZ
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
0
0
0
0
0
0
1
1
1
1
0
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
1
1
Boolean Algebra and Logic Gates 42
21
Z = X Y
Z= X+ Y
Y
AND gate
Z= X
X
NOT gate or
inverter
OR gate
X Y
(OR)
X+ Y
(NOT)
(AND)
F = X + Y Z
0
1
0
X
0
1
Y
1
1
Z
1
Logic Equation
F = X +Y Z
Logic Diagram
22