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
• DeMorgan’s Theorem
• Universal Gates
– NAND and NOR
• Canonical/Standard Forms of Logic
– Sum of Product (SOP)
– Product of Sum (POS)
– Minterm and Maxterm
A.A.H Ab-Rahman January 2009 1
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

A.A.H Ab-Rahman January 2009 2


Sum of Product (SOP)
• Boolean expressions are expressed as the sum
of product, example:
minterm

ABC CDE BC D literal

• Each variable or their complements is called


literals
• Each product term is called minterm

A.A.H Ab-Rahman January 2009 3


SOP (cont.)
• In SOP, a single overbar cannot extend over
more than one variable, example:

AB ABC Not SOP because BC

• Standard SOP forms must contain all of the


variables in the domain of the expression for
each product term, example:
A BC ABC ABC

A.A.H Ab-Rahman January 2009 4


SOP (cont.)
• In the following SOP form,

ABC AB ABCD

– How many minterms are there? => 3


– How many literals in the second product term? => 2
– Is it in a standard SOP form? => No
– How do we convert the boolean expression to
standard SOP form?

A.A.H Ab-Rahman January 2009 5


SOP (cont.)
• To convert SOP to its standard form, we use
the boolean rules
–A+A=1
– A(B + C) = AB + AC
• We have
ABC AB ABCD
• The first product term is missing the variable
D, and the second product term is missing C
and D
A.A.H Ab-Rahman January 2009 6
SOP (cont.)
ABC AB ABCD
Apply D + D = 1 and C + C = 1
ABC ( D D) AB(C C )( D D) AB C D
Apply the distributive law

ABCD ABC D ( ABC ABC )( D D) AB C D

ABCD ABC D ABCD ABCD ABC D


ABC D ABCD Standard SOP form
Which is logically equivalent to the original expression
ABC AB ABCD
A.A.H Ab-Rahman January 2009 7
Product of Sum (POS)
• Boolean expressions are expressed as the
product of sum, example:

( A B )( A B C ) literal

maxterm

A.A.H Ab-Rahman January 2009 8


POS (cont.)
• In POS, a single overbar cannot extend over
more than one variable, example:

( A B )( A B C ) Not SOP because B+C

• Standard POS forms must contain all of the


variables in the domain of the expression for
each sum term, example:
( A B C )( A B C )( A B C )

A.A.H Ab-Rahman January 2009 9


POS (cont.)
• In the following POS form,

( A B C )( B C D)( A B C D)

– Is it in a standard POS form? => No


– How do we convert the boolean expression to
standard POS form?

A.A.H Ab-Rahman January 2009 10


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
( A B C )( B C D)( A B C D)
• The first sum term is missing the variable D,
and the second sum term is missing A

A.A.H Ab-Rahman January 2009 11


POS (cont.)
( A B C )( B C D)( A B C D)

Apply D.D = 0 and A.A = 0 to first and second terms

(A B C D.D)( A. A B C D)( A B C D)
Expand first and second terms
( A B C D)( A B C D)( A B C D)( A B C D)
( A B C D) Standard POS form
Which is logically equivalent to the original expression
( A B C )( B C D)( A B C D)
A.A.H Ab-Rahman January 2009 12
SOP Expression
• Given the standard forms of SOP, can you derive its
truth table?
inputs output
Z ABC ABC ABC ABC A B C Z
0 0 0 0
0 0 1 1 A BC
Since Z = 1 at “001”, “101”, “110” and “111”
0 1 0 0
We can write the SOP as
0 1 1 0
Z m(1,5,6,7) 1 0 0 0
1 0 1 1 A BC
1 1 0 1 AB C
1 1 1 1 ABC

A.A.H Ab-Rahman January 2009 13


POS Expression
• Given the standard forms of POS, can you derive its
truth table?
Z ( A B C )( A B C )( A B C )( A B C )
inputs output
A B C Z
Since Z = 0 at “000”, “001”, “010” and “110” 0 0 0 0 A B C
We can write the POS as
0 0 1 0 A B C
Z (0,1,2,6) 0 1 0 0 A B C
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 0 A B C
1 1 1 1
January 2009 14
Minterm and Maxterm
• How to design minterms? AND-OR logic
Z ABC ABC ABC ABC
A Also known as
B
C 2 level logic

A
B
C
Z
A
B
C

A
B
C

A.A.H Ab-Rahman January 2009 15


Minterm and Maxterm
• How to design minterms? NAND-NAND Logic
Z ABC ABC ABC ABC
A P
B
C

A
Q
B
C
Z
A R
B
C

A S
Z P Q R S
B
C Using DeMorgan’s Theorem

A.A.H Ab-Rahman
Z P Q R S
January 2009 16
Minterm and Maxterm
• How to design maxterms? OR-AND Logic
Z ( A B C )( A B C )( A B C )( A B C )
A
B
C

A
B
C
Z
A
B
C

A
B
C

A.A.H Ab-Rahman January 2009 17


Minterm and Maxterm
• How to design maxterms? NOR-NOR Logic
Z ( A B C )( A B C )( A B C )( A B C )
A P
B
C

A
Q
B
C
Z
A R
B
C

A S
Z P Q R S
B
C Using DeMorgan’s Theorem

A.A.H Ab-Rahman
Z P Q R S
January 2009 18

You might also like