0% found this document useful (0 votes)
23 views55 pages

CLD L5

Uploaded by

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

CLD L5

Uploaded by

Ara K.b
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

Lecture-5

Boolean Algebra

SHIVAN SHKUR
LECTURER
Boolean Operations and Expressions

⦿ Addition ⦿ Multiplication
0*0=0
0+0=0
0*1=0
0+1=1
1*0=0
1+0=1
1*1 =1
1+1=1
Law and Rule of Boolean Algebra

⦿ Commutative Laws
⦿ Associative Laws

⦿ Distributive Law
Law of Boolean Algebra

⦿ Commutative Law of Addition:


A+B=B+A

⦿ Commutative Law of Multiplication:


A.B = B.A
Law of Boolean Algebra

⦿ Associative Law of Addition:


A + (B + C) = (A + B) + C

⦿ Associative Law of Multiplication:


A.(B.C) = (A.B).C
Law of Boolean Algebra

⦿ Distributive Law:
A(B + C) = AB + AC
Rule of Boolean Algebra
Rule of Boolean Algebra
⦿ Rule 1 A+ 0 =A OR Truth Table

⦿ Rule 2 A+ 1 = 1

⦿ Rule 3 A. 0 = 0 AND Truth Table


Rule of Boolean Algebra
⦿ Rule 4 A. 1 =A

⦿ Rule 5 A+A=A

⦿ Rule 6 A+A= 1
Rule of Boolean Algebra
⦿ Rule 7 A.A=A

⦿ Rule 8 A.A= 0

⦿ Rule 9 A=A
Rule of Boolean Algebra
⦿ Rule 10 A + AB = A

AND Truth Table OR Truth Table

⦿ Rule 10: (Proof) A + AB = A


1
A + AB = A(1 + B) Factoring (Distributive law)

=A Rule 2: (1 + B) = 1
Rule of Boolean Algebra
⦿ Rule 11 A + AB = A + B AND Truth Table OR Truth Table

⦿ Rule 11: (Proof) A + AB = A + B


A + AB = A + AB + AB Rule 10: A=A+AB
1
= A + B(A + A) Factoring
= A + B(1) Rule 6: A + A =1
= A+B Rule 4: Drop the 1
Rule of Boolean Algebra
⦿ Rule 12 (A + B)(A + C) = A + BC

AND Truth Table OR Truth Table

⦿ Rule 12: (Proof) (A + B)(A + C) = A + BC


• (A + B)(A + C)=AA+AC+AB+BC
• Distribution law Rule 7: AA=A
= A + AC + AB + BC
• Factoring(Distrib. law)
= A(1+C) + AB + BC
• Rule 2: 1+C = 1
= A.1 + AB + BC
•Factoring(Distrib. law) Rule 2: 1+B = 1
= A(1 + B) + BC

= A + BC
Demorgan’s Theorem

⦿ Theorem 1
XY = X + Y

⦿ Theorem 2
X + Y = XY
Remember:
“Break the bar,
change the sign”
Demorgan’s Theorem

⦿ Theorem 1 XY = X + Y
Demorgan’s Theorem
⦿ Theorem 2 X + Y = XY
Demorgan’s Theorem
⦿ Ex 1: Apply Demorgan’s theorem to the following expressions:

XYZ and X+Y+Z


Sol.:
XYZ = X + Y + Z

X+Y+Z =X Y Z
Demorgan’s Theorem

⦿ Ex 2: Apply Demorgan’s theorms to the following


expression:

X+Y+Z
Sol.:
X+Y+Z = X Y Z =XYZ
Demorgan’s Theorem

⦿ Ex 3: Apply Demorgan’s theorms to the following


expression:
(AB + C)(A+BC)
Sol.:
=
(AB + C)(A+BC) (AB + C) + (A+BC)
= (AB . C) + (A . BC)

= (A + B) C + A (B + C)
Boolean Algebra (Examples)

⦿ Ex 1: Prove that AB + BC +BC = AB + C


Sol.:
AB + BC + BC = AB + C(B + B)
= AB + C.1

= AB + C
Boolean Algebra (Examples)
⦿ Ex 2: Simplify the expression
Sol.
Boolean Algebra (Examples)

⦿ Ex 3: If AB + AB = C show that AC + AC = B

Sol.: AC + AC = A(AB + AB) + A(AB + AB)

= A(AB).( AB) + A(AB + AB)


= A(A+B).(A+B) + A(AB + AB)

= (AA+AB).(A+B) + AAB + AAB


0 0 0
= AAA+AAB +AAB+ABB+AAB + AAB

= 0 +0 +AB+0+0 + AB
= AB+ AB = B(A+ A)
= B
Standard form of Boolean Expressions
⦿A Boolean function expressed algebraically can be expressed in a variety
of ways.

⦿ The standard forms contain product (AND) terms and


Sum (OR) terms.
⦿ EX:
XYZ (Product term)
X+Y+Z (Sum term)

⦿ All Boolean expressions can be converted into either of two forms:


- sum-of-product (SOP) form, or
- product-of-sum (POS) form.
Sum of product (SOP) form

Sum-of-Product: Two or more product terms are summed by


Boolean addition.

Note: SOP can have the term ABC but not ABC
Sum of product (SOP) form
⦿ AND/OR implementation of a SOP Expression
EX: X=AB + BCD + AC
Sum of product (SOP) form

⦿ Conversion of a general expression to SOP form:


• Any logic expression can be converted into SOP form by applying
Boolean algebra techniques.

EX: A(B+CD)

Can be converted into SOP using distribution law:

A(B+CD)=AB+ACD
Conversion Of A General Expression To SOP Form
⦿ Examples: convert the following forms into SOP form.

a) AB + B(CD + EF) = AB+BCD+BEF

b) (A + B) (B + C + D) = AB+AC+AD+BB+BC+BD
= AB+AC+AD+B+BC+BD

c) (A + B + C) =(A + B) C =(A + B) C =AC + BC


Minterms

⦿Aproduct term in which all the variables of the domain appear


exactly once, either complemented or uncomplemented.
⦿It represents exactly one combination of binary variable values
in the truth table.

⦿It has the value 1 for that combination and 0 for all others.

⦿There are 2n distinct minterms for n variables.

⦿Each minterm is a product of n variables.


Minterms

⦿ In the truth table, if the bit = 0 , the corresponding variable


of the minterm is complemented.

⦿ Inthe truth table, if the bit = 1 , the corresponding variable of


the minterm is uncomplemented.
⦿ The symbol of the minterm is mi

where i is the decimal equivalent of the binary combination


corresponding to the minterm.
Minterms

⦿ Ex:
The standard SOP Form

⦿ Standard SOP: is a Sum-of-Minterm expression in which all the


variables in the domain appear in each product term of the
expression.

EX: ABC+ABC+ABC (standard SOP expression)


EX: ABCD + ABC ( nonstandard SOP, because D is missing )
Converting product term to standard SOP form

⦿ Method:

Step 1: Multiply the nonstandard product term by 1 (sum of


missing variable and its complement).

Step 2: Repeat step 1 until all resulting product terms


contain all variables in the domain.
Converting product term to standard SOP form

⦿Ex: Convert the following Boolean expression into standard


SOP form:
Sol.:
Product of Sum (POS) Form

Product-of-Sum: Two or more sum terms are multiplied.


(A + C)(A+B+C)

(A+B+C)(C+D+E)(B+C)

X(X+Y+Z)(X+Z)

Note: POS can have the term (A+B+C ) but not (A+B+C)
Product of Sum (POS) Form

⦿ Implementation of POS Expression

EX:X=(A+B)(B+C+D)(A+C)
Maxterms
⦿Maxterm: A sum term that contains all the variables in
complemented or uncomplemented form.
-It is possible to formulate 2n distinct Maxterms for n variables.
⦿ Each Maxterm is a logical sum of n variables.
⦿ Each variable is complemented if the corresponding binary bit is
1,and uncomplemented if the corresponding binary bit is 0.
⦿ Thesymbol of the Maxterm is Mi
Where i is the decimal equivalent of the binary combination
corresponding to the Maxterm.
Maxterms

⦿ The value of the Maxterm is 0 for the corresponding combination


and 1 for all other combinations.
Notes:
• A minterm and a maxterm of the same subscript are the
complements of each other
(Mi= mi ) and (mi = Mi )

Ex: M3 = X + Y + Z = X Y Z = m3
Maxterms

⦿ Ex:
Truth Table Notation for Minterms and Maxterms

⦿Minterms and Maxterms are easy x y z Minterm Maxterm


to denote using a truth table. 0 0 0 x y z = m0 x+y+z = M0
⦿ Example: 0 0 1 x y z = m1 x+y+z = M1
Assume 3 variables x,y,z
0 1 0 x y z = m2 x+y+z = M2
(order is fixed)
0 1 1 x y z = m3 x+y+z= M3
1 0 0 x y z = m4 x+y+z = M4
1 0 1 x y z = m5 x+y+z = M5
1 1 0 x y z = m6 x+y+z = M6
1 1 1 x y z = m7 x+y+z= M7
Truth Table Notation for Minterms and Maxterms

⦿ Standard POS: is a product-of-Maxterm expression in which all the


variables in the domain appear in each sum term of the
expression.

EX: (A+B+C)(A+B+C)(A+B+C) (standard POS expression)

EX: (A+B+C+D)(A+B+C) ( nonstandard POS,because D is missing )


Converting sum term to standard POS Form

⦿ Method:

Step 1: Add “0” to each nonstandard sum term (product of missing


variable and its complement)

Step 2: Apply the rule: A + BC = (A+B)(A+C)

Step 3: Repeat step 1 until all resulting sum terms contain all
variables in the domain.
Converting sum term to standard POS Form

⦿ Ex: Convert the following Boolean expression into standard


POS form:
Sol.:
Boolean Function using standard SOP and POS form

⦿ AnyBoolean function F( ) can be expressed as a


unique sum of minterms and a unique product of
maxterms (under a fixed variable ordering).

⦿ Inother words, every function F() has two


standard forms:

Standard Sum-Of-Products (sum of minterms)


Standard Product-Of-Sums (product of maxterms)
Standard SOP and POS form

⦿ Standard Sum-Of-Products:
The minterms included are those mi such that F( ) = 1 in
row i of the truth table for F( ).

⦿ Standard Product-Of-Sums:
The maxterms included are those Mi such that F( ) = 0 in
row i of the truth table for F( ).
Standard Forms of Boolean Expressions

“An algebraic expression of a Boolean function can be derived


from the truth table by finding a logical Sum of Product (SOP)
terms for which the function assumes the binary value 1”

“An algebraic expression of a Boolean function can be derived


from the truth table by finding a logical Product of Sum (POS)
terms for which the function assumes the binary value 0”
Boolean Functions using standard SOP & POS forms

⦿ Observe that: mi = Mi
Shorthand:

⦿ f1(a,b,c)= ∑ m(1,2,4,6), where ∑ indicates that this is a sum-of-products


form, and m(1,2,4,6) indicates that the minterms to be included are m1,
m2, m4, and m6.

⦿ f1(a,b,c)= ∏ M(0,3,5,7), where ∏ indicates that this is a product-of-


sums form, and M(0,3,5,7) indicates that the maxterms to be
included are M0, M3, M5, and M7.

⦿ Since mi = Mi for any i,


∑ m(1,2,4,6) = ∏ M(0,3,5,7) = f1(a,b,c)
Conversion between standard forms

⦿ Replace∑ with ∏ (or vice versa) and replace those i’s that
appeared in the original form with those that do not.
Converting standard SOP to standard POS Form

⦿ Method

Step 1: Determine the binary numbers that represent the product term

Step 2: Determine all the binary numbers not included in step 1.

Step 3: write the equivalent sum term for each binary number of step 2.
Converting standard SOP to Standard POS Form

⦿ Ex: Convert the following SOP expression to an equivalent POS.

Sol:
Step 1: Binary numbers of the product terms

Step 2: The remaining binary numbers not included in step 1

Step 3: The equivalent POS (binary no.s that make sum term 0)
Converting SOP Expression to truth table Format
⦿Ex: Develop a truth table for the standard SOP expression

Sol: Domain= 3 variables è 23 = 8 combinations


Converting POS Expression to truth table Format

⦿Ex: Develop a truth table for the standard POS expression

Sol: Domain= 3 variables è 23 = 8 combinations


Converting POS & SOP Expression from truth table
⦿ Ex:
From the truth table below, determine the standard POS and
SOP expressions
Standard SOP

Sol: The resulting standard SOP:


Converting POS & SOP Expression from truth table
Standard POS

Sol:
The resulting standard POS:
Questions

You might also like