Download as pdf or txt
Download as pdf or txt
You are on page 1of 23

Boolean Algebra

Why study Boolean Algebra?

It is highly desirable to find the simplest circuit implementation


(logic) with the smallest number of gates or wires.

We can use Boolean minimization process to reduce a Boolean


function (expression) to its simplest form: The result is an
expression with the fewest literals and thus less wires in the
final gate implementation.

1
Boolean Algebra (continued)

▪ George Boole (1815-1864), a mathematician introduced a


systematic treatment of logic.
▪ He developed a consistent set of postulates (assumptions)
that were sufficient to define a new type of algebra: Boolean
Algebra (similar to Linear Algebra)
▪ Many of the rules are the same as the ones in Linear
Algebra.
▪ Boolean Algebra is defined by a set of elements, B,
together with two binary operators + and .
▪ Boolean Functions can represent electrical circuits.
2
Difference between Postulates & Theorems

Postulate
– A basic assumption that is accepted without proof
– Accepted as true in order to provide a basis for logical
reasoning

Boolean Postulates proposed by George Boole (1815-1864) are


assumptions that serve as basis for the Boolean Algebra

Theorem
– A statement which has been proved or can be proved to be
true using logical (deductive) reasoning
– A proposition deducible from basic postulates 3
Two Valued Boolean Algebra

• Set of two Elements B={0,1}


• Two Binary Operators + and .
• Two Valued Boolean Algebra having a set of two elements
{0,1}, two binary operators has operation rules similar to
AND and OR operations and Complement Operator
equivalent to NOT operator.
• Use Boolean Algebra to represent Binary Logic
• Boolean Function F1 = x + y ' z

4
Two Valued Boolean Algebra

• Closure➔ x + y is in B and x . y=is in B


– Obvious as result either 0 or 1
• Identity➔ (1.x=x) and (0+x=x)
• Commutative ➔x + y = y + x and x . y = y . x
– Can be proved from the Truth Table
• Distributive ➔ x + (y.z) = (x + y)(x + z) and x.(y + z) = (x.y) + (x.z)
– Can be proved from the Truth Table
• Associative ➔(x + y) + z = x + (y + z) = x + y + z and (xy)z = x(yz) = xyz
– Can be proved from the Truth Table
• Complement➔ x + x’ = 1 and x.x’=0
– X+X’=1➔ 0 +0’=0+1=1 and 1+1’=1+0=1
– X.X’=0 ➔ 0.0’ = 0.1 =1 and 1.1’ =1+0=1

5
Postulates & Theorems of Boolean Algebra
▪ Postulate 2 - Identity a) X + 0 = X b) X . 1 = X
▪ Postulate 3 – Commutative a) X + Y = Y + X b) X . Y = Y.X
▪ Postulate 4- Distributive
a) X . (Y + Z) = (X .Y) + (X . Z)
b) X + (Y . Z) = (X+Y) . (X+Z)
▪ Postulate 5 – Associative
a) (x + y) + z = x + (y + z) = x + y + z
b) (xy)z = x(yz) = xyz
▪ Postulate 6 – Complement a) X + X’ = 1 b) X . X’ = 0

▪ Theorem 1 a) X+X = X b) X.X=X


▪ Theorem 2 a)X+1=1 b) X.0=0
▪ Theorem 3 (X’)’=X
▪ Theorem 4 a) X+(Y+Z)=(X+Y)+Z b) X(YZ)= (XY)Z
▪ Theorem 5 a) (X+Y)’ = X’Y’b) (XY)’=X’+Y’
▪ Theorem 6 a) X+ XY=X b) X(X+Y)=X 6
Duality principal

• Every algebraic expression deducible from


postulates of Boolean Algebra remain valid if
the operators and identity elements are
interchanged
– In postulates part (a) if binary operators are
interchanged then we get postulate part (b)

• If dual of an Algebraic Expression is desired,


we simply interchange OR and AND
7
Laws of Boolean Algebra

• There are 6 fundamental laws, or axioms, used to formulate


various algebraic structures:

1. Closure: Boolean algebra operates over a field of numbers, B = {0,1}

For every x, y in B:
▪ Closure with respect to +
x + y is in B
(1,0)
(1,0) (1,0)
▪ Closure with respect to .
x . y is in B
(1,0)
(1,0) (1,0)
8
Laws of Boolean Algebra (continued)
2. Identity laws:
▪ A set B is said to have an identity element with
respect to a binary operation {.} on B if there exists an
element designated by 1 in B with the property: 1 . x = x
Example: AND operation

▪ A set B is said to have an identity element with respect


to a binary operation {+} on B if there exists an element
designated by 0 in B with the property: 0 + x = x
Example: OR operation

» Similar to Linear Algebra 9


Laws of Boolean Algebra (continued)

3. Commutative laws: For every x, y in B,


▪ Commutative with respect to +
x+y=y+x
» Similar to Linear Algebra
▪ Commutative with respect to .
x.y=y.x

x x
F=x+y F = x.y
y y
y y F = y.x
F=y+x
x x

10
Laws of Boolean Algebra (continued)

4. Distributive laws: For every x, y, z in B,


• x + (y.z) = (x + y)(x + z) [+ is distributive over .]
» NOT Similar to Linear Algebra

• x.(y + z) = (x.y) + (x.z) [. is distributive over +]


» Similar to Linear Algebra

11
Laws of Boolean Algebra (continued)

5. Associative laws: For every x, y, z in B,


▪ (x + y) + z = x + (y + z) = x + y + z
▪ (xy)z = x(yz) = xyz
» Similar to Linear Algebra

x
F = xyz
y
z

z
F = xyz
y
x
12
Laws of Boolean Algebra (continued)

6. Complement
For each x in B, there exists an element x’ in B (the
complement of x) such that:
• x + x’ = 1
• x . x’ = 0

We can also use x to represent complement.

13
Laws of Boolean Algebra (continued)

14
Implementation of Boolean Functions

Draw the logic diagram for the following function: F = (a.b)+(b.c)

a
b
F

15
Implementation of Boolean Functions

F1 = x + y ' z
Boolean Function expresses logical relationship between binary variables
F1 is 1 if X=1 or if Y=0 and Z=1
Boolean Function can be represented by Truth Table (2n rows)

x F1

y 16
z
Implementation of Boolean Functions

Example 2: F2 = x' y ' z + x' yz + xy '

F2
z

17
Implementation of Boolean Functions
▪ Try another implementation using a simplified F2:
F2 = x' y ' z + x ' yz + xy'
= x' z ( y '+ y ) + xy' Distributive Pos

= x' z (1) + xy' Complement Pos

= x ' z + xy'
x
y
F2

•This implementation has fewer gates and fewer inputs


to the gates (or wires) than the previous one. 18
Simplifying Boolean Functions
▪ Simplify the following Boolean function to a minimum
number of terms:
F3 = xy + x' z + yz
= xy + x' z + yz( x + x' ) Identity .1 is same & Complement Pos (x.x’)=1

= xy + x' z + xyz + x' yz Distributed Pos

= xy + xyz + x' z + x' yz Rearrange order

= xy(1 + z ) + x' z (1 + y ) Distributed Pos

= xy + x' z Theorem 2 (X+1 =1)

x
y
F3

z 19
20
Complement of a Function
▪Theorem 5 (X+Y)’ = X’Y’ (XY)’=X’+Y’

(A+B+C+D+…+F)’= A’B’C’D’…. F’
(ABCD…F)’ = A’+B’+C’+D’+… + F’

The complement of a Function F is F’ is obtained by taking dual of


the function and complement each literal
F1=X’YZ’ +X’Y’Z
Dual of F1 is = (X’+Y+Z’)(X’+Y’+Z) - Interchange AND and OR in function
Complement each literal (X+Y’+Z)(X+Y+Z’) = F1’

21
More on complements (DeMorgan)
Theorem 5, DeMorgan (X+Y)’ = X’Y’ and (XY)’=X’+Y’

▪ Find the complement of: ▪ Show that the complement of x( x + y ) = x'


F = ( AB '+C ) D '+ E [ x ( x + y )]' = x'+ ( x + y )'
F ' = [( AB '+C ) D '+ E ]' = x'+ x ' y '
= [( AB '+C ) D ' ]' E '
= x ' (1 + y ' ) Distributed Pos
= [( AB '+C )'+ D ' ' ]E '
= x ' (1) = x' Theorem 2 (X+1 =1)
= [( AB ' )' C '+ D ]E '
= ( A'+ B )C ' E '+ DE '

22
23

You might also like