Representation

advertisement
Logic Functions
and
their Representation
Combinational Networks
x1
x2
f
xn
Logic Functions and their Representation
Slide 2
Logic Operations
• Truth tables
x
y
AND
xy
0
0
0
0
0
1
1
0
0
1
1
0
0
0
1
1
0
1
1
1
0
0
1
1
1
1
1
1
1
0
0
0
Qui ckTime™ and a
TIFF (LZW) decompressor
are needed to see this pi cture.
Quic kT ime™ and a
T IFF (LZW) dec ompres sor
are needed to s ee this pi cture.
OR NOT NAND NOR EXOR
xy x xy x xy
y
QuickT ime™ and a
T IFF (LZW) decompressor
are needed to see this pict ure.
Quic kT ime™ and a
QuickTime™ and a
T IFF (LZW) decompres sor
TIFF (LZW) decompressorare needed to see this pic ture.
are needed to see t his picture.
Logic Functions and their Representation
Quic kT ime™ and a
T IFF (LZW) decompres sor
are needed to see this pic ture.
Slide 3
SOP and POS
• Definition: A variable xi has two literals xi and
xi. A logical product where each variable is
represented by at most one literal is a
product or a product term or a term. A term
can be a single literal. The number of literals
in a product term is the degree. A logical sum
of product terms forms a sum-of-products
expression (SOP). A logical sum where each
variable is represented by at most one literal
is a sum term. A sum term can be a single
literal. A logical product of sum terms forms a
product-of-sums expression (POS).
Logic Functions and their Representation
Slide 4
Minterm
• A minterm is a logical product of n literals
where each variable occurs as exactly one
literal
• A canonical SOP is a logical sum of
minterms, where all minterms are different.
• Also called canonical disjunctive form or
minterm expansion
Logic Functions and their Representation
Slide 5
Maxterm
• A maxterm is a logical sum of n literals
where each variable occurs as exactly one
literal
• A canonical Pos is a logical product of
maxterms, where all maxterms are different.
• Also called canonical conjunctive form or
maxterm expansion
Show an example
Logic Functions and their Representation
Slide 6
Shannon Expansion
• Theorem: An arbitrary logic function
f(x1,x2,…,xn) is expanded as follows:
f(x1,x2,…,xn) = x1f(0,x2,…,xn)  x1f(1,x2,…,xn)
(Proof)
When x1 = 0,
= 1f(0,x2,…,xn)  0f(1,x2,…,xn)
= f(0,x2,…,xn)
When x1 = 1,
similar
Logic Functions and their Representation
Slide 7
Expansions into Minterms
• Example: Expand f(x1,x2,x3) = x1(x2  x3)
• Example: minterm expansion of an arbitrary
function
• Relation to the truth table
• Maxterm expansion (duality)
Logic Functions and their Representation
Slide 8
Reed-Muller Expansions
• EXOR properties
(x  y)  z = x  (y  z)
x(y  z) = xy  xz
xy=yx
xx=0
x  1 = x
Logic Functions and their Representation
Slide 9
Reed-Muller Expansions
• Lemma xy = 0  x  y = x  y
(Proof)
() Let xy = 0
x  y = xy  xy = (xy  xy)  (xy xy) = x
y
() Let xy ≠ 0
x = y = 1. Thus x  y = 0, x  y = 1
Therefore, x  y ≠ x  y
Logic Functions and their Representation
Slide 10
• An arbitrary 2-varibale function is represented by
a canonical SOP
f(x1,x2) = f(0,0)x1x2  f(0,1)x1x2  f(1,0)x1x2  f(1,1)
x1x2
Since the product terms have no common minterms,
the  can be replaced with 
f(x1,x2) = f(0,0)x1x2  f(0,1)x1x2  f(1,0)x1x2  f(1,1)
x1x2
Next, replace x1= x1  1, and x2= x2  1
Show results! Logic Functions and their Representation
Slide 11
PPRM
• An arbitrary n-variable function is uniquely
represented as
f(x1,x2,…,xn) = a0 
a1x1  a2x2 …  anxn 
a12 x1x2  a13 x1x3 …  an-1,nxn-1xn 
…  a12…nx1x2…xn
Logic Functions and their Representation
Slide 12
Download