KENYATTA UNIVERSITY
DEPARTMENT OF COMPUTING AND INFORMATION
SCIENCE
Lesson 2: Boolean Algebra
Ojwang D.O.
05/31/2025 ELECTRONICS 1
LAWS AND RULES OF BOOLEAN
ALGEBRA
• Boolean algebra is used to express logic circuits mathematically.
• It is used to simplify logic circuits thus minimizes amount of logic
gates used to perform a specific function
05/31/2025 ELECTRONICS 2
Rules of Boolean Algebra
• There are 14 basic rules that are useful in manipulating and
simplifying Boolean expressions.
• Rules 1 through 9 will be viewed in terms of their application to logic
gates.
• Rules 10 through 14 can be derived in terms of the simpler rules (1
through 9)
05/31/2025 ELECTRONICS 3
Basic rules of Boolean
1.algebra
A+0=A
2. A+1=1
3. A.0 = 0
4. A.1 = A
5. A+A=A
6. A + A’ = 1
7. A.A = A
8. A. A = 0
9.
A =A
10. A + AB = A
11. A + A’ B = A + B
12 (A + B) (A+C) = A + BC
13 AB + A’C + BC = AB + A’C
14 (A+B)(A’+C)(B+C)=(A+B)(A’+C)
05/31/2025 ELECTRONICS 4
15. Commutative theorems: A+B=(B+A)
A.B=B.A (Inputs of a gate are interchangeable)
16. Associative Theorems: A + (B+C) = (A+ B) + C
A.(B.C)=(A.B).C/ A+(B.C) NOT EQUAL TO (A+B).C
17. Distributive Theorems: A.(B+C)=A.B +A.C
(A+B).(C+D)= AC+BC+AD+BD
18 DE Morgan's theorem (A+B)’=A’.B’
(A.B)’=A’+B’
Y=(A’+B’)’=A.B
05/31/2025 ELECTRONICS 5
Proof of rules 10,11 & 12
Rule 10
A + AB = A
We use rule 2, 4 and distributive law to prove the left side
A + AB
=A.1 + A.B
=A(1+B), Distributive law, rule 2
=A.1, rule 2
=A , rule 4
05/31/2025 ELECTRONICS 6
Rule 11
A + A’B = A + B
Left side A + A’B
= A.1 + A’B, rule 4
= A(1+B) + A’B , rule 2
= A.1 + A.B + A’B, rule 12
= A + B(A +A’), rule 4 and 12
=A + B.1, rule 6
= A + B, rule 4
05/31/2025 ELECTRONICS 7
Rule 12
(A + B) (A+C) = A + BC
Students to try this??
05/31/2025 ELECTRONICS 8
Commutative Laws
• The commutative law of addition for two variables is written as A+B =
B+A
• The law means the inputs of a gate are interchangeable
05/31/2025 ELECTRONICS 9
Illustration
A Y= A+B B Y= B+A
B
≡ A
illustrates the commutative law as applied to the OR
gate and shows that it doesn't matter to which input
each variable is applied. (The symbol ≡ means
"equivalent to.").
05/31/2025 ELECTRONICS 10
The commutative law of
multiplication for two variables is
• A.B = B.A
• This law states that the order in which the variables are ANDed makes
no difference.
05/31/2025 ELECTRONICS 11
Illustration
A Y=A.B B Y=B.A
B
≡ A
illustrates this law as applied to the AND gate
05/31/2025 ELECTRONICS 12
Associative Laws :
• This law states that when ORing or ANDing more than two variables,
the result is the same regardless of the grouping of the variables.
• A+(B.C)=(A+B).C NB/ Not equal to each other
• Note that the operation (./+) in the function must be the same
05/31/2025 ELECTRONICS 13
Distributive Law
• This law states that ORing two or more variables and then ANDing the
result with a single variable is equivalent to ANDing the single variable
with each of the two or more variables and then ORing the products.
• The distributive law also expresses the process of factoring in which
the common variable A is factored out of the product terms
05/31/2025 ELECTRONICS 14
Idempotence Law
05/31/2025 ELECTRONICS 15
Absorption Law
05/31/2025 ELECTRONICS 16
Involutionary
05/31/2025 ELECTRONICS 17
BOOLEAN ANALYSIS OF
LOGIC CIRCUITS
• Boolean algebra provides a concise way to express the operation of a
logic circuit formed by a combination of logic gates so that the output
can be determined for various combinations of input values
• To derive the Boolean expression for a given logic circuit, begin at the
leftmost inputs and work toward the final output, writing the
expression for each gate.
05/31/2025 ELECTRONICS 18
• For example circuit in Fig in the next slide, the Boolean expression is
determined as follows:
• The expression for the left-most AND gate with inputs C and D is CD.
• The output of the left-most AND gate is one of the inputs to the OR gate and
B is the other input. Therefore, the expression for the OR gate is B + CD.
• The output of the OR gate is one of the inputs to the right-most AND gate
and A is the other input.
• Therefore, the expression for this AND gate is A(B + CD), which is the final
output expression for the entire circuit.
05/31/2025 ELECTRONICS 19
A logic circuit showing the
development of the Boolean
expression for the output.
C
D CD
B B+CD
A(B+CD)
A
05/31/2025 ELECTRONICS 20
DeMorgan’s Theorem
• Whenever bar over a Boolean expression is broken, the sign inside
the bar changes from OR to AND and vice versa.
• An AND gate can be replaced with an OR gate with inverted inputs (see (i))
• An OR gate can be replaced with an OR gate with inverted inputs (see (ii))
05/31/2025 ELECTRONICS 21
Examples
05/31/2025 ELECTRONICS 22
05/31/2025 ELECTRONICS 23
05/31/2025 ELECTRONICS 24
05/31/2025 ELECTRONICS 25
05/31/2025 ELECTRONICS 26
05/31/2025 ELECTRONICS 27
05/31/2025 ELECTRONICS 28
Examples
05/31/2025 ELECTRONICS 29