Академический Документы
Профессиональный Документы
Культура Документы
Computer Engineering
2016
14
Boolean Functions
Examples:
g(x ) = 0 is a unary Boolean function.
f (x , y ) = x y
is a binary B. function.
the operators and and or are binary B. functions.
Computer Engineering
2016
15
Boolean Identities
Boolean algebra.
analogous to reduction in regular algebra (e.g. 2x + x + x 4x )
Example 1
(x y ) x
Computer Engineering
2016
16
Boolean Identities
Boolean algebra.
analogous to reduction in regular algebra (e.g. 2x + x + x 4x )
Example 1
(x y ) x
(x y ) x
Computer Engineering
2016
16
Boolean Identities
Boolean algebra.
analogous to reduction in regular algebra (e.g. 2x + x + x 4x )
Example 1
(x y ) x
(x y ) x
(x y ) x
Computer Engineering
2016
16
Boolean Identities
Boolean algebra.
analogous to reduction in regular algebra (e.g. 2x + x + x 4x )
Example 1
(x y ) x
(x y ) x
(x y ) x
x
Computer Engineering
2016
16
Example 2
(x y z) (x y z)
Computer Engineering
2016
17
Example 2
(x y z) (x y z)
(x y ) (z z)
Computer Engineering
2016
17
Example 2
(x y z) (x y z)
(x y ) (z z)
(x y ) 1
Computer Engineering
2016
17
Example 2
(x y z) (x y z)
(x y ) (z z)
(x y ) 1
x y
Computer Engineering
2016
17
Example 2
(x y z) (x y z)
(x y ) (z z)
(x y ) 1
x y
Computer Engineering
2016
17
Boolean expression:
f (x , y ) = (x y ) x
f (x , y ) = x y
f (x , y ) = (x y )
Truth table:
x
0
0
1
1
y
0
1
0
1
f (x , y )
0
1
0
0
Computer Engineering
2016
18
0
4
Circuit diagrams:
Computer Engineering
2016
19
Canonical Representations
function.
the same is true for circuits and binary decision diagrams.
Computer Engineering
2016
20
Canonical Representations
function.
the same is true for circuits and binary decision diagrams.
But: each function has only one truth table.
A truth table is a canonical representation of a B. function.
Computer Engineering
2016
20
Canonical Representations
function.
the same is true for circuits and binary decision diagrams.
But: each function has only one truth table.
A truth table is a canonical representation of a B. function.
Question: Can we find canonical representation for expressions,
Computer Engineering
2016
20
Minterms
Definition (Minterm)
A minterm of n variables is a conjunction (product) in which each variable
appears exactly once in true or complemented form
n
^
()xi
i=1
Computer Engineering
2016
21
Definition (DNF)
A formula is in disjunctive normal form (DNF) when it is a disjunction ()
of conjunctions().
If the conjunctions are minterms, it is canonical.
Example: (x y z) (x y z)
Remark: Another name for DNF is Sum of Product-Form (SoP)
Computer Engineering
2016
22
Maxterms
Definition (Maxterm)
A maxterm of n variables is a disjunction (sum) in which each variable
appears exactly once in true or complemented form
n
_
()xi
i=1
Computer Engineering
2016
23
Definition (CNF)
A formula is in conjunctive normal form (CNF) when it is a conjunction()
of disjunctions ().
If the disjunctions are maxterms, it is canonical.
Example: (x y z) (x y z)
Remark: Another name for CNF is Product of Sums-Form (PoS)
Computer Engineering
2016
24
CNF.
important for many fields:
3SAT (a NP-complete problem from computational theory)
Quine-McClusky algorithm (minimizing Boolean functions)
automated proving (mathematics)
Computer Engineering
2016
25
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
0
1
0
0
1
0
0
1
Computer Engineering
2016
26
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
0
1
0
0
1
0
0
1
x1 x2 x3
x1 x2 x3
x1 x2 x3
Computer Engineering
2016
26
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
0
1
0
0
1
0
0
1
x1 x2 x3
x1 x2 x3
x1 x2 x3
Computer Engineering
2016
26
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
0
1
0
0
1
0
0
1
Computer Engineering
2016
27
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
0
1
0
0
1
0
0
1
x1 x2 x3
x1 x2 x3
x1 x2 x3
x1 x2 x3
x1 x2 x3
Computer Engineering
2016
27
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
0
1
0
0
1
0
0
1
x1 x2 x3
x1 x2 x3
x1 x2 x3
x1 x2 x3
x1 x2 x3
Computer Engineering
2016
27
to get CNF:
1 mark all rows with function value 0
2 note the corresponding maxterms:
xi = 0 in truth table xi in maxterm
xi = 1 in truth table xi in maxterm
3
Computer Engineering
2016
28
Computer Engineering
2016
29
Combinational Circuits
Combinational Circuits
Computer Engineering
2016
30
Combinational Circuits
Computer Engineering
2016
31
Combinational Circuits
Computer Engineering
2016
31
Combinational Circuits
OR-Gate
AND-Gate
a transistor is a simple electronic switch
NOT-Gate
Computer Engineering
2016
32
Combinational Circuits
Computer Engineering
2016
33
Combinational Circuits
Computer Engineering
2016
33
Combinational Circuits
Computer Engineering
2016
34
Combinational Circuits
Computer Engineering
2016
34
Combinational Circuits
Future Computers?
Fluidics
use fluids (liquids) to implement logics
applications: nanotechnology, automobiles, military
naturally quite slow
Nano Transistors
Computer Engineering
2016
35
Combinational Circuits
AND-Gate, x y
OR-Gate, x y
NOT-Gate x
Computer Engineering
2016
36
Combinational Circuits
NAND-Gate, (x y )
NOR-Gate, (x y )
XOR-Gate,
x y = (x y ) (x y )
Computer Engineering
2016
37