Sie sind auf Seite 1von 8

Ut t",auttl fwl&

- Boolean algebras, simplilication of boolean functions, M.Lupea Boolean algebras and hoolean functions
MFCS

-- 2010

George Boole introduced boolean algebras

in

1854.

In

1938 Claude Shannon

proved thata two valued binary boolean algebra can describe the operations of twovalued electrical switchinq circuits. In nodern times boolean alsebras and boolean
functions are indispensable in the design of computer chips and digital circuits

1. Boolean algebras

Definition

1.

A boolean algebra is a structure (,4, n, v, , 0, 1), where: . lAl> 2, A contains at least two elements: 0 Ei 1, 0 +

. A: v - binary operations . - unary operation r 0- zeroelement:


a a

xv0=0vx= x,YxeA xv1=Iv x=l,YxeA 1- unityelement: x nL=I n x= x, and

xn0=0.nx:0

and

0- the first element. 1- the last element

*n,=0
a a

and

tti=l,YxeA
=

duble negation: x=

x,YxeA

comutativity:
x

^y =

nx

and

xv y = !v x,Yx,yeA
and

associativity:

x^(y^z)- (xny) nz(=x,.'YAz)


distributivity: xn(yv z)=(xn1;)v(:r nz) ffld xv(yn z)=(xvy)n(xv;),
idempotency: .rn
VX,

xv(yv z)=(xv 1)v z(=r;vJ/v z)"Yx,y,zeA

y,zeA

x=x

and

lrvx: xrYxeA
-" y =,
:r'v
(-r;

De Morgan laws:

, ny = *u

and

nY,Yx, YeA r , Yx, ye '4

absorption laws:
.r n (.v

l) : ;r and

n.'')

='

EMFCS

Boolean algebras, simpiification of boolean functions, M.Lu;eL

The principle of duality in a boolean algebra: ,,For any equality of two-n:,: there is another equality, [J'=v', obtainecl by interchanging n, v and 0, 1,'.

em j,:*.::l

'..

U:V,

Example

1.

The binary boolean algebra rs B


^:. U '1
!:

:
1

(Bz:{0,1},

^,

V,

, 0, 1), where:

1 ;t '1

I
i
:

0-

Alternative syrnbols used in binary boolean algebra are * (for n) and + (for v).

Example 2. The structure (Fp, r', v, -, F, T) is a booiean alsebra: ' lFpl2 2, Fp - the set of all well-formed propositional formulas; o F, Te Fp, where F, T are the truth values; o (conjunction), v (disjunction); ^ o --r (negation); Example 3. The structure

cdll=y-1,

@(n, A, U, c, a,l0

is a boolean algebra.

denoted C(A) is the complementary set

ofl

with resp ectto x:

2. Boolean functions Definition 2.


Let

B:

(Bz, A, V,

-, 0, l)

be the binary boolean algebra,

Bz:{0;}

qi n e,Al.

boolean

function of n variables is afunction -f


1. The

,(B)'

-+ 82 defined

as follows:

projection function: Pi

Bl

-+ BZ, Pi(*1,..., xi,..., xn) = xi ,is a boolean function.

2.If

.f , g ,

B;

-+ BZ are boolean functions then:

-f n g,-f u g,7 are boolean functions, where:


xn) = -f (xt,..., xn) n g(xt ,..., xn) , " S)@t;...t ("f v S)Qt,..., xn) = -f (xt,..., xn) v g(xt ,..., xn) ,

(f

7(\,...,*r) = f er*,*r)

3. Any boolean function can be obtained by a finite aplication of the rules

and2.

MFCS

Boolean algebras, simplification of boolean

functions, M.Lupea -- 2010

Theorem L. V n N*, there are 22" boolean functions

of n variable.

Theorem 2.

"n 2' -l boolean functions of neN. variables, where n, v


and fg(x1,...,xn)

The structure (FB(n), A, V,

-, .[0, f

) is a boolean algebra, where FB(n) is the set of all

and

are

defined in the above definition

=0,

,f
"2,

_,(x1,...,

xr):1

are the constant functions: 0

thd

1.

Example
For

4.

n:l,there are 4=22 =22t -22" boolean functions of one variable:.

X
0
1

"fo@):o
0
0

.fi@): x ,fz(i:
0
1

fz@)=1 I I

I
0

Example

5.
1

The boolean functions of 2 variables: 22' -24

:L6
.fi&,y)
"fs(*,y)
1)

fo6'y)
contradiction

"fi (x,y)

"fz&'y)

"f:(*,y)

-fo6,y)
*lOtt ev)/

"fr(x,y)

x^y
0 0
0 0 0
0 0

xny
0

xvy
0

0 0

0
0 0

0
I
_l

I
0

I
0
0

I
I

I I
I

I I

I
0

0 I

-v

fa6'y)

fs6,y)

,fto&,y)
1)

ft t6,y)

f tz@,y)
L

fis@,y)

.fit6,y)

-fis6,y)

x{y
0
U

xey
I
0

y-)x
0

x-)y
I I
0

xty
I

,^

tautologt
I I

I
0
1

I
0

I I

0
0

I
0

I I

0 0

l
0

I I

Each function has an inverse function obtained as its negation. Pairs of inverse functions:
Uo, "fis)

'

(fr, ft4) '

(fz, frs)

(h,

fn), (fq'.ftt),

(fs,.fi0)

(fa, fg) ,

6t ' "ft)

MFCS

Boolean algebras, simplification of boolean

functions, M i-|ta-Slitr

We have used the following symbols for operations:

J (nor)

Pierce's function, x

y =G

f (nand)- Schaffer'sfunction, xt y=(*"y) + (logical implication), x -+ y =i " y e (logical equivalence), x e y - (x -+ y) n (y + x)


O(,,xor"), x@y=(x<+y)

" ),

For a uniform reprezentation of variables and their negations we will

n -

=0' [x, xt:xand 00=0=1; 0l=0; Forx, ae{0,1}: x0:i, - 11, if x=a

following notation: '

*"

=7!'

:!." if a

=1,

xe{0, 1} -- (-) ^'

10:T=0;

1l:l

t-=10. ifx+a,

x,qe{0,

1}

3. Canonical forms of boolean functions

Theorem 3. A booleanfunction

f ,(B)'

-+

82,n.M

can be transformed into two equivalent forms:

l. canonical disjunctive form (CDF): v -(f (at,..., dn) ^xf1 (D f @t,..., x,) = (a1,...,ar)eB!
2. canonical conjunctive form (CCF):

n '..n

*no')

Q)
Theorem 4.

f@t,...,xr)=

(a1,...,an)eBl^(f(at,.-.,dr)t,"rot

v...v

*ro')

A booleanfunction -f

,(B)n

-> 82 is unique determined by

its

values -f(ab...,ar),where

(a1,...,a)eBl:

L canonical disjunctive

form (CDF):
(aln.., .,"r)eBl $i.f (at,..., dr)=l

(1)e(l')f(x1,"',xn)=
2. canonical conjunctive

-t

(*1orn"'nxndn;

form (CCF):
(a1,...,

(2)

12',1

f @t,"', xn) =

a)eBl ;i.f (ar..., ar)=0

("6 v "' v *r4 )

MFCS

Boolean algebras, simplification of booiean

functions, M.Lupea -- 2010

Example 6. For n:2, the canonical disjunctive forrns of the functions .fs.13,.f0,.fi2 frorn Exarnple 5 are build using formula (1):
., (0 n xl yl) =; ,., ^ ^, "l -y0 ) .frs(x,y)=(lnr0r...1,0)v(1nx0^-yl)v(0 rr: ^.y0)v(1n rt nyt):(; "i)"(i"y)v(.rny) .fa(x, y)= (0 n 3r0) v (1 n r0 n yt) v (1 n rl -y0) v (0 n rt n yt) = (; t y) v (" r.. y)

.fs@,y):

(1

"0

,,r

"y0 )

r, (0 ,n r0 ,., .yl ) ., (0 ,'

"0,^

.ftz(r,y)=(1n *0 ny0)v(1n *0 nyt).r(0nrl ,n y0)u(0nxl

^yt)=fr"ilv(in

!)=x"(iu

y)

We remark that the functions' indices. reprezented in binary using 4 binary digits, are the

binary numbers obtained reading the corresponding column.

For f12(x,y),l2:I100(2) and the column of the function's values is:

[|
Remark: . The canonical disiunctive form is recommended when the function has more values
than
1.
1

The canonical coniunctive form is recommended when the function has lnore values
than 0.

Example

7.

Write the canonical forms of fe@,y):

.fg(x,y)=(l nr0 .n-y0)v (0 n *0 n yt) v


= 1x n y)
,f, (x. y

(0 n

"'

r.'-y0)

(1

"'

rt-v')

"

(r n.r,) --- CDF

apply

distibutivity:)
v y)

):

i1i n y) '', x),". (t.i n y) v

/) : (i v x) n 1y v.r') n (i " y) n(j'


1

:1r.
Example
8.

(x

ui) "1i

n.1.,tn

(r,,, yi". tx v y) --- CCF

Write the corresponding canonical forms of .fz, .fs , .fs , .fg , zccording to the previous remark:
Formula

(l') will be used for .f2,.15 andforrnula (2') will be used fot .fi(x,y), foQ,y)
(xr n yo) = x

.fz6,i:

^,

(CDF)

f5o. l)= i.r0 ^.1'' )t, tt' ^;)'l ) = ti n)'lv ixn v) = txvr)

nl

= 1n J

1' ICDF)

MFCS

Boolean algebras, simplificatior' of boolean


-fi(x,

functions' M'Lupea -- 2010


x nS" v y) = x n 1 = x
(C

y)=

0 0 ix v y ) n (t

t t, y ) = (x v y) n (x v.y) =

CF)

f'@

v)

:#,*;#iljl;*::
,rn

xnx

ccF,

Remarks:

o r

The boolean function 7s doesn't have a canonical disjunctive form. have a canonical coniunctive for:m' The boolean function f

_rdoesn't

Definition 3.
Let

f : (82)" -+ BZ, n.N be a boolean function of n variables.


variables and has the form:

r o o

A conjunction of variables is called a monom' of n A monom which contains all n variables is called canonical monom or minterm
xlor n ...
xnon

,di e 82,

A disjunction containing all nvariables, with the form:


maxterm of n variables.

xft

v ...v xron ,&i B, is called

Example 9,For n:3: . xt n x2 is a monom, but not a canonical monom; . xl ni2 nx3 is a canonical monom (rninterm) of 3 variables; . i, u'i2 v x3 is a maxterm of 3 variables'

Properties:

. . .

YneN*, there ate 2n maxterms, denoted by Mo,M1,"',Mzn-t and 2" minterms'


denoted bY *o,t/t1>...t
ffi2n

A maxterm is a boolean function which is 0 for only one argument' A minterm is a boolean function r,vhich is 1 for only un argument'

-t'

Remarks: of 1. The index of a minterm of n variables is obtained by the conversion in decimal powers of all n variables the binary number composed of the digits representing the

2.

from the expression of the minterm' in decimal of The index of a maxterm of n vanables is obtained by the conversion the powers the binary number composed of the duals of the digits, digits representing of ail nvariables from the expression of the maxterm.

MFCS

Boolean algebras, simplification of boolean

functions, M.Lupea -- 2010

Example 10.
For

n:l,there

ate 2n X
0
1

minterms and maxterms:


mo =

lvlt

mI = Mo = x

I
0

Example L1. For fr:2,there ate 2n


nxo

minterms and maxterms.


m3=

x v
0
0
1

Ay
I

i"v
0

u.l -

t,t2 -

x,.,
o
U

x^y
0 0 0

xv y

An^

il,

xv,
I

Mz= xv y
1
1

Y': xvy
I I I
0

0 I
0

0
I

0 0 0

I
0

0
I
1

I 0

0
I

We'remark that the minterms have a unique value 1 on their columns, and the tnaxterms
have a unique value 0 on the coresponding colurnns.
1110

m0012)

X0 n Y0

:i

"i
Y

t/13=t'l't1l12y

=XI nyl

=x,'Y

Ml=Mot1z1:tdt
Example 12.

Y7

=*u

io Mz:Mrcp1=x 'v Y- =xY !

For n:3,there are 2" =23 = B mintenls and maxtenrrs.

m0=m000(r)=*0 n.y0

n'0 =inynZ

M0=Mooo1z1 =x6 v y6

r rd =xv yv z

t?\=t?1g1re)=r' nYl n'l :iAYAz


trtT=t/t1r

Ml=Mott121 =X" v

oll-

y'v z'=xv yv z

l(z) ,t ny'n'l =x,.yAz

M7=Mtttrz,

=ti., yl ,,1 =iriu2

Theorem 5.

.
o

The conjunction of two distinct minterms is 0. n1; nmi =A, Yi + i, i' i =0'"''?"-l ' The disjunction of two distinct maxterms is

l: M , v M , =1,

Yi + j,

i,

= A,...,2n-l

A minterm and maxterm lvith the same index are inverse functions. Mi=mi,7I; =mi, Yi=0,"',2't-1 '

MFCS

Boolean algebras, simplification of boolean

functions. ]'f .L::c. -- L

tl

Example 13.

. m2Aftr6:G ny n=:0n-/n: = [' "y nrln(x ny ntl=(i,rx; . Mtv M, -(xu yu21r6u yuil=(ivx), yri=1vJ v:=. il=*o nyl ,r 21 =xAyAz-xvyur=*l v"y0vr0 = -r0t-t1 il=ronylnrl=,
Remark:

. . o

The canonical conjunctive form, CCF, is the conjunction of the nlaxtenns crr:rcr:.'idins to the arguments for which the function is 0.

The canonical disjunctive form, CDF, is the disjunction of the minterms correspondng
to the arguments for which the function is
1.

Example 14.
For n:3 the boolean function .f (xu xz, xs) is given below. Write the canonical forms of
1', ."1

f
l7l7

Y^ --z

X3

.f (*t, xz, xt)


1

M2
1

Ma

M5
I

//lg

//11

/713

m6

0 0 0 0

0
0

0 I

I
0

0 I 0 0 0 0 0 0

0 0 0
1

0
0 0 0 0 0
1

I
0
1

i
I I
0

I
I
1

0
0 0 0 0 0
I

I
1

0
I

0
1

0 0 0
0 0 0

I I I
I

0 0
1

0
1

0 0
1

I I
I
1

I
0
1
1

0
0
0
U

I
I a

The canonical conjunctive form is built using the maxterms coffesponding to the values 0 the function.

of

CCF(/):Mz^Mq^Ms:
the function.

(xr

trirtrx:)n(ir

x2v\)^(", u*ruirS
I of

The canonical disjunctive form is built using the rninterms coffesponding to the values

CDF(/):tnoy trtry rlttY Ln.6Y L/17: :(i, nirnir)t(irn x2r,xj)t (i, AX2/rxr)v (", ,.x2nir)v(x, Ax2A\)

Das könnte Ihnen auch gefallen