Boolean Laws and Implementation
Boolean Laws and Implementation
Chapter 4
Boolean algebra
4.1 Definition
Boolean algebra is the mathematics of digital logic in which the values of the
variables are the truth values true and false, usually denoted 1 and 0,
respectively. Basic knowledge of Boolean algebra is indispensable to the study
and analysis of logic circuits. Variable, complement, and literal are terms used
in Boolean algebra. A variable is a symbol (usually an italic uppercase letter
or word) used to represent an action, a condition, or data. Any single variable
can have only a 1 or a 0 value. The complement is the inverse of a variable
and is indicated by a bar over the variable (overbar).
There are four connecting symbols used in Boolean algebra.
1. Equal sign (=): This refers to the sign of equality as in mathematics.
2. Multiplication sign (·): It refers to the AND operation.
3. Plus sign (+): This refers to the OR operation.
4. Inversion sign (‘) or (−): This operation performs a complement of the input
given to the logic gate.
The basic laws of Boolean algebra—the commutative laws for addition and
multiplication, the associative laws for addition and multiplication, and the
distributive law—are the same as in ordinary algebra. Each of the laws is
illustrated with two or three variables, but the number of variables is not
limited to this.
54
This law states that it makes no difference in what order the variables are
grouped when ANDing more than two variables. Figure illustrates this law
as applied to 2-input AND gates.
The table below lists 12 basic rules that are useful in manipulating and
simplifying Boolean expressions.
Rule 1: A + 0 = A
A variable ORed with 0 is always equal to the variable. If the input variable A
is 1, the output variable X is 1, which is equal to A. If A is 0, the output is 0,
which is also equal to A.
Rule 3: 𝑨 . 𝟎 = 𝟎
A variable ANDed with 0 is always equal to 0. Any time one input to an AND
gate is 0, the output is 0, regardless of the value of the variable on the other
input.
57
Rule 4: 𝑨 . 𝟏 = 𝑨
A variable ANDed with 1 is always equal to the variable. If A is 0, the output
of the AND gate is 0. If A is 1, the output of the AND gate is 1 because both
inputs are now 1s.
Rule 5: A+A=A
A variable ORed with itself is always equal to the variable. If A is 0, then
0 + 0 = 0; and if A is 1, then 1 + 1 = 1.
Rule 6: 𝑨 + 𝑨 = 𝟏
A variable ORed with its complement is always equal to 1. If A is 0, then
0 + 0 = 0 + 1 = 1. If A is 1, then 1 + 1 = 1 + 0 = 1.
58
Rule 7: 𝑨 ∙𝑨=𝑨
A variable ANDed with itself is always equal to the variable. If A = 0, then
0 #0 = 0; and if A = 1, then 1 #1 = 1.
Rule 8: 𝑨 ∙ 𝑨 = 𝟎
A variable ANDed with its complement is always equal to 0. Either A or A
will always be 0; and when a 0 is applied to the input of an AND gate, the
output will be 0 also.
̅=𝑨
Rule 9: 𝑨
The double complement of a variable is always equal to the variable. If you
start with the variable A and complement (invert) it once, you get A. If you
then take A and complement (invert) it, you get A, which is the original
variable.
59
Rule 10: A + AB = A
This rule can be proved by applying the distributive law, rule 2, and rule 4 as
follows:
𝐴 + 𝐴𝐵 = 𝐴 . 1 + 𝐴𝐵 = 𝐴 (1 + 𝐵) Factoring (distributive law)
= 𝐴 . 1 Rule 2: (1 + 𝐵) = 1
= 𝐴 Rule 4: 𝐴 . 1 = 𝐴
The proof is shown in below, which shows the truth table and the resulting
logic circuit simplification.
Rule 11: 𝑨 + 𝑨𝑩 = 𝑨 + 𝑩
This rule can be proved as follows:
𝐴 + 𝐴𝐵 = (𝐴 + 𝐴𝐵) + 𝐴𝐵 Rule 10: A = A + AB
=(𝐴𝐴 + 𝐴𝐵) + 𝐴𝐵 Rule 7: A = AA
=AA + AB + AA + AB Rule 8: adding AA = 0
= (A + A)(A + B) Factoring
= 1 . (A + B) Rule 6: A + A = 1
= A + B Rule 4: drop the 1
60
The proof is shown in the table below, which shows the truth table and the
resulting logic circuit simplification.
Rule 12: (A + B) (A + C) = A + BC
This rule can be proved as follows:
(A + B)(A + C) = AA + AC + AB + BC Distributive law
= A + AC + AB + BC Rule 7: AA = A
= A(1 + C) + AB + BC Factoring (distributive law)
= A .1 + AB + BC Rule 2: 1 + C = 1
= A(1 + B) + BC Factoring (distributive law)
= A . 1 + BC Rule 2: 1 + B = 1
= A + BC Rule 4: A. 1 = A
The proof is shown in the table below, which shows the truth table and the
resulting logic circuit simplification.
61
H.W:
1. Apply the associative law of addition to the expression A + (B + C + D).
2. Apply the distributive law to the expression A(B + C + D).
̅̅̅̅
𝑋𝑌 = 𝑋̅ + 𝑌̅ ……… (1)
̅̅̅̅̅̅̅̅
𝑋 + 𝑌 = 𝑋̅ 𝑌̅ ……… (2)
Figure below shows the gate equivalencies and truth tables for Equations 1
and 2.
63
Sol.
Sol.
Sol.
A+AB = A (1+B)
= A .1 = A
Sol.
𝐴 + 𝐴̅𝐵 = (𝐴 + 𝐴𝐵) + 𝐴̅𝐵
= 𝐴 + 𝐵(𝐴 + 𝐴̅)
= 𝐴 + 𝐵. 1
=𝐴+𝐵
Sol.
Sol.
(A+B)(A+C) = AA + AC + AB + BC
= A + AC + AB + BC
= A + (1+C) + AB + BC
= A.1 + AB + BC
= A + AB + BC
= 𝐴(1 + 𝐵) + 𝐵𝐶
= A.1 + BC
= A + BC
H.W.:
1. 2. 3.
The figure below shows that the simplification process significantly reduced
the number of logic gates required to implement the expression. Part (a) shows
that 5 gates are required to implement the expression in its original form;
however, only 2 gates are needed for the simplified expression, shown in part
(b). It is important to realize that these two gate circuits are equivalent.
66
̅̅̅̅̅̅̅̅̅̅̅
𝐴𝐵 + 𝐴𝐶 + 𝐴̅𝐵̅𝐶
Sol.
̅̅̅̅ )(𝐴𝐶
(𝐴𝐵 ̅̅̅̅ ) + 𝐴̅𝐵̅𝐶 DeMorgan’s theorem
(𝐴̅ + 𝐵̅)(𝐴̅ + 𝐶̅ ) + 𝐴̅𝐵̅𝐶 DeMorgan’s theorem
𝐴̅𝐴̅ + 𝐴̅𝐶̅ + 𝐴̅𝐵̅ + 𝐵̅𝐶̅ + 𝐴̅𝐵̅𝐶 distributive law to the two terms
𝐴̅𝐵̅ + 𝐴̅𝐵̅𝐶 = 𝐴̅𝐵̅(1 + 𝐶) = 𝐴̅𝐵̅ rule 7 (𝐴̅𝐴̅ = 𝐴̅) = A) to the first term
𝐴̅ + 𝐴̅𝐶̅ + 𝐴̅𝐵̅ + 𝐵̅𝐶̅ rule 10 to the third and last terms.
𝐴̅ + 𝐴̅𝐶̅ = 𝐴̅(1 + 𝐶̅ ) = 𝐴̅ rule 10 to the first and second terms
𝐴̅ + 𝐴̅𝐵̅ + 𝐵̅𝐶̅
𝐴̅ + 𝐴̅𝐵̅ = 𝐴̅(1 + 𝐵̅) = 𝐴̅ rule 10 to the first and second terms.
𝐴̅ + 𝐵̅𝐶̅
H.W.: