Documente Academic
Documente Profesional
Documente Cultură
Modulul 3. Reprezentarea Funcţiilor de Comutaţie 3.1. Forma Sumă de Produse (SOP - Sum of Products)
Modulul 3. Reprezentarea Funcţiilor de Comutaţie 3.1. Forma Sumă de Produse (SOP - Sum of Products)
i j F1
unde :
- F 1 este mulimea tuturor combinaiilor ale valorilor variabilelor {x1 ,..., x n } pentru
care f este mapat n 1
- m este o funcie mintermen definit pe mulimea {x1 ,..., x n }
- este sum logic
- k este greutatea funciei, k = w( f )
Aceast reprezentare este cunoscut i sub numele de forma normal disjunctiv
absolut pentru funcia f (x1 ,..., x n ) .
Teorema 2 : Orice funcie de comutaie f (x1 ,..., x n ) , exceptnd constanta 0, poate fi
reprezentat n mod unic ca o sum XOR de funcii mintermen
f (x1 ,..., x n ) =
mi (x1 ,..., x n ) = mi
i j =F1
unde :
- F 1 este mulimea tuturor combinaiilor ale valorilor variabilelor {x1 ,..., x n } pentru
care f este mapat n 1
- m este o funcie mintermen definit pe mulimea {x1 ,..., x n }
- k este greutatea funciei f, k=w(f)
- este suma XOR
i j F11
i j F2
Fiecare funcie are propria mulime de combinaii pentru care f este 1 sau g este 1,
notate F11 sau F21 . Atunci, produsul logic ntre f i g conduce ctre o nou funcie
de comutaie h cu mulimea F31 = F21 F11 ( unde este intersecia ntre mulimi ) :
f (x1 ,..., x n ).g ( x1 ,..., x n ) = h(x1 ,..., x n ) =
i j F31
mi j (x1 ,..., x n ) =
mi (x1 ,..., x n )
i j F31
i j F41
mi j (x1 ,..., x n ) =
mi (x1 ,..., x n )
i j F41
Corolarul 3: Fie
f (x1 ,..., x n ) o funcie de comutaie definit pe {x1 ,..., x n } .
Complementul lui f este o nou funcie de comutaie l cu mulimea F51 , unde
F51 = 2 n F11 ( complementul mulimii F11 ) :
f (x1 ,..., x n ) = l (x1 ,..., x n ) =
i j F51
mi j (x1 ,..., x n ) =
mi (x1 ,..., x n )
i j F51
in = 0
unde :
(i1 ,..., i n ) este o combinaie particular de valori atribuite variabilelor {x1 ,..., x n } ,
i {0,1}, j [1, n] ;
f (i1 ,..., i n ) este valoarea lui f pentru combinaia considerat
i j F1
mi j (x1 ,..., x n )
Algoritm :
Se d tabelul de adevr al unei funcii de comutaie f (x1 ,..., x n ) . Pentru a scrie forma
canonic P corespunztoare se aplic urmtoarea procedur :
Pasul 1 : Se marcheaz toate combinaiile de variabile pentru care funcia este mapat
n 1.
Pasul 2 : Se scriu mintermenii corespunztori combinaiilor marcate.
Pasul 3 : Se scrie suma logic a mintermenilor de la pasul 2.
Exemplu :
Se d o funcie de comutaie de trei variabile {x1 x 2 x3 } prin tabelul su de adevr i se
cere reprezentarea n form canonic P.
x1
x2
x3
0
0
0
0
0
1
0
1
0
0
1
1
0
1
1
1
1
1
0
0
1
1
1
0
1
0
1
0
1
1
0
0
Pasul 1 :
x1
x2
x3
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
0
1*
1*
0
1*
1*
0
0
Pasul 2 :
m1 = x1 x 2 x3
m 2 = x1 x 2 x3
m 4 = x1 x 2 x 3
m5 = x1 x 2 x 3
Pasul 3 :
f (x1 x 2 x3 ) = x1 x 2 x3 + x1 x 2 x3 + x 2 x3 + x1 x 2 x 3
f (x1 x 2 x3 ) = x1 x 2 x 3 x1 x 2 x3 x1 x 2 x 3 x1 x 2 x3
Algoritm : Se d o form boolean A(x1 ,..., x n ) . Pentru a se obine forma canonic P,
logic Pi cu 1 i se nlocuiete 1 cu x j + x j :
Pi .1 = Pi x j + x j
Pasul 2 :
Se separ mintermenul x y zu
Pasul 3 :
x y = x y ( z + z )(u + u ) = x yzu + x y zu + x y z u
xz = xz ( y + y )(u + u ) = x yzu + x yzu + x yzu + x yz u
yz = ( x + x) yz (u + u ) = x yzu + x yz u + x yz u
yzu = ( x + x) yzu = xyzu + x yzu
Pasul 4 :
A( x, y, z , u ) = x yzu + x yz u + x y zu + x y z u +
+ x yzu + x yzu + x yzu + x yz u + x yzu +
+ x yz u + x yzu + x yz u + xyzu + x yzu =
= x yzu + x yz u + x y zu + x yzu +
+ x y z u + x yzu + x yzu + x yz u + xyzu
Atunci :
f (xyzu ) = (2,3,6,7,8,9,10,11,15)
Deoarece forma canonic P a unei funcii de comutaie este unic, dou forme
booleene echivalente trebuie s aib aceeai form canonic P. Deci, o metod
simpl se poate folosi pentru a demonstra c dou forme booleene sunt echivalente.
Se aplic algoritmul pentru transformarea formelor booleene n forme canonice P i
se compar. Dac sunt identice atunci formele booleene analizate sunt echivalente.
Exemplu :
Se dau A( x, y, z ) i B( x, y, z ) dou forme booleene n forma SOP i se cere s se
stabileasc dac sunt echivalente :
A( xyz ) = xy + x y z + yz
B ( xyz ) = xyz + x z + x yz + x yz
A( xyz ) = xy + x y z + yz = xy ( z + z ) + x y z + ( x + x) yz =
= xyz + xy z + x y z + x yz + x yz =
= m7 + m6 + m 4 + m5 + m1 = (1,4,5,6,7 )
B ( xyz ) = xyz + x z + x yz + x yz = xyz + x( y + y ) z + x yz + x yz =
= xyz + xy z + x y z + x yz + x yz = m7 + m6 + m 4 + m5 + m1 = (1,4,5,6,7 )
a n + 2 x1 x3 ... a 2 n 1 x1 x 2 ...x n 1 x n
unde :
[ (
)]
a i , i 0, 2 n 1
x y
0
0
1
1
0
1
0
1
1
0
0
0
f ( x, y ) = x y = x. y = (1 x )(1 y ) = 1 x y xy
a1 = 1
a 2 = 1
a3 = 1
x+ y
0
0
1
0
1
0
0
1
1
f ( x, y ) = x y x y xy = (1 x ) y x(1 y ) xy =
= y xy x xy xy = x y xy
a1 = 1
a 2 = 1
a 3 = 1
xy
0
0
1
1
0
1
0
1
1
1
1
0
f ( x, y ) = x y x y x y = (1 x )(1 y ) (1 x ) y x(1 y ) =
= 1 x y xy y xy x xy = 1 xy
Aceasta reprezint forma RMJ pentru funcia NAND iar coeficienii RMJ
corespunztori sunt:
a 0 = 1
a1 = 0
a 2 = 0
a 3 = 1
este 2 2 = 16 .
Considerm forma canonic P a unei funcii de comutaie de o variabil scris cu
operatorul XOR ntre mintermeni :
f ( x) = d 0 m0 (x ) d1 m1 (x )
unde :
f ( x) = d 0 (1 x ) d 1 x = d 0 d 0 x d 1 x = d 0 x(d 0 d1 )
a1 = d 0 d1
0 d 0
1 d 1
Notm matricile :
0
1
= T1
1
1
a0
= a
a1
d0
= d
d1
Atunci : a = T1 d
Continum analiza pentru funciile de dou variabile. Forma canonic P a unei funcii
de comutaie de dou variabile scris cu operatorul XOR ntre mintermeni este :
f (x1 x 2 ) = d 0 m0 d1 m1 d 2 m 2 d 3 m3
unde :
m0 (x1 x 2 ) = x1 x 2 = (1 x1 )(1 x 2 ) = 1 x1 x 2 x1 x 2
m1 (x1 x 2 ) = x1 x 2 = (1 x1 )x 2 = x 2 x1 x 2
m 2 (x1 x 2 ) = x1 x 2 = x1 (1 x 2 ) = x1 x1 x 2
m3 (x1 x 2 ) = x1 x 2
f (x1 x 2 ) = d 0 (1 x1 x 2 x1 x 2 ) d 1 (x 2 x1 x 2 ) d 2 (x1 x1 x 2 ) d 3 x1 x 2 =
= d 0 x 2 (d 0 d1 ) x1 (d 0 d 2 ) x1 x 2 (d 0 d 1 d 2 d 3 )
a1 = d 0 d1
a 2 = d 0 d 2
a 3 = d 0 d1 d 2 d 3
0
1
...
0
1
...
...
...
...
...
0
0
...
1
1
0
d 0
0
d1
...
d2
0
d
1 3
unde:
a0
a1
a=
a
2
a
3
d0
d1
d =
d
2
d
3
T1 0
T2 =
T1 T1
f (x1 x 2 x3 ) = d 0 m0 d 1 m1 d 2 m 2 d 3 m3 d 4 m 4 d 5 m5 d 6 m6 d 7 m7
m0 = x1 x 2 x3 = (1 x1 )(1 x 2 )(1 x 3 ) = 1 x1 x 2 x3 x1 x 2 x1 x3 x 2 x3 x1 x 2 x 3
m1 = x1 x 2 x3 = (1 x1 )(1 x 2 )x 3 = (1 x1 x 2 x1 x 2 ) x3 = x3 x1 x3 x 2 x3 x1 x 2 x3
m 2 = x1 x 2 x 3 = (1 x1 )x 2 (1 x 3 ) = (1 x1 x3 x1 x3 ) x 2 = x 2 x1 x 2 x 2 x3 x1 x 2 x 3
m3 = x1 x 2 x 3 = (1 x1 )x 2 x 3 = x 2 x3 x1 x 2 x 3
m 4 = x1 x 2 x3 = x1 (1 x 2 )(1 x3 ) = x1 (1 x 2 x 3 x 2 x3 ) = x1 x1 x 2 x1 x3 x1 x 2 x3
m5 = x1 x 2 x3 = x1 (1 x 2 )x3 = x1 x3 x1 x 2 x 3
m6 = x1 x 2 x 3 = x1 x 2 (1 x3 ) = x1 x 2 x1 x 2 x 3
m7 = x1 x 2 x3
d 1 (x3 x1 x 3 x 2 x3 x1 x 2 x3 )
d 2 (x 2 x1 x 2 x 2 x3 x1 x 2 x3 )
d 3 ( x 2 x3 x1 x 2 x3 )
d 4 (x1 x1 x 2 x1 x3 x1 x 2 x 3 )
d 5 (x1 x3 x1 x 2 x3 )
d 6 (x1 x 2 x1 x 2 x3 ) d 7 x1 x 2 x3 =
= d 0 x1 (d 0 d 4 ) x 2 (d 0 d 2 ) x3 (d 0 d 1 )
x1 x 2 (d 0 d 2 d 4 d 6 )
x1 x 3 (d 0 d1 d 4 d 5 )
x 2 x 3 (d 0 d1 d 2 d 3 )
x1 x 2 x3 (d 0 d 1 d 2 d 3 d 4 d 5 d 6 d 7 )
f (x1 x 2 x3 ) = a 0 a1 x3 a 2 x 2 a 3 x 2 x3 a 4 x1 a 5 x1 x3 a 6 x1 x 2 a 7 x1 x 2 x 3
a0 = d 0
a1 = d 0 d 1
a2 = d 0 d 2
a3 = d 0 d1 d 2 d 3
a4 = d 0 d 4
a5 = d 0 d1 d 4 d 5
a6 = d 0 d 2 d 4 d 6
a 7 = d 0 d1 d 2 d 3 d 4 d 5 d 6 d 7
n notaie matriceal:
1 0 0 0 ... 0 0 0
a0
1 1 0 0 ... 0 0 0
a1
a 1 0 1 0 ... 0 0 0
2 1 1 1 1 ... 0 0 0
a3
= .........................................
a 4 1 0 0 0 ... 1 0 0
a5
1 1 0 0 ... 1 1 0
a6
a 1 0 1 0 ... 1 0 1
7 1 1 1 1 ... 1 1 1
0
d 0
0
d1
0
d2
0
d 3
d
0 4
d
0 5
d
0 6
d
1 7
n notaie compat :
a = T3 d
unde:
T
T3 = 2
T2
T2
unde :
Tn 1
Tn =
Tn 1
Tn 1
unde :
daca e j = 1
x j
e
x jj =
1
daca e j = 0
n
este
[0, (2
)]
indexul
coeficientului
RMJ
gama
zecimal
k = 210 = (10 )2
k = 310 = (11)2
x10 x 20 = 1.1 = 1
x10 x 12 = 1.x 2 = x 2
x11 x 20 = x1 .1 = x1
x11 x 12 = 1.x 2 = x1 x 2
f (x1 x 2 ) = a 0 0 a1 1 a 2 2 a3 3 = a 0 a1 x 2 a 2 x1 a 3 x1 x 2
Pentru n = 3 , valorile lui k sunt 0,1,...,7 ; coeficienii RMJ sunt : a 0 ...a 7 iar termenii
produs sunt determinai astfel :
k = 010 = (000 )2
k = 110 = (001)2
k = 210 = (010 )2
k = 310 = (011)2
k = 410 = (100 )2
k = 510 = (101)2
k = 610 = (110 )2
k = 710 = (111)2
x11 x 12 x31 = x1 x 2 x3
f (x1 x 2 x3 ) = a 0 a1 x3 a 2 x 2 a 3 x 2 x3 a 4 x1 a 5 x1 x3 a 6 x1 x 2 a 7 x1 x 2 x 3
n general, reprezentarea RMJ pentru n variabile se poate scrie n felul urmtor :
f (x1 x 2 ...x n ) =
2 n 1
a k k
k = 0
unde :
e j (0,1),
j [1, n]
x j , daca e j = 1
e
x jj =
daca e j = 0
1,
Coeficienii a k k = 0, 2 n 1 sunt determinai din ecuaia matriceal :
(a ) = (Tn )(. d ) , unde
))
10
Tn 1
Tn =
Tn 1
Tn 1
0
Ti 1
Ti 1
Ti =
Ti 1
i
1
T1 =
1
2 2 expresii diferite.
Algoritm :
Transformarea formei canonice P n reprezentare RMJ urmeaz urmtorii pai :
d0
d1
1). Formarea matricii d =
...
d n
2 1
1
T1 =
1
Tn 1
0
Ti 1
0
x j , daca e j = 1
e
x jj =
daca e j = 0
1,
k10 = (e1e2 ...en )2
Exemplu :
Se d urmtoarea funcie de trei variabile :
f (x1 x 2 x3 ) = (0,4,5,6)
Matricea d
11
1
0
0
0
d =
1
1
1
0
Matricea T3 :
T2
T3 =
T2
T1 0 .
T1 T1 .
0
= .
. .
T2
T1 0 .
T1 T1 .
. .
T1 0
T1 T1
1
1
1
= .
1
1
1
0 0 0 . 0 0 0 0
1 0 0 . 0 0 0 0
0 1 0 . 0 0 0 0
1 1 1 . 0 0 0 0
. . . . . . . .
0 0 0 . 1 0 0 0
1 0 0 . 1 1 0 0
0 1 0 . 1 0 1 0
1 1 1 . 1 1 1 1
a0 = 1
0
1
0
1
.
0
1
0
1
0
0
1
1
.
0
0
1
1
0
0
0
1
.
0
0
0
1
. 0 0 0
. 0 0 0
. 0 0 0
. 0 0 0
. . . .
. 1 0 0
. 1 1 0
. 1 0 1
. 1 1 1
0
1
0
0
0
0
0
0
. .
1
0
1
0
1
0
0
1
a1 = 1
a2 = 1
a3 = 1
a4 = 0
a5 = 1
a6 = 1
a7 = 0
12
k =0
000
k =1
001
x10 x 20 x 31 = 11x 3 = x 3
k =2
010
x10 x 12 x30 = 1x 2 1 = x 2
k =3
011
x10 x 12 x31 = 1x 2 x3 = x 2 x3
k =4
100
k =5
101
x11 x 20 x 31 = x11x3 = x1 x 3
k =6
110
x11 x 12 x 30 = x1 x 2 1 = x1 x 2
k =7
111
x11 x 12 x 31 = x1 x 2 x 3 = x1 x 2 x 3
Putem verifica corectitudinea expresiei obinute prin scrierea formei canonice P a lui
f (x1 x 2 x3 ) cu operatorul XOR :
f (x1 x 2 x3 ) = x1 .x 2 .x3 x1 .x 2 .x3 x1 x 2 x3 x1 x 2 x3 =
f 13
f 14
f 15
x1 2 x 2
1 x 2 x1 x 2
1 x1
1100
1010
x1 x 2
1 x1 x1 x 2
1 x1 x 2
1011
1001
1001
x1
x1 1 x 2
13
i j F 0
unde :
- F 0 este mulimea tuturor combinaiilor de valori ale variabilelor {x1 ,..., x n } pentru
care f este mapat n 0.
- - este produs logic
- M este un maxtermen definit pe variabilele {x1 ,..., x n } ;
- L = 2 n k , unde k este greutatea funciei.
Aceast form se mai numete i forma absolut normal conjunctiv, pentru funcia
f (x1 ,..., x n ) .
Teorema T2 :
Orice funcie f (x1 ,..., x n ) , exceptnd constanta 1, poate fi reprezentat n urmtoarea
form conjunctiv folosind operatorul XNOR :
f (x1 ,..., x n ) =
M ij
[
i j F 0
(x1 ,..., x n ) = M i
M i2 ... M iL
unde :
- - F 0 este mulimea tuturor combinaiilor de valori ale variabilelor {x1 ,..., x n }
pentru care f este mapat n 0.
- M este un maxtermen definit pe variabilele {x1 ,..., x n } ;
- L = 2 n k , unde k este greutatea funciei.
- P este produsul XNOR
Teorem ( forma canonic S )
Orice funcie de comutaie f (x1 ,..., x n ) , exceptnd constanta 1, permite urmtoarea
reprezentare unic n form conjunctiv :
1
in = 0
unde :
14
dac f (i1 ,..., i n ) = 0 atunci maxtermenul corespunztor este reinut. Deci, din cei 2 n
maxtermeni numai cei pentru care f (i1 ,..., i n ) = 0 sunt reinui. Astfel, produsul
reprezint mulimea de maxtermeni pentru care f (i1 ,..., i n ) este mapat n zero. Astfel
am demonstrat c aceast teorem a fost redus la cea anterioar definind forma
absolut normal conjunctiv a unei funcii de comutaie.
Algoritm :
Tranziia de la tabelul de adevr al unei funcii de comutaie f (x1 ,..., x n ) la forma
canonic S.
1) Se marcheaz combinaiile pentru care f (x1 ,..., x n ) este mapat n 0.
2) Se scriu maxtermenii corespunztori diferii de combinaiile identificate la pasul
1.
3) Se scrie produsul logic din maxtermeni formai la pasul 2.
Exemplu :
Se consider o funcie de comutaie f (x1 x 2 x3 ) definit prin tabelul de adevr :
x1
0
0
0
0
1
1
1
1
x2
x3
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
1
0
0
1
0
1
1
0
Pasul 1:
Marcm combinaiile 001, 010, 100, 111 pentru care f (x1 x 2 x3 ) = 0
x1
0
0
0
0
1
1
1
1
x2
x3
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
1
0*
0*
1
0*
1
1
0*
Pasul 2 :
Scriem maxtermenii corespunztori
M 1 = x1 + x 2 + x 3
M 2 = x1 + x 2 + x 3
M 4 = x1 + x 2 + x 3
M 7 = x1 + x 2 + x 3
Pasul 3 :
Forma canonic S este :
15
)(
f ( x1 x 2 x3 ) = M 1 M 2 M 4 M 7 = x1 + x 2 + x3 x1 + x 2 + x 3
(x
)(
+ x 2 + x3 x1 + x 2 + x3
) (
f (x1 x 2 x3 ) = x1 + x 2 + x3 x1 + x 2 + x3
) (
x1 + x 2 + x3 x1 + x 2 + x3
Algoritm :
Transformarea unei forme booleene A(x1 ,..., x n ) n forma canonic S .
1) Forma boolean dat se prelucreaz pn se obine forma POS (forma normal
conjunctiv )
2) Termenii care conin toate variabilele sunt separai ( extragerea maxtermenilor )
3) Dac ntr-un maxtermen lipsete variabila xi atunci un 0, scris ca xi .xi
, este adugat xi .xi = 0
4) Se aplic distributivitatea lui OR fa de AND.
5) Teorema de idempoten se folosete pentru a reine numai un maxtermen din
mulimea de maxtermeni identici
Exemplu :
Considerm urmtoarea form boolean :
)(
A(x1 x 2 x3 ) = x1 + x 2 x 2 + x3
)(
= (x + x + x )(x + x + x )
(x + x + x )(x + x + x )
A(x1 x 2 x3 ) = x1 + x 2 + x 3 x3 x1 x1 + x 2 + x 3 =
1
)(
)(
f (x1 x 2 x3 ) = x1 + x 2 + x 3 x1 + x 2 + x3 x1 + x 2 + x3
(x
Proprietate : Deoarece forma canonic S este unic, dou forme booleene sunt
echivalente dac au aceeai form canonic S.
Exemplu : Sunt considerate dou forme booleene
)(
A(x1 x 2 x 3 ) = (x 2 + x 3 ) x1 + x 2 x 2 + x3
)(
)(
B(x1 x 2 x 3 ) = x 2 + x 2 + x 3 x1 + x 2 x1 + x 2 + x 3 (x 2 + x3 )
16
)(
)(
= (x + x + x )(x + x + x )(x + x + x )
(x + x + x )(x + x + x )(x + x + x ) =
= (x + x + x )(x + x + x )(x + x + x )
(x + x + x )(x + x + x ) =
= M 0M 4M 6M 7M 3
(
)(
)
(x + x + x )(x x + x + x ) =
= (x + x + x )(x + x + x )(x + x + x )
(x + x + x )(x + x + x )(.x + x + x ) =
= (x + x + x )(.x + x + x )(x + x + x )
(x + x + x )(x + x + x ) = M M M M M
B(x1 x 2 x3 ) = x1 + x 2 + x3 x1 + x 2 + x3 x3
1
1 1
17
) (
) (
a n +1 + x1 + x 2 a n + 2 + x1 + x 3 ...
... a 2 n 1 + x1 + x 2 + ... + x n
unde :
) (
) (
f (x1 x 2 ) = a 0 a1 + x1 a 2 + x 2 a 3 + x1 + x 2
Exemplu :
Considerm funcia AND , f (x1 x 2 ) = x1 x 2 , cu urmtorul tabel de adevr :
x1
x2
x1 x 2
0
0
0
0
1
0
1
0
0
1
1
1
Prin aplicarea teoremei T2 , f (x1 x 2 ) poate fi reprezentat astfel :
) (
f (x1 x 2 ) = ( x1 + x 2 ) x1 + x 2 x1 + x 2
[(
)] [(
) (
] [ (
f (x1 x 2 ) = 0 x1 + 0 x 2 0 x1 + x 2 x1 + 0 x 2
Prin aplicarea distributivitii lui + asupra avem :
f (x1 x 2 ) = (0 + 0 ) 0 x 2 0 x1 x1 + x 2
[
( ) ( ) (
)]
[(0 x ) (x + x )]
[(0 x ) (x x )] =
= 0 x x (x x ) x (x + x ) x (x
2
+ x2
)]
f (x1 x 2 ) = 0 x1 + x 2
Astfel, pentru f (x1 x 2 ) = x1 x 2 coeficienii polinomiali sunt :
18
a 0 = 0
a1 = 1
a 2 = 1
a 3 = 0
D1
AND OR
D2
NAND NAND
D3
OR NAND
D4
NOR OR
F/
(
f ( x ...x ) = U (x
i1
1
F/
)
)
)
C1
OR AND
C2
NOR NOR
C3
AND NOR
C4
NAND AND
F0
F0
Fiecare form este descris de dou funcii logice. Prima funcie logic specific
operaia dintre variabilele {x1 ,..., x n } iar cea de-a doua funcie specific operaia dintre
termeni. Evident, D1 i C1 corespund formelor fundamentale canonice P i S iar
restul corespund unor forme canonice noi care incorporeaz funciile NAND i NOR.
Aceste forme sunt uor de demonstrat prin reducere la formele canonice
fundamentale:
19
D2
f (x1 ...x n ) = / x1i1 x 2i2 ... x nin = / x1i1 x 2i2 ...x nin = / m jk (x1 ...x n ) = m j1 m j2 ...m jk =
F
F
F
( forma
canonica P )
F/
i1 i2
x1 x 2 ...x nin
Fiecare produs
reprezint un mintermen definit pe mulimea {x1 ,..., x n } ; k
este greutatea funciei f (k = w( f ) ) .
D3 :
= m j1 + m j 2 + ... + m jk =
( forma canonica P )
F/
) (
f (x1 ...x n ) = U x1i1 x 2i2 ... x nin = U x1i1 x 2i2 ... x nin =
D4 :
F/
F/
( forma canonica P )
F.
) (
f (x1 ...x n ) = 0 x1i1 x 2i2 ... x nin = 0 x1i1 + x 2i2 + ... + x nin =
C2 :
= 0 M jt = M j1 + M j2 + ... + M jt = M j1 .M j2 .....M jt =
F
( forma
canonica S )
unde :
M j = x1i1 + x 2i2 + ... + x nin este un maxtermen definit pe {x1 ,..., x n } ;
L = 2 n w( f ) = 2 n k
C3 :
= M j1 + M j2 + ...M jt = M j1 .M j2 .....M jt =
canonica S )
C4 :
f (x1 ...x n ) = x1i1 x 2i2 ... x nin = x1i1 x 2i2 ...x nin =
F0
F0
( forma
( forma
canonica S )
20
x1
x2
x3
x4
0
0
0
0
1
0
0
0
1
1
0
0
1
0
0
0
0
1
1
1
0
1
0
0
0
0
1
0
1
1
0
1
1
0
1
0
1
1
1
1
1
0
0
0
1
1
0
0
1
1
1
0
1
0
0
1
0
1
1
1
1
1
0
0
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
0
Se cer formele generalizate canonice.
Deoarece greutatea funciei este k = w( f ) = 12 , nseamn c funcia este balansat
ctre 1. Vom folosi forma generalizat canonic conjunctiv. Sunt identificate
combinaiile pentru care f (x1 x 2 x3 x 4 ) = 0 , ceea ce corespunde cu determinarea
mulimii F 0 :
0
0
F0 =
1
1
0 1 0
1 0 0
0 1 0
1 1 1
(
)(
)(
)(
: f (x x x x ) = (x x x x )(x x x x )(x x x x )(x
: f ( x x x x ) = (x ..x .x x ) (x .x .x .x ) (x .x .x .x ) ( x .x .x .x )
)
x )
C1 : f (x1 x 2 x3 x 4 ) = x1 + x 2 + x3 + x 4 x1 + x 2 + x3 + x 4 x1 + x 2 + x3 + x 4 x1 + x 2 + x3 + x 4
C2
C3
1 2 3 4
1 2 3 4
)(
)(
C 4 : f (x1 x 2 x 3 x 4 ) = x1 x 2 x3 x 4 x1 x 2 x 3 x 4 x1 x 2 x3 x 4 (x1 x 2 x3 x 4 )
x 2 x3
x2
x3
0
0
0
0
0
0
1
1
0
1
0
0
0
1
1
0
1
0
0
1
1
0
1
0
1
1
0
1
1
1
1
0
Se cer formele canonice generalizate. Greutatea funciei este
folosi formele canonice generalizate disjunctive.
Sunt identificate combinaiile pentru care f (x1 x 2 x3 ) = 1
w( f ) = 3 , deci vom
21
0 0 1
F = 1 0 0
1 1 0
'
)(
)(
x ) + (x
)(
)(
D2 :
f ( x1 x2 x3 ) = x1 x 2 x3 x1 x2 x3 x1 x2 x3
D3 :
f (x1 x2 x3 ) = x1 + x2 + x3 x1 + x2 + x3 x1 + x 2 + x3
(
f (x x x ) = (x
) (
D4 :
1 2 3
1 x2
3
1 x 2 x3 + x1 x 2 x3
n afar de criteriul greutii, exist i un al doilea criteriu legat de baza tehnologic
avut la dispoziie pentru realizarea reelei logice. De exemplu, dac avem la
dispoziie numai pori NAND, atunci, indiferent de greutate , trebuie s construim
circuitul folosind numai pori NAND. Astfel, avem nevoie de forma NAND - NAND
care se poate obine din C 4 prin dubl complementare :
f (x1 ...x n ) = x1i1 x 2i2 ... x nin = 0 x1i1 x 2i2 ... x nin
F0
Aceast relaie este adevrat deoarece complenentul lui AND generalizat este
NAND.
Astfel, exist dou metode disponibile pentru scrierea formei canonice n baza
NAND, prima ca grup disjunctiv pe F ' iar cea de-a doua n grup conjunctiv pe F 0 ,
astfel :
1) f (x1 ...x n ) == 1 x1i1 x 2i2 ... x nin
F
x2
x3
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
1
0
0
1
0
1
1
0
0
F =
1
1
0
1
0
1
1
0
0
1
22
0
0
F1 =
1
1
0 0
1 1
0 1
1 0
)(
)(
)(
)(
)(
Avem nevoie de ceva similar pe F 1 ; dac lum forma D4 din grupul disjunctiv,
dup o dubl complementare obinem :
) (
) (
f (x1 ...x n ) = U x1i1 x 2i2 ... x nin =U x1i1 x 2i2 ... x nin = 1 x1i1 x 2i2 ... x nin
F1
F1
Aceast relaie este adevrat deoarece complementul lui OR generalizat este NOR.
Astfel, avem dou metode disponibile de a scrie forme canonice n baza NOR, prima
n grupul conjunctiv pe F 0 iar cea de-a doua n grupul disjunctiv pe F 1
1) f (x1 ...x n ) = 0 x1i1 x 2i2 ... x nin
(
f (x ...x ) = (x
F
2)
F1
i1
1
)
)
F0 =
1
1
0
0
F1 =
1
1
0 1
1 0
0 0
1 1
0 0
1 1
0 1
1 0
)(
) (
) (
x1 x 2 x3 x1 x 2 x3
) (
) (
) (
(
f (x ...x ) = (x
F0
i1
1
)
)
...
f ( x1 ...x n ) = U
xnin
i
i
i
i
24
f (x1 ...x n ) = U
x nin11 x nin
i
i
i
i
i
i
F 1 x11 x 22 x 33 x 44 x 55 ... x nn22
Aceste teoreme pot fi extinse pentru diveri operatori NOR depinznd de tehnologia
impus.
Aa cum se tie, funcia NOR formeaz o mulime funcional complet, astfel nct
nu este nevoie de folosirea operatorilor OR.
Urmtoarele teoreme asigur un mod direct de reprezentare a funciilor de comutaie
prin folosirea numai a operatorilor NOR.
Teorem : Orice funcie de comutaie f (x1 ...x n ) , exceptnd constanta 0, i care are
greutatea k = w( f ) , poate fi reprezentat cu operatori NOR 2 n felul urmtor :
f ( x1 ...x n ) =
...
m in
mi1 mi2 mi3 ...
...
m ik
mi1 mi2 mi3 mi4 mi5 ...mik 1
mj =
x nin
i3
in 1
i1
i2
x1 x 2 x3 ... x n 1
...
m ik
mi1 mi2 mi3 ...
x2
x3
0
0
0
0
1
1
1
0
0
1
1
0
0
1
0
1
0
1
0
1
0
0
1
0
0
1
1
0
25
1
1
1
0
1
Mulimea F este {(001), (100), (101)} ; greutatea lui f (x1 x 2 x3 ) este 3 (k = w( f ) = 3) .
Mintermenii pentru combinaiile marcate sunt :
m1 = x1 x 2 x3
m 4 = x1 x 2 x3
m5 = x1 x 2 x 3
f (x1 x 2 x3 ) = x1 x 2 x3 x1 x 2 x3 x1 x 2 x 3
f (x1 ...x n ) == i
i3
i2
in
1
F 0 x1 x 2 x 3 ... x n
f (x1 ...x n ) = i1
i2
in
0
F x1 x 2 ... x n
...
M i1 M i2 M i3 ...
M iL
unde :
- M i j este un maxtermen definit pe mulimea de variabile {x1 ...x n }
- L este complementul greutii : L = 2 n k = 2 n w( f )
Teorem : Orice funcie de comutaie f (x1 ...x n ) , exceptnd constanta 1, poate fi
reprezentat cu ajutorul operatorilor NOR 3 n form conjunctiv astfel :
f (x1 ...x n ) =
...
M i1 M i2 M i3 ...
M iL 1 M iL
unde :
- M i j este un maxtermen definit pe mulimea de variabile {x1 ...x n }
26
...
x1i1 x 2i2 x 3i3 ... x nin
...
M i1 M i2 M i3 ...
M iL
x3
0
0
0
0
0
1
0
1
1
0
1
0
1
1
1
1
Pasul 2 :
0
1
0
1
0
1
0
1
0
1
1
1
0
0
1
0
x1
M 0 = x1 x 2 x 3
M 4 = x1 x 2 x 3
M 5 = x1 x 2 x3
M 5 = x1 x 2 x3
Pasul 3 :
f (x1 x 2 x3 ) = M 0 M 4 M 5 M 7 = x1 x 2 x 3 x1 x 2 x3 x1 x 2 x3
x1 x 2 x 3
3.8.Reprezentri NAND
3.8.1. Reprezentri NAND disjunctive.
Teorem : Orice funcie de comutaie f (x1 ...x n ) , exceptnd constanta 0, poate fi unic
reprezentat cu operatori NAND 2 n form disjunctiv astfel :
...
f ( x1 ...xn ) = U i i i
in
3
1
2
F 1 x1 x 2 x3 ... x n
27
f ( x1 ...x n ) = U
i3
i5
in 1
in
i1
i2
i4
1
F
[(( x1 | x 2 | x3 ) | x 4 | x5 ) | ... | x n 1 | x n ]
Aceste teoreme pot fi extinse la alte tipuri de operatori NAND. Deoarece NAND este
o mulime funcional complet, funcia OR nu este necesar. Deci, urmtoarele
teoreme specific pe f (x1 ...x n ) folosind numai funcii NAND.
Teorem : Orice funcie de comutaie f (x1 ...x n ) , exceptnd constanta 0 , cu greutatea
k , poate fi reprezentat cu ajutorul operatorilor NAND 2 n form disjunctiv astfel :
...
f ( x1 ...x n ) =
mi1 mi2 mi3 ... | mik
unde :
- mi j este mintermen definit pe {x1 ...x n }
- k este greutatea funciei, k = w( f )
Teorem : Orice funcie de comutaie f (x1 ...x n ) , exceptnd constanta 0 , cu greutatea
k , poate fi reprezentat cu ajutorul operatorilor NAND 3 n form disjunctiv astfel :
f (x1 ...x n ) =
...
mi1 mi2 mi3 mi4 mi5
unde :
- mi j este mintermen definit pe {x1 ...x n }
k este greutate afunciei, k = w( f )
...
mi1 mi2 mi3 ...
m ik
x2
x3
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
1
0
0
1
1
0
0
0
28
x2
x3
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
1*
0
0
1*
1*
0
0
0
Pasul 2:
Mintermenii m0 , m3 i m 4 sunt :
m0 = x1 x 2 x3
m3 = x1 x 2 x3
m 4 = x1 x 2 x 3
F 0 x1 x 2 x 3 ...
...
f ( x1 ...x n ) = i1 i2 i i3 in 1 in
F 0 x1 x 2 x3 x 4 ... x n 1 | x n
Teorem : Orice funcie de comutaie f (x1 ...x n ) , exceptnd constanta 1, poate fi unic
reprezentat cu operatori NAND 2 n form conjunctiv astfel :
f (x1 ...x n ) =
...
M i1 M i2 M i3 ... M iL
unde :
- M i j este maxtermen definit pe {x1 ...x n }
29
...
M i1 M i2 M i3 M i4 M i5 ... M iL 1 M iL
unde :
- M i j este maxtermen definit pe {x1 ...x n }
- L este complementul greutii k , L = 2 n k = 2 n w( f )
Algoritm : Tranziia de la tabelul de adevr la reprezentarea NAND conjunctiv.
1) Se marcheaz combinaiile pentru care f (x1 ...x n ) este mapat n 0
2) Se scriu maxtermenii corespunztori combinaiilor marcate la pasul 1 folosind
formula :
...
Mj =
...
M i1 M i2 M i3 ... M iL
x2
x3
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
1
0
1
0
1
1
0
1
Funcia :
f (x1 x 2 x3 ) = x1 x 2 x3 x1 x 2 x3 x1 x 2 x 3
Observaii :
1) Dei teoremele i algoritmii sunt precis descrise, implementrile au un neajuns :
structura este dezechilibrat, diverselor ci de la intrare la ieire avnd valori
30
...
M i1 M i2 M i3 ...
M iL
) ( )
= M i1 M i2 M i3 ... M iL =
= M i1 M i2 M i3 ... M iL =
= M i1 M i2 M i3 ... M iL =
....................................................
=
...
M i1 M i2 M i3 ...
M iL
...
mi1 mi2 ... mik
Conform cu D2 :
) ( )
...
mi1 mi2 mi3 ...
mi L
31