Presentation is loading. Please wait.

Presentation is loading. Please wait.

EEL 3705 / 3705L Digital Logic Design

Similar presentations


Presentation on theme: "EEL 3705 / 3705L Digital Logic Design"— Presentation transcript:

1 EEL 3705 / 3705L Digital Logic Design
Fall 2006 Instructor: Dr. Michael Frank Module #4: Boolean Algebra 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

2 Topics for Today (Fri. 9/22)
Administrivia: HW#1 has been graded. HW#2 is due Wed. next week Midterm exam #1 (lecs.1-7, CIOs 1-3): will be on Mon., Oct. 2nd Design Project #1 will be posted soon. planned to be due Fri., Oct. 13th design document examples are already posted Demonstrate & explain latest example circuit: Color ASCII table display on VGA monitor Topic #3: Basics of Boolean Algebra 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

3 Topics for Today (Mon. 9/25)
Administrivia: HW#1 has been graded. HW#2 is due Wed. Midterm exam #1 (lecs.1-7, CIOs 1-3): will be on Mon., Oct. 2nd Design Project #1 will be posted soon. planned to be due Fri., Oct. 13th design document examples are already posted Topic 3.4: Basic Combinational Logic 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

4 Design Projects: Preview
9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

5 Structured Engineering Design Process
System Requirements Specification (SRS) Informal Statement of Needs System-Level Design Specification (SLDS) CG&S Report Requirements Analysis Concept Generation & Selection System-Level Design Detailed Design (to component level) Testing Report Testing Plan Design Files Detailed Design Specification Simulation Testing Product Manufacture Prototype Testing Prototype System Prototype Manufacture 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

6 Design Projects in This Course
During the semester, we will have 1 or 2 small design projects, and one larger term project at semester end. In each project, you will go through a simplified version of the structured engineering design process… Turing in deliverables for the different reports with the later projects being more complex. 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

7 Basic Boolean Logic: Review
9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

8 M. Frank, EEL3705 Digital Logic, Fall 2006
Boolean Logic: Review For reasoning about whether propositions (statements) are true (T) or false (F). The truth value of the proposition. The important functional operators of Boolean logic include: NOT(x) = {T iff x=F (otherwise F)} AND(x,y) = {T iff both x=T and y=T} OR(x,y) = {T iff either x=T or y=T, or both} XOR(x,y) = {T iff either x=T or y=T, but not both} George Boole iff = “if and only if”  “exclusive OR” 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

9 Boolean Logic Notations
You should be aware that any given expression of Boolean logic could be written in several styles: Writing operators as functions: XOR(OR(AND(a,b),NOT(c)),d) Using operator names “infix” (between their operands): ((a AND b) OR (NOT c)) XOR d Using mathematical logic operator symbols: [(a  b)  ¬c]  d Using C programming language operators: ((a & b) | ~c) ^ d Using Boolean algebra notation: These are applied to all of the bits of a word in parallel We’ll use this notation 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

10 Topic Area #3: Boolean Algebra
Algebraic Methods for the Analysis and Synthesis of Digital Logic Circuits 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

11 What is Boolean Algebra?
A minor generalization of propositional logic. In general, an algebra is any mathematical structure satisfying certain standard algebraic axioms. Such as associative/commutative/transitive laws, etc. General theorems that are proved about an algebra then apply to any 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’s Master’s thesis! 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

12 Boolean Algebra Subtopics
3.1. Basics of Boolean Algebraic Functions 3.2. Representing Boolean Functions 3.3. Logic Gates Covered earlier, but we go into a bit more depth 3.4. Combinational Logic Circuits 3.5. Minimization of Circuits 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

13 3.1. Boolean Functions: Subtopics
Boolean complement, sum, product. Boolean expressions and functions. Boolean algebra identities. Duality. Abstract definition of a Boolean algebra. 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

14 Complement, Sum, Product
Correspond to logical NOT, OR, and AND. We will denote the two logic values as 0:≡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: Decreasing precedence order→ 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

15 M. Frank, EEL3705 Digital Logic, Fall 2006
Boolean Functions Let B = {0, 1}, the set of Boolean values. For all nZ+, any function f:Bn→B is called a Boolean function of degree n. There are 22ⁿ (wow!) distinct Boolean functions of degree n. Because  2n rows in truth table; 0 or 1 in each. Degree How many Degree How many , ,294,967, ,446,744,073,709,551,616. 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

16 M. Frank, EEL3705 Digital Logic, Fall 2006
Boolean Expressions Let x1, …, xn be n different Boolean variables. n may be as large as desired. A Boolean expression (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. 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

17 Hypercube Representation
A Boolean function of degree n can be represented by an n-cube (hypercube) with the corresponding function value at each vertex. (a, b, c) (1,1,0) (1,1,1) 1 (0,1,0) 1 1 (0,1,1) (1,0,0) (1,0,1) 1 (0,0,0) (0,0,1) 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

18 Boolean equivalents, operations on Boolean expressions
Two Boolean expressions e1 and e2 that represent the exact same function f are called equivalent. We write e1e2, or just e1=e2. This means that the two expressions have the same value for all values 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. 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

19 Some popular Boolean identities
Note: The laws circled in red depart from ordinary numerical algebras! 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 also, the Unit Property: x + x = 1 and Zero Property: x · x = 0 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

20 M. Frank, EEL3705 Digital Logic, Fall 2006
Duality The dual ed 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 e1e2 then e1de2d. Example: The equivalence x(x+y) = x implies (and is implied by) x + xy = x. 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

21 Boolean Algebra, in the abstract
A general Boolean algebra is any set B having elements 0, 1, two binary operators ,, and a unary operator  that satisfies the following laws: Identity laws: x  0 = x, x  1 = x Complement laws: x  x = 1, x  x = 0 Associative laws:(xy)z = x(yz), (xy)z = x(yz) Commutative laws: x  y = y  x, x  y = y  x Distributive laws: x(yz) = (xy)(xz), x(yz)=(xy)(xz). Note that B may generally have other elements besides 0, 1, and we have not fully defined any of the operators! 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

22 More about Boolean algebras
Any Boolean algebra (in the general sense) can be proven to satisfy all the theorems of “ordinary” Boolean algebra! An example of another Boolean algebra: For any set U, let B = 2U, 0=, 1=U, =, =, and =¯ (set complement). Then, (B,0,1,,,) is a Boolean algebra! Boolean algebras can also be defined in terms of lattices (in chapter 7, though we skipped it). A poset where every pair x,y has a lub and a glb. A complemented, distributed lattice is a Boolean alg. 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

23 Topic 3.2: Representing Boolean Functions
9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

24 3.2 – 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. 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

25 3.2.1. 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. 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

26 M. Frank, EEL3705 Digital Logic, Fall 2006
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. 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

27 3.2.2. 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∑j yi,j Can also get CNF more directly, using the 0 rows of the truth table. 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

28 3.2.3. 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). 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

29 Reversible Boolean Logic
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. 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

30 M. Frank, EEL3705 Digital Logic, Fall 2006
A little Quantum Logic 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) 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. Quantization removes the need for ternary gates! 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

31 Topic 3.3: Basic Logic Gates
9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

32 M. Frank, EEL3705 Digital Logic, Fall 2006
3.3 – Logic Gates Inverter, Or, And gate symbols. You’ve already seen these; this is just review Multi-input gates. Inverting gates (NAND, etc.) Alternative gate symbols Bubbled representations for active-low functions Buffers 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

33 M. Frank, EEL3705 Digital Logic, Fall 2006
Logic Gate Icons Inverter Logical NOT, Boolean complement AND gate Boolean product OR gate Boolean sum XOR gate exclusive-OR, sum mod 2 x x x·y y x x+y y x xy y 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

34 M. Frank, EEL3705 Digital Logic, Fall 2006
Multi-input AND, OR Can extend these gates to arbitrarily many inputs. Two commonly seen drawing styles: Note that the second style keeps the gate icon relatively small. x1 x1x2x3 x2 x3 x1 ⋮ x5 x1…x5 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

35 M. Frank, EEL3705 Digital Logic, Fall 2006
Multi-input XOR There is a small subtlety here… You might expect that XOR(a,b,c) should mean, “a or b or c, but not all three.” But actually, that’s not how it’s usually defined. Or, how about, “a or b or c, but not more than one?” No, it’s not that either! a XOR(a,b,c) is defined as (a⊕b)⊕c = (a+b+c) mod 2. “An odd number of a, b, and c are true.” b a⊕b⊕c c 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

36 M. Frank, EEL3705 Digital Logic, Fall 2006
NAND, NOR, XNOR Just like the earlier icons, but with a small circle on the gate’s output. Denotes that the output is complemented. Circles could also be placed on inputs. Means, input is complemented before being used. x y x y x y 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

37 CMOS NAND gate implementation
A NAND gate is particularly easy to implement in CMOS: Simple 4-transistor circuit  A NOR gate is equally simple, but slower, due to series pFETs If we wanted to, we could build any computer using nothing but NAND gates and wires! Vdd x y xy Vss = GND 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

38 Bubbled Inputs and DeMorgan Substitutions
We’re also allowed to draw inversion bubbles on the inputs to a gate. Example: The below gate computes : Note that DeMorgan’s Law allows us to swap AND↔OR by toggling bubbles on inputs & outputs E.g., the above gate equals  I.e., an AND of active-low signals implements OR. x y x x+y y 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

39 M. Frank, EEL3705 Digital Logic, Fall 2006
Buffer x x What about an inverter symbol without a circle? This is called a buffer. It is the identity function. It serves no logical purpose, but… It represents an explicit delay in the circuit. This is sometimes useful for timing purposes. All gates, when physically implemented, incur a non-zero delay between when their inputs are seen and when their outputs are ready. Often called the propagation delay. 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

40 Topic 3.4: Basic Combinational Logic
Examples of Some Basic Circuits 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

41 3.4. Combinational Logic Circuits
Basic Combinational Logic Concepts Examples of Some Simple Combinational Circuits 3-input majority function XOR constructions half adder full adder n-bit ripple-carry adder 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

42 Combinational Logic Circuits
Note: The correct word to use here is “combinational,” NOT “combinatorial!” Many sloppy authors get this wrong. These are circuits composed of Boolean gates whose outputs depend only on their most recent inputs, not on earlier inputs. Thus these circuits have no useful memory. Their state persists while the inputs are constant, but is irreversibly lost when the input signals change. Later we’ll discuss sequential circuits that have memory. 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

43 Majority Voting Circuit
3-input majority voter: Output is true if 2 or more inputs are. Truth table shown at right. Boolean expression: m = ab + ac + bc a b c m 1 Logic circuit: 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

44 M. Frank, EEL3705 Digital Logic, Fall 2006
XOR from AND/OR/NOT Boolean algebra expression: XOR can be implemented combinationally using more basic gates, as shown below. 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

45 3-input XOR from MAJ, NAND, etc.
We can express XOR(a,b,c) as 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

46 M. Frank, EEL3705 Digital Logic, Fall 2006
Half Adder Circuit to add any 2 given bits a,b to produce their 2-bit sum (002, 012, or 102) Two bits of output: s1s0, given by s1 = ab, s0 = a⊕b Called a “half adder” because two of them can be used to make a “full adder” (next slide) a (s1) (s0) b 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

47 M. Frank, EEL3705 Digital Logic, Fall 2006
Full Adder Given bits a,b,c, computes (s1s0)2 = a + b + c. Can build it using two half adders to compute the low-order bit of the sum as s0 = (a⊕b)⊕c. Plus an extra OR gate needed to combine the carries. 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

48 Another Full Adder Implementation
This one uses 3-input XOR and MAJ subcircuits. 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

49 M. Frank, EEL3705 Digital Logic, Fall 2006
Ripple-Carry Adder Uses a “carry chain” of 1-bit full adders to add two n-bit numbers carry bits a3 a2 a1 a0 + b3 b2 b1 b0 c s3 s2 s1 s0 The structure of the hardware reflects the flow of information in the ordinary hand-algorithm for binary addition 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

50 Closeup of One Stage of the Ripple-Carry Adder Structure
Each stage has: input c used for “carry in” from previous stage output s1 used for “carry out” to next stage output s0 is one bit of the sum carry out carry in 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

51 2-to-1 Selector (Multiplexer)
Implements q=a if s=0, otherwise q=b. In other words, s selects which input (a or b) to use as the output. Like C language statement q = s?b:a; A straightforward implementation is below. 9/17/2018 M. Frank, EEL3705 Digital Logic, Fall 2006


Download ppt "EEL 3705 / 3705L Digital Logic Design"

Similar presentations


Ads by Google