Switching functions
description
Transcript of Switching functions
![Page 1: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/1.jpg)
Switching functions
• The postulates and sets of Boolean logic are presented in generic terms without the elements of K being specified
• In EE we need to focus on a specific Boolean algebra with K = {0, 1}
• This formulation is referred to as “Switching Algebra”
![Page 2: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/2.jpg)
Switching functions• Axiomatic definition:
00110111000
1'001
XXXX
![Page 3: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/3.jpg)
Switching functions• Variable: can take either of the values ‘0’ or ‘1’• Let f(x1, x2, … xn) be a switching function of n
variables• There exist 2n ways of assigning values to x1,
x2, … xn
• For each such assignment of values, there exist exactly 2 values that f(x1, x2, … xn) can take
• Therefore, there exist switching functions of n variables
n22
![Page 4: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/4.jpg)
Switching functions• For 0 variables there exist how many
functions?
f0 = 0; f1 = 1
• For 1 variable a there exist how many functions?
f0 = 0; f1 = a; f2 = ā; f3 = 1;
2202
4212
![Page 5: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/5.jpg)
Switching functions• For n = 2 variables there exist how many
functions?
• The 16 functions can be represented with a common expression:
fi (a, b) = i3ab + i2ab + i1āb + i0āb
where the coefficients ii are the bits of the binary expansion of the function index
(i)10 = (i3i2i1i0)2 = 0000, 0001, … 1110, 1111
16222
![Page 6: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/6.jpg)
Switching functions
![Page 7: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/7.jpg)
Switching functions
• Truth tables– A way of specifying a switching function– List the value of the switching function for all
possible values of the input variables– For n = 1 variables the only non-trivial function is ā
![Page 8: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/8.jpg)
Switching functions• Truth tables of the 4 functions for n = 1
• Truth tables of the AND and OR functions for n = 2
a f(a) = 10 11 1
a f(a) = 00 01 0
a f(a) = a0 01 1
a f(a) = ā0 11 0
![Page 9: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/9.jpg)
Boolean operators
• Complement: X (opposite of X)• AND: X × Y• OR: X + Y
binary operators, describedfunctionally by truth table.
![Page 10: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/10.jpg)
Alternate Gate Symbols
]'''[]')'[( YXYXYX
![Page 11: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/11.jpg)
Alternate Gate Symbols
![Page 12: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/12.jpg)
Switching functions• Truth tables
– Can replace “1” by T “0” by F
![Page 13: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/13.jpg)
Algebraic forms of Switching functions
• Sum of products form (SOP)
• Product of sums form (POS)
![Page 14: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/14.jpg)
Logic representations:
(a) truth table (b) boolean equation
F = X’Y’Z’ + X’YZ + XY’Z’ + XYZ’ + XYZ
F = Y’Z’ + XY + YZ
from 1-rows in truth table:
F = (X + Y + Z’)(X + Y’ + Z)(X’ + Y + Z’)
F = (X + Y’ + Z)(Y + Z’)
from 0-rows in truth table:
![Page 15: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/15.jpg)
Literal --- a variable or complemented variable (e.g., X or X')
product term --- single literal or logical product of literals (e.g., X or X'Y)
sum term --- single literal or logical sum of literals (e.g. X' or (X' + Y))
sum-of-products --- logical sum of product terms (e.g. X'Y + Y'Z)
product-of-sums --- logical product of sum terms (e.g. (X + Y')(Y + Z))
normal term --- sum term or product term in which no variable appears more than once(e.g. X'YZ but not X'YZX or X'YZX' (X + Y + Z') but not (X + Y + Z' + X))
minterm --- normal product term containing all variables (e.g. XYZ')
maxterm --- normal sum term containing all variables (e.g. (X + Y + Z'))
canonical sum --- sum of minterms from truth table rows producing a 1
canonical product --- product of maxterms from truth table rows producing a 0
Definitions:
![Page 16: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/16.jpg)
Truth table vs. minterms & maxterms
![Page 17: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/17.jpg)
Switching functions
![Page 18: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/18.jpg)
Switching functions
![Page 19: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/19.jpg)
Switching functions
![Page 20: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/20.jpg)
Switching functions
• The order of the variables in the function specification is very important, because it determines different actual minterms
![Page 21: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/21.jpg)
Truth tables
• Given the SOP form of a function, deriving the truth table is very easy: the value of the function is equal to “1” only for these input combinations, that have a corresponding minterm in the sum.
• Finding the complement of the function is just as easy
![Page 22: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/22.jpg)
Truth tables
![Page 23: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/23.jpg)
Truth tables and the SOP form
![Page 24: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/24.jpg)
Minterms
• How many minterms are there for a function of n variables?
2n
• What is the sum of all minterms of any function ? (Use switching algebra)
1,...,,,...,, 2121
12
0
nn
ii xxxfxxxfm
n
![Page 25: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/25.jpg)
Maxterms
• A sum term that contains each of the variables in complemented or uncomplemented form is called a maxterm
• A function is in canonical Product of Sums form (POS), if it is a product of maxterms
CBACBACBACBACBAf ,,
![Page 26: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/26.jpg)
Maxterms
![Page 27: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/27.jpg)
Maxterms
• As with minterms, the order of variables in the function specification is very important.
• If a truth table is constructed using maxterms, only the “0”s are the ones included– Why?
![Page 28: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/28.jpg)
Maxterms
![Page 29: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/29.jpg)
Maxterms
• It is easy to see that minterms and maxterms are complements of each other. Let some minterm ; then its complementcbami
ii Mcbacbam
![Page 30: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/30.jpg)
Maxterms
• How many maxterms are there for a function of n variables?
2n
• What is the product of all maxterms of any function? (Use switching algebra)
0,...,,,...,, 2121
12
0
nn
ii xxxfxxxfM
n
![Page 31: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/31.jpg)
Derivation of canonical forms
![Page 32: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/32.jpg)
Derivation of canonical forms
![Page 33: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/33.jpg)
Derivation of canonical forms
![Page 34: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/34.jpg)
Derivation of canonical forms
![Page 35: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/35.jpg)
Derivation of canonical forms
![Page 36: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/36.jpg)
Canonical forms
Contain each variable in either true or complemented form
SOPSum of minterms
2n minterms 0…2n-1Variable “true” if bit = 1Complemented if bit =0
POSProduct of maxterms
2n maxterms 0…2n-1Variable “true” if bit = 0Complemented if bit =1
cbam 0 cbaM 0
Si
imf
Sk
kmf
![Page 37: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/37.jpg)
Canonical formsSOP
If row i of the truth table is = 1, then minterm mi is included in f (iS)
POS
If row k of the truth table is = 0, then maxterm Mi is included in f (kS)
Si
imf
Sk
kmf
ii Mm ii mM
![Page 38: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/38.jpg)
Canonical forms
Where U is the set of all 2n indexes
SOPThe sum of all minterms = 1
If
Then
POSThe product of all
maxterms = 0If
Then
Si
imf
Sk
kmf
SUiimf
SUkkmf
![Page 39: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/39.jpg)
F = X’Y’Z’ + X’YZ + XY’Z’ + XYZ’ + XYZ= (0, 3, 4, 6, 7)
F = (X + Y + Z’)(X + Y’ + Z)(X’ + Y + Z’)= (1, 2, 5)
Shortcut notation:
Note equivalences: (0, 3, 4, 6, 7) = (1, 2, 5)
[ (0, 3, 4, 6, 7)]’ = (1, 2, 5) = (0, 3, 4, 6, 7)
[ (1, 2, 5)]’ = (0, 3, 4, 6, 7) = (1, 2, 5)
![Page 40: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/40.jpg)
Incompletely specified functions
![Page 41: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/41.jpg)
Incompletely specified functions
![Page 42: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/42.jpg)
Incompletely specified functions
![Page 43: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/43.jpg)
Incompletely specified functions
![Page 44: Switching functions](https://reader035.fdocuments.in/reader035/viewer/2022062410/56815e8b550346895dcd19ed/html5/thumbnails/44.jpg)
Incompletely specified functions