You are on page 1of 18

Logic Gates and Boolean Algebra

Logic Gates
Inverter, OR, AND, Buffer, NOR, NAND, XOR, XNOR
Boolean Theorem
Commutative, Associative, Distributive Laws
Basic Rules
DeMorgans Theorem
Universal Gates
NAND and NOR
Canonical/Standard Forms of Logic
Sum of Product (SOP)
Product of Sum (POS)
Minterm and Maxterm
2/18/2012 1 A.A.H Ab-Rahman, Z.Md-Yusof
SOP and POS
All boolean expressions can be converted to
two standard forms:
SOP: Sum of Product
POS: Product of Sum
Standardization of boolean expression makes
evaluation, simplification, and implementation
of boolean expressions more systematic and
easier
2/18/2012 2 A.A.H Ab-Rahman, Z.Md-Yusof
Sum of Product (SOP)
Boolean expressions are expressed as the sum
of product, example:


Each variable or their complements is called
literals
Each product term is called minterm
D C B CDE ABC
literal
minterm
2/18/2012 3 A.A.H Ab-Rahman, Z.Md-Yusof
SOP (cont.)
In SOP, a single overbar cannot extend over
more than one variable, example:


Standard SOP forms must contain all of the
variables in the domain of the expression for
each product term, example:
BC A AB Not SOP because BC
ABC C B A C B A
2/18/2012 4 A.A.H Ab-Rahman, Z.Md-Yusof
SOP (cont.)
In the following SOP form,


How many minterms are there?
How many literals in the second product term?
Is it in a standard SOP form?
How do we convert the boolean expression to
standard SOP form?

D C AB B A C B A
=> 3
=> 2
=> No
2/18/2012 5 A.A.H Ab-Rahman, Z.Md-Yusof
SOP (cont.)
To convert SOP to its standard form, we use
the boolean rules
A + A = 1
A(B + C) = AB + AC
We have

The first product term is missing the variable
D, and the second product term is missing C
and D
D C AB B A C B A
2/18/2012 6 A.A.H Ab-Rahman, Z.Md-Yusof
SOP (cont.)


D C AB D C B A
D C B A D C B A CD B A D C B A CD B A


D C AB D D C C B A D D C B A ) )( ( ) (
D C AB D D C B A C B A D C B A CD B A ) )( (
D C AB B A C B A
Apply D + D = 1 and C + C = 1
Apply the distributive law
Standard SOP form
2/18/2012 7 A.A.H Ab-Rahman, Z.Md-Yusof
Product of Sum (POS)
Boolean expressions are expressed as the
product of sum, example:

) )( ( C B A B A
literal
maxterm
2/18/2012 8 A.A.H Ab-Rahman, Z.Md-Yusof
POS (cont.)
In POS, a single overbar cannot extend over
more than one variable, example:


Standard POS forms must contain all of the
variables in the domain of the expression for
each sum term, example:
Not SOP because B+C ) )( ( C B A B A
) )( )( ( C B A C B A C B A
2/18/2012 9 A.A.H Ab-Rahman, Z.Md-Yusof
POS (cont.)
In the following POS form,


Is it in a standard POS form?
How do we convert the boolean expression to
standard POS form?

) )( )( ( D C B A D C B C B A
=> No
2/18/2012 10 A.A.H Ab-Rahman, Z.Md-Yusof
POS (cont.)
To convert POS to its standard form, we use
the boolean rules
A . A = 0
A + BC = (A + B)(A + C)
We have

The first sum term is missing the variable D,
and the second sum term is missing A
) )( )( ( D C B A D C B C B A
2/18/2012 11 A.A.H Ab-Rahman, Z.Md-Yusof
POS (cont.)
) )( )( ( D C B A D C B C B A
Apply D.D = 0 and A.A = 0 to first and second terms
) )( . )( . ( D C B A D C B A A D D C B A
Expand first and second terms
) (
) )( )( )( (
D C B A
D C B A D C B A D C B A D C B A


Standard POS form
2/18/2012 12 A.A.H Ab-Rahman, Z.Md-Yusof
Minterm and Maxterm
Minterm: Product terms in SOP
Maxterm: Sum terms in POS
Standard forms of SOP and POS can be derived from
truth tables
A B C Z
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 1
C B A
C B A
C B A
C B A
C B A
C B A
C AB
ABC
ABC C AB C B A C B A Z
) )( ( C B A C B A Z
For SOP form,
For POS form,

) 7 , 6 , 5 , 1 ( m

) 4 , 3 , 2 , 0 ( M
) )( ( C B A C B A
2/18/2012 13 A.A.H Ab-Rahman, Z.Md-Yusof
Minterm and Maxterm
How to design minterms AND-OR logic
ABC C AB C B A C B A Z
A
B
C
A
B
C
A
B
C
A
B
C
Z
Also known as
2 level logic
2/18/2012 14 A.A.H Ab-Rahman, Z.Md-Yusof
Minterm and Maxterm
How to design minterms NAND-NAND Logic
A
B
C
A
B
C
A
B
C
A
B
C
Z
S R Q P Z
P
Q
R
S
Using DeMorgans Theorem
S R Q P Z
ABC C AB C B A C B A Z
2/18/2012 15 A.A.H Ab-Rahman, Z.Md-Yusof
Minterm and Maxterm
How to design maxterms OR-AND Logic
) )( )( )( ( C B A C B A C B A C B A Z
A
B
C
A
B
C
A
B
C
A
B
C
Z
2/18/2012 16 A.A.H Ab-Rahman, Z.Md-Yusof
Minterm and Maxterm
How to design maxterms NOR-NOR Logic
A
B
C
A
B
C
A
B
C
A
B
C
Z
) )( )( )( ( C B A C B A C B A C B A Z
P
Q
R
S
S R Q P Z
Using DeMorgans Theorem
S R Q P Z
2/18/2012 17 A.A.H Ab-Rahman, Z.Md-Yusof
Minterm and Maxterm
Can the minterm and maxterm logic be
optimized?
Yes, using Boolean algebra explore yourself
Yes, using Karnaugh maps next lecture
A.A.H Ab-Rahman August 2008
2/18/2012 18 A.A.H Ab-Rahman, Z.Md-Yusof

You might also like