Boolean Algebra DE
Boolean Algebra DE
A+A=A A + A = 2A
A−A=A A − A = A2
Table 2.1
Boolean Algebra 29
y In automatic control of machines, they
are used for decision making.
y They are used in computers, calculators AND operator/AND gate
and digital measuring techniques. Fig. 2.2 AND Operation
y In musical instruments, games and 2. O
R operator: In Boolean algebra, a plus (+)
domestic appliances, etc. sign is used for the OR operator.
The OR gate is called as OR operator, and
Basic Operators
it performs logical addition.
The three basic operators to perform or For example:
implement a logical operation or function in If A + B = C, then
Boolean algebra are: If A is true, (i.e., A = 1) or if B is true, (i.e.,
1. AND operator B = 1), then C will also be true, (i.e., C = 1).
2. OR operator C will be false, (i.e., C = 0), only when both
3. NOT operator A and B are false, (i.e., A and B = 0).
For example: A B C
If A · B = C, then 0 0 0
If A is true, (i.e., A = 1) and B is true, (i.e., B =
1), then only C will be true, (i.e., C = 1), else C 0 1 0
will be false, (i.e., C = 0).
1 0 0
The different combinations of A and B are
shown below: 1 1 1
Table 2.3 OR operation
Input Output
A B C OR operator/OR gate
Fig. 2.3 OR Operation
0 0 0
3. N
OT operator: In Boolean algebra, the not
0 1 0 operator is defined by the use of an over
bar (–) or apostrophe (‘).
1 0 0 The NOT gate is called as NOT operator,
and it performs the inversion operation.
1 1 1 For example:
Table 2.2 AND operation If A = 0, (i.e., false), then A = 1 , (i.e., true).
30 Boolean Algebra
Law 1: A + 0 = A
Input Output
Law 2: A + 1 = 1
A A Law 3: A + A = A
Law 4: A + A = 1
0 1
4. Commutative laws
1 0 There are two commutative laws that
Table 2.4 NOT operation allow the change in position of variables
in OR and AND operations. These are:
Law 1: A + B = B + A [The order in which
variables are ORed is immaterial]
NOT operator/NOT gate Law 2: A · B = B · A [The order in which
Fig. 2.4 Truth Table of NOT Gate
variables are ANDed is immaterial]
Axioms and Laws of Boolean Algebra
Note:
y Axioms or postulates of Boolean algebra This law can be extended to any number of
are a set of logical expressions that can be variables. For example:
accepted without proof and upon which a A·B·C=B·C·A=C·A·B=B·A·C
set of useful theorems can be built. 5. Associative laws
y Actually, axioms are the definitions There are two associative laws that allow
of the three basic logic operators and the grouping of variables.
their operations that we have already Law 1: (A + B) + C = A + (B + C)
discussed: AND, OR and NOT. This law states that the way in which
variables are grouped and ORed is
Laws of Boolean algebra:
immaterial.
1. Laws of complementation (NOT laws)
Law 2: (A · B) · C = A · (B · C)
Complement means to invert, i.e., to change
This law states that the way in which variables
0s to 1s and vice-versa. The symbol is an
are grouped and ANDed is immaterial.
over-bar.
Five laws of complementation are as Fun facts
follows: These laws can be extended to a number of
Law 1: 0 = 1 variables. For example:
Law 2: 1 = 0 y A + (B + C + D) = (A + B + C) + D = (A + B)
Law 3: If A = 0, then A = 1 + (C + D)
Law 4: If A = 1, then A = 0 y A · (B · C · D) = (A · B · C) · D = (A · B) · (C · D)
Law 5: A = A
2. AND laws 6. Distributive laws
Four AND laws are as follows: There are three distributive laws that allow
Law 1: A · 0 = 0 factoring or multiplying out of expressions.
Law 2: A · 1 = A Law 1: A · (B + C) = AB + AC
Law 3: A · A = A Law 2: A + BC = (A + B) (A + C)
Law 4: A · A = 0 Let us prove this:
RHS = (A + B) (A + C)
Note:
= AA + AC + BA + BC
The fourth law represents that if one input, ∴
= A + AC + AB + BC ( AA = A)
(i.e., A) is logic 1, then the other input A
= A(1 + C + B) + BC
would be logic 0, so the output is zero and ∴
= A · 1 + BC ( 1 + C + B = 1)
vice-versa.
= A + BC = LHS
3. OR laws Law 3: A + AB = A + B
Four OR laws are as follows: Let us prove this:
Boolean Algebra 31
RHS = A + B
A⋅A =
0 A · (B + C) = A · B + A · C
= 1 · (A + B)
∴
= (A + A ) (A + B) ( A + A = 1)
= AA + AB + A A + A B 0=1 A + B · C = (A + B)(A + C)
∴
= A + AB + 0 + A B ( A A = 0)
= A(1 + B) + A B 1=0 A ⋅ (A + B) =
AB
∴
= A (1) + A B ( 1 + B = 1)
= A + AB Boolean algebra basic rules
= LHS
Table 2.5 General Boolean Algebra Expression
7. Absorption laws
There are three absorption laws:
Demorganisation
Law 1: A + (A · B) = A
Let us prove this: The transformation A + B = A ⋅ B and A ⋅ B = A + B
LHS = A + (A · B) can be extended to complicated expressions
= A(1 + B) by the following three steps:
∴
= A(1) ( 1 + B = 1)
Step 1: The entire function is initially
=A
complemented.
= RHS
Law 2: A · (A + B) = A Step 2: All AND operations are replaced by
Let us prove this: OR operations and vice-versa.
LHS = A · (A + B) Step 3: Finally, complement the individual
=A·A+A·B variables. This procedure is commonly
∴
=A+A·B ( AA = A) known as Demorganisation.
= A (1 + B)
∴ Example 1:
=A·1 ( 1 + B = 1)
=A Prove that ( A + B + AB) ( A + B ) ( AB) =0
= RHS
Solution:
Law 3: A · ( A + B) = AB
Let us prove this: LHS = ( A + B + AB) ( A + B) ( AB)
LHS = A · ( A + B) But A + AB = A
= A A + AB LHS = ( A + B) ( A + B) ( AB)
= 0 + AB
= AB = ( AA + AB + AB + BB) ( AB)
= RHS
But A • A = A and B ⋅B =
B and
AB + AB = B ( A + A ) = AB
A+0=A A=A
∴ LHS = ( A + AB + B ) ( AB)
A+1=1 A+B=B+A
= A ( 1 + B ) + B ( AB)
A+A=A A·B=B·A
But ( 1 + B ) =1
A+A =
1 A + AB = A ∴ LHS= ( A ⋅ 1) + B ( AB)
A·A=A (A · B) · C = A · (B · C) LHS = 0 + 0 = 0
32 Boolean Algebra
Example 2: +A B CD + A BCD + A BCD + A BCD
Simplify the following expression: = A BD (C + C ) + A BD (C + C ) + ABC (D + D ) + ACD (B +
Y= ( AB + A + AB ) = A BD (C + C ) + A BD (C + C ) + ABC (D + D ) + ACD (B + B) + ABC (D + D )
Solution:
= ABD + ABD + ABC + ACD + ABC
Y= (AB + A + AB) = AD (B + B) + AC (B + B) + ACD
But AB= A + B …DeMorgan’s second theorem
= AD + AC + ACD
∴ Y= ( A + B + A + AB ) =AD + A ( C + CD )
But A + A =
A = AD + A C ( 1 + D ) + CD
∴ Y= ( A + B + AB) = AD + A C + CD + CD
Now use DeMorgan’s first theorem, which = AD + AC + AD
states that
= AC + AD + AD
A + B + C = A ⋅B ⋅C
= AC + ( A ⊕ D )
∴ Y = A ⋅ B ⋅ AB
Example 4:
But A A=
= and B B
Simplify the following function using Boolean
∴ Y = A ⋅ B ⋅ AB algebra
But AB
= ( A + B) … DeMorgan’s second X = ABC + ACD + AB + ABCD + ABC
theorem
Solution:
∴ Y =A ⋅ B ( A + B ) =AAB + ABB
X = ABC + ACD + AB + ABCD + ABC
=AA 0=
and BB 0 = ABC + ABC + ACD + AB + ABCD
∴ Y = 0 ⋅B + A ⋅ 0 = AB (C + C ) + ACD + AB + ABCD
Boolean Algebra 33
Truth Table
Input Output
A logical table which shows the possible A B C
combinations of inputs and outputs in
Boolean algebra is called as truth table. 0 0 0
0 1 0
Every logic gate, as well as its conversion, can
be represented by a truth table. For example: 1 0 0
The truth table of an AND gate is expressed 1 1 1
below. Table 2.6 Truth Table for AND Operation
A B X
0 0 0
OR X=A+B 0 1 1
1 0 1
1 1 1
A B X
0 0 0
AND X=A·B 0 1 0
1 0 0
1 1 1
A X
NOT OR
X=A 0 1
INVERTER
1 0
A B X
0 0 1
NOR X (A + B)
= 0 1 0
1 0 0
1 1 0
A B X
0 0 1
NAND X (A ⋅ B)
= 0 1 1
1 0 1
1 1 0
X= A ⊕ B A B X
or 0 0 0
Exclusive
0 1 1
OR or XOR X = A ⋅B + A ⋅B
1 0 1
1 1 0
34 Boolean Algebra
Logic Gate Symbol Boolean Function Truth Table
A B X
X= A ⊕ B 0 0 1
Exclusive NOR
or 0 1 0
or XNOR
1 0 0
X = A ⋅ B + AB
1 1 1
Table 2.7
Demorgan’s Theorem
Law 1: A + B = A ⋅ B
This law states that ‘the complement of a sum of variables is equal to the product of their
individual complements.’ Schematically, each side of this law can be represented as:
LHS RHS
A A A A ·B
=
B B B
Bubbled AND Gate
Law 2: A B= A + B
This law states that ‘the complement of the product of variables is equal to the sum of their
individual complements.’ Schematically, each side of this law can be represented as:
LHS RHS
A B AB A B A B A +B
0 0 1 0 0 1 1 1
º
0 1 1 0 1 1 0 1
1 0 1 1 0 0 1 1
1 1 0 1 1 0 0 0
The last column shows that the NAND gate is equivalent to a bubbled OR gate
Fig. 2.6 Truth Table for NAND Operation
Boolean Algebra 35
Example 5:
Standard SOP Standard POS
Demorganize Y = (A + B)(C + D) .
Solution:
For example: For example:
The given function is Y =(A + B)(C + D) F(A,B,
= C) ABC + ABC F(A,B, C) = (A + B + C) ⋅
F(A,B,
= C)
On complementing the entire function, weABC + ABC
(A + B + C) ⋅ (A + B + C)
get (A + B)(C + D) +ABC + ABC
It is standard SOP It is a standard POS
Changing ANDs to ORs and ORs to ANDs, we because all the because all the sum
get A ⋅ B + C ⋅ D product terms terms contain all
contain all the the three variables
Now, on complementing the variables, we
three variables of of the function.
get Y = A ⋅ B + C ⋅ D
the function.
Example 6:
Table 2.8
Demorganize AB(CD + EF)(AB + CD) . Minterms and Maxterms
Solution:
y Each variable in a Boolean expression is
The given expression is: a literal.
Let Y = AB(CD + EF)(AB + CD) y Boolean variables can appear either in
normal form (x) or complemented form ( x ).
Y = AB + CD + EF + AB + CD y A minterm is an AND combination of terms.
Y = AB + (CD ⋅ EF) + (AB ⋅ CD) y A maxterm is an OR combination of terms.
Y = AB + (C + D) ⋅ (E + F) + ABCD Minterm: Each individual product term in a
standard SOP is called as minterm.
SOP, POS and Canonical Forms of Boolean For example:
Function Representation Two variable functions f(A, B), the minterms for
all the possible combinations are as follows:
SOP (sum of products):
It is a summation of product terms.
For example: Rack Your Brain
Y =AB + ABC + ABC
POS (product of sums): ‘A NAND gate is equivalent to a bubbled
It is a product of sum terms. OR gate.’
For example:
Y = (A + B)·(A + C) ⋅ (A + B) Variables Minterms
Canonical forms:
A B SOP
36 Boolean Algebra
Maxterm: Each individual sum term in a Representing functions with minterms:
standard POS is called as maxterm.
Minterm number is the same as the row
For example: position in the truth table (starting with 0 at
the top).
Two variable functions f(A, B), the maxterms
for possible combinations are as follows: Let there be a truth table of a circuit as
shown below, and we have to represent it by
Variables Maxterms a Boolean function (in minterms).
A B POS A B C f
0 0 0 1 m0
0 0 A + B → M0
0 0 1 1 m1
0 1 A + B → M1 0 1 0 1 m2
0 1 1 0
1 0 A + B → M2
1 0 0 1 m4
1 0 1 1 m5
1 1 A + B → M3
1 1 0 0
Table 2.10
Example 7: 1 1 1 0
Represent the given Boolean function in Table 2.11 Table Representing Min Terms
minterms
f(A,B)
= AB + AB
Boolean Algebra 37
f = ABC + ABC + ABC
A B C f
0 0 0 1 ↓
0 0 1 1 f = m3 + m6 + m7 = ∑(3, 6, 7)
0 1 0 1 ↓ Conversion in
0 1 1 0 m3 maxterms
1 0 0 1 f = M0 M1 M2M4 M5 = πM(0, 1, 2, 4, 5)
↓
1 0 1 1
f = (A + B + C) ⋅ (A + B + C) ⋅ (A + B + C)
1 1 0 0 m6
⋅ (A + B + C) ⋅ (A + B + C)
1 1 1 0 m7
It can be represented by a Boolean function NAND and NOR gates are called as universal
as: gates. They can be used to produce any other
logic or Boolean function with the NAND and
f = (A + B + C) ⋅ (A + B + C) ⋅ (A + B + C)
NOR gates being minimal.
f= M3 · M6 · M7
NAND and NOR gates are called as minimal
f = πM(3, 6, 7) sets in themselves since they can be used
individually or together to construct many
Conversion between canonical forms: other logic circuits.
y It is quite easy to convert minterms into Hence, the complete set of operations of the
maxterms and vice versa. main logic gates can be defined as:
y Firstly, we will represent it by a Boolean
function (in minterms) and convert all y AND, OR and NOT (a full set)
AND operations with OR operations and y AND and NOT (a complete set)
vice versa. y OR and NOT (a complete set)
y Finally, complement the individual variables. y NAND (a minimal set)
y Let us understand the conversion with y NOR (a minimal set)
the help of an example; a truth table of a Implementation of logic functions using only
digital circuit is shown below. NAND gates:
A B C f
NAND Gate symbol
0 0 0 0
0 0 1 0
NOT Gate/Inverter
0 1 0 0
Fig. 2.7 Representation of NOT Gate
0 1 1 1
1 0 0 0
AND Gate
1 0 1 0
1 1 0 1
Buffer
1 1 1 1
Table 2.13
38 Boolean Algebra
Buffer
OR Gate
AND Gate
Fig. 2.10 Design of AND Gate Using NOR Gate
NOR Gate
NAND Gate
Exclusive-OR Gate
Fig. 2.8 Design Of Standard Logic Gates Universal
Gates
Exclusive-OR Gate
Exclusive-NOR Gate
Fig. 2.9 Design Of EX-NOR Gate
Using Universal Gate Exclusive-NOR Gate
Fig. 2.11 Design of EX-NOR Gate Using
Implementation of logic functions using only NOR Gate
NOR gates:
Two level Nand-Nand Implementation
The simplified Boolean function of SOP
NOR Gate Symbol expression can be implemented by using
AND-OR gates. The AND-OR implementation
is a two-level implementation. For such
NOT Gate/Inverter implementation, it is necessary to convert the
logic diagram from AND-OR logic to NAND-
NAND logic. In the figure below, two equivalent
symbols for NAND gates are shown.
OR Gate
Boolean Algebra 39
Previous Years’ Questions
Fig. 2.12 Two Graphic Symbols for Nand Gates
Step 2:
NOR-NOR implementation:
The AND gates are replaced by NAND gates
and OR gate is replaced by a NAND gate with The implementation of a Boolean function
an OR invert graphic symbol. with NOR-NOR logic requires that the
function should be a simplified POS
expression. In the first implementation, all
sum terms are implemented by the NOR gate,
and in the second level, all ANDed terms are
implemented using the equivalent of the
Fig. 2.14 NOR gate. The following steps are used:
40 Boolean Algebra
1. Simplify the logic expression and convert
it into POS form.
2. Draw an OR-AND logic circuit for the
above-simplified expression.
3. Replace OR gate by NOR gate and AND Fig. 2.19
gate by invert AND gate.
4. Replace invert AND gate by NOR gate. Example 10:
Implement the following Boolean function
Example 9: using 2-input NAND-NAND logic if the inputs
Implement the given Boolean function using are given in normal and complement form.
2-input NOR-NOR gate logic if the inputs are
F(A, B, C) = åm(1, 2, 3, 4, 5, 7)
given in normal and complement form.
Solution:
F = AC + BC + D Step 1:
Step 2: F(A,B, C) =C + AB + AB
Fig. 2.17
Fig. 2.18
Boolean Algebra 41
Step 4:
Replace bubble OR gate by NAND gate.
Fig. 2.27
Example 12:
Perform the NAND implementation of the
following function if the inputs are given in
Fig. 2.26
normal and complement form.
Step 4: F(A,B, C,D)
= A(BC + D) + AB
Replace invert AND gate by NOR gate.
42 Boolean Algebra
Solution: 3. A
ll the bubbles in the diagram have to
be carefully checked. Insert an inverter
Step 1:
equivalent NOR gate for every bubble that
Implement the logic function with AND, OR
is not compensated by another bubble
and NOT gates.
along the same line. Finally, replace the
invert AND gate by NOR gate.
Example 13:
Perform the NOR implementation of the
following Boolean function:
F(A,B, C,D)
= A(BC + D) + AB
Solution:
Fig. 2.28 Step 1:
Step 2: Implement the logic function by AND, OR and
NOT gates.
Replace the AND gates by NAND gates and
OR gates by invert OR gates.
Fig. 2.31
Fig. 2.29
Step 2:
Step 3:
The input D line has only one bubble. Now, Now, replace OR gate by NOR gate and AND
the input D is complemented. Replace invert gate by invert AND gate.
OR by NAND.
Fig. 2.32
Fig. 2.30
Step 3:
Boolean Algebra 43
Chapter Summary
Practice Questions
1. The number of Boolean functions that n 4. The simplified form of the logical
variables can generate are equal to: expression F = A + BC ( AB + ABC ) is:
(A) 22n–1
(A) 1
(B) 22n
(B) AB
(C) 2n–1
(C) ABC
(D) 2n
(D) 0
Z = R + S + PQ + PQR + PQS
3. The minimised form of the logical Then,
expression (ABC + ABC + ABC + ABC) is:
(A) AC + BC + AB (A) =
W Z,
= X Z
(B) AC + BC + AB (B) W = Z, X = Y
(C) AC + BC + AB (C) W = Y
(D) AC + BC + AB (D) W= Y= Z
44 Boolean Algebra
6. The Boolean expression AC + BC is (A) B(A + C)(A + C)
equivalent to: (B) B(A + C)(A + C)
(A) AC + BC + AC
(C) B(A + C)(A + C)
(B) BC + AC + BC + ACB
(D) B(A + C)(A + C)
(C) AC + BC + BC + ABC
(D) ABC + ABC + ABC + ABC 8. The Boolean expression
Y = ABCD + ABCD + ABCD + ABCD
7. The Boolean expression for the truth can be minimised to:
table shown is:
(A) Y = ABCD + ABC + ACD
A B C f
(B) Y = ABCD + BCD + ABCD
0 0 0 0
0 0 1 0 (C) Y = ABCD + BCD + ABCD
0 1 0 0 (D) Y = ABCD + BCD + ABCD
0 1 1 1
1 0 0 0
1 0 1 0
1 1 0 1
1 1 1 0
Practice Solutions
Boolean Algebra 45