1 / 54

Lecture 4

Lecture 4. 4. Boolean functions – advanced 4.1 The normal form and the canonical form 4.2 Fundamental product and sums 4.3 Disjunctive and conjunctive canonical forms 4.4 Logical operations of 2 variables 4.5 Functionally complete sets 4.6 Karnaugh map – another way of denot at ion

joella
Télécharger la présentation

Lecture 4

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture 4 4.Boolean functions – advanced 4.1 The normal form and the canonical form 4.2 Fundamental product and sums 4.3 Disjunctive and conjunctive canonical forms 4.4 Logical operations of 2 variables 4.5 Functionally complete sets 4.6 Karnaugh map – another way of denotation 4.7 Karnaugh map of 5 and 6 variables 4.7 Don’t care terms

  2. Boolean functions and logical operations • Some fundamental terms, forms and definitions relating to Boolean functions and expressions will now be studied • We shall also see how many other logical operations besides AND, OR and negation can be derived

  3. 4.1 The normal form D1: • A Boolean variable in true form or in complemented form is called a literal. Thus a,b,c, Na,Nb,Nc (a’,b’,c’) and so on are literals. D2: • The Boolean product of two or more literals is called a product term.

  4. The normal form-2 D3: • The Boolean sum of two or more literals is called a sum term. D4: • When a Boolean function appears as a sum of several product terms, it is said to be expressed as a sum of products (SOP). The SOP form is also called the disjunctive normal form (DNF).

  5. The normal form-3 D5: • When a Boolean function appears as a product of several sum terms, it is said to be expressed as a product of sums (POS). The POS form is also called the conjunctive normal form (CNF).

  6. The normal form-4 Example 1 f(a,b,c,d)=N.a+b.Nc+c.d is an expression in SOP form or DNF. Example 2 f(a,b,c,d)=(a+b).(b+c+d) is an expression in POS form or CNF.

  7. The canonical form D6: • When each of the terms of a Boolean functions expressed either in SOP or POS form has all the variables in it it is said to be expressed in canonical form. • Here also by idempotence law of Boolean algebra, the canonical form cannot have the same term more than once.

  8. The canonical form-2 • The canonical SOP form is called the disjunctive canonical form (DCF) and the canonical POS form is called the conjunctive canonical form (CCF). Example: Express the following functions in canonical forms • f1=a.Nb.c+b.Nc+a.c • f2=(a+b).(b+Nc)

  9. The canonical form-3 Solutions: a)f1=a.Nb.c+b.Nc+a.c= =a.Nb.c+(a+Na).b.Nc+a.(b+Nb).c= =a.Nb.c+a. b.Nc+Na.b.Nc+a.b.c+a.Nb.c b)f2= (a+b)(b+Nc)= = (a+b+c.Nc)(a.Na+b+Nc)= = (a+b+c).(a+b+Nc).(a+b+Nc).(Na+b+Nc)= = (a+b+c).(a+b+Nc).(Na+b+Nc) f1 is expressed in DCF, f2is expressed in CCF.

  10. 4.2 Fundamental products and sums D7: • A product term of n variables is called a minterm of n variables. Thus Na.Nb.Nc and a.Nb.Nc are minterms of three variables. • Since each variable can appear in a minterm in one of the two forms, true and complemented, the number of all possible minterms of n variables is 2 powered by n. A minterm is also called fundamental product.

  11. Fundamental products and sums-2 • If a 0 is written for complemented variable and 1 for the uncomplemented variable, each minterm can be expressed as a binary number. • Each minterm is then designated as mi, where the subscript i is the decimal value of the binary number. • See following table for the three variable case:

  12. Fundamental products and sums-3

  13. Fundamental products and sums-4 D8: • A sum term of n variables is called a maxterm of n variables. Thus Na+b+c+Nd and a+b+c+d are maxterms of four variables. • Like minterms, the number of maxterms is also 2 powered by nfor n variables. A maxterm is also called fundamental sum.It is customary to designate each maxterm by Mi, where i is the decimal equivalent of the binary number representation of a maxterm, as shown in the following table for the three variable case.

  14. Fundamental products and sums-5

  15. Fundamental products and sums-6 • It should be noted, that in the maxterms we have written a 0 for a variable in the true form and 1 for a variable in the complemented form. This is the opposite of the procedure we followed in the case of minterms. It can easily be verified, that the complement of mi is Mi and vice versa, that is: N(mi)=Mi and N(Mi)=mi

  16. Fundamental products and sums-7 • From the definitions of minterm and maxterm it is evident, that the disjunctive canonical form of a Boolean function is a sum of minterms, and the conjunctive canonical form is a product of maxterms. Thus f1=Na.Nb.Nc+Na.Nb.c+a.b.c=m0+m1+m7 and f2=(a+b+c).(Na+Nb+c).(Na+Nb+Nc)=M0.M6.M7

  17. Fundamental products and sums-8 • This has led to another convenient way of writing the canonical form wherein the m’s (minterms) and M’s (maxterms) are not written at all. Thus f1=sum(0,1,7) and f2=pí(0,6,7)

  18. Fundamental products and sums-9 • Here the decimal numbers (which are subscripts of the m’s or M’s) identify the particular terms, sum indicates, that the terms are minterms and the function is a summation, and pí indicates, that the terms are maxterms and the function is a product.

  19. 4.3 Disjunctive and conjunctive canonical forms • It has been mentioned earlier that the disjunctive canonical form is the same as the sum of minterms and the conjunctive canonical form is the same as the product of maxterms. • It is interesting to note that if a function is expressed in the DCF, it can also be expressed in the CCF, and vice versa.

  20. Disjunctive and conjunctive canonical forms-2 Theorem: A Boolean function expressed as a sum of minterms or as a product of maxterms can be converted into the other form as given by sum(mi)=pí(Mj) and pí(Mi)=sum(mj) Where the subsets i andj are two partitions of the entire set of 2powered by n subscripts of either m’s or M’s.

  21. Disjunctive and conjunctive canonical forms-3 From this theorem it can be concluded, that any Boolean function can be expressed in both the disjunctive and conjunctive canonical form. Example1: Express the following function in the other type of canonical form: f1=Na.b.c+a.Nb.Nc+a.b.c

  22. Disjunctive and conjunctive canonical forms-4 Solution f1=f1(a,b,c)=m3+m4+m7=sum(mi) Subset i=(3,4,7) Entire set of subscripts: 2 powered by n (n=3) is 8 (0,1,2,3,4,5,6,7) Subset j=(0,1,2,5,6) f1=pí(Mj)=pí(M0,M1,M2,M5,M6)= =M0.M1.M2.M5.M6= (a+b+c).(a+b+Nc).(a+Nb+c).(Na+b+Nc).(Na+Nb+c)

  23. Disjunctive and conjunctive canonical forms-5 Example2: Express the function y from the Example 1 from exercises in the both canonical forms: y=f(S1,S2,S3) y=sum (mi)=(i:(3,5,6))=NS1.S2.S3+ S1.NS2.S3+ S1.S2.NS3…….DCF (DSF) y=pí(Mj)=(j:(0,1,2,4,7))=(S1+S2+S3). .(S1+S2+NS3).(S1+NS2+S3).(NS1+S2+S3). .(NS1+NS2+NS3)…..CCF (CSF)

  24. 4.4 Logical operations of 2 variables • So far we have discussed mainly two logical operations, AND and OR of two variables and NOT(negation, inversion) of one variable. • But there are altogether 16 various functions of two variables. 2 powered by 2 powered by 2=2 powered by 4=16 • Generally the number of various functions of n binary variables is equal 2 powered by 2 powered by n

  25. Logical operations of 2 variables -2

  26. Logical operations of 2 variables -3 • f1…allways FALSE • f16…allways TRUE • f2….AND • f15……NAND • f8…..OR • f9…..NOR • f7….EXOR (nonequivalence) • f10…equivalence

  27. Logical operations- of 2 variables-4 negation

  28. Logical operations of 2 variables -5 • f4…assertion (repetition) of a • f13…negation of a • f6…. assertion (repetition) of b • f11…negation of b • f3,f5,f12,f14 inclusion (does not have direct technical meaning)

  29. 4.5 Functionally complete sets • Definition: A set of operations is called a functionally complete set, if and only if any Boolean function can be expressed by operations belonging to the set only. • In fact, to prove any other set of operations to be functionally complete, it should be shown that its members can express the three operations of AND, OR, and NOT.

  30. Functionally complete sets-2 • For example, the sets of operations {AND, OR,NOT} {AND, NOT} {NAND} {OR,NOT} {NOR} {XOR, AND} are functionally complete sets.

  31. Functionally complete sets-3 • It can be seen that the NAND and NOR operations alone form a functionally complete set. • It is therefore possible to implement any switching function using only one type of gate, either NAND or NOR. • Hence these two operations are also known as universal operations, and the gates are used much more extensively than other gates in the synthesis of combinational logic circuits.

  32. Functionally complete sets-4 • How to implement switching function NOT (negation) using only NAND gate a a Na Na & & 1 a N(a . 1)=N(a)=Na N(a . a)=N(a)=Na

  33. Functionally complete sets-5 • How to implement switching function NOT (negation) using only NOR gate a a Na Na >=1 >=1 0 a N(a + 0)=N(a)=Na N(a + a)=N(a)=Na

  34. Functionally complete sets-6 • How to implement switching function AND using only NAND gate a N(a.b) N(a.b) a.b & & b N(a.b)

  35. Functionally complete sets-7 • How to implement switching function OR using only NOR gate a N(a+b) N(a+b) a+b >=1 >=1 b N(a+b)

  36. Functionally complete sets-8 • How to implement switching function OR using only NAND gate a N(Na.Nb)= N(Na)+N(Nb)= a+b Na & a & b Nb & b

  37. Functionally complete sets-8 • How to implement switching function AND using only NOR gate a N(Na+Nb)= N(Na).N(Nb)= a.b Na >=1 a >=1 b Nb >=1 b

  38. 4.6 Karnaugh map – another way of denotation

  39. Karnaugh map – another way of denotation-2

  40. Karnaugh map – another way of denotation -3

  41. Karnaugh map – another way of denotation -3

  42. Karnaugh map – another way of denotation-4 What is important: • Index is a binary value of the same expression, e.g. „abcd“ • Property of neighbourhood

  43. 4.7 Karnaugh map of 5 and 6 variables • The five-variable map is drawn as two separate four variable maps. • Each of the two four variable maps is a map for the four variables e.g. x2,x3,x4,x5. • They differ in the value of the first variable, x1. • In one of the maps x1=0, in the other x1=1. • Decimal values of the index can be computed following the same procedure as in other maps. • Similarly, the six-variable map consists of four four-variable maps.

  44. Five-varibles Karnaugh map-2Example – values of indexes, 1st map for x1=0

  45. Five-varibles Karnaugh map-2Example – values of indexes, 2nd map for x1=1

  46. 4.8 Don’t care terms • Karnaugh map is a representation of a switching function expressed in the form of a truth table or as a sum of minterms. • In all the maps that we discussed so far, in each cell we plotted either a 1(shown on the map) or a 0 (shown or not shown but meant by implication) • This means, that for such functions the output of the circuit is clearly specified to be either 1 or 0. • Such functions are called completely specified functions.

  47. Don’t care terms-2 • There may be many practical cases, however, where the output of a circuit cannot be precisely specified. • Very often this happens due to the simple fact that all input combinations may not occur in a practical situation • For example, if the input variables of a function f(a,b) represent the values of limit switches for level in a container, we know that in practical case there is not possible to have high level and simultanously don’t have the low level too.

  48. Don’t care terms-3 • The exact value of the function for this input combination cannot be specified. • Such functions are known as incompletely specified functions • The input combinations for which the function is not specified are shown by plotting a xon the corresponding cell of the map. • It is obvious that while minimizing, the value of x can be assumed to be either 1 or 0.

  49. Don’t care terms-4 • Since the circuit or software designer does not care for the exact value of these cells and chooses either 1 or 0 to suit the objective of obtaining the minimum solution, these terms are known as don’t –care terms. • The minterms for which the function has the value x are also known as don’t –care minterms.

  50. Don’t care terms-example -5

More Related