0% found this document useful (0 votes)
71 views20 pages

EECS150 - Digital Design: Lecture 6 - Boolean Algebra I

This document provides an overview of Boolean algebra and its application to combinational logic circuits. It discusses three representations of combinational logic - truth tables, logic gates, and algebraic equations - and how to convert between them. As an example, it walks through representing a 4-bit adder circuit using each method. It also formally defines Boolean algebra, its operators and identities, and how it can be used to prove theorems about logic functions and circuit designs.

Uploaded by

Wanda Powell
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views20 pages

EECS150 - Digital Design: Lecture 6 - Boolean Algebra I

This document provides an overview of Boolean algebra and its application to combinational logic circuits. It discusses three representations of combinational logic - truth tables, logic gates, and algebraic equations - and how to convert between them. As an example, it walks through representing a 4-bit adder circuit using each method. It also formally defines Boolean algebra, its operators and identities, and how it can be used to prove theorems about logic functions and circuit designs.

Uploaded by

Wanda Powell
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 20

EECS150 - Digital Design

Lecture 6 - Boolean Algebra I


(Representations of Combinational
Logic Circuits)
February 7, 2002
John Wawrzynek

Spring 2002 EECS150 - Lec6-bool1 Page 1


Outline
• Review of three representations for combinational logic:
– truth tables,
– graphical (logic gates), and
– algebraic equations
• Relationship among the three
• Adder example
• Formal description of Boolean algebra
• Laws of Boolean algebra

Spring 2002 EECS150 - Lec6-bool1 Page 2


Combinational Logic (CL) Defined

yi = fi(x0 , . . . . , xn-1), where x, y are {0,1}.


Y is a function of only X.

• If we change X, Y will change immediately (well almost!).


• There is an implementation dependent delay from X to Y.

Spring 2002 EECS150 - Lec6-bool1 Page 3


CL Block Example #1
Boolean Equation:
y0 = (x0 AND not(x1))
OR (not(x0) AND x1)
y0 = x0x1' + x0'x1

Truth Table Description:


Gate Representation:
x0 x1 y
0 0 0
0 1 1
1 0 1
1 1 0

How would we prove that all three representations are equivalent?

Spring 2002 EECS150 - Lec6-bool1 Page 4


Boolean Algebra/Logic Circuits
• Why are they called “logic circuits”?
• The 19th Century Mathematician, George Boole, developed a
math. system (algebra) involving formal principles of
reasoning, Boolean Algebra.
• His variables took on TRUE, FALSE
• Later Claude Shannon (father of information theory) showed
(in his Master’s thesis!) how to map Boolean Algebra to digital
circuits:
• Primitive functions of Boolean Algebra:

Spring 2002 EECS150 - Lec6-bool1 Page 5


Relationship Among Representations
* Theorem: Any Boolean function that can be expressed as a truth table
can be written as an expression in Boolean Algebra using AND, OR,
NOT.
u n iq u e
? T r u th T a b le
not ?
u n iq u e
g a te
B o o le a n not
r e p r e s e n ta tio n
E x p r e s s io n u n iq u e
(s c h e m a tic )
[c o n v e n ie n t fo r [c lo s e to
m a n ip u la tio n ] im p le m e n ta to n ]

How do we convert from one to the other?


Spring 2002 EECS150 - Lec6-bool1 Page 6
Notes on Example #1
• The example is the standard
x0 x1 y function called exclusive-or
0 0 0 (XOR,EXOR)
0 1 1 • Has a standard algebraic
1 0 1 symbol:
1 1 0

• And a standard gate symbol:

Spring 2002 EECS150 - Lec6-bool1 Page 7


CL Block Example #2
• 4-bit adder: • Truth Table Representation:

R = A + B,
c is carry out

In general: 2n rows for n inputs. 256 rows!


Is there a more efficient (compact) way to specify this function?
Spring 2002 EECS150 - Lec6-bool1 Page 8
4-bit Adder Example
• Motivate the adder circuit design
by hand addition:

• Add a1 and b1 as follows:

• Add a0 and b0 as follows:

carry to
next stage

r = a XOR b
c = a AND b = ab r = a XOR b XOR ci
co = ab + aci + bci
Spring 2002 EECS150 - Lec6-bool1 Page 9
4-bit Adder Example
• In general:
ri = ai XOR bi XOR cin
cout = aicin + aibi + bicin = cin(ai + bi) + aibi

• Now, the 4-bit adder: “Full adder cell”

“ripple” adder
Spring 2002 EECS150 - Lec6-bool1 Page 10
4-bit Adder Example
• Graphical Representation of FA-cell • Alternative Implementation:
ri = ai XOR bi XOR cin ri = (ai XOR bi) XOR cin
cout = aicin + aibi + bicin cout = cin(ai + bi) + aibi

Spring 2002 EECS150 - Lec6-bool1 Page 11


Boolean Algebra
Defined as: Set of elements B, binary operators  , , unary
operation   , such that the following axioms hold :

1. B contains at least two elements a,b such that a  b.


2. Closure : a,b in B,
a  b in B, a  b in B, a in B.
3. Communitive laws :
a  b  b  a, a  b  b  a.
4. Identities : 0, 1 in B
a  0  a, a  1  a.
5. Distributive laws :
a  (b  c)  (a  b)  (a  c), a  (b  c)  a  b  a  c.
6. Complement :
a  a  1, a  a  0.

Spring 2002 EECS150 - Lec6-bool1 Page 12


Logic Functions
B  {0,1},   OR,   AND,   NOT
is a valid Boolean Algebra.

00 0 00 0 0 1
01 1 01 0 1 0
10 1 10 0
11 1 11 1

Do the axioms hold?


– Ex: communitive law: 0+1 = 1+0?

Spring 2002 EECS150 - Lec6-bool1 Page 13


Other logic functions of 2 variables (x,y)
x y f0 f1
00 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
01 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
10 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
11 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1

0 AND X Y + OR NOR XNOR NAND 1

Look at NOR and NAND:

• Theorem: Any Boolean function that can be expressed as a truth


table can be expressed using NAND and NOR.
– Proof sketch:
= NOT = AND
= OR
– How would you show that NAND or NOR is sufficient?

Spring 2002 EECS150 - Lec6-bool1 Page 14


Laws of Boolean Algebra
Duality: A dual of a Boolean expression is derived by interchanging OR
and AND operations, and 0s and 1s (literals are left unchanged).
{F ( x1 , x2 ,..., xn ,0,1,,)}D  {F ( x1 , x2 ,..., xn ,1,0,, )}
Any law that is true for an expression is also true for its dual.

Operations with 0 and 1:


1. x + 0 = x x*1=x
2. x + 1 = 1 x*0=0
Idempotent Law:
3. x + x = x x x=x
Involution Law:
4. (x’)’ = x
Laws of Complementarity:
5. x + x’ = 1 x x’ = 0
Commutative Law:
6. x + y = y + x x y=y x

Spring 2002 EECS150 - Lec6-bool1 Page 15


Laws of Boolean Algebra (cont.)
Associative Laws:
(x + y) + z = x + (y + z) x y z = x (y z)
Distributive Laws:
x (y + z) = (x y) + (x z) x +(y z) =
(x + y)(x + z)
“Simplification” Theorems:
x y + x y’ = x (x + y) (x + y’) = x
x+xy=x x (x + y) = x
(x + y’) y = x y (x y’) + y = x + y
DeMorgan’s Law:
(x + y + z + …) = (x y z …)’ =
x’ y’ z’ … x’ + y’ + z’ + …
Theorems for Multiplying and Factoring:
(x + y) (x’ + z) = x y + x’ z =
x z + x’ y (x + z) (x’ + y)
Consensus Theorem:
x y + y z + x’ z = (x + y) (y + z) (x’ + z)
x y + x’ z = (x + y) (x’ + z)

Spring 2002 EECS150 - Lec6-bool1 Page 16


Proving Theorems via axioms of Boolean
Algebra
Ex: prove the theorem: x y + x y’ = x
x y + x y’ = x (y + y’) distributive law
x (y + y’) = x (1) complementary law
x (1) =x identity

Ex: prove the theorem: x + x y = x


x + x y = x 1 + x y identity
x 1 + x y = x (1 + y) distributive law
x (1 + y) = x (1) identity
x (1) =x identity

Spring 2002 EECS150 - Lec6-bool1 Page 17


DeMorgan’s Law
x y x' y' ( x + y ) ' x 'y '
(x + y)’ = x’ y’
0 0 1 1 1 1
0 1 1 0 0 0
= 1 0 0 1 0 0
1 1 0 0 0 0

x y x' y' (x y )' x ' + y '


(x y)’ = x’ + y’
0 0 1 1 1 1
0 1 1 0 1 1
= 1 0 0 1 1 1
1 1 0 0 0 0

* DeMorgan’s Law can be used to convert AND/OR expressions to OR/AND expressions:


Example: z = a’b’c + a’bc + ab’c + abc’
z’ =

Spring 2002 EECS150 - Lec6-bool1 Page 18


Algebraic Simplification
Ex: full adder (FA) carry out function
Cout = a’bc + ab’c + abc’ + abc

Spring 2002 EECS150 - Lec6-bool1 Page 19


Algebraic Simplification
Ex: full adder (FA) carry out function
Cout = a’bc + ab’c + abc’ + abc
= a’bc + ab’c + abc’ + abc + abc
= a’bc + abc + ab’c + abc’ + abc
= (a’ + a)bc + ab’c + abc’ + abc
= (1)bc + ab’c + abc’ + abc
= bc + ab’c + abc’ + abc + abc
= bc + ab’c + abc + abc’ + abc
= bc + a(b’ +b)c + abc’ +abc
= bc + a(1)c + abc’ + abc
= bc + ac + ab(c’ + c)
= bc + ac + ab(1)
= bc + ac + ab

Spring 2002 EECS150 - Lec6-bool1 Page 20

You might also like