Principles OfPrinciples Of
Digital DesignDigital Design
Chapter 3Chapter 3
Boolean Algebra and Logic Design
 Boolean Algebra
 Logic Gates
 Digital Design
 Implementation Technology
ASICsASICs
Gate ArraysGate Arrays
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
2
set is a collection of objects with a common property
If is set and is member of the set Sthen  SIf is set and is member of the set Sthen  S
{1, 2, 3, 4} denotes the set Awhose elements are 1, 2, 3, 4{1, 2, 3, 4} denotes the set Awhose elements are 1, 2, 3, 4
binary operator on a set S is a rule that assigns to eachpair of elements in S another element that is in S
Axioms are assumption that are valid without proof
Basic Algebraic PropertiesBasic Algebraic Properties
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
3
Closure
set is closed with respect to binary operator  iff for all x, y  S,( y)  Sset is closed with respect to binary operator  iff for all x, y  S,( y)  S
Z+ = {1, 2, 3, …} is closed to addition, because positive numbers are in Z+Z+ = {1, 2, 3, …} is closed to addition, because positive numbers are in Z+
Associativity
binary operator ● defined on set is associative iff for allx, y, z  Sbinary operator ● defined on set is associative iff for allx, y, z  S
( y  ( z)( y  ( z)
Identity Element
set has an identity element for every x  Sset has an identity element for every x  S
  x  x
x + 0 xx + 0 x
Examples of AxiomsExamples of Axioms
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
4
Commutativity
binary operator ● is commutative iff for all x, y  Sbinary operator ● is commutative iff for all x, y  S
 y  x y  x
Inverse Element
set has an inverse iff for every  Sthere exists an element S such thatset has an inverse iff for every  Sthere exists an element S such that
 y e  y e
Distributivity
If ● and □ are two binary operators on set S is said to bedistributive over  if, for all x, y, z  SIf ● and □ are two binary operators on set S is said to bedistributive over  if, for all x, y, z  S
 (y  z) ( y)  ( z) (y  z) ( y)  ( z)
Examples of AxiomsExamples of Axioms
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
5
Axiom 1 (Closure Property): (a) B is closed with respect to the operator +; (b) B is alsoclosed with respect to the operator 
Axiom 2 (Identity Element): (a) B has an identity element with respect to +, designatedby 0; (b) B also has an identity element with respect  , designated by 1
Axiom 3 (Commutativity Property): (a) B is commutative with respect to +; (b) B is alsocommutative with respect to 
Axiom 4 (Distributivity Property): (a) The operator  is distributive over +; (b) similarly,the operator + is distributive over 
Axiom 5 (Complement Element): For every  B, there exists an element x′  B suchthat (a) x + x′ = and (b)  x′ = 0This second element x′, is called the complement of x
Axiom 6 (Lower Cardinality Bound): There are at least two elements x, y  B such that  y
Axiomatic Definition of Boolean AlgebraAxiomatic Definition of Boolean Algebra
Boolean algebra is set of elements B with two binary operators, + and whichsatisfies the following six axioms:Boolean algebra is set of elements B with two binary operators, + and whichsatisfies the following six axioms:
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
6
In ordinary algebra, is not distributive 
Boolean algebra does not have inverses with respect to + and  ;therefore, there are no subtraction or division operations in Booleanalgebra
Complements are available in Boolean algebra, but not in ordinaryalgebra
Boolean algebra applies to a finite set of elements, whereas ordinaryalgebra would apply to the infinite sets of real numbers
The definition above for Boolean algebra does not includeassociativity, since it can be derived from the other axioms
Axiomatic Definition of Boolean AlgebraAxiomatic Definition of Boolean Algebra
Differences between Boolean algebra and ordinary algebraDifferences between Boolean algebra and ordinary algebra
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
7
Two-valued Boolean AlgebraTwo-valued Boolean Algebra
Set B has two elements: 0 and 1
Algebra has two operators: AND and OR
x
y
x  y
0
0
0
0
1
0
1
0
0
1
1
1
AND Operator
x
y
x y
0
0
0
0
1
1
1
0
1
1
1
1
OR Operator
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
8
Two-valued Boolean AlgebraTwo-valued Boolean Algebra
Axiom 1 (Closure Property): Closure is evident in the AND/ORtables, since the result of each operation is an element of B.
Axiom 2 (Identity Element): The identity elements in this algebra are0 for the operator + and 1 for the operator . From the AND/ORtables, we see that:
0, and 10, and 1
 1, and   0 1, and   0
Axiom 3 (Commutativity Property): The commutativity laws followfrom the symmetry of the operator tables.
Two-valued Boolean algebra satisfies Huntington axiomsTwo-valued Boolean algebra satisfies Huntington axioms
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
9
Two-valued Boolean AlgebraTwo-valued Boolean Algebra
Axiom 4 (Distributivity): The distributivity of this algebra can bedemonstrated by checking both sides of the equation.
x
y
z
y + z
x ∙ (y + z)
xy
xz
(xy) + (xz)
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
1
0
1
0
0
0
0
0
1
1
1
0
0
0
0
1
0
0
0
0
0
0
0
1
0
1
1
1
0
1
1
1
1
0
1
1
1
0
1
1
1
1
1
1
1
1
1
Proof of distributivity of 
x
y
z
yz
x + (yz)
x + y
x + z
(x + y)(x + z)
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
1
0
0
0
1
0
0
0
1
1
1
1
1
1
1
1
0
0
0
1
1
1
1
1
0
1
0
1
1
1
1
1
1
0
0
1
1
1
1
1
1
1
1
1
1
1
1
Proof of distributivity of +
∙ (y + z) = (x ∙ y) + (x ∙ z)
(y ∙ z) = (x + y)(x + z).
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
10
Two-valued Boolean AlgebraTwo-valued Boolean Algebra
Axiom 5 (Complement): 0 and 1 are complements of each other, since0 + 0′ = 0 + 1 = 1 and 1 + 1′ = 1 + 0 = 1; furthermore,0 ∙ 0′ = 0 ∙ 1 = 0 and 1 ∙ 1′ = 1 ∙ 0 = 0.
Axiom 6 (Cardinality): The cardinality axiom is satisfied, since thistwo-valued Boolean algebra has two distinct elements, and 0, and 0.
x
x
0
1
1
0
NOT Operator
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
11
Boolean Operator ProcedureBoolean Operator Procedure
Boolean operators are applied in the following order.
Parentheses(    )Parentheses(    )
NOTNOT
ANDAND
OR+OR+
Example: Evaluate expression (x xy) for x 1 and y 0:Example: Evaluate expression (x xy) for x 1 and y 0:
(1 10)′ (1 0)′ (1)′ 0(1 10)′ (1 0)′ (1)′ 0
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
12
Duality PrincipleDuality Principle
Any algebraic expression derived from axioms stays validwhen
OR and ANDOR and AND
0 and 10 and 1
are interchanged.
Example:Example:
IfIf
X  +  1 1X  +  1 1
thenthen
X   ∙  0X   ∙  0
by the duality principleby the duality principle
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
13
Theorem of Boolean AlgebraTheorem of Boolean Algebra
Theorem 1
(a)
x + x
=
x
(Idempotency)
(b)
xx
=
x
Theorem 2
(a)
x + 1
=
1
(b)
x  0
=
0
Theorem 3
(a)
yx + x
=
x
(Absorption)
(b)
(y + x)x
=
x
Theorem 4
(x)
=
x
(Involution)
Theorem 5
(a)
(x + y) + z
=
x + (y + z)
(Associativity)
(b)
x(yz)
=
(xy)z
Theorem 6
(a)
(x + y)
=
xy
(De Morgan’s Law)
(b)
(xy)
=
x + y
Basic Theorems of Boolean Algebra
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
14
Theorem Proofs in Boolean AlgebraTheorem Proofs in Boolean Algebra
Theorems can be proved by transformations based on axiomsand theorems
Duality
Example:Example:
Theorem 1(a) Idempotency: x x.Theorem 1(a) Idempotency: x x.
Proof:Proof:
x=(x∙ 1by identity (Ax. 2b)x=(x∙ 1by identity (Ax. 2b)
=(x(x′)by complement (Ax. 5a)=(x(x′)by complement (Ax. 5a)
=xx′by distributivity (Ax. 4b)=xx′by distributivity (Ax. 4b)
=0by complement (Ax. 5b)=0by complement (Ax. 5b)
=xby identity (Ax. 2a)=xby identity (Ax. 2a)
Example:Example:
Theorem 1(b) Idempotency: x  x.Theorem 1(b) Idempotency: x  x.
Proof:Proof:
x=xby Theorem 1(a)x=xby Theorem 1(a)
 ∙ x=xby Duality principle ∙ x=xby Duality principle
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
15
Theorem Proofs in Boolean AlgebraTheorem Proofs in Boolean Algebra
Checking theorems for every combinations of variable value
Example:Example:
Theorem 6(a) DeMorgan’s Law: (x y)′ x′y′Theorem 6(a) DeMorgan’s Law: (x y)′ x′y′
x
y
x + y
(x + y)′
x′
y′
xy
0
0
0
1
1
1
1
0
1
1
0
1
0
0
1
0
1
0
0
1
0
1
1
1
0
0
0
0
Proof of Demorgan’s First Theorem
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
16
Note 1: When we evaluate Boolean expressions, we must follow aspecific order of operations, namely, (1) parentheses, (2) NOT, (3) AND,(4) OR.Note 1: When we evaluate Boolean expressions, we must follow aspecific order of operations, namely, (1) parentheses, (2) NOT, (3) AND,(4) OR.
Note 2: primed or unprimed variable is usually called literal.Note 2: primed or unprimed variable is usually called literal.
Boolean FunctionsBoolean Functions
Algebraic expression, which are formed from binaryvariables and Boolean operators ANDOR and NOT.
Example:Example:
F1 xy xyz x′yzF1 xy xyz x′yz
This function would be equal to if = and = 1orThis function would be equal to if = and = 1or
if = and = and = 1orif = and = and = 1or
if = and = and = 1;if = and = and = 1;
otherwise, F1 0.otherwise, F1 0.
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
17
Boolean FunctionsBoolean Functions
Truth tables which list the functional value for allcombinations of variable values.
Example:Example:
F1 xy xyz x′yzF1 xy xyz x′yz
RowNumbers
VariableValues
FunctionValues
x
y
z
F1
0
0
0
0
0
1
0
0
1
0
2
0
1
0
0
3
0
1
1
1
4
1
0
0
0
5
1
0
1
1
6
1
1
0
1
7
1
1
1
1
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
18
Complement of FunctionComplement of Function
Complement of function F is function F, where F can beobtained by:
Interchanging 0 and 1 in the truth table.Interchanging 0 and 1 in the truth table.
RowNumbers
VariableValues
FunctionValues
x
y
z
F1
F1
0
0
0
0
0
1
1
0
0
1
0
1
2
0
1
0
0
1
3
0
1
1
1
0
4
1
0
0
0
1
5
1
0
1
1
0
6
1
1
0
1
0
7
1
1
1
1
0
Example:Example:
F1 xy xyz x′yzF1 xy xyz x′yz
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
19
Complement of FunctionComplement of Function
Complement of function F is function F, where F can beobtained by:
Repeatedly applying DeMorgan’s theorems.Repeatedly applying DeMorgan’s theorems.
Duality PrincipleDuality Principle
Example: F1=(xy xy′z x′yz)by definition of FExample: F1=(xy xy′z x′yz)by definition of F
=(xy)′ (xy′z)′ (x′yz)by DeMorgan’s Th.=(xy)′ (xy′z)′ (x′yz)by DeMorgan’s Th.
=(x y)(x′ z′)(y′ z′)by DeMorgan’s Th.=(x y)(x′ z′)(y′ z′)by DeMorgan’s Th.
Example: F1=(x  ∙  y) (x  ∙  y′  ∙  z) (x′  ∙   y   ∙  z)Example: F1=(x  ∙  y) (x  ∙  y′  ∙  z) (x′  ∙   y   ∙  z)
F1=(x y∙ (x′ z′)  ∙  (x  +  y′ z′)F1=(x y∙ (x′ z′)  ∙  (x  +  y′ z′)
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
20
Graphic Representation ofBoolean FunctionsGraphic Representation ofBoolean Functions
+
+
+
+
+
+
+
AND-OR Expression
OR-AND Expression
F size=ANDsF size=ANDs
ORsORs
NOTsNOTs
F size=ANDsF size=ANDs
ORsORs
NOTsNOTs
zz
FF
FF
FF
yy
xx
zz
yy
xx
Two different expressions have different sizes
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
21
We can prove expression equivalence by algebraicmanipulation in which each transformation uses an axiomor a theorem of Boolean algebra.
Expression EquivalenceExpression Equivalence
xy + xy′z + x′yz
requires
5
ANDs
2
ORs
2
NOTs
xy + xz + yz
requires
3
ANDs
2
ORs
Difference:
2
ANDs
and
2
NOTs
Example: F1=xy xy′z x′yzExample: F1=xy xy′z x′yz
=xy xz yz=xy xz yz
Proof:Proof:
  xy xy′z x′yz =xy xyz xy′z x′yz by absorption=xy x(y′)x′yz by distributivity=xy x1x′yz by complement=xy xz x′yz by identity=xy xyz xz x′yz by absorption=xy xz (x′)yz by distributivity=xy xz 1yz by complement=xy xz yz by identity  xy xy′z x′yz =xy xyz xy′z x′yz by absorption=xy x(y′)x′yz by distributivity=xy x1x′yz by complement=xy xz x′yz by identity=xy xyz xz x′yz by absorption=xy xz (x′)yz by distributivity=xy xz 1yz by complement=xy xz yz by identity
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
22
MintermsMinterms
Minterms for Three Binary Variables
Minterm definition
If i bn – 1b0 is binary number between 0 and 2n – 1then aminterm of n variables x– 1xn – 2…,x0could be represented as:If i bn – 1b0 is binary number between 0 and 2n – 1then aminterm of n variables x– 1xn – 2…,x0could be represented as:
mi (x– 1xn – 2…,x0yn – 1y0mi (x– 1xn – 2…,x0yn – 1y0
where for all k such that ≤ k ≤ – 1,where for all k such that ≤ k ≤ – 1,
 yk= { yk= {
xk if  b1xk if  b1
xk if  b0xk if  b0
x
y
z
Minterms
Designation
0
0
0
xyz
m0
0
0
1
xyz
m1
0
1
0
xyz
m2
0
1
1
xyz
m3
1
0
0
xyz
m4
1
0
1
xyz
m5
1
1
0
xyz
m6
1
1
1
xyz
m7
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
23
Sum-of-MintermsSum-of-Minterms
Any Boolean function can be expressed as a sum (OR) ofits 1-minterms:
F(list of variables) = Σ(list of 1-minterm indices)
RowNumbers
VariableValues
FunctionValues
x
y
z
F1
F1
0
0
0
0
0
1
1
0
0
1
0
1
2
0
1
0
0
1
3
0
1
1
1
0
4
1
0
0
0
1
5
1
0
1
1
0
6
1
1
0
1
0
7
1
1
1
1
0
Example:Example:
Equation Table
F1 = xy + xy′z + x′yz
F1′ = (x′ + y′)(x′ + y + z′)(x + y′ + z′)
F1(x, y, z)=Σ(3, 5, 6, 7)F1(x, y, z)=Σ(3, 5, 6, 7)
=m3 m5 m6 m7=m3 m5 m6 m7
=x′yz xy′z xyz′ xyz=x′yz xy′z xyz′ xyz
F1(x, y, z)=Σ(01, 2, 4)F1(x, y, z)=Σ(01, 2, 4)
=m0 m1 m2 m4=m0 m1 m2 m4
=x′y′z′ x′y′z x′yz′ xyz′=x′y′z′ x′y′z x′yz′ xyz′
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
24
Expansion to Sum-of-MintermsExpansion to Sum-of-Minterms
Any Boolean function can be expanded into a sum-of-minterms form be expanding each term with (x) for eachmissing variable x.
Example:Example:
yzyz
=x(y′)(z′) (x′)yz=x(y′)(z′) (x′)yz
=xyz xy′z xyz′ xy′z′ xyz x′yz=xyz xy′z xyz′ xy′z′ xyz x′yz
After removing duplicates and rearranging the minterms inascending order:After removing duplicates and rearranging the minterms inascending order:
x′yz xy′z′ xy′z xyz′ xyzx′yz xy′z′ xy′z xyz′ xyz
=m3 m4 m5 m6 m7=m3 m4 m5 m6 m7
=Σ(3, 4, 5, 6, 7)=Σ(3, 4, 5, 6, 7)
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
25
Conversion to Sum-of-MintermsConversion to Sum-of-Minterms
F m3 m4 m5 m6 m7F m3 m4 m5 m6 m7
Each Boolean function can be converted into a sum-of-minterms form by generating the truth table and identifying1-minterms.
Example: F x yzExample: F x yz
x
y
z
F
0
0
0
0
0
0
1
0
0
1
0
0
0
1
1
1
1
0
0
1
1
0
1
1
1
1
0
1
1
1
1
1
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
26
MaxtermsMaxterms
Maxterms can be defined as the complement of minterms:
Mi = mi and Mi miMi = mi and Mi mi
Maxterms for Three Binary Variables
x
y
z
Maxterms
Designation
0
0
0
x + y + z
M0
0
0
1
x + y + z
M1
0
1
0
x + y + z
M2
0
1
1
x + y + z
M3
1
0
0
x + y + z
M4
1
0
1
x + y + z
M5
1
1
0
x + y + z
M6
1
1
1
x + y + z
M7
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
27
Product-of-MaxtermsProduct-of-Maxterms
Any Boolean function can be expressed as a product (AND)of its 0-maxterms:
F(list of variables) = Π(list of 0-maxterm indices)
RowNumbers
VariableValues
FunctionValues
x
y
z
F1
F1
0
0
0
0
0
1
1
0
0
1
0
1
2
0
1
0
0
1
3
0
1
1
1
0
4
1
0
0
0
1
5
1
0
1
1
0
6
1
1
0
1
0
7
1
1
1
1
0
Example:Example:
Equation Table
F1 = xy + xy′z + x′yz
F1′ = (x′ + y′)(x′ + y + z′)(x + y′ + z′)
F1(x, y, z)=Π(01, 2, 4)F1(x, y, z)=Π(01, 2, 4)
=MMMM4=MMMM4
=(z)(z′)(y′ z)(x′ z)=(z)(z′)(y′ z)(x′ z)
F1(x, y, z)=Π(3, 5, 6, 7)F1(x, y, z)=Π(3, 5, 6, 7)
=MMMM7=MMMM7
=(y′ z′)(x′ z′)(x′ y′ z)(x′ y′ z′)=(y′ z′)(x′ z′)(x′ y′ z)(x′ y′ z′)
Product-of-maxterms can also be obtained bycomplementing the sum-of-mintermsProduct-of-maxterms can also be obtained bycomplementing the sum-of-minterms
 (F1)=(x′yz xy′z xyz′ xyz) (F1)=(x′yz xy′z xyz′ xyz)
=(y′ z′)(x′ z′)(x′ y′ z)(x′ y′ z′)=(y′ z′)(x′ z′)(x′ y′ z)(x′ y′ z′)
=MMMM7=MMMM7
F1=(F1)F1=(F1)
=(x′y′z′ x′y′z x′yz′ xyz′)=(x′y′z′ x′y′z x′yz′ xyz′)
=(z)(z′)(y′ z)(x′ y′ z)=(z)(z′)(y′ z)(x′ y′ z)
=MMMM4=MMMM4
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
28
Expansion to Product-of-MaxtermsExpansion to Product-of-Maxterms
Any Boolean function can be expanded into a product-of-maxtermsform be expanding each term with xx for each missing variable x.
Example:Example:
ConvertConvert
=x′y′ xz=x′y′ xz
=(x′y′ x)(x′y′ z)=(x′y′ x)(x′y′ z)
=(x′ x)(y′ x)(x′ z)(y′ z)=(x′ x)(y′ x)(x′ z)(y′ z)
=(x + y′)(x′ z)(y′ z)=(x + y′)(x′ z)(y′ z)
ExpandExpand
x + y′=y′ zz′=(y′ z)(y′ z′)x + y′=y′ zz′=(y′ z)(y′ z′)
x′ z=x′ yy′=(x′ z)(x′ y′ z)x′ z=x′ yy′=(x′ z)(x′ y′ z)
y′ z=y′ xx′=(y′ z)(x′ y′ z)y′ z=y′ xx′=(y′ z)(x′ y′ z)
CombineCombine
F =(y′ z)(y′ z′)(x′ z)(x′ y′ z)F =(y′ z)(y′ z′)(x′ z)(x′ y′ z)
=MMMM6=(2, 3, 4, 6)=MMMM6=(2, 3, 4, 6)
missingmissing
xixi
missingmissing
yiyi
missingmissing
cici
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
29
Conversion to Product-of-MaxtermsConversion to Product-of-Maxterms
Any Boolean expression can be converted into a sum-of-maxterms by generating the truth table and listing all the 0-maxterms.
Example: F xy xzExample: F xy xz
x
y
z
F
0
0
0
1
0
0
1
1
0
1
0
0
0
1
1
0
1
0
0
0
1
0
1
1
1
1
0
0
1
1
1
1
F(x, y, z)=Σ(0, 1, 5, 7)F(x, y, z)=Σ(0, 1, 5, 7)
F(x, y, z)=Π(2, 3, 4, 6)F(x, y, z)=Π(2, 3, 4, 6)
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
30
Canonical FormsCanonical Forms
Two canonical forms:
Sum-of-mintermsSum-of-minterms
Product-of-maxtermsProduct-of-maxterms
Canonical forms are unique.
Conversion between canonical forms is achieved by:
Exchanging Σ and ΠExchanging Σ and Π
Listing all the missing indicesListing all the missing indices
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
31
Standard FormsStandard Forms
Two standard forms
Sum-of-productsSum-of-products
Product-of-sumsProduct-of-sums
Standard forms are not unique.
Sum-of-products is an OR expression with product termsthat may have less literals than minterms
Example:Example:
F  =  xy x′yz xy′zF  =  xy x′yz xy′z
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
32
Standard FormsStandard Forms
Product-of-sums is an AND expression with sum terms thatmay have less literals than maxterms
Standard forms have fewer operators (literals) thancanonical forms
Standard forms can be derived from canonical forms bycombining terms that differ in one variable (this is, terms atdistance 1)
Example:Example:
F  =  (x′ y′)(y′ z′)(x′ z′)F  =  (x′ y′)(y′ z′)(x′ z′)
Example:Example:
F1=xyz xyz′ xy′z x′yzF1=xyz xyz′ xy′z x′yz
=xyz xyz′ xyz xy′z xyz x′yz=xyz xyz′ xyz xy′z xyz x′yz
=xy(z′) x(y′)(x′)yz=xy(z′) x(y′)(x′)yz
=xy xz yz=xy xz yz
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
33
Non-standard FormsNon-standard Forms
Non-standard forms have fewer operators (literals) thanstandard forms.
They are obtained by factoring variables.
Example:Example:
xy xy′z xy′w=x(y y′z y′w)xy xy′z xy′w=x(y y′z y′w)
=x(y y′(w))=x(y y′(w))
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
34
Strategy for Operator (Literal)Reduction in Boolean ExpressionsStrategy for Operator (Literal)Reduction in Boolean Expressions
Algebraic Expression
Generate canonical form
Expand into truth table
Find functional subcubes
Factor sub-expressions
Non-standard form
Truth table
Canonical form
Standard form
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
35
Binary Logic OperationsBinary Logic Operations
There are 22n Boolean functions for n binary variables
Therefore, 16 Boolean functions for n = 2. They are
Name
OperatorSymbol
FunctionalValues for x,y =
AlgebraicExpression
Comment
00
01
10
11
Zero
0
0
0
0
F0 = 0
Binary constant 0
AND
∙ y
0
0
0
1
F1 = xy
x and y
Inhibition
/ y
0
0
1
0
F2 = xy
x but not y
Transfer
0
0
1
1
F3 = x
x
Inhibition
/ x
0
1
0
0
F4 = xy
y but not x
Transfer
0
1
0
1
F5 = y
y
XOR
 y
0
1
1
0
F6 = xy + xy
x or but not both
OR
+ y
0
1
1
1
F7 = x + y
x or y
NOR
 y
1
0
0
0
F8 = (x + y)
Not-OR
Equivalence
 y
1
0
0
1
F9 = xy + xy
x equals y
Complement
y
1
0
1
0
F10 = y
Not y
Implication
 y
1
0
1
1
F11 = x + y
If y, then x
Complement
x
1
1
0
0
F12 = x
Not x
Implication
 y
1
1
0
1
F13 = x′ + y
If x, then y
NAND
 y
1
1
1
0
F14 = (xy)
Not-AND
One
1
1
1
1
F15 = 1
Binary constant 1
There are two functions thatgenerate constants: Zero andOne. For every combinationof variable values, the Zerofunction will return to 0,whereas the One functionwill return to 1.
There are four functions ofone variable, which indicateComplement and Transferoperations.  Specifically, theComplement function willproduce the complement ofone of the binary variables.The Transfer functions bycontrast will reproduce oneof the binary variables at theoutput.
There are ten functions thatdefine eight specific binaryoperations: AND, Inhibition,XOR, ORNOR, Equivalence,Implication, and NAND.
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
36
Digital Logic GatesDigital Logic Gates
Name
GraphicSymbol
FunctionalExpression
Number oftransistors
Delayin ns
Inverter
F = x
2
1
Driver
F = x
4
2
AND
F = xy
6
2.4
OR
F = x + y
6
2.4
NAND
F = (xy)
4
1.4
NOR
F = (x + y)
4
1.4
XOR
F = x  y
14
4.2
XNOR
F = x  y
12
3.2
xx
FF
xx
FF
xx
yy
xx
yy
FF
FF
FF
FF
FF
FF
Basic Logic Library
(CMOS Technology Implementations)
xx
yy
xx
yy
xx
yy
xx
yy
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
37
Multiple-Input GatesMultiple-Input Gates
Name
GraphicSymbol
FunctionalExpression
Number oftransistors
Delayin ns
3–input AND
F = xyz
8
2.8
4–input AND
F = xyzw
10
3.2
3–input OR
F = x + y + z
8
2.8
4–input OR
F = x + y + z + w
10
3.2
3–input NAND
F = (xyz)
6
1.8
4–input NAND
F = (xyzw)
8
2.2
3–input NOR
F = (x + y + z)
6
1.8
4–input NOR
F = (x + y + z + w)
8
2.2
xx
yy
zz
FF
xx
yy
zz
FF
ww
xx
yy
zz
xx
yy
zz
ww
xx
yy
zz
xx
yy
zz
ww
xx
yy
zz
xx
yy
zz
ww
FF
FF
FF
FF
FF
FF
Multiple-Input Standard Logic Gates
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
38
Multiple-Operator (Complex) GatesMultiple-Operator (Complex) Gates
Name
GraphicSymbol
FunctionalExpression
Number oftransistors
Delayin ns
2–wide,2–inputAOI
F = (wx + yz)
8
2.0
3–wide,2–inputAOI
F = (uv + wx + yz)
12
2.4
2–wide,3–inputAOI
F = (uvw + xyz)
12
2.2
2–wide,2–inputOAI
F = ((w + x)(y + z))
8
2.0
3–wide,2–inputOAI
F = ((u + v)(w + x)(y + z))
12
2.2
2–wide,3–inputOAI
F = ((u + v + w)(x + y + z))
12
2.4
FF
FF
xx
yy
zz
ww
FF
FF
FF
FF
Multiple-Operator Standard Logic Gates
xx
yy
zz
ww
xx
yy
zz
ww
uu
vv
xx
yy
zz
ww
uu
vv
xx
yy
zz
uu
vv
ww
xx
yy
zz
uu
vv
ww
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
39
Full-adder Design Using XOR GatesFull-adder Design Using XOR Gates
xi
yi
ci
c+ 1
si
0
0
0
0
0
0
0
1
0
1
0
1
0
0
1
0
1
1
1
0
1
0
0
0
1
1
0
1
1
0
1
1
0
1
0
1
1
1
1
1
Truth table
si=xi′yi′ci xi′yici′ xiyi′ci xiyicisi=xi′yi′ci xi′yici′ xiyi′ci xiyici
=(xi′yi xiyi)ci (xi′yi xiyi)ci=(xi′yi xiyi)ci (xi′yi xiyi)ci
=(xi  yi)ci (xi  yi)ci=(xi  yi)ci (xi  yi)ci
(xi  yi)ci (xi  yi)′ci(xi  yi)ci (xi  yi)′ci
=(xi  yi)  ci=(xi  yi)  ci
 c1xiyici xiyici xi′yici xiyi′ci c1xiyici xiyici xi′yici xiyi′ci
=xiyi(ci cici(xi′yi xiyi)=xiyi(ci cici(xi′yi xiyi)
=xyi ci(xi  yi)=xyi ci(xi  yi)
Full–adder equation
xixi
yiyi
cici
si
c1c1
2.4
4.2
4.2
2.4
2.4
Logic Schematic (46 Transistors)
Input/Output
Path
Delay
(ns)
ci to c+ 1
4.8 ns
ci to si
4.2 ns
xiyi to c+ 1
9.0 ns
xiyi to si
8.4 ns
Full–adder delays
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
40
Full-adder Design Using Fast GatesFull-adder Design Using Fast Gates
 x yi=xyi xi′yi x yi=xyi xi′yi
=((xyi)′ (xi′yi)′ )=((xyi)′ (xi′yi)′ )
=((xyi)′ (xi + yi))=((xyi)′ (xi + yi))
si=(xi yi)ci (xi  yi)cisi=(xi yi)ci (xi  yi)ci
=(xi  yi)′ci (xi  yi)ci=(xi  yi)′ci (xi  yi)ci
=(xi  yi)  ci=(xi  yi)  ci
 c1xyi ci(xi + yi) c1xyi ci(xi + yi)
=((xyi)′ (ci(xi + yi))′)′=((xyi)′ (ci(xi + yi))′)′
Full–adder equation
xi
yi
ci
c+ 1
si
0
0
0
0
0
0
0
1
0
1
0
1
0
0
1
0
1
1
1
0
1
0
0
0
1
1
0
1
1
0
1
1
0
1
0
1
1
1
1
1
Truth table
Logic Schematic (36 Transistors)
Input/Output
Path
Delay
(ns)
ci to c+ 1
2.8 ns
ci to si
3.8 ns
xiyi to c+ 1
5.2 ns
xiyi to si
7.6 ns
Full–adder delays
xixi
yiyi
cici
sisi
c1c1
2.4
1.4
1.4
1.4
1.4
1.4
2.4
1.4
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
41
Full-adder Design withMultiple-input GatesFull-adder Design withMultiple-input Gates
xi
yi
ci
c+ 1
si
0
0
0
0
0
0
0
1
0
1
0
1
0
0
1
0
1
1
1
0
1
0
0
0
1
1
0
1
1
0
1
1
0
1
0
1
1
1
1
1
Truth table
Full–adder equation
Logic Schematic (56 Transistors)
xixi
yiyi
cici
sisi
c1c1
2.2
1.8
1.4
1.4
1.4
1.8
1.8
1.8
1.8
Input/Output
Path
Delay
(ns)
ci to c+ 1
3.2 ns
ci to si
5.0 ns
xiyi to c+ 1
4.2 ns
xiyi to si
5.0 ns
Full–adder delays
si=xi′yi′ci xi′yici′ xiyi′ci xiyicisi=xi′yi′ci xi′yici′ xiyi′ci xiyici
=((xi′yi′ci)′ (xi′yici)′ (xiyi′ci)′ (xiyici)’)=((xi′yi′ci)′ (xi′yici)′ (xiyi′ci)′ (xiyici)’)
 c1xiyi cixi ciyi c1xiyi cixi ciyi
=((xiyi)′ (cixi)′ (ciyi))=((xiyi)′ (cixi)′ (ciyi))
  
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
42
Full-adder Design with Complex GatesFull-adder Design with Complex Gates
Full–adder equation
xi
yi
ci
c+ 1
si
0
0
0
0
0
0
0
1
0
1
0
1
0
0
1
0
1
1
1
0
1
0
0
0
1
1
0
1
1
0
1
1
0
1
0
1
1
1
1
1
Truth table
Input/Output
Path
Delay
(ns)
ci to c+ 1
3.4 ns
ci to si
4.4 ns
xiyi to c+ 1
3.4 ns
xiyi to si
4.4 ns
Full–adder delays
Logic Schematic (46 Transistors)
sisi
c1c1
xixi
yiyi
cici
1.4
2.4
2.0
2.0
si=xi′yi′ci xi′yici′ xiyi′ci xiyicisi=xi′yi′ci xi′yici′ xiyi′ci xiyici
=((xi′yi′ci+ xi′yici)′ (xiyi′ci′ + xiyici))=((xi′yi′ci+ xi′yici)′ (xiyi′ci′ + xiyici))
 c1xiyi cixi ciyi c1xiyi cixi ciyi
=((xiyi)′ (cixi)′ (ciyi))=((xiyi)′ (cixi)′ (ciyi))
=((xi yi)(ci xi)(ci yi))=((xi yi)(ci xi)(ci yi))
=(xi yi  ci xi  ci yi )=(xi yi  ci xi  ci yi )
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
43
VLSI TechnologyVLSI Technology
Small-scale integration (SSI)
10 gates/package10 gates/package
Medium-scale integration (MSI)
10 – 100 gates/package (2 – bit slices)10 – 100 gates/package (2 – bit slices)
Large-scale integration (LSI)
100 – 1000 gates/package (controllers, datapaths, bit slices)100 – 1000 gates/package (controllers, datapaths, bit slices)
Very-large-scale integration (VLSI)
1000+ gates/package (systems on chip)1000+ gates/package (systems on chip)
Custom designs (Standard cells)
Gate arrays (GAs)
Field-programmable (FPGAs)
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
44
Custom DesignCustom Design
Each designed by hand
Standard cells
Same height, different widthsSame height, different widths
Routing in channels and over the cellsRouting in channels and over the cells
Two or more metal layersTwo or more metal layers
Standard Cell Approach
Standard Cells
Routing Channel
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
45
Example of Custom DesignExample of Custom Design
Full-Adder Implementation with Standard Cells
sisi
c1c1
xixi
yiyi
cici
yi ciyi ci
c1c1
xcixci
xyixyi
xi yi cixi yi ci
yiyi
cici
xixi
sisi
xi yi cixi yi ci
xi yi cixi yi ci
xyi cixyi ci
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
46
Semi-Custom Approach withGate ArraysSemi-Custom Approach withGate Arrays
Gate arrays are prefabricated arrays of interconnected gates
All gates are the same type (3–input NAND, for example)
Two or more metal layers used to connect gates
Full-Adder Implementation in a Gate Array
xixi
yiyi
cici
sisi
c1c1
(xi yi)(xi yi)
yiyi
cici
xixi
(yi ci)(yi ci)
(xi ci)(xi ci)
(xi yci)(xi yci)
(xi yici)(xi yici)
(xiyci)(xiyci)
(xiyici)(xiyici)
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
47
Field–Programmable Approach withFPGAField–Programmable Approach withFPGA
FPGAs are programmed by loading data into internal memory
Excellent for rapid prototyping
Low density and low speed
4-variableBooleanfunction
GQGQ
GG
HQHQ
HH
g1g1
g2g2
g3g3
g4g4
h1h1
h2h2
h3h3
h4h4
4-variableBooleanfunction
SM
SM
SM
SM
SM
SM
SM
SM
PLB
PLB
PLB
PLB
SM
Array Structure
Programmable Logic Blocks (PLB)
Interconnect Point (IP)
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
48
Full-adder Implemented with FPGAFull-adder Implemented with FPGA
1 programmable logic block for each full-adder
3 out of 4 inputs are used for each Boolean function
h1
h2
h3
h4
H
0
0
0
X
0
0
0
1
X
1
0
1
0
X
1
0
1
1
X
0
1
0
0
X
1
1
0
1
X
0
1
1
0
X
0
1
1
1
X
1
g1
g2
g3
g4
G
X
0
0
0
0
X
0
0
1
0
X
0
1
0
0
X
0
1
1
1
X
1
0
0
0
X
1
0
1
1
X
1
1
0
1
X
1
1
1
1
c1c1
GQGQ
GG
HQHQ
HH
sisi
g1g1
g2g2
g3g3
g4g4
h1h1
h2h2
h3h3
h4h4
UnusedUnused
UnusedUnused
cici
xixi
yiyi
Copyright © 2004-2005 by Daniel D.Gajski
Slides by Philip Pham, University of California, Irvine
49
Chapter SummaryChapter Summary
Boolean Algebra
AxiomsAxioms
Basic theoremsBasic theorems
Boolean Functions
Specification of Boolean Functions
Truth tablesTruth tables
Algebraic expressionsAlgebraic expressions
Canonical forms
Standard forms
Non-standard forms
Algebraic Manipulation of Boolean Expressions
Logic Gates
Simple gatesSimple gates
Multiple-input gatesMultiple-input gates
Complex gatesComplex gates
Implementation Technology
SSI (Small-scale integration)SSI (Small-scale integration)
MSI (Medium-scale integration)MSI (Medium-scale integration)
LSI (Large-scale integration)LSI (Large-scale integration)
VLSI (Very-large-scale integration)VLSI (Very-large-scale integration)
Custom designs
Semi-custom designs
Field-programmable