0% found this document useful (0 votes)
151 views5 pages

Boolean Algebra of Two-Valued Functions

The document discusses: (1) The algebra of 2-valued Boolean functions, which consists of the sets {0,1} and the operations {∧,∨,¬}; (2) How Boolean functions can be represented by truth tables and formulas; (3) The laws of Boolean algebra including commutative, associative, distributive, negation, and De Morgan's laws; (4) How to derive equivalent transformations of Boolean formulas using these laws.

Uploaded by

Daria Sorokina
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
151 views5 pages

Boolean Algebra of Two-Valued Functions

The document discusses: (1) The algebra of 2-valued Boolean functions, which consists of the sets {0,1} and the operations {∧,∨,¬}; (2) How Boolean functions can be represented by truth tables and formulas; (3) The laws of Boolean algebra including commutative, associative, distributive, negation, and De Morgan's laws; (4) How to derive equivalent transformations of Boolean formulas using these laws.

Uploaded by

Daria Sorokina
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Topic7b.

Algebra of 2-valued Boolean functions

I remind you: algebra = set of objects + set of operations.

Def: 2-element Boolean algebra is two sets: {0,1} and {,, ˉ}.
(It is a set of two values and tree operations to manipulate these values)

Any Boolean function can be presented by its table.

Ex: f 27(x,y,z):

(n=3, function №27 27(decimal) = 11011(binary), 23 = 8 sets of argument values)

x y z f 27(x,y,z)
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 1

Any Boolean function can be presented by a formula (an expression consisting of


Boolean functions and their compositions).

Priority of Boolean functions in formulas:( ), ˉ, , ;

Note: in formulas we may omit ‘’. So xy = xy.


f 27(x,y,z) = x yzx y zxy z xyz = x yzx y zxy=

(xyz)(xy z )(x y z)( x  y z ).

Note: the same Boolean function can be presented by many equivalent formulas
Laws of 2-element Boolean algebra.
1. Commutative law:
a˅b=b ˅ a ;a ˄b = b˄a
2. Associative law:
(a˅ b) ˅ c = a ˅ (b ˅ c); (a˄b) ˄c = a˄(b˄c)
3. Distributive law:
a ˅ b ˄c=(a ˅ b) ˄ (a ˅c); a˄ (b ˅c)=a˄b˅a˄c
4. Law for constants:
a ˅ 0 =a; a ˅ 1=1;
a˄0 = 0; a˄ 1 = a
5. Elimination (absorption) laws:
a˅ a˄ b = a; a ˄ (a ˅ b) = a;
6. Idempotent laws:
a ˅ a = a; a ˄ a = a:
7. Negation laws:
a ˅ ā =1;(excluded middle) a ˄ ā = 0; (contradiction)
8. De Morgan’s laws:
a b = a ˄ b; a˄b = a  b;
9. a = a; (Double negation law)
H/a: prove laws3 and 8 by building truth tables.
Topic7c. Equivalent transformations of formulas of 2-valued
Boolean algebra.

F(x, y, z)= ( x ˄ y ˄ z ) ˄( x ˅ y ˅ z ) =
= ( x́ ˅ ý ˅ ź) ˄( x ˄ ý ˄ ź ) = (De Morgan’s)
=( x˅ y ˅ z) ˄ ( x ˄ y ˄ z) = (double negation)
=(x ˄ x ˄y˄z) ˅ (y˄ x ˄y˄z) ˅ ( z ˄ x ˄ y ˄ z) = (distributive, idempotent, contradiction)
0
= ( x ˄ y˄z)˅ ( x ˄ y ˄ z ) = ( x ˄ y ˄ z );

Building the truth table for a given formula of a 2-element Boolean function:
Given:f(x, y, z)=(x ˅ y )˄ ( x ˅ y ˄ z )
Set# x y z f(x, y, z)= (x ˅ y )˄ ( x ˅ y ˄ z )

0 0 0 0 ¿¿ = 0
1 0 0 1 ¿¿
2 0 1 0 ¿¿ = 0 = 1
3 0 1 1 ¿¿ = 0 = 1
4 1 0 0 ¿¿ = 0 = 1
5 1 0 1 ¿ ¿= 1
6 1 1 0 ¿¿ = 1 = 0
7 1 1 1 ¿¿ = 1
Building a formula by a truth table. A method based on 1-values of a Boolean
function.Given: a 2-values Boolean function:
x y z f(x, y, z)
0 0 0 0 0
1 0 0 1 1 x ˄ y ˄ z=1only for x=0, y=0, z=1
2 0 1 0 0
3 0 1 1 1 x ˄ y ˄ z=1 only for x=0, y=1, z=1
4 1 0 0 1 x ˄ y ˄ z=1 only for x=1, y=0, z=0
5 1 0 1 0
6 1 1 0 0 Minterm is a product of all variables taken
7 1 1 1 0 with proper negations.

f(x, y, z)= x ˄ y ˄ z ˅ x ˄ y ˄ z˅ x ˄ y ˄ z = x y z ˅ x yz˅ x y z .

This formula takes value 1 only on such sets of variable values:


x=0, y=0, z=1
x=0, y=1, z=1

x=1, y=0, z=0.

On other sets x, y, z – values (on other interpretations ) this function is equal to 0.


Definition: A formula of a Boolean function which is a disjunction of its minterms is
called its Perfect Disjunctive Normal Form (PDNF). In technical papers, such a
formula is called a Complete Sum of Products Form(CSPF).

We can pass from a table to a formula based on 0- values of the Boolean function.

f1(x, y, z) is given by its table.

x y z f1(x, y, z) x˅ y ˅ z. This formula =0 only for x=0, y=0,


0 0 0 0 z=0. On other sets of x, y, z – values it =1. It is
0 0 1 1 called a maxterm(=disjunction of all variables
0 1 0 1 taken with proper negations).
0 1 1 0
1 0 0 1 x˅ y ˅ z . This maxterm is equal to 0 only for x=0,
1 0 1 1 y=1, z=1.
1 1 0 0
x ˅ y ˅ z. This maxterm is equal to 0 only for
1 1 1 1
x=1, y=1, z=0.

f1(x, y, z) = (x˅y˅z) ˄ (x˅ y ˅ z ) ˄ ( x ˅ y ˅ z) = (x˅y˅z)(x˅ y ˅ z )( x ˅ y ˅ z).

Now let x=0, y=1, z=1.

f1(x, y, z) = (x˅y˅z)(x˅ y ˅ z )( x ˅ y ˅ z)= 0

1 0 1

Let x=0, y=1, z=0

f1(x, y, z= (x˅y˅z)(x˅ y ˅ z )( x ˅ y ˅ z)= 1

1 1 1

Such a formula which is a conjunction of maxterms is called the Perfect Conjunctive


Normal Form(PCNF) or more frequenly: Complete Product-of-Sums
Form(CPSF).

You might also like