Boolean Algebra 9/15/09 - L5 Boolean Algebra Copyright 2009 - Joanne DeGroat, ECE, OSU.

Download Report

Transcript Boolean Algebra 9/15/09 - L5 Boolean Algebra Copyright 2009 - Joanne DeGroat, ECE, OSU.

Boolean Algebra
9/15/09 - L5 Boolean Algebra
Copyright 2009 - Joanne DeGroat, ECE, OSU
1
Class 5 outline

Boolean Algebra






Basic Boolean Equations
Multiple Level Logic Representation
Basic Identities
Algebraic Manipulation
Complements and Duals
Material from section 2-2 of text
9/15/09 - L5 Boolean
Algebra
Copyright 2009 - Joanne DeGroat, ECE, OSU
2
History

George Boole



2 November 1815 Lincoln Lincolnshire, England
– 8 December 1864 Ballintemple, Ireland
Professor at Queens College, Cork, Ireland
“spring of 1847 that he put his ideas into the
pamphlet called Mathematical Analysis of
Logic.” from wikipedia.com
9/15/09 - L5 Boolean
Algebra
Copyright 2009 - Joanne DeGroat, ECE, OSU
3
Basic Boolean Equations


For the basic gates/functions
AND




3 input gate
4 input gate
OR



Z=AB
X=CDE
Y=FGHK
Z=A+B
Y=F+G+H+K
4 input gate
NOT


Z=A
Y = (F G H K)
9/15/09 - L5 Boolean
Algebra
actually 2 level logic
Copyright 2009 - Joanne DeGroat, ECE, OSU
4
2 Level Logic

Consider the following logic equation





Z(A,B,C,D) = A B + C D
The Z(A,B,C,D) means that the output is a
function of the four variables within the ().
The AB and CD are terms of the expression.
This form of representing the function is an
algebraic expression.
For this function to be True, either both A AND
B are True OR both C AND D are True.
9/15/09 - L5 Boolean
Algebra
Copyright 2009 - Joanne DeGroat, ECE, OSU
5
Truth table expression

Just like we had the
truth tables for the
basic functions, we can
also construct truth
tables for any function.
9/15/09 - L5 Boolean
Algebra
Copyright 2009 - Joanne DeGroat, ECE, OSU
6
Examples of Boolean Equations

Some examples






F = AB + CD + BD’
Y = CD + A’B’
SUM = AB + A Cin + B Cin
P = A0A1A2A3A4B0B1B2B3B4 + …
Equations can be very complex
Usually desire a minimal expression
9/15/09 - L5 Boolean
Algebra
Copyright 2009 - Joanne DeGroat, ECE, OSU
7
Basic Identities of Boolean Algebra

1. X + 0 = X

2. X · 1 = X

3. X + 1 = 1
5. X + X = X

4. X · 0 = 0
6. X · X = X

9/15/09 - L5 Boolean
Algebra

Copyright 2009 - Joanne DeGroat, ECE, OSU
8
Basic Identities (2)

7. X + X’ = 1

9. (X’)’ = X
9/15/09 - L5 Boolean
Algebra

8. X · X’ = 0
Copyright 2009 - Joanne DeGroat, ECE, OSU
9
Basic Properties (Laws)

Commutative


10. X + Y = Y + X
Associative







12. X+(Y+Z)=(X+Y)+Z
Distributive
9/15/09 - L5 Boolean
Algebra
11. X · Y = Y · X
Associative


14. X(Y+Z) =XY+XZ
AND distributes over
OR
Commutative
13. X(YZ) = (XY)Z
Distributive


15. X+YZ=(X+Y)(X+Z)
OR distributes over
AND
Copyright 2009 - Joanne DeGroat, ECE, OSU
10
Basic Properties (2)


DeMorgan’s Theorem
Very important in simplifying equations


16. (X + Y)’ = X’ · Y’
17. (XY)’ = X’ + Y’
9/15/09 - L5 Boolean
Algebra
Copyright 2009 - Joanne DeGroat, ECE, OSU
11
Simplify, simplify

These properties (Laws and Theorems) can be used to
simplify equations to their simplest form.

Simplify
9/15/09 - L5 Boolean
Algebra
F=X’YZ+X’YZ’+XZ
Copyright 2009 - Joanne DeGroat, ECE, OSU
12
Affect on implementation

F = X’YZ + X’YZ’ + XZ

Reduces to F = X’Y + XZ
9/15/09 - L5 Boolean
Algebra
Copyright 2009 - Joanne DeGroat, ECE, OSU
13
Other examples

Examples from the text

1. X + XY = X·1 + XY = X(1+Y) = X·1 = X


2
14
3
2
2. XY+XY’ = X(Y + Y’) = X·1 = X


Use
Use
14
7
2
3. X+X’Y = (X+X’)(X+Y) = 1· (X+Y) = X+Y

9/15/09 - L5 Boolean
Algebra
Use
15
Copyright 2009 - Joanne DeGroat, ECE, OSU
7
2
14
Further Examples

Examples from the text

4. X· (X+Y)=X·X+X·Y=
X+XY=X(1+Y)=X·1=X





Use
14
6
14
3
2
5. (X+Y) ·(X+Y’)=XX+XY’+XY+YY’=
X+XY’+XY+0=X(1+Y’+Y)=X·1=X
by a slightly different reduction
6. X(X’+Y) = XX’+XY = 0 + XY = XY
9/15/09 - L5 Boolean
Algebra
Copyright 2009 - Joanne DeGroat, ECE, OSU
15
Consensus Theorem

The Theorem gives us the relationship



XY + X’Z + YZ = XY + X’Z
Proof is on page 47.
Note that in doing the reduction the first step is to
and in a 1 to the YZ term. That 1 is in the form,
(X+X’).
9/15/09 - L5 Boolean
Algebra
Copyright 2009 - Joanne DeGroat, ECE, OSU
16
Application of Consensus Theorem

Consider (page 47 of text)



(A+B)(A’+C) = AA’ + AC + A’B + BC
= AC + A’B + BC
= AC + A’B
9/15/09 - L5 Boolean
Algebra
Copyright 2009 - Joanne DeGroat, ECE, OSU
17
Complement of a function

In real implementation sometimes the
complement of a function is needed.

Have
9/15/09 - L5 Boolean
Algebra
F=X’YZ’+X’Y’Z
Copyright 2009 - Joanne DeGroat, ECE, OSU
18
Duals

What is meant by the dual of a function?


The dual of a function is obtained by
interchanging OR and AND operations and
replacing 1s and 0s with 0s and 1s.
Shortcut to getting function complement




Starting with the equation on the previous slide
Generate the dual F=(X’+Y+Z’)(X’+Y’+Z)
Complement each literal to get:
F’=(X+Y’+Z)(X+Y+Z’)
9/15/09 - L5 Boolean
Algebra
Copyright 2009 - Joanne DeGroat, ECE, OSU
19
Getting XILINX software


Go to www.xilinx.com
In the upper line you have



Sign in
Language Documentation Downloads
Choose Downloads
On the right side of the page you will see


“Logic design tools”
Choose ISE WebPackTM
9/15/09 - L5 Boolean
Algebra
Copyright 2009 - Joanne DeGroat, ECE, OSU
20
Class 5 assignment


Covered section 2-2
Problems for hand in


Problems for practice


2-7
2-2a,b,c 2-6b,c,d
Reading for next class: section 2-3
9/15/09 - L5 Boolean
Algebra
Copyright 2009 - Joanne DeGroat, ECE, OSU
21