Download presentation
Presentation is loading. Please wait.
1
EEL 3705 / 3705L Digital Logic Design
Fall 2006 Instructor: Dr. Michael Frank Lecture Module #6: DNF/CNF Forms & Radix Conversion 9/17/2018 M. Frank, EEL3705 Digital Logic, Spring 2007
2
Topics for Today (Mon. 1/19)
Administrivia: Don’t forget, “Reading Assignment #1” is due Tuesday. Turn in your lab report from lab #1 this week. Lab #2 due dates have been pushed back 1 week. Use lab time this week to catch up & get an early start on lab #2. YOU ARE STILL REQUIRED TO ATTEND THE LAB! A HW#1 will hopefully be posted shortly! Homeworks are generally due 1 week after they are assigned. Today’s Lecture: Conjunctive and Disjunctive Normal Forms of Boolean Expressions Common Subexpression Elimination to simplify Logic Synthesis Radix (Base) Conversion Techniques 9/17/2018 M. Frank, EEL3705 Digital Logic, Spring 2007
3
Topic 2.2.1.1.3: DNF and CNF representations
9/17/2018 M. Frank, EEL3705 Digital Logic, Spring 2007
4
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, Spring 2007
5
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, Spring 2007
6
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. Written ∑i∏j yi,j where the ith minterm is ∏j yi,j = yi,1,yi,2,… 9/17/2018 M. Frank, EEL3705 Digital Logic, Spring 2007
7
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, Spring 2007
8
Another Notation for minterms/DNF
Express the minterm yi = yi,1yi,2…yi,n with the equation xn,xn−1,…,x2,x1 = bn−1,bn−2,…,b1,b0, where each bk is either 0 or 1; Abbreviate this minterm as “m(Bi)” where Bi is the integer whose binary expansion is bn−1bn−2…b1b0. Write the DNF formula as ∑m(B1,B2,…) where the Bi are the integer indices of all the minterms present in the original DNF formula Use a similar technique to abbreviate CNF formulas as ∏M(B1,B2,…) for B’s of maxterms 9/17/2018 M. Frank, EEL3705 Digital Logic, Spring 2007
9
M. Frank, EEL3705 Digital Logic, Spring 2007
Example of Minterms/Maxterms for Arbitrary Boolean functions of 3 inputs row # Input variables Minterms Maxterms Arbitrary function Terms of DNF (SoP) Form Terms of CNF (PoS) Form a b c full abbr. f m0 M0 1 m1 M1 2 m2 M2 3 m3 M3 4 m4 M4 5 m5 M5 6 m6 M6 7 m7 M7 9/17/2018 M. Frank, EEL3705 Digital Logic, Spring 2007
10
M. Frank, EEL3705 Digital Logic, Spring 2007
Summary of Example The steps on the preceding slide show that the function to the right can be represented as DNF (SoP, sum-of-minterms): Full form: Abbreviated: CNF (PoS, product-of-maxterms): a b c f 1 9/17/2018 M. Frank, EEL3705 Digital Logic, Spring 2007
11
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, Spring 2007
12
M. Frank, EEL3705 Digital Logic, Spring 2007
Lecture Ended Here We ran out of time to cover the remaining slides and they will be presented later in the semester 9/17/2018 M. Frank, EEL3705 Digital Logic, Spring 2007
13
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! 9/17/2018 M. Frank, EEL3705 Digital Logic, Spring 2007
14
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! 9/17/2018 M. Frank, EEL3705 Digital Logic, Spring 2007
15
Combinational Circuits & Boolean Formulas
Topic Combinational Circuits & Boolean Formulas 9/17/2018 M. Frank, EEL3705 Digital Logic, Spring 2007
16
M. Frank, EEL3705 Digital Logic, Spring 2007
Breakdown of Topic Combinational circuits and Boolean formulas. Simple examples of combinational circuits. Converting formulas to circuits (“synthesis”). Converting circuits to formulas (“analysis”). CIO 3. [SynAnal] Derive digital circuits from optimized Boolean equations and compute the Boolean equations of a digital circuit. 9/17/2018 M. Frank, EEL3705 Digital Logic, Spring 2007
17
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 9/17/2018 M. Frank, EEL3705 Digital Logic, Spring 2007
18
Base Conversion Methods
Subtopic #1.3 Base Conversion Methods 9/17/2018 M. Frank, EEL3705 Digital Logic, Spring 2007
19
M. Frank, EEL3705 Digital Logic, Spring 2007
Base Conversions Some procedures for converting a number N from an old base b to a new base B: Method 0: If one of the bases is a power of the other, can do direct substitution of (groups of) digits. E.g., octal ↔ binary ↔ hex conversions work like this Otherwise: Two methods for conversion using arithmetic in the new base B: Method 1: Directly evaluate the polynomial expression for Nb. Method 2: (Horner’s rule) Repeatedly multiply by b and add digits of N, reading from left to right. Two methods for conversion using arithmetic in the old base b: Method 3: Repeatedly divide N by B, the remainders are the new digits, reading from right to left. Method 4: Repeatedly divide N by the largest power of B less than N; the quotients are the new digits, reading from left to right. Natural if new base is 10 Natural if old base is 10 9/17/2018 M. Frank, EEL3705 Digital Logic, Spring 2007
20
M. Frank, EEL3705 Digital Logic, Spring 2007
Example of Method 0 Convert 3F616 to octal. We’ll first convert to binary, then binaryoctal. Hex to binary groups of 4 bits: 3 00112, F 11112, 6 The complete binary representation is: Binary groups of 3 bits to octal: 1 1, 111 7, 110 6, 110 6 The complete octal representation is: 17668 9/17/2018 M. Frank, EEL3705 Digital Logic, Spring 2007
21
M. Frank, EEL3705 Digital Logic, Spring 2007
Examples of Method 1 Convert to base 10. = (taking the sum from right to left) = 1×20 + 1×21 + 0×22 + 1×23 + 0×24 + 1× ×26 + 0×27 + 1×28 = 1·1 + 1·2 + 0·4 + 1·8 + 0·16 + 1·32 + 1· · ·256 = = Convert 3D9616 to base 10. 3D9616 = 3× × × ×160 = 3×4, × ×16 + 6×1 = 12, , = 15,76610 9/17/2018 M. Frank, EEL3705 Digital Logic, Spring 2007
22
M. Frank, EEL3705 Digital Logic, Spring 2007
Examples of Method 2 Convert to base 10. 1×2 + 0 = 2, ×2 + 1 = 5, ×2 + 1 = 11, ×2 + 0 = 22, ×2 + 1 = 45, ×2 + 0 = 90, ×2 + 1 = 181, ×2 + 1 = Convert 3D9616 to base 10. 3×16 = 48; +13 = 61; ×16 = 976; +9 = 985; ×16 = 15,760; +6 = 15,76610. 9/17/2018 M. Frank, EEL3705 Digital Logic, Spring 2007
23
Example of Method 3 (Dec. Binary)
Convert to binary. 363 ÷ 2 = 181 r ÷ 2 = 90 r 1 90 ÷ 2 = 45 r 0 45 ÷ 2 = 22 r 1 22 ÷ 2 = 11 r 0 11 ÷ 2 = 5 r 1 5 ÷ 2 = 2 r 1 2 ÷ 2 = 1 r 0 1 ÷ 2 = 0 r 1. 9/17/2018 M. Frank, EEL3705 Digital Logic, Spring 2007
24
Method 3 Variation: Tower Drawing Style
Same algorithm, but without rewriting of quotients: 0 r 1 2 1 r 0 2 2 r 1 2 5 r 1 2 11 r 0 2 22 r 1 2 45 r 0 2 90 r 1 2 181 r 1 2 363 9/17/2018 M. Frank, EEL3705 Digital Logic, Spring 2007
25
Example of Method 3 (Dec. Hex)
Convert 15,76610 to hexadecimal. 15,766 ÷ 16 = 985 r 6; 985 ÷ 16 = 61 r 9; 61 ÷ 16 = 3 r 13; 3 ÷ 16 = 0 r 3. 3D9616 9/17/2018 M. Frank, EEL3705 Digital Logic, Spring 2007
26
Example of Method 4 (Dec. Binary)
Convert to binary. 363 ÷ 256 = 1 r ÷ 128 = 0 r ÷ 64 = 1 r ÷ 32 = 1 r ÷ 16 = 0 r ÷ 8 = 1 r 3 3 ÷ 4 = 0 r 3 3 ÷ 2 = 1 r 1 1 ÷ 1 = 1 r 0 9/17/2018 M. Frank, EEL3705 Digital Logic, Spring 2007
27
M. Frank, EEL3705 Digital Logic, Spring 2007
Method 4 Variation When converting from binary, the divides in method 4 can be replaced by simple subtraction of the powers of 2. Example: Convert to binary. 363 256 = 107 107 64 = 43 43 32 = 11 11 8 = 3 3 2 = 1 1 1 = 0 256 128 64 32 16 8 4 2 1 1 1 1 1 1 1 9/17/2018 M. Frank, EEL3705 Digital Logic, Spring 2007
28
Example Where Neither Base is 10 or a Power of the Other
Convert 2103 ___5 using each of methods 1-4. Method 1: N = 2·32 + 1·31 + 0·30 = 2· ·3 + 0 2·145 = 2· ·4 = = 335 N = = = 415. Method 2: 2 · 3 = 115, + 1 = 125, · 3 = = 415. Method 3: 2103 / 123 = 113 r 1, 113 / 123 = 0 r 113 415 Method 4: 2103 / 123 = 113 r 1, 1 / 1 = 1 r 0 415 Doing addition and multiplication in base 5 Doing division in base 3 9/17/2018 M. Frank, EEL3705 Digital Logic, Spring 2007
29
M. Frank, EEL3705 Digital Logic, Spring 2007
Another Way (Method 5) When converting between two bases neither of which is base 10 or a power of the other, you might find the following strategy easier than using any of methods 1-4 directly: First, convert from the old base to base 10 using either method 1 or 2 Next, convert from base 10 to the new base using either method 3 or 4. 9/17/2018 M. Frank, EEL3705 Digital Logic, Spring 2007
30
M. Frank, EEL3705 Digital Logic, Spring 2007
Example of Method 5 Convert 2103 ___5 using method 5. First use method 1 to convert to base 10: 2103 = 2·32 + 1·31 + 0·30 = 2· =18+3= 2110 Next use method 4 to convert to base 5: 2110 ÷ 5 = 4 r 1 415 9/17/2018 M. Frank, EEL3705 Digital Logic, Spring 2007
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.