CHAPTER 13 - Boolean Algebra Class 12 2020 Cs Notes
CHAPTER 13 - Boolean Algebra Class 12 2020 Cs Notes
X X
0 1
1 0
X X
OR OPERATOR
This operator denotes logic addition
Symbol used is +
For ‘n’ input variables, there will be 2n possible combinations of inputs.
If any one input is true, then the output of OR operation will be true.
2
AND Operation
This operator denotes logical multiplication
Symbol used is dot (.)
If any one input is false, output will be false.
Truth table is
X Y X.Y
0 0 0
0 1 0
1 0 0
1 1 1
Venn diagram of X.Y is,
Boolean expression
Logical variables + logical operator = Boolean expression
Ex: X+Y.Z+Y
Boolean expression can be evaluated using truth tables
Precedence order for evaluating Boolean expression is
NOT
AND
OR
If there is parenthesis, the expression in parenthesis is evaluated first.
Ex-1: X + YZ
X Y Z Z Y.Z X+YZ
0 0 0 1 0 0
0 0 1 0 0 0
0 1 0 1 1 1
0 1 1 0 0 0
1 0 0 1 0 1
1 0 1 0 0 1
1 1 0 1 1 1
1 1 1 0 0 1
3
OR Gate
It’s a gate with 2 or more input signals & only 1 output signal.
If any of the input signals are high, then the output signal is high.
If all inputs are low, only then the output is low.
Truth Table is
X Y X+Y
0 0 0
0 1 1
1 0 1
1 1 1
(2 Inputs)
X Y Z X+Y+Z
False False False False
False False True True
False True False True
False True True True
True False False True
True False True True
True True False True
True True True True
(3 Inputs)
4
Symbol of OR gate is
=A+B
AND Gate
It’s a gate with 2 or more inputs and only 1 output.
Only when all the inputs are high, output will be high.
If any one input is low, then the output will be low.
Truth Table is
X Y X.Y
0 0 0
0 1 0
1 0 0
1 1 1
(2 Inputs)
X Y Z X.Y.Z
False False False False
False False True False
False True False False
False True True False
True False False False
True False True False
True True False False
True True True True
(3 Inputs)
Symbol of AND gate is
=A.B
Ans: 0 + 1 = 1
1.0=0
Basic theorems of Boolean algebra
Boolean postulates are used for defining Boolean algebra theorems
Boolean algebra theorems are used for manipulating Boolean expressions
1. Properties of 0 & 1
a) 0+X=X
Proof using Truth Table
0 X Result
0 0 0
0 1 1
b) 1+X=1
Proof using Truth Table
1 X Result
1 0 1
1 1 1
It’s a tautology
c) 0.X=0
Proof using Truth Table
0 X Result
0 0 0 It’s a fallacy
0 1 0
d) 1.X=X
Proof using Truth Table
1 X Result
1 0 1
1 1 1
2. Indempotence Law
a) X+X=X
Proof using Truth Table
X X Result 0+0=0
0 0 0 1+1=1 As per postulate II
1 1 1 So X+X=X
b) X.X=X
Proof using Truth Table
X X Result 0.0=0
0 0 0 1.1=1 As per postulate III
1 1 1 So X.X=X
3. Involution
X =X
X X X
0 1 0
1 0 1
4. Complementarity law
a) X+X =1
Proof using Truth Table
X X Result
0 1 1 0+1=1
1 0 1 1+0=1 As per postulate II
It’s a tautology
b) X.X=0
0.1=0
X X Result =0 As per postulate III
0 1 0
1 0 0
It’s a fallacy
5. Commutative Law
a) X+Y =Y+X
X Y X+Y Y+X
0 0 0 0
0 1 1 1
1 0 1 1
1 1 1 1
b) X.Y=Y.X
X Y X.Y Y.X
0 0 0 0
0 1 0 0
1 0 0 0
1 1 1 1
6. Associative Law
a) X+(Y+Z) = (X+Y) + Z
X Y Z Y+Z X+(Y+Z) X+Y (X+Y)+Z
0 0 0 0 0 0 0
0 0 1 1 1 0 1
0 1 0 1 1 1 1
0 1 1 1 1 1 1
1 0 0 0 1 1 1
1 0 1 1 1 1 1
1 1 0 1 1 1 1
1 1 1 1 1 1 1
7
b) X(YZ)=(XY)Z
Proof same as above
7. Distributive Law
a) X(Y+Z)=XY+XZ
b) X(X+Y)=X
Algebraic Proof is,
L.H.S=X(X+Y)
=XX+XY
8
P=X+Y
So P = X.Y
To prove the first part i.e P+P=1
(X+Y) + ( X.Y)
=((X+Y)+X)((X+Y)+Y)
= (X+X+Y) (X+Y+Y)
=(1+Y)(X+1) [As X+X=1 & Y+Y=1]
1
(X+Y). (X.Y)
= XXY + XYY
0+0=0
Therefore demorgans first theorem is proved
DeMorgan’s Second Theorem
X.Y = X+Y
9
Proof Suppose
P=X.Y, then P= X.Y=X+Y Here also
we need to prove P+P=1 & P.P=0
P+P=1
(X.Y) + (X+Y)
= (X+Y)+ (X.Y)
=(1+Y)(X+1)
= 1.1=1
P.P = 0
(X.Y)(X+Y)
=X.Y.X + X.Y.Y = 0.0=0
Therefore DeMorgans second theorem is proved.
Minterm
A minterm is the product of all variables in the logic system with or without bar.
Ex: If X & Y are the variables in the logic system, then XY+XY is the sum of products of all the
variables within the system. Since each term contains the product of all variables with or without
bar, each term is considered as the minterm
Here 0 denotes bar Minterm
If X=0 and Y=1, then the minterm will be XY Is product of all variables
Minterm expansion of expression 0 denotes bar
Steps are,
Convert the given expression into sum of products form
In each term multiply missing term + missing term
Expand the expression
Remove all duplicate terms
Ex: convert X + Y to minterms
X.(Y+Y) + Y.(X+X)
XY+XY+XY+XY
XY+ XY+XY
Shorthand notation
Minterm is denoted using ‘m’
Write the binary equivalent of each minterm (0 denotes bar & 1 denotes variable without bar)
Write the decimal equivalent of each binary as the subscript of ‘m’.
Ex: Shorthand notation of XYZ+XYZ+XYZ is
F(X, Y, Z)= m7 + m5 + m1
OR
F(X, Y, Z)= ∑(7, 5, 1)
Maxterm
A Maxterm is the sum of all the variables within the logic system with or without bar.
Ex: If X, Y & Z are the variables in the logic system, then (X+Y+Z)(X+Y+Z) is the product of the
sum of all the variables within the system. Since each term contains the sum of all variables with
or without bar, each term is considered as the Maxterm
Here 1 denotes bar Maxterm
Is the sum of all variables
If X=0 and Y=1, then the maxterm will be X+Y
1 denotes bar
10
Shorthand notation
Maxterm is denoted using ‘M’
Write the binary equivalent of each maxterm (1denotes bar & 0 denotes variable without bar)
Write the decimal equivalent of each binary as the subscript of ‘M’.
Ex: Shorthand notation of (X+Y+Z)(X+Y+Z)(X+Y+Z) is
F(X, Y, Z)= M0.M2.M1 OR F(X, Y, Z)= π(0.2.1.)
Canonical expression
A Boolean expression composed entirely either of minterms or of maxterms is referred to as
canonical expression.
Canonical expression can be represented in two forms
1. S.O.P form
2. P.O.S form
Canonical S.O.P Form
A Boolean expression represented completely as the sum of minterms is said to be in canonical
sum of products form.
Example 1
A logical network has two inputs X & Y and an output Z. the relationship between inputs and output is as
follows
When X=0 and Y=0, Z=1
When X=0 and Y=1, Z=0
When X=1 and Y=0, Z=1
When X=1 and Y=1, Z=1
Express this in canonical sum of products form
Answer:
Draw the truth table with inputs and outputs and add a column for minterms
X Y Z Minterm
0 0 1 XY
0 1 0 XY
1 0 1 XY
1 1 1 XY
0 0 0 1 XYZ
0 0 1 1 XYZ
0 1 0 1 XYZ
0 1 1 0 XYZ
1 0 0 0 XYZ
11
1 0 1 1 XYZ
1 1 0 0 XYZ
1 1 1 0 XYZ
Example 1
Consider the truth table given below and express the Boolean function in product of sums form.
X Y Z Output
0 0 0 1
0 0 1 0
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 1
Answer
Add a new column for maxterms
X Y Z Output Maxterms
0 0 0 1 X+Y+Z
0 0 1 0 X+Y+Z
0 1 0 1 X+Y+Z
0 1 1 0 X+Y+Z
1 0 0 1 X+Y+Z
1 0 1 0 X+Y+Z
1 1 0 1 X+Y+Z
1 1 1 1 X+Y+Z
Multiply the maxterms with output 0
Algebraic method
1. Simplify the expression using Boolean theorems
2. Convert into P.O.S form using X+YZ=(X+Y)(X+Z)
3. In each sum term add missing variable . missing variable
4. Keep on expanding using X+YZ=(X+Y)(X+Z) to get maxterms
5. Remove all duplicate terms
Example
Express XY+Y(Z(Z+Y)) into canonical P.O.S form
Refer the following example from textbook 13.15
Rules
Groups may not include any cell containing a zero
Groups may be horizontal or vertical, but not diagonal.
Groups must contain 1, 2, 4, 8, or in general 2n cells.
Groups should be as large as possible.
Every 1 must be in at least one group.
Overlapping allowed.
Wrap around allowed.
Fewest numbers of groups possible.
Grouping
Pairs
It’s a group of 2 one’s that are horizontally or vertically adjacent.
Pair eliminates a variable and its complement.
14
Quad
It’s a group of 4 one's that are horizontally or vertically adjacent.
A quad eliminates two variables and their complements.
X=AC
Octet
It’s a group of 8 one's that are horizontally or vertically adjacent.
An octet eliminates three variables and their complements.
15
Map Rolling: Map rolling means rolling the map as if its left edges are touching the right edges and top
edges are touching bottom edges.
Overlapping Groups: Overlapping means same 1 can be encircled more than once. Overlapping always
leads to simpler expressions.
Redundant Group: It is a group whose all 1's are overlapped by other groups. Redundant groups must be
removed. Removal of redundant group leads to much simpler expression.
Ex_2: Ex_3:
16
Ex_4: Ex_5:
Ex_6: Ex_7:
Ex_8:
A+B A+B’
A’+B A’+B’
17
Steps are,
Prepare the truth table for the given function
Draw an empty K-Map for the function
Enter 0’s in the corresponding squares for the output 0’s in the truth table
Enter 1’s in all the left out squares
Group adjacent 0’s in form of octets, quads and pairs
Write the reduced expression for all the groups and multiply them
More about gates
NOR
NAND
XOR
XNOR
NOR Gate
It’s a gate with 2 or more input signals and one output signal
It’s an inverted OR gate. That is NOR gate is a combination OR gate followed by an inverter
18
NAND Gate
It’s a gate with 2 or more input signals and one output signal
It’s an inverted AND gate. That is NAND gate is a combination AND gate followed by an inverter
XOR Gate
It stands for Exclusive OR gate
It’s a gate with 2 or more input signals and one output signal
Here odd number of input1’s produce output 1
XNOR Gate
It stands for Exclusive NOR gate
It’s an inverted XOR gate
Ic
Universal gates
NAND and NOR gates are the universal gates as any other gate can be made using NAND and
NOR.
NAND TO NAND Logic
NOT using NAND
A NAND A = A.A = A
19
A NAND B = A B = A + B
A NOR A = A+A = A
OR using NOR gate
A NOR B = A+B
Refer the examples 13.30, 31, 32, 33 & 34 in page 683, 684, 685