Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
7 views

Boolean Algebras Lecture Notes

Good for revision

Uploaded by

allankinuthia68
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Boolean Algebras Lecture Notes

Good for revision

Uploaded by

allankinuthia68
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

BOOLEAN ALGEBRA

By Dr. Runji F
Introduction:
In mathematics and mathematical logic, Boolean algebra is the branch
of algebra in which the values of the variables are the truth values true and
false, usually denoted 1 and 0, respectively.
Boolean algebra provides the operations and the rules for working with the
set {0,1}.
Electronic and optical switches can be studied using this set and the rules
of Boolean algebra.
The three operations in Boolean algebra that are mostly used are
complementation, the Boolean sum, and the Boolean product.
The complement of an element, denoted with a bar, is defined by 0  1
and 1  0 .
The Boolean sum, denoted by + or by OR, has the following values:
1+ 1 = 1,
1+0 = 1,
0+1 = 1,
0+0 = 0.
The Boolean product, denoted by (.) or by AND, has the following values:
1.1 = 1,
1· 0 = 0,
0· 1 = 0,
0· 0 = 0
The symbol (∙) can be deleted just as in algebraic product if there is no
danger of confusion.

Page 1 of 12
The order of Operations is as follows:
✓ Parenthesis
✓ Compliments
✓ Boolean product and finally
✓ Boolean sum

Page 2 of 12
Boolean Expressions and Boolean Functions
Let B  0,1 . Then Bn    x1, x2 ,..., xn  : xi B for 1  i  n  is the set of all possible
n-tuples of 0’s and 1’s.
The variable x is called a Boolean variable if it assumes values only from B,
that is, if its only possible values are 0 and l.
A function from B n to B is called a Boolean function of degree n.

Example:
Find the values of the Boolean function represented by 𝐹(𝑥, 𝑦, 𝑧) = 𝑥𝑦 + 𝑧̅
Solution:
The values of this function are displayed in Table below.

Note that we can represent a Boolean function graphically by


distinguishing the vertices of the n-cube that correspond to the n-tuples of
bits where the function has value 1.

Page 3 of 12
Equivalent Boolean functions
Boolean functions F and G of n variables are equal if and only if
F ( b1 , b2 , ..., bn )  G ( b1 , b2 , ..., bn ) whenever b1 , b2 , ... , bn belong to B.

Two different Boolean expressions that represent the same function are
called equivalent.
For instance, the Boolean expressions xy, xy + 0, and xy . 1 are equivalent.
The complement of the Boolean function F is the function 𝐹̅ , where
F ( x1 , x2 , ..., xn )  F ( x1, x2 , ..., xn )

. Let F and G be Boolean functions of degree n.


The Boolean sum F + G and the Boolean product F G are defined by
 F  G  x1,..., xn   F  x1,..., xn   G  x1,..., xn  ,  FG  x1 , ..., xn   F  x1 , ..., xn G  x1 , ..., xn 

A Boolean function of degree two is a function from a set with four


elements, namely: pairs of elements from B = {0, 1}, to B, a set with two
elements. Hence, there are 16 different Boolean functions of degree two.
In the table below we display the values of the 16 different Boolean
functions of degree two.

Page 4 of 12
Example: How many different Boolean functions of degree n are there?
Solution: From the product rule for counting, it follows that there are 2n
different n-tuples of 0’s and 1’s. Because a Boolean function is an
assignment of 0 or 1 to each of these 2n different n-tuples, the product rule
shows that there are 22 different Boolean functions of degree n.
n

Table 4 displays the number of different Boolean functions of degrees one


through six. The number of such functions grows extremely rapidly.

Page 5 of 12
Identities of Boolean Algebra
There are many identities in Boolean algebra. The most important of these
are displayed in Table 5. These identities are particularly useful in
simplifying the design of circuits. Each of the identities can be proved
using a table.
Example : Show that the distributive law x(y + z) = xy + xz is valid.
Solution: The verification of this identity is shown in the table below. The
identity holds because the last two columns of the table agree.
x y z 𝑦 + 𝑧 𝑥𝑦 𝑥𝑧 𝑥(𝑦 + 𝑧) 𝑥𝑦 + 𝑥𝑧
1 1 1 1 1 1 1 1
1 1 0 1 1 0 1 1
1 0 1 1 0 1 1 1
1 0 0 0 0 0 0 0
0 1 1 1 0 0 0 0
0 1 0 1 0 0 0 0
0 0 1 1 0 0 0 0
0 0 0 0 0 0 0 0

Page 6 of 12
Page 7 of 12
Example

Translate the distributive law (𝑥 + 𝑦𝑧) = (𝑥 + 𝑦)(𝑥 + 𝑧) into a logical


equivalence

Solution 𝑝 ∨ (𝑞 ∧ 𝑟) ≡ (𝑝 ∨ 𝑞) ∧ (𝑝 ∨ 𝑟)

Remark: The identities in Boolean algebra can be used to prove other


identities

Example

Prove absorption law 𝑥(𝑥 + 𝑦) = 𝑥 using identities of Boolean algebra

𝑥(𝑥 + 𝑦) = (𝑥 + 0)(𝑥 + 𝑦) Identity law for the Boolean sum

= 𝑥 + 0. 𝑦 Distributive law of Boolean sum over product

= 𝑥 + 𝑦. 0 commutative law

=𝑥+0 Domination law

=𝑥 Identity law

Duality
The dual of a Boolean expression is obtained by interchanging Boolean
sums and Boolean products and interchanging 0’s and 1’s.
Example

Find the duals of 𝑥(𝑦 + 0) & 𝑥̅ ∙ 1 + (𝑦̅ + 𝑧)

solutions; 𝑥 + (𝑦 ∙ 1)

(𝑥̅ + 0)(𝑦̅𝑧)

Example

Construct an identity from the absorption law 𝑥(𝑥 + 𝑦) = 𝑥 by taking duals

𝑥 + 𝑥𝑦 = 𝑥
Page 8 of 12
Abstract definition of a Boolean Algebra

Representing Boolean Functions


Sum-of-Products Expansions
Given the values of a Boolean function, a Boolean expression that
represents this function be found. This is possible since any Boolean
function can be represented by a Boolean sum of Boolean products of the
variables and their complements. Thus every Boolean function can be
represented using the three Boolean operators: (.),(+), and(ˉ).
The example below illustrates a procedure for constructing a Boolean
expression representing a function with given values. Each combination of
values of the variables for which the function has the value 1 leads to a
Boolean product of the variables or their complements.

Example : Find Boolean expressions that represent the functions


Page 9 of 12
F (x, y, z) and G(x, y, z), which are given in the table below
x y z F G
1 1 1 0 0
1 1 0 0 1
1 0 1 1 0
1 0 0 0 0
0 1 1 0 0
0 1 0 0 1
0 0 1 0 0
0 0 0 0 0
To represent F, we need an expression or expressions that equals 1and the
value 0 otherwise. Such an expression is row three with x=1, y=0, z=1.
Such an expression can be formed by taking the Boolean product of x,𝑦̅,
and z. This product, 𝑥𝑦̿𝑧 , has the value 1 if and only if 𝑥 = 𝑦̿ = 𝑧 = 1 ,
which holds iff 𝑥 = 𝑧 = 1 and 𝑦 = 0. Thus 𝐹(𝑥, 𝑦, 𝑧) = 𝑥𝑦̿𝑧.
To represent G, we need an expression that equals 1 when x = y = 1 and
z=0, or when x = z = 0 and y = I. We can form an expression with these
values by taking the Boolean sum of two different Boolean products.
The Boolean product 𝑥𝑦𝑧̿ has the value 1 if and only if x = y = 1 and z=0.
Similarly, the product 𝑥̅ 𝑦𝑧̅ has the value 1 if and only if x = z = 0 and y = 1.
The Boolean sum of these two products, 𝑥𝑦𝑧̅ + 𝑥̅ 𝑦𝑧̅ represents G, because it
has the value 1 if and only if x = y = 1 and z = 0 or x = z = 0 and y = 1.
Thus 𝐺(𝑥, 𝑦, 𝑧) = 𝑥𝑦𝑧̅ + 𝑥̅ 𝑦𝑧̅
Definition: A literal is a Boolean variable or the complement of a Boolean
variable
Definition: A minterm is a product of literals. More specifically, if there
are n variables, x1 , x2 , .., xn , a minterm is a product y1 y 2 .. y n where

yi is xi or x i

Definition: A sum-of-products expansion or disjunctive normal form of a


Boolean function is the function written as a sum of minterms.

Page 10 of 12
Example: Find the disjunctive normal form for the Boolean function F
defined by the table below

Example. Using properties of Boolean expressions, simply the expression

Page 11 of 12
Page 12 of 12

You might also like