MC - Lecture Slides - 01 Boolean Algebra
MC - Lecture Slides - 01 Boolean Algebra
(IT1030)
Lecture 2
Boolean Algebra
Boolean Algebra
• A variable used in an algebraic formula so far, is assumed to
take a set of numerical values.
• All variables in boolean equations can take only one of two
possible values.
• Used symbols for the two values are 0 and 1.
• Rules first defined for logic by George Boole (1854), were
adapted for the use in designing electronic circuits.
• The circuits in computers and other electronic devices have
inputs, each of which is either a 0 or a 1.
11/02/2019 2
Boolean Algebra (cont'd.)
• One major advantage in using these rules is to simplify an
electronic circuit.
• Boolean algebra provides the operations and the rules for
working with boolean variables.
• Three (3) boolean operators are discussed.
• Complement
• Boolean sum
• Boolean product
• Ten (10) rules are also discussed (aka Boolean Identities).
11/02/2019 3
Boolean Operators
• Complement
• Defined as the opposite of the value that a boolean variable takes.
• Denoted with a bar (E.g.: A).
• 0 = 1 and 1 = 0.
• Boolean Sum
• Defined as the output to be 1 if at least one variable is 1.
• Denoted with the symbol + or by OR.
• 0 + 0 = 0, 0 + 1 = 1, 1 + 0 = 1 and 1 + 1 = 1.
11/02/2019 4
Boolean Operators (cont'd.)
• Boolean Product
• Defined as the output to be 0 if at least one variable is 0.
• Denoted with the symbol ( ∙ ) or by AND.
• 0 ∙ 0 = 0, 0 ∙ 1 = 0, 1 ∙ 0 = 0 and 1 ∙ 1 = 1.
• When there is no danger of confusion, the symbol ∙ can be omitted.
11/02/2019 6
Boolean Identities (cont'd.)
5. Commutative Laws
• A+B=B+A
• A∙B=B∙A
6. Associative Laws
• A + (B + C) = (A + B) + C
• A ∙ (B ∙ C) = (A ∙ B) ∙ C
7. Distributive Laws
• A ∙ (B + C) = (A ∙ B) + (A ∙ C)
• A+B∙C= A+B ∙ A+C
11/02/2019 7
Boolean Identities (cont'd.)
8. De Morgan’s Laws
• A∙B =A+B
• A+B =A∙B
9. Absorption Laws
• A ∙ (A + B) = A
• A+A∙B=A
10. Inverse Laws / Unit & Zero Properties
• A+A=1
• A∙A=0
11/02/2019 8
Examples
1. Find the values of the following expressions.
i. 1 ∙ 0
ii. 1 + 1
iii. 1 + 0
2. Prove both variants of the absorption law using other
boolean identities.
3. Simplify the following expressions.
i. ABD + ABD
ii. (A + B) A + B
iii. M = WXYZ + WXYZ + WXYZ + WXYZ
11/02/2019 9
Truth Tables
• To verify the above rules, a truth table can be used.
• It’s also known as a Table of Combinations.
• It’s a table displaying all possible values for the variables and
the outcomes for a boolean expression.
• If there are n number of variables, there will be 2n number
of rows in the truth table.
• If the truth table for two boolean expressions shows the same
outcomes for the same values for the variables, it can be
concluded that the expressions are the same/equal.
11/02/2019 10
Examples
1. Use a table to express the values of each of these Boolean
functions.
i. AB
ii. M = xy + xyz
iii. F x, y, z = y xz + xz
11/02/2019 11
Sum of Products (SoP)
• In some cases, the truth table might be known and we might
want to know the expression that gives the truth table.
• This can be done by representing as a Sum of Products (SoP)
of the variables and their complements.
• Steps:-
1. Select the rows in the truth table that gives 1 as the outcome.
2. Write how we can obtain 1 for the first selected row by using the
product of the variables.
3. Repeat step two for all selected rows and use the sum to combine
all results.
11/02/2019 12
Example
Find the boolean expression for F from the given truth table.
A B C F
0 0 0 1
0 0 1 0
0 1 0 1
0 1 1 1
1 0 0 0
1 0 1 0
1 1 0 1
1 1 1 1
11/02/2019 13
Product of Sums (PoS)
• Used for the same reason as a SoP.
• Product of Sums (PoS) has opposite steps of SoP.
• Steps:-
1. Select the rows in the truth table that gives 0 as the outcome.
2. Write how we can obtain 0 for the first selected row by using the
sum of the variables.
3. Repeat step two for all selected rows and use the product to
combine all results.
• Conversion can be done between the two using De Morgan’s
rule.
11/02/2019 14
Duality Principle
• In a boolean expression, if all the sums (+) and products ( ∙ )
are exchanged as well as if 1’s and 0’s are exchanged, the
resulting expression is the opposite of the initial expression.
11/02/2019 15
11/02/2019 16
Summary
• Students should be able to,
• Understand the boolean expressions.
• Learn laws and rules of boolean algebra.
• Simplify boolean expressions using boolean identities.
• Use Sum of Products (SoP) and Product of Sums (PoS) to find
boolean expressions.
• Understand similarities and differences between boolean variables
as opposed to regular variables.
11/02/2019 17
End of Lecture 2
Next Lecture:-
Logic Gates