260 likes | 312 Views
EEL 3705 / 3705L Digital Logic Design. Fall 2006 Instructor: Dr. Michael Frank Lecture Module #4: Boolean Algebra & Boolean Circuits. Topics for Today (Wed. 1/17). Administrivia: Don’t forget, “Reading Assignment #1” is due Friday. Turn in your lab report from lab #0 this week.
E N D
EEL 3705 / 3705LDigital Logic Design Fall 2006Instructor: Dr. Michael Frank Lecture Module #4: Boolean Algebra & Boolean Circuits M. Frank, EEL3705 Digital Logic, Spring 2007
Topics for Today (Wed. 1/17) • Administrivia: • Don’t forget, “Reading Assignment #1” is due Friday. • Turn in your lab report from lab #0 this week. • Lab Assignment #1is going on now. • Lab Assignment #2 has been posted. • YOU MUST COMPLETE THE PRE-LAB BEFORE LAB! • A HW#1 will hopefully be posted shortly. • Homeworks are generally due 1 week after they are assigned. • Today’s Lecture: • Some general remarks concerning Lab #1. • Topic #2, Combinational Digital Logic • Subtopic 2.2. Design of combinational logic circuits • 2.2.1. Analytical combinational design • 2.2.1.1. Boolean algebra • 2.2.1.2. Combinational circuits and Boolean formulas. M. Frank, EEL3705 Digital Logic, Spring 2007
Topic 2.2.1.1: Boolean Algebra Just the Essentials M. Frank, EEL3705 Digital Logic, Spring 2007
Breakdown of Topic • Topic 2. Combinational Digital Logic • Subtopic 2.2. Design of combinational logic circuits • 2.2.1. Analytical combinational design • 2.2.1.1. Basics of Boolean algebra • 2.2.1.1.1. Syntax, defining axioms, and basic identities • 2.2.1.1.2. Boolean functions and truth tables. • 2.2.1.1.3. Hand-derivation of Boolean algebra equivalences • 2.2.1.1.4. DNF and CNF expansions M. Frank, EEL3705 Digital Logic, Spring 2007
What is Boolean Algebra? • A generalization of propositional logic. • In general, an algebra is any mathematical structure satisfying certain standard algebraic axioms. • Such as associative/commutative/distributed laws, etc. • General theorems that are proved about an algebra then apply to any mathematical structure satisfying these axioms. • Boolean algebra just generalizes the rules of propositional logic to sets other than {T,F}. • E.g., to the set {0,1} of base-2 digits, or the set {VL, VH} of low and high voltage levels in a circuit. • We will see that this algebraic perspective is useful for the analysis and synthesis of digital logic circuits. Claude Shannon’sMaster’s thesis! M. Frank, EEL3705 Digital Logic, Spring 2007
Boolean Complement, Sum, Product • Correspond to logical NOT, OR, and AND. • We denote the two logic values as0:≡F and 1:≡T, instead of False and True. • Using numbers encourages algebraic thinking. • New, more algebraic-looking notation for the most common Boolean operators: In order of decreasing precedence → M. Frank, EEL3705 Digital Logic, Spring 2007
Boolean Functions • Let B = {0, 1}, the set of Boolean values. • For all nZ+, any function f:Bn→B is called a Boolean function of degree n. • There are 22ⁿ (wow!) distinct Boolean functions of degree n. • Because there are 2n rows in its truth table; each containing either a 0 or a 1. DegreeHow manyDegreeHow many 0 2 4 65,536 1 4 5 4,294,967,296 2 16 6 18,446,744,073,709,551,616. 3 256 7 (number is too big to fit) M. Frank, EEL3705 Digital Logic, Spring 2007
Truth Tables • Go through a simple example on the board, e.g. for the expression ~x y + z M. Frank, EEL3705 Digital Logic, Spring 2007
Boolean Expressions • Let x1, …, xn be n different Boolean variables. • n may be as large as desired. • A Boolean expression or formula (recursive definition) is a string of one of the following forms: • Base cases: 0, 1, x1, …, or xn. • Recursive cases: E1, (E1E2), or (E1+E2), where E1 and E2 are Boolean expressions. • A Boolean expression represents a Boolean function. • Furthermore, every Boolean function (of a given degree) can be represented by a Boolean expression. M. Frank, EEL3705 Digital Logic, Spring 2007
Boolean equivalents, operations on Boolean expressions • Two Boolean expressions e1 and e2 that represent the exact same function f are called equivalent. • We write e1e2, or just e1=e2. • This means that the two expressions have the same value for all possible combinations of values of all of the free variables appearing in e1 and e2. • The operators ¯, +, and · can be extended from just operating on expressions to operating on the functions that they represent, in the obvious way. M. Frank, EEL3705 Digital Logic, Spring 2007
Double complement: x = x Idempotent laws: x + x = x, x · x = x Identity laws: x + 0 = x, x · 1 = x Domination laws: x + 1 = 1, x · 0 = 0 Commutative laws: x + y = y + x, x · y = y · x 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 De Morgan’s laws: (x · y) = x + y, (x + y) = x · y Absorption laws: x + x·y = x, x · (x + y) = x Some popular Boolean identities Note: The laws circled in red depart from ordinary numerical algebra! also, the Unit Property: x + x = 1 and Zero Property: x· x = 0 M. Frank, EEL3705 Digital Logic, Spring 2007
Methods for Determining whether Two Boolean Formulas are Equivalent • Write out their truth tables & compare them • This is simple & straightforward • Show an example on the board • Carry out an analytic, symbolic derivation by hand using the basic identities & theorems • Much like you do in ordinary algebra… • Go through an example on the board, if there is time M. Frank, EEL3705 Digital Logic, Spring 2007
Duality • The dualed of a Boolean expression e representing function f is obtained by exchanging + with ·, and 0 with 1 in e. • The function represented by ed is denoted fd. • Duality principle: If e1e2 then e1de2d. • Example: The equivalence x(x+y) = ximplies (and is implied by) x + xy = x. M. Frank, EEL3705 Digital Logic, Spring 2007
End of Lecture We ran out of time here… Remaining topics will be covered on Monday. M. Frank, EEL3705 Digital Logic, Spring 2007
Topic 2.2.1.1.3: DNF and CNF representations M. Frank, EEL3705 Digital Logic, Spring 2007
Representing Boolean Functions • Sum-of-products Expansions • A.k.a. Disjunctive Normal Form (DNF) • Product-of-sums Expansions • A.k.a. Conjunctive Normal Form (CNF) • Functional Completeness • Minimal functionally complete sets of operators. M. Frank, EEL3705 Digital Logic, Spring 2007
Sum-of-Products Expansions • Theorem: Any Boolean function can be represented as a sum of products of variables and their complements. • Proof: By construction from the function’s truth table. For each row that is 1, include a term in the sum that is a product representing the condition that the variables have the values given for that row. Show an example on the board. M. Frank, EEL3705 Digital Logic, Spring 2007
Literals, Minterms, DNF • A literal is a Boolean variable or its complement. • A minterm of Boolean variables x1,…,xn is a Boolean product of n literals y1…yn, where yi is either the literal xi or its complement xi. • Note that at most one minterm can have the value 1. • The disjunctive normal form (DNF) of a degree-n Boolean function f is the unique sum of minterms of the variables x1,…,xn that represents f. • A.k.a. the sum-of-products expansion of f. M. Frank, EEL3705 Digital Logic, Spring 2007
Conjunctive Normal Form • A maxterm is a sum of literals. • CNF is a product-of-maxterms representation. • Or, product-of-sums. • To find the CNF representation for f, • take the DNF representation for complement f, f = ∑i∏j yi,j • and then complement both sides & apply DeMorgan’s laws to get: f = ∏i∑jyi,j Can also get CNF moredirectly, using the 0rows of the truth table. M. Frank, EEL3705 Digital Logic, Spring 2007
Functional Completeness • Since every Boolean function can be expressed in terms of ·,+,¯, we say that the set of operators {·,+,¯} is functionally complete. • There are smaller sets of operators that are also functionally complete. • We can eliminate either · or + using DeMorgan’s law. • NAND | and NOR ↓ are also functionally complete, each by itself (as a singleton set). • E.g., x = x|x, and xy = (x|y)|(x|y). M. Frank, EEL3705 Digital Logic, Spring 2007
Reversible Boolean Logic Bonus research topic • A reversible Boolean function of degree n is a bijective function f:Bn↔Bn. • Also corresponds to a permutation of Bn. • Reversible unary and binary Boolean operators are bijective operators on B and B2, respectively. • Unary f:B↔B, binary f:B2↔B2. • It turns out that no set of reversible unary and binary Boolean operators is functionally complete! • However, there are many ternary reversible operators that are functionally complete, even as singletons. • One reason that reversible logic is interesting is that these operations theoretically require no energy dissipation! M. Frank, EEL3705 Digital Logic, Spring 2007
A little about Quantum Logic Bonus research topic • A quantum Boolean function is a bijective and linear function f:C2ⁿ↔C2ⁿ. • That is, it maps vectors of 2n complex numbers (one for each n-bit string of Boolean values) to new ones, reversibly and linearly. • Any reversible Boolean function corresponds to a quantum Boolean function where a string in Bn is represented by c=1 for that string, c=0 for all others. • Any quantum Boolean function can be built out of quantum operators operating on just C and C2. • Going to the quantum realm removes the need for ternary gates! M. Frank, EEL3705 Digital Logic, Spring 2007
Topic 2.2.1.2 Combinational Circuits & Boolean Formulas M. Frank, EEL3705 Digital Logic, Spring 2007
Breakdown of Topic • 2.2.1.2. Combinational circuits and Boolean formulas. • 2.2.1.2.1. Simple examples of combinational circuits. • 2.2.1.2.2. Converting formulas to circuits (“synthesis”). • 2.2.1.2.3. Converting circuits to formulas (“analysis”). • CIO 3. [SynAnal] Derive digital circuits from optimized Boolean equations and compute the Boolean equations of a digital circuit. M. Frank, EEL3705 Digital Logic, Spring 2007
Coverage of Topic • Topic is very simple to understand/explain, just go through a few arbitrary examples on the board. • Include sets of equations / circuits with multiple outputs • Be sure to mention how the circuit representation can be used to eliminate the redundancy of common subexpressions M. Frank, EEL3705 Digital Logic, Spring 2007