You are on page 1of 19

Switching Circuits & Logic Design

Boolean Algebra (Contd)


Professor Chien-Mo James Li
Graduate Institute of Electronics Engineering
National Taiwan University

NTUEE C.M. Li

Logic Design

Review Questions
What is SOP? What is POS?
What is multiplying out? What is Factoring?
What is DeMorgans Law?

Logic Design

NTUEE C.M. Li

Goal of This Lecture


Transform circuits by transforming Boolean expressions

SOP POS

Simplify circuits by simplify Boolean expression

Logic Design

NTUEE C.M. Li

Outline

Multiplying Out and Factoring Expressions.


Exclusive-OR and Equivalence Operations.
The Consensus Theorem.
Algebraic Simplification of Switching Expressions.
Proving Validity of an Equation.

Logic Design

NTUEE C.M. Li

Useful Equations
X(Y+Z) = XY+XZ
(X+Y)(X+Z) = X+YZ
(X+Y)(X+Z) = XZ+XY

(3-1) first distributive law


(3-2) second distributive law
(3-3) consensus theorem

Simple Proof of 3-3

If X=0
If X=1
A better proof will come later

NTUEE C.M. Li

Logic Design

Before you Multiply out


Application of 3-3 and 3-2 saves you lots of time
Example P.63

Multiply out (A+B+C)(A+B+D)(A+B+E)(A+D+E)(A+C)

Multiplying out will be 162 terms!


Use 3-2 and 3-3

Logic Design

NTUEE C.M. Li

Factoring Out
Converse of 3-1, 3-2 and 3-3 helps to factoring out

XY+XZ = X(Y+Z)
(3-1)
X+YZ = (X+Y)(X+Z)
(3-2) second distributive law
XZ+XY = (X+Y)(X+Z)
(3-3)
Example P.63
Factor AC+ABD+ABE+ACDE

Q: why (A+CDE+D+E ) (A+D+E) ?

Logic Design

NTUEE C.M. Li

Real-world Example
X+XY = X
X =
Y =
The following two conditions are the same
LD
() LD

Logic Design

NTUEE C.M. Li

Outline

Multiplying Out and Factoring Expressions.


Exclusive-OR and Equivalence Operations.
The Consensus Theorem.
Algebraic Simplification of Switching Expressions.
Proving Validity of an Equation.

NTUEE C.M. Li

Logic Design

Exclusive OR

0 0=0
0 1=1
1 0=1
1 1=0

XY =1 iff X=1 or Y=1

But NOT BOTH!

XY = (X+Y)(XY)= XY+XY

Logic Design

NTUEE C.M. Li

10

Symbol of XOR
X XOR Y

Logic Design

11

NTUEE C.M. Li

Theorems

P.65
X0=X
X 1 = X
XX=0
X X = 1
X Y = Y X (commutative law)
(X Y ) Z = X ( Y Z ) = X Y Z (associative law)
X( Y Z ) = XY XZ (distributive law)
(X Y) = X Y = X Y = XY + XY

Logic Design

NTUEE C.M. Li

(3-8)
(3-9)
(3-10)
(3-11)
(3-12)
(3-13)
(3-14)
(3-15)

12

Equivalence

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

X Y = 1 iff X equals Y
(X Y) = XY+XY
Equivalence is complement of XOR

( X Y) = (XY + XY) = (X + Y)(X + Y )


= XY + XY = (X Y)
(3-18)

NTUEE C.M. Li

Logic Design

13

Symbol of Equivalence
Equivalence

Exclusive NOR
XNOR

Logic Design

NTUEE C.M. Li

14

Boolean Expression Using XOR


Example p.66

Simplify F = (AB C) + (B AC)

Example p.66

Simplify A B C

Logic Design

NTUEE C.M. Li

15

Use of XOR
Error Checking

Can save your life when you are taking an airplane!

Logic Design

NTUEE C.M. Li

16

Outline

Multiplying Out and Factoring Expressions.


Exclusive-OR and Equivalence Operations.
The Consensus Theorem.
Algebraic Simplification of Switching Expressions.
Proving Validity of an Equation.

Logic Design

NTUEE C.M. Li

17

Consensus Term
Given a pair of terms for which a variable appears in one term and

the complement of that variable in another term


The consensus term is formed by multiplying the two original
terms together,
Leaving out the selected variable and its complement
Example
XY + XZ + YZ
YZ is consensus term

Logic Design

NTUEE C.M. Li

18

Consensus Theorem
Consensus Theorem: Consensus term can be eliminated
SOP form

XY + XZ + YZ = XY+XZ
Proof. on P.67

(3-20)

Exercise P.67
ab+ac+bc+bc+ab =?

POS form

(X+Y)(X+Z)(Y+Z) = (X+Y)(X+Z)
Exercise P.67
(a+b+c)(a+b+d)(b+c+d)= ?

Logic Design

(3-21) Dual of (3-20)

NTUEE C.M. Li

19

Food for Thought


Please give me a metaphor of the consensus theorem ?

Hint you can use the same LD example.

Logic Design

NTUEE C.M. Li

20

Order Matters
The final results obtained by consensus theorem may depend on the
order in which terms are eliminated.

Example P.67

Simplify ACD+ABD+BCD+ABC+ACD
Method 1

Method 2

NTUEE C.M. Li

Logic Design

21

Simplification Using CT
Sometimes, adding a CT into Boolean expression helps to simplify
Example p.67
F=ABCD+BCDE+AB+BCE

Originally, no consensus terms can be deleted


BUT, if we add one term, we can reduce two terms

Win one term!


Which term to add?
we will see how to use this technique more easily later

Logic Design

NTUEE C.M. Li

22

Outline

Multiplying Out and Factoring Expressions.


Exclusive-OR and Equivalence Operations.
The Consensus Theorem.
Algebraic Simplification of Switching Expressions.
Proving Validity of an Equation.

NTUEE C.M. Li

Logic Design

23

Simplification
General rules of simplifying Boolean expressions
Step 1 combining terms

XY+XY=X
Dual: (X+Y)(X+Y)=X
Step 2 Eliminating terms
X+XY=X
Dual: X(X+Y) = X
XY+XZ+YZ = XY+XZ Dual: (X+Y)(X+Z)(Y+Z)=(X+Y)(X+Z)
Step 3 Eliminating literals
X+XY=X+Y
Dual: X(X+Y) = XY
Step 4 adding redundant CT terms

Logic Design

NTUEE C.M. Li

24

SOP Example P.69

ABCD+ABCD+ABD+ABCD+ABCD+ACD+BCD

POS Example P. 70

(A+B+C)(A+B+C)(B+C)(A+C)(A+B+C)

Logic Design

NTUEE C.M. Li

25

When Is Simplification Done?


Unfortunately, there is NO easy way to determine when a Boolean
expression has a minimum number of terms or minimum number of
literals
Systematic way to find minimal SOP or POS will come in Ch5, 6
Now you know the importance of Quine-McClusky method

Logic Design

NTUEE C.M. Li

26

Outline

Multiplying Out and Factoring Expressions.


Exclusive-OR and Equivalence Operations.
The Consensus Theorem.
Algebraic Simplification of Switching Expressions.
Proving Validity of an Equation.

Logic Design

NTUEE C.M. Li

27

Proving Validity of Equations


What

Prove F always equal to G


Always means true for all inputs

Why ?

1. prove theorems
2. verify circuits
3. compare answers with your classmates

Logic Design

NTUEE C.M. Li

28

Methods to Prove equations


1. truth table

Simple but Very time consuming


2. manipulate one side by applying various theorems
3. reduce both sides of equations independently
4. perform same reversible operations on both side of equations
Reversible operations
Complement, Dual ok
Irreversible operations forbidden!
AND OR not ok

Logic Design

NTUEE C.M. Li

29

Prove Inequality
Showing one counterexample is enough

i.e. show at least one input such that FG

Logic Design

NTUEE C.M. Li

30

Strategy to prove Equations


1. First reduce both sides to a SOP (or POS)
2. Compare two sides of equation to see how they differ
3. Try to add terms to one side of equation that are present on other

side
4. try to eliminate terms from one side that are not present on the
other side

Logic Design

NTUEE C.M. Li

31

Examples
Example 1, P. 71

Steps 2 to 4

Example 2, P. 71

Step 1

Logic Design

NTUEE C.M. Li

32

Cancellation Law
Cancellation law of ordinary algebra are not true for Boolean algebra

Ordinary algebra
If x+y = x+z then y=z
Boolean algebra
NOT APPLICABLE!
1+0=1+1 , but 10
Ordinary algebra
If xy=xz, then y=z if x not zero
Boolean algebra
NOT APPLICABLE!
So when proving Boolean equations, DO NOT use cancellation law
Converse of cancellation law is ok
If y=z, then x+y = x+z
If y=z, then xy=xz

Logic Design

NTUEE C.M. Li

33

FFT
Q: Proving equation is so hard. Can we find a good computer

program to help us?


Q: Whats the worst case number of trials to prove two n-input
circuits are the same?

Logic Design

NTUEE C.M. Li

34

Programmed Exercise
Please try all exercises

3-1 to 3-5
Will ask you next time

Logic Design

NTUEE C.M. Li

35

Tired of Equations?
Will teach simpler methods later

K map

Logic Design

NTUEE C.M. Li

36

Next Time
ch 1 Introduction Number Systems
and Conversion
ch 2 Boolean Algebra
(change to Rm.105, 9am to 12pm)
Or attend other classes on 9/26
ch 3 Boolean Algebra (contd)
ch 4. Application of Boolean Algebra
ch 5 Karnaugh Maps
ch 7 Multi-Level Gate Circuits;
NAND NOR Gates
ch 8 Combinational Ckt Design
Midterm

Logic Design

NTUEE C.M. Li

37

You might also like