Boolean Algebra
Huntington’s Axioms/Postulates
Fundamental Theorems
CS 21 - Computer Organization and Assembly Language Programming Lecture 10 Boolean Algebra 1
University of the Philippines - Diliman College of Engineering Department of Computer Science
Boolean Algebra
Huntington’s Axioms/Postulates
Outline
1
Boolean Algebra
2
Huntington’s Axioms/Postulates
3
Fundamental Theorems
Fundamental Theorems
Boolean Algebra
Huntington’s Axioms/Postulates
Outline
1
Boolean Algebra
2
Huntington’s Axioms/Postulates
3
Fundamental Theorems
Fundamental Theorems
Boolean Algebra
Huntington’s Axioms/Postulates
Fundamental Theorems
What is an Algebra?
An algebra is a mathematical theory involving a set of elements K and a set of operations I that acts on members of K
Boolean Algebra
Huntington’s Axioms/Postulates
High School Algebra
K = R (infinite set of real numbers) I = +, - , x , /
Fundamental Theorems
Boolean Algebra
Huntington’s Axioms/Postulates
Fundamental Theorems
Boolean Algebra
K = 0, 1 Named after English mathematician George Boole From Boole’s book The Laws of Thought(1854) Boole showed how to reduce human reasoning to symbolic form resembling ordinary numerical algebra
Boolean Algebra
Huntington’s Axioms/Postulates
Fundamental Theorems
Boolean Algebra
In 1930s Claude Shannon showed that Boolean algebra provides the theory needed for the analysis and design of digital circuits built from electromechanical relays Why? on/off (circuits) are analogs of true/false (logic) Boolean Algebra has remained relevant up to this day since it addresses the structure and behavior of circuits in an abstract, technology independent form.
Boolean Algebra
Huntington’s Axioms/Postulates
Outline
1
Boolean Algebra
2
Huntington’s Axioms/Postulates
3
Fundamental Theorems
Fundamental Theorems
Boolean Algebra
Huntington’s Axioms/Postulates
Fundamental Theorems
What are axioms/postulates?
Axioms/postulates are rules that govern the manner in which algebraic operations can be used.
Boolean Algebra
Huntington’s Axioms/Postulates
Fundamental Theorems
Huntington’s Axioms/Postulates
Axioms for Boolean algebra Published by American mathematician Edward V Huntington in 1904 Employs 3 operations: AND(x), OR(+), NOT(’)
Boolean Algebra
Huntington’s Axioms/Postulates
Huntington’s Axioms 1A & 1B
Closure Axioms 1A. If a and b are in K, then a + b is in K 1B. If a and b are in K, then ab is in K
Fundamental Theorems
Boolean Algebra
Huntington’s Axioms/Postulates
Fundamental Theorems
Huntington’s Axioms 2A & 2B
Zero Axiom 2A. There is an element 0 in K such that a + 0 = a Unit Axiom 2B. There is an element 1 in K such that a1 = a
Boolean Algebra
Huntington’s Axioms/Postulates
Huntington’s Axioms 3A & 3B
Commutativity Axioms 3A. For all a and b in K, a + b = b + a 3B. For all a and b in K, ab = ba
Fundamental Theorems
Boolean Algebra
Huntington’s Axioms/Postulates
Fundamental Theorems
Huntington’s Axioms 4A & 4B
Distributivity Axioms 4A. For all a, b and c in K, a + bc = (a + b)(a + c) 4B. For all a, b and c in K, a(b + c) = ab + ac
Boolean Algebra
Huntington’s Axioms/Postulates
Fundamental Theorems
Huntington’s Axioms 5A & 5B
Inverse Axioms 5A. For each a in K there is an inverse or complement element a’ in K such that a + a’ = 1 5B. For each a in K there is an inverse or complement element a’ in K such that aa’ = 0
Boolean Algebra
Huntington’s Axioms/Postulates
Huntington’s Axiom 6
6. There are at least two distinct elements in K
Fundamental Theorems
Boolean Algebra
Huntington’s Axioms/Postulates
Fundamental Theorems
Boolean Algebra and gate networks/circuits
Boolean algebra expressions are easily implementable in gate network/circuit form variables = values operations = gates
Boolean Algebra
Huntington’s Axioms/Postulates
Fundamental Theorems
Circuit Interpretation of Boolean Algebra Axioms Zero Axiom
Unit Axiom
Boolean Algebra
Huntington’s Axioms/Postulates
Fundamental Theorems
Circuit Interpretation of Boolean Algebra Axioms
Distributivity Axiom
Boolean Algebra
Huntington’s Axioms/Postulates
Outline
1
Boolean Algebra
2
Huntington’s Axioms/Postulates
3
Fundamental Theorems
Fundamental Theorems
Boolean Algebra
Huntington’s Axioms/Postulates
Fundamental Theorems
What is a Theorem?
A true statement or proposition about an algebra derived from axioms.
Boolean Algebra
Huntington’s Axioms/Postulates
Fundamental Theorems
Why are boolean algebra theorems important?
Along with axioms, theorems provide the rules needed to simplify logic circuits, change gate types, etc
Boolean Algebra
Huntington’s Axioms/Postulates
Fundamental Theorems
Why would we like to simplify circuits?
Hardware availability constraints(gate types, limit to number of inputs, etc) Better performance
Boolean Algebra
Huntington’s Axioms/Postulates
Fundamental Theorem 1
Uniqueness Theorems 1A. The zero element 0 is unique 1B. The unit element 1 is unique
Fundamental Theorems
Boolean Algebra
Huntington’s Axioms/Postulates
Fundamental Theorem 2
Idempotence 1A. For each a in K, a + a = a 1B. For each a in K, aa = a
Fundamental Theorems
Boolean Algebra
Huntington’s Axioms/Postulates
Fundamental Theorem 3
Unit Property 3A. For each a in K, a + 1 = 1 Zero Property 3B. For each a in K, a0 = 0 Identity Property 3C. For each a in K, a+0 = a and a1 = a
Fundamental Theorems
Boolean Algebra
Huntington’s Axioms/Postulates
Fundamental Theorem 4
Involution 4. For each a in K, (a’)’ = a
Fundamental Theorems
Boolean Algebra
Huntington’s Axioms/Postulates
Fundamental Theorem 5
Inverse 5a. For each a in K, the inverse a’ is unique 5b. For each a in K, aa’ = 0 and a + a’= 1
Fundamental Theorems
Boolean Algebra
Huntington’s Axioms/Postulates
Fundamental Theorems
Fundamental Theorem 6
Commutativity 6A. For all a, b, and c in K, a + b = b + a 6B. For all a, b, and c in K, ab = ba Associativity 6C. For all a, b, and c in K, (a + b) + c = a + (b + c) 6D. For all a, b, and c in K, (ab)c = a(bc) Distributivity 6E. For all a, b, and c in K, a(b + c) = ab + ac 6F. For all a, b, and c in K, a + (bc) = (a + b)(a + c)
Boolean Algebra
Huntington’s Axioms/Postulates
Other Simplification Theorem 7
De Morgan’s Theorems 7A. For all a and b in K, (a + b)’ = a’b’ 7B. For all a and b in K, (ab)’ = a’ + b’
Fundamental Theorems
Boolean Algebra
Huntington’s Axioms/Postulates
Other Simplification Theorem 8
Absorption 8A. For all a and b in K, a + ab = a 8B. For all a and b in K, a(a + b) = a 8C. For all a and b in K, (ab)+(ab’) = a 8D. For all a and b in K, (a+b)(a+b’) = a
Fundamental Theorems
Boolean Algebra
Huntington’s Axioms/Postulates
Fundamental Theorems
Other Simplification Theorem
Duality 9. The dual of any statement in a Boolean algebra is the statement obtained by interchanging AND and OR , and simultaneously inter-changing the elements 0 and 1 in the statement Example, given the distributive law a(b + c) = ab + ac the dual expression is a+bc = (a + b)(a + c) Multiplication and Factoring 10. For all a, b, and c in K, (a + b)(a’ + c) = ac + a’b 11. For all a, b, and c in K, ab + a’c = (a + c)(a’ + b)
Boolean Algebra
Huntington’s Axioms/Postulates
Application
Prove the equivalence of E1 and E2 E1 = a’b’h + c’fgh + d’fgh + e’fgh E2 = ((a + b)(cde + (fg)’))’h Options Use truth table (so many rows!) Use theorems
Fundamental Theorems
Boolean Algebra
Example
Simplify c + (bc)’
Huntington’s Axioms/Postulates
Fundamental Theorems
Boolean Algebra
Huntington’s Axioms/Postulates
Example
Simplify c + (bc)’ 1
c + (bc)’ — original expression
Fundamental Theorems
Boolean Algebra
Huntington’s Axioms/Postulates
Example
Simplify c + (bc)’ 1
c + (bc)’ — original expression
2
c + (b’ + c’) — DeMorgan’s
Fundamental Theorems
Boolean Algebra
Huntington’s Axioms/Postulates
Example
Simplify c + (bc)’ 1
c + (bc)’ — original expression
2
c + (b’ + c’) — DeMorgan’s
3
(c + c’) + b’ — Comm, Assoc
Fundamental Theorems
Boolean Algebra
Huntington’s Axioms/Postulates
Example
Simplify c + (bc)’ 1
c + (bc)’ — original expression
2
c + (b’ + c’) — DeMorgan’s
3
(c + c’) + b’ — Comm, Assoc
4
1 + b’ — Complement
Fundamental Theorems
Boolean Algebra
Huntington’s Axioms/Postulates
Example
Simplify c + (bc)’ 1
c + (bc)’ — original expression
2
c + (b’ + c’) — DeMorgan’s
3
(c + c’) + b’ — Comm, Assoc
4
1 + b’ — Complement
5
1 — Identity
Fundamental Theorems
Boolean Algebra
Huntington’s Axioms/Postulates
Example
Simplify c + (bc)’ 1
c + (bc)’ — original expression
2
c + (b’ + c’) — DeMorgan’s
3
(c + c’) + b’ — Comm, Assoc
4
1 + b’ — Complement
5
1 — Identity
6
Revelation: It’s always true!
Fundamental Theorems
Boolean Algebra
Huntington’s Axioms/Postulates
Fundamental Theorems
Difference between expressions and functions
Boolean expressions is an implementation of a Boolean function Boolean functions define relationships between inputs and output; tied to a truth table Every Boolean expression defines a unique Boolean function A Boolean function can be defined by many different but equivalent Boolean expressions
Boolean Algebra
Huntington’s Axioms/Postulates
So...
Any questions?
Fundamental Theorems