switching function
a switching function
is a correspondence that associates an element of the algebra with each of the
combinations of variables
. this correspondencee is best specified by means of a truth table. note that each truth table defines only one switching function, although this function may be expressed in a number of ways.
[cite:@kohavi_switching_2010 chapter 3.2 switching functions]
[cite:@kohavi_switching_2010 chapter 3.2 switching functions]
the complement
is a function whose value is 1 whenever the value of
is 0, and 0 whenever the value of
is 1. the sum of two functions
and
is 1 for every combination in which either
or
or both equal 1, while their product is equal to 1 iff both
and
equal 1. if a function
is specified by means of a truth table, its complement is obtained by complementing each entry in the column headed
. new functions that are equal to the sum
and the product
are obtained by adding or multiplying the corresponding entries in the
and
columns.
[cite:@kohavi_switching_2010 chapter 3.2 switching functions]
[cite:@kohavi_switching_2010 chapter 3.2 switching functions]
0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 |
0 | 0 | 1 | 1 | 0 | 1 | 1 | 1 |
0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 |
0 | 1 | 1 | 0 | 1 | 0 | 0 | 0 |
1 | 0 | 0 | 1 | 0 | 1 | 1 | 1 |
1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 |
1 | 1 | 0 | 1 | 0 | 0 | 1 | 0 |
1 | 1 | 1 | 0 | 1 | 1 | 1 | 0 |
if
and
then 

1st side, assume
and
, we need to prove 
assume that
, then
is a consequence of
that
, and
is a consequence of
so that
, and so 
2nd side, assume that
if
then
and so
and so 
if
then
and so
and so 
assume that
2nd side, assume that
if
if
a list of switching functions
of the two variables 
[cite:@kohavi_switching_2010 table 3.6]
name of function | symbol | |||||
---|---|---|---|---|---|---|
0 | 0 | 0 | 0 | 0 | inconsistency | |
0 | 0 | 0 | 1 | nor | ||
0 | 0 | 1 | 0 | |||
0 | 0 | 1 | 1 | not | ||
0 | 1 | 0 | 0 | |||
0 | 1 | 0 | 1 | |||
0 | 1 | 1 | 0 | xor | ||
0 | 1 | 1 | 1 | nand | ||
1 | 0 | 0 | 0 | and | ||
1 | 0 | 0 | 1 | equivalence | ||
1 | 0 | 1 | 0 | |||
1 | 0 | 1 | 1 | material implication | ||
1 | 1 | 0 | 0 | |||
1 | 1 | 0 | 1 | implication | ||
1 | 1 | 1 | 0 | or | ||
1 | 1 | 1 | 1 | 1 | tautology |
finding the switching expressions of a switching function
we write a truth table for the function and for each row we write a minterm or a maxterm depending on whether the function outputs 1 or 0, respectively
x | y | z | f | minterms | maxterms | |
---|---|---|---|---|---|---|
0 | 0 | 0 | 0 | 1 | ||
1 | 0 | 0 | 1 | 0 | ||
2 | 0 | 1 | 0 | 1 | ||
3 | 0 | 1 | 1 | 1 | ||
4 | 1 | 0 | 0 | 0 | ||
5 | 1 | 0 | 1 | 0 | ||
6 | 1 | 1 | 0 | 1 | ||
7 | 1 | 1 | 1 | 1 |
the process of finding a minimal switching expression of a switching function
given the switching function
- find all the broken link: blk:1707154256s of
- from the list of prime implicants, find the essential prime implicants and put them in an expression
- remove from the list of PI all the EPI's and all the PI's that are covered by EPI's
- if the set of EPI's covers
, then we're done, otherwise, choose more PI's so that
is entirely covered by the resulting set of PI's but make sure to pick a minimal number of PI's to do the job, and make sure to pick the PI's with the least number of literals
this isnt a definite solution for the problem but its enough for functions with a small number of literals
using karnaugh maps we can apply this processeach cell maps to a combination of variables, we place each minterm in its corresponding cell, i.e. with the cell that provides the correct corresponding values for the variables
by finding rectangles whose area is a power of 2 in these tables we would be finding minterms and the least amount of rectangles we can find would give us the minimal form we're looking for
the variables that cells in a rectangle may share are the ones to be taken for the switching expression