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

Simplification of Logic Expression

PART I
(Boolean Switching Algebra)
Introduction
We learn digital electronics to develop our skill of so called ‘Logic Design’. In order to
design a logic circuit first of all we have to find a logic expression for the output of the circuit as
a function of its inputs according to prescribed outcome to be achieved. Combinational logic
circuits are designed by judiciously interconnecting logic gates to achieve a prescribed outcome.
For designing a digital circuit our target should be:
To design the circuit using lowest number of gates (gates and FFs in case of sequential logic
circuit) with lowest number of interconnections between the gates.
Now digital circuits are designed from logic expression of the circuit. Thus to achieve the above
mentioned goal the logic expression of a circuit has to be reduced in to a minimal expression
composed of lowest number of terms with lowest number of literals in each term. A logic
expression composed of lowest number of terms with lowest number of literals in each term is
called the minimal expression. Logic expressions can be simplified/reduced by two methods: (i)
Boolean Algebra and (ii) Mapping Method.

Basics of Boolean switching algebra


Variable: A variable is used to represent a condition, an act, a specific purpose, a physical
parameter, data etc. In digital electronics variables and logic operators together with describe the
exact function of a logic circuit.
In Boolean switching a variable is usually designated by letters and it can be assigned with only
two values 0 and 1.
Complement of variable is designated by a bar symbol over the variable (overbar).
Both inputs and outputs are treated as variable.
Usually, inputs are designated by uppercase letters near the beginning of the alphabet while the
outputs are designated by letters near the end of the alphabet

1
Complement: Complement of variable is inverse of the variable represented by a bar symbol
over the variable (overbar) and defined as: for every variable A there exists a complement ̅
such that A + ̅ = 1 and A . ̅ = 0 (these two expressions describe the inverse property).
Literal: A Boolean variable (single) with or without overbar (variable or complement of a
variable) is called literal. Example: A, ̅ , B, C, D
̅ etc.
Truth Table: A truth table (or functional table) is tabular representation output(s) in terms of
inputs of a logic circuit and it describes the exact functional behavior of the circuit for every
possible combination of inputs.
Logic (Switching) expression: A Logic (switching) expression is a mathematical statement
formed with variables and operators of Boolean algebra that is either true (1) or false (0)
depending on present set of applied inputs. In case of digital circuit a logic (switching)
expression is an expression composed of literals and operators (+, . , ̅ ) that represents the
output as a function of inputs and exact behavior of the circuit can be easily evaluated for all
combinations of inputs if we construct a truth table for the given expression. Example:
Y= (A + B)AB
Term: Two or more literal connected by logic operator is called term.
Sum Term: Sum term is sum of literal. In logic circuit sum term is obtained by OR operation of
the literal. In above example (A+B) is sum term.
Product Term: Product term is product of literal. In logic circuit product term is obtained by
AND operation of the literal. In above example AB is product term.
Minterm: A minterm is a Boolean product (ANDed) term in which all variables of the function
(F) are present either in uncomplemented or complemented form. For each minterm the output
assumes the value ‘1’ only for one combination of variables.
Maxterm: A maxterm is a Boolean sum (ORed) term in which all variables of the function (F)
are present either in uncomplemented or complemented form. For each maxterm the output
assumes the value ‘0’ only for one combination of variables.
Standard format of representation of switching function
The switching function or logic expression in digital electronics regardless of their form and
complexity can be expressed in two standard formats:
(i) Sum of product (SOP representation) or
(ii) Product of sum (POS representation).

2
This standardization makes the evaluation, simplification and implementation of Boolean logic
expressions much more systematic and easier.
Canonical forms of logic expression (switching function):
Canonical or standard SOP: In SOP format a switching function is expressed as logic sum
(OR) of product (AND) term i.e OR of ANDed terms. A switching function or logic expression
composed of Boolean sum of minterms is said to be canonical or standard SOP expression.
Examples:
F1 (A, B, C) = ̅ ̅ (simplified form)
F2 (A, B, C) = ̅ ̅ ̅B ̅ ̅̅ ̅ (canonical or standard form)
Canonical or standard POS: In POS representation a switching function is written as logic
product (AND) of sum (OR) term i.e., AND of ORed terms. A switching function or logic
expression composed of Boolean product of maxterms is said to be canonical or standard POS
expression.
Examples:
F3 (A, B, C) = ̅ ̅ ̅ ̅ ̅ (simplified form)
F4 (A, B, C) = (A+B+C (A ̅ ̅ ̅ +B+ ̅ ) (canonical or standard form)

Check relationship between (i) F1 and F3, and (ii) F2 and F4

Rules of assignment of value to the variables


In SOP representation:
Uncomplemented variables of the minterm or product term are assigned with constant value ‘1’.
Complemented variables of the minterm or product are assigned with constant value ‘0’.
Whereas in POS format:
Uncomplemented variables of the maxterm or sum are assigned with constant value ‘0’.
Complemented variables of the maxterm are or sum assigned with constant value ‘1’.

3
Code table of the minterm and maxterm:
The minterm and maxterm code tables are written following above mentioned rules. The
minteram and maxterm code table for three variables (A, B, C) is presented below.
A B C Decimal Minterm (m) Maxterm (M)

0 0 0 0 m 0) (A+B+C) (M0)
0 0 1 1 m 1) 1)
0 1 0 2 B m2 ) 2)
0 1 1 3 m 3) 3)
1 0 0 4 m 4) 4)
1 0 1 5 m 5) 5)
1 1 0 6 m 6) 6)
1 1 1 7 ABC (m7) 7)
‘m’ symbol for minterm and ‘ ’ symbol for maxterm.
A function having ‘n’ number of variables has in all 2n numbers of minterms and same numbers
of maxterms.

From logic expression to truth table


F1 (A, B, C) = ̅ ̅ F1 (A, B, C) = ̅ ̅

= ̅ ̅ ̅ ̅
̅
̅𝑩 𝑪
𝑨 010 (2) 101(5) 101 (5)
= ̅ ̅ ̅ ̅ ̅
̅ 𝑩𝑪
𝑨 011 (3) ̅𝑪
𝑨𝑩 111 (7) 𝑨𝑩𝑪
= ̅ ̅ ̅ ̅

= m2 + m3 + m5 + m7 = Σ m (2, 3, 5, 7)
F1 = Π 0,1,4,6
Truth table for F1 and F3
Inputs Output Output

A B C F1 F3

0 0 0 0 (m0) 1 (M0)
0 0 1 0 (m1) 1 (M1)
0 1 0 1 (m2) 0 (M2)
0 1 1 1 (m3) 0 (M3)
1 0 0 0 (m4) 1 (M4)
1 0 1 1 (m5) 0 (M5)
1 1 0 0(m6) 1 (M6)
1 1 1 1 (m7) 0 (M7)

4
Note that output is also variable
F3 (A, B, C) = ̅ ̅ ̅ ̅ ̅

= ̅ ̅ ̅ ̅ ̅ ̅ ̅

= ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅

[using (A+B)(A+C) = A+BC]


= ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅

= M7, M5, M3, M2 F3 (A, B, C) = ̅ ̅ ̅ ̅ ̅

= Π M (2, 3, 5, 7)
𝑨 ̅
𝑩 𝑪 010 (2) 101 (5) 101 (5) ̅
𝑨 𝑩 ̅
𝑪
= Σ m 0,1,4,6
𝑨 ̅
𝑩 ̅
𝑪 011 (3) 111 (7) ̅
𝑨 ̅
𝑩 ̅
𝑪

From the above truth table we may conclude that


(i) In SOP representation the output is ‘1’ when a minterm is ‘1’ as SOP expression is obtained
by OR-ing the minterms whereas, in POS representation the output is ‘0’ when a maxterm is ‘0’
as POS expression is obtained by AND-ing the maxterms.
(ii) The logic expression in SOP format can be written from the truth table by OR-ing the
minterms for which the output F = 1 while, the same in POS format can be written from the truth
table by AND-ing the maxterms for which the output F = 0.

From truth table to Logic Expression


Truth table for F2 and F4
Inputs Output Output

A B C F2 F4

0 0 0 0 (m0) 0 (M0)
0 0 1 1 (m1) 1 (M1)
0 1 0 1 (m2) 1 (M2)
0 1 1 0 (m3) 0 (M3)
1 0 0 1 (m4) 1 (M4)
1 0 1 0 (m5) 0 (M5)
1 1 0 1 (m6) 1 (M6)
1 1 1 1 (m7) 1 (M7)

5
F2 (A, B, C) = ̅ ̅ ̅B ̅ ̅̅ ̅ = Σ 1, 2, 4, 6, 7 canonical SOP
= Π 0, 3, 5 = (A ̅ ̅ ̅ +B+ ̅ ) = F4 (canonical POS)
F4 (A, B, C) = (A+B+C (A ̅ ̅ ̅ +B+ ̅ ) = Π 0, 3, 5 (canonical POS)
= Σ 1, 2, 4, 6, 7 = ̅ ̅ ̅B ̅ ̅̅ ̅ = F2 (canonical SOP)
Note that above expressions of F2 and F4 are in canonical form and may be simplified in a
reduced format.
Therefore, F2 = F4
Show, F2 = F4 using Boolean algebra and Karnaugh map (K-map)

Contd.

6
Laws and theorems of Boolean algebra
Complete set of operators in switching algebra: Any Boolean function can be realized with
AND, OR & NOT ( . , +, ̅ ) operators (so called AOI). Hence, they form a complete set of
operators. Further, due to universal character NAND and NOR operator are functionally
complete single operator. Again, all Boolean functions can be retain using OR and over bar
( ̅ operators only; AND and over bar ( ̅ operators only with the help of De organ’s
theorem. Thus, ( ̅ and ( ̅ also form a complete set of operator.

Laws of logic operators


OR laws AND laws NOR laws NAND laws XOR laws XNOR laws
A+0=A A.0=0 = =1 A⊕0=A A 0=
A+1=1 A.1=A =0 = A⊕1= A 1=A
A+A=A A.A=A = = A⊕A=0 A A=1

A+ ̅=1 A. ̅ =0 =0 =1 A⊕ ̅ =1 A ̅=0

 Boundness theorem
A + 1 = 1; A . 0 = 0
 Idempotent theorem
A + A = A; A . A = A
 Commutative property of AND (.) and OR (+) operator
A + B = B + A; A.B=B.A (Truth table proof)
A + B = A ̅ + ̅ B + AB
B + A = B ̅ + ̅ A + AB = A ̅ + ̅ B + AB; using commutative law of AND.

These laws can be extended for any number of variables.


For example: A + B + C = B + C + A = C + A + B = B + A + C;
A.B.C=A.C.B=C.A.B=B.A.C

7
 Associative Laws
(A + B) + C = A + (B + C); (A . B) . C = A . (B . C)
These laws allow grouping of variables
These laws can be extended for any number of variables.
A + (B + C + D) = (A + B + C) + D = (A + B) + (C + D);
A . (B . C . D) = (A . B . C) . D = (A . B) . (C . D) etc.
A gate can be extended to have multiple inputs by way of cascading if the operation, it represents
is both commutative and associative.

 Properties of NAND and NOR operation


Is NAND operation commutative and associative?
Let us denote operator N ND by ↑ symbol
Commutative law for NAND
↑ = = = ↑
= ̅+̅=̅+̅= ↑ ;
↑ ↑ = = = ↑ ↑
= ↑ ↑ ;
So ↑ operation is commutative and extendable for any number of variables.
Associative law for NAND

grouping ↑ ↑ = = + ̅ = AB + ̅

nd, ↑ ↑ = = ̅ + B.C
Therefore, ↑ ↑ ≠ ↑ ↑ ;
Hence, N ND (↑) operation is not associative
In consequence, NAND gate cannot be extended for multiple variables by way cascading. In case
of writing the cascaded NAND operation, one must be careful and must use the correct
parenthesis to maintain (signify) proper sequence of the gates.
Now:

8
; BUT
Therefore, Y1 ≠ Y2
To overcome this difficulty, we define the multiple input NAND gate as complement of AND
gate. Thus by this definition
↑ ↑ = = = ↑ ↑
Therefore, a three input NAND gate is represented by the symbol

In this definition NAND gate should be treated as complement of AND gate and NAND
operation becomes associative.

Is NOR operation commutative and associative?


Let us denote operator NOR operator by ↓ symbol
Commutative law for NOR operator
↓ = = = ↓ ;
↓ ↓ = = = ↓ ↓
=C↓ ↓ etc.
Thus, NOR is commutative and it is extendable for any number of variables.
Associative law for NOR

grouping ↓ ↓ = =( . ̅ = (A + B) . ̅ = A ̅ + B ̅

Again, A ↓ (B ↓ C) = = ̅ . (B + C) = ̅ + ̅
Therefore, (A ↓ B) ↓ ≠ ↓ (B ↓ C);
Hence, NOR (↓) operation is not associative.
Since, NOR operation is commutative but not associative, therefore extended to have multiple
inputs by way of cascading.
In writing the logic expression of cascaded NOR gates, one must use correct sequence of
parenthesis to maintain the proper sequence of the gates.

9
Now

; BUT

Therefore, Y1 ≠ Y2
To overcome this difficulty, we define the multiple input NOR gate as complement of OR gate.
According to this definition
↓ ↓ =
Then, ( ↓ ↓ = = = ↓ ↓
Thus, in this definition NOR operation becomes associative. A three input NOR gate is
represented by the symbol:

 Equality theorem
If A + B = A + C and AB = AC i.e., if these two equations are satisfied simultaneously then
only B = C.
Proof:
A + B = A + C; for A = 0, B = C; but for A = 1, B = 0 and C = 1 then A + B = 1, again A + C = 1
So = but ≠
Similarly, for AB = AC if A = 1 then B = C; but if A = 0, B = 0 and C = 1, then AB = 0, AC = 0,
but B ≠
Now,
A + B = A + C;
B (A + B) = B (A + C);
Or, AB + B = AB + BC;
Or, B (A + 1) = AC + BC; Since, AB = AC
Or, B = C (A + B) = C (A + C); Since, A + B = A + C
Or, B = AC + C;
Or, B = C (A + 1);

10
Therefore, B=C

 Involution theorem

=A
Proof:

Let, ̅ = B, then = ̅;
Now, B + ̅ = 1 and B . ̅ = 0; A + ̅ = 1 and A . ̅ = 0;
Therefore, B + ̅ = A + ̅ and B . ̅ = A . ̅
Since, A + ̅ = B + ̅;
Therefore, A + B = B + ̅; (As, ̅ = B)
And A . ̅ = B . ̅;
Therefore, A . B = ̅ B; (As, ̅ = B)
So, A+B=B+̅ and A.B=B.̅
A+B=̅+B and A.B=̅.

Therefore, A = ̅ =
OR

Second proof of: =A

Let, = B; Therefore, =
Now, from inverse laws: A + = 1; B + = 1; A = 0; B =0
So, A + =B+ and A =B

Putting, = B and , we get A+B=B+ and AB=B


According to equality theorem if A + B = A + C and AB = AC then only B = C.
Therefore, from equality theorem we can write

=A

=A

Let, = B; Therefore, =
Now, from inverse laws: A + = 1; B + = 1; A = 0; B =0
So, A + B = B + and AB = B

11
By equality theorem A = =

 Absorption theorem
A + A . B = A and A (A + B) = A
Proof:
A + A . B = A (1 + B) = A
and A (A + B) = A + AB = A

 Distributive law
A . (B + C) = A . B + A . C and A + B . C = (A + B) . (A + C) (Convert AND to OR and OR to
AND)
Proof:
A . B + A . C = A (B + C);
(A + B) . (A + C) = A + AC + AB + BC;
= A (1 + C + B) + BC = A + BC;

 Redundant literal rule (RLR) (Elimination or simplification theorem):


A + ̅ . B = A + B and A ( ̅ + B) = AB
Proof:
A + ̅ . B = A (1 + B) + ̅ . B
= A + AB + ̅ . B;
= A + B (A + ̅) = A + B;
A ( ̅ + B) = A ̅ + AB =AB

 Consensus theorem
AB + ̅C + BC = AB + ̅C;
↓ ↓ ↓
110 001 011
111 011 111

12
Therefore, BC is consensus term of AB + ̅C, that means by dropping BC we can write AB +
̅ C + BC = AB + ̅ C; and also we may add the term BC with AB + ̅C without any effect on
output i.e., AB + ̅C = AB + ̅C + BC

Proof:
L.H.S = AB + ̅C + BC
= AB + ̅C + BC (A + ̅)
= AB + ̅C + ABC + ̅BC
= AB + ABC + ̅C + ̅BC = AB (1 + C) + ̅C (1 + B) = AB + ̅ C = R.H.S
Again by interchanging AND (.) by OR (+) and (+) by (.), we can write
(A + B) ( ̅ + C) (B + C) = (A + B) ( ̅ + C)
↓ ↓ ↓
000 100 000
001 110 100

L.H.S = (A + B) ( ̅ + C) (B + C)
= (0 + AC + ̅B + BC) (B + C)
= ABC + ̅B + BC + AC + ̅BC + BC
= ABC + BC + ̅B + ̅BC + AC;
= BC (A + 1) + ̅B (1 + C) + AC = BC + ̅B + AC
R.H.S = (A + B) ( ̅ + C)
= A ̅ + ̅B + AC + BC
= BC + ̅B + AC
↓ ↓ ↓
011 010 101
111 011 111
Therefore, BC is redundant

 Transposition theorem
AB + ̅C = (A + C) ( ̅ + B)
Proof:
R.H.S = (A + C) ( ̅ + B)
= A ̅ + ̅C + AB + BC

13
= ̅C + AB + BC
↓ ↓ ↓
001 110 011
011 111 111
BC is consensus of ̅C + AB
Therefore, R.H.S = ̅C + AB

Differences between Boolean switching algebra and ordinary algebra


During our discussion on Boolean algebra we have noted some differences between conventional
algebra and Boolean switching algebra. We can jot down those differences as follows:
(i) In switching algebra a variable can be assigned with only two values ‘0’ and ‘1’ but
in conventional algebra variable can have infinite number of values without any
restriction.
(ii) In Boolean algebra for every variable there exist a complement but in conventional
algebra there is no such concept of complement.
(iii) The idempotent theorem (i.e., A + A = A and A.A = A), boundness theorem (i.e., A +
1 = 1 and A.0 = 0) and absorption theorem (A + A.B = A and A(A+B) = A) of
Boolean algebra are not valid in conventional algebra.
(iv) In switching algebra there is no multiplicative or additive inverse as in conventional
algebra; thus no operator is available for subtraction and division operations in
Boolean algebra.
(v) All the operators of conventional algebra obey associative law, although this law
holds true for OR, AND & NOT operator of switching algebra but does not for
NAND and NOR operator.
(vi) The equality theorem of switching algebra i.e., if the equations A + B = A + C and
AB = AC are simultaneously satisfied then only B = C. However, in conventional
algebra B will be equal to C if A + B = A + C or AB = AC is sufficient.

14
15

You might also like