Boolean Algebra
Boolean Algebra
1 INTRODUCTION A A A
A A 1
Boolean algebra is the subarea of algebra in 3. AND Theorem:
which the values of the variables are the 0.0 0
truth values true and false, usually denoted 0.1 0
1 and 0 respectively. The most obvious 1.0 0
way to simplify Boolean expressions is to 1.1 1
manipulate them in the same way as 0.A 0
normal algebraic expressions are 1.A A
manipulated. With regards to logic A.A A
relations in digital forms, a set of rules for A.A 0
symbolic manipulation is needed in order
4. Commutative Law:
to solve for the unknowns.
A B B A
A set of rules formulated by the English
AB BA
mathematician George Boole describe
5. Associative Law:
certain propositions whose outcome would (A B) C A (B C)
be either true or false. With regard to digital
logic, these rules are used to describe circuits (AB)C A(BC)
whose state can be either, 1 (true) or 0 6. Distributive Law:
(false). In order to fully understand this, the A(B C) AB AC
relation between AND gate, OR gate and NOT A (BC) (A B)(A C)
gate operations should be appreciated. 7. Redundancy Law:
A AB A
OPERATOR SYMBOL A(A B) A
NOT ‘ or - A AB A B
AND .
OR + A A B AB
8. De Morgan's Theorem:
2.1.1 LAWS & THEOREMS A B AB
1. NOT Theorem: AB A B
9. Consensus Theorem:
0 1
AB AC BC AB AC
1 0
A b A C B C A B A C
A A
2. OR Theorem:
0 0 0 2.1.2 BOOLEAN FUNCTION
0 1 1
1+ 0=1 A Boolean (logical) function described by
1+ 1=1 an algebraic expression consists of binary
0+ A=A variables, the constants 0 and 1, and the
1 A 1 logic operation symbols. For a given value
of the binary variables, the function can be
equal to either 1 or 0.
© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
As an example, consider the Boolean 1 0 1 0
function 1 1 0 0
F x y'z
1 1 1 1
Here F is function of 3 independent
Example: Write the logical expression for
variables x, y, z.
function Y in the given truth table.
F 1 ; if x 1 or both y’ 1 y 0 and z = 1.
B C Y
F 0 ; Otherwise 0 0 0
A Boolean function expresses the logical 0 1 1
relationship between binary variables and 1 0 0
is evaluated by determining the expression 1 1 1
for all possible values of the variables. Solution: The function Y = 1 when B = 0 &
C = 0 or B = 1 & C = 1
2.1.3 TRUTH TABLE
Y B.C B.C
A truth table is a means for describing how
2.1.4 PRINCIPLE OF DUALITY
a logic circuit’s output depends on the logic
levels present at the circuit’s inputs. The
The duality principle states that every
table lists all possible combinations of logic
algebraic expression deducible from the
levels present at inputs A and B, along with
theorems of Boolean algebra remains valid
the corresponding output level x. Note that
if the operators and identity elements are
there are 4 table entries for the two-input
interchanged.
truth table, 8 entries for a three-input truth
e.g. If X Y Y X then by duality
table, and 16 entries for the four-input
X.Y Y.X
truth table. The number of input
If X + 0 = X then by duality X.1 X
combinations will equal 2n for an n-input
To find dual of any logical expression
truth table.
1. Interchange the OR and AND operations
A B X
of the expression.
0 0 1
2. Interchange the 0 and 1 elements of the
0 1 0
expression.
1 0 0 3. Do not change the form of the
1 1 0 variables.
Example: Write the truth table for logic
Example: Find the dual of F xy xy.
function F x yz .
Solution: Interchanging the OR and AND
Solution: We know that the function F =1
operations of the expression
if x = 1 or y = 1 & z = 1
F = 0 other wise FD x y x y
This information about function F can be
show in truth table as 2.1.5 COMPLEMENT OF A FUNCTION
© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Example: Calculate the complement of SOP expression for a function is the
F xy xy. combination of min terms. For the
Solution: complement of above given table F in SOP form can be
written as
F F x y x y
F ABC ABC ABC ABC
The function F can also be written as
2.1.6 MIN & MAX TERMS F m1 m 3 m 5 m 7 m(1, 3,5, 7)
The combinations of independent variables The numbers 1, 3, 5 & 7 represents the
for which the function has value 1 are combinations of A, B & C for which the
called min terms & the combinations for function F 1 .
which the function has value 0 are called
max terms. Consider a function Y(A,B) POS expression for a function is
whose truth table is as shown below combination of max terms. For the
above given table
Combin A B Y Min term Max term F’ ABC ABC ABC ABC
ation F A B C . A B C . A B C . A B C
0th 0 0 0 AB(m 0 ) A B (M 0 ) The function F can also be written as
1st 0 1 1 AB (m1 ) A B (M1 ) F M0 M 2 M4 M 6 M(0, 2, 4, 6)
2nd 1 0 0 AB (m 2 ) A B (M 2 ) The numbers 0, 2, 4 & 6 represents the
combinations of A, B & C for which the
3rd 1 1 1 AB (m 3 ) A B (M3 ) function F = 0.
min terms for the function are AB & AB 2.2.1 CANONICAL FORMS
(1st& 3rd combination of A & B) A canonical SOP or POS expression is the
1. max terms are AB A B one in which each product or sum term
contains all the independent variables.
AB A B (0th & 2nd combination
of A & B) Example: Convert A AB to canonical SOP
form.
Note:
Solution: A AB A B B AB
While writing min terms there will
always be AND operator between AB AB AB
variables.
While writing max terms there will Example: Convert A(A+B) into canonical
always be OR operator between POS form.
variables.
Solution: A A B A BB A B
2.2 SOP & POS EXPRESSIONS A B A B A B
© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Solution: Q x y z’ z x y z
1. In SOP Y m 1,3 m1 m3 x y(1 x) z
BC BC x y z
Y M 0, 2 M0 M2
2. In POS 2.3 KARNAUGH MAP
B C B C
The Karnaugh map (K-MAP) provides a
simple and straight-forward method of
Example: Simplify
minimizing Boolean expressions. With the
i. xy xy'
Karnaugh map Boolean expressions having
ii. xyz x ' y xyz' up to four and even six variables can be
iii. ABC+A’B+ABC’+AC simplified.
iv. (x’y’ z)’ z xy wz
Solution: 2.3.1 2-VARIABLE K-MAP
i. xy xy ' x y y ' x
A function F(A,B) with 2 variables can be
Q y y' 1 simplified using a two variable K-map
ii. xyz x ' y xyz ' xyz xyz x ' y xyz ' shown below by substituting the values of
F for different combinations of A & B in the
(Repetition of xyz term won’t make any
respective block.
difference)
y xz x ' xy(z z ' )
y z x' xy
Q xz x ' (z x ' )
y(z x ' x) Procedure:
y(z 1)
Consider a Y(B,C) function with truth
Q x x' 1 table
y B C Y
iii. ABC A’B ABC’ AC AC A’ B 0 0 0
A(BC’ C) 0 1 1
(C A’)B A(B C) 1 0 0
BC A’B AB AC 1 1 1
BC (A’ A)B AC Here m 0 0 , m1 1, m 2 0 , m3 1
BC B AC Substitute the values of m 0 , m1 , m 2 , m 3
B C 1 AC in the K-map
B AC
iv. x’y’ z ’ z xy wz
'
x’y’ z’ z xy wz Make groups of 1,2,4,8,16 for 1’s in the
K-map
Q using De Morgan 's Law
x " y" z’ xy (1 w)z
x y z’ xy z
x y z xy
© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Write the expression for the groups 5. Groups may overlap.
1. For both the 1s in the group B 1 i.e.
B is same for both 1s, hence it will
be taken into consideration while
writing the expression.
2. For upper 1, A 0 & for lower 1,
A 1 . As is different for both 1s, 6. Groups may wrap around the table.
hence it will not be taken into The leftmost cell in a row may be
consideration. grouped with the rightmost cell and
The expression for F B the top cell in a column may be
grouped with the bottom cell.
Rules for grouping:
1. Groups may not include any cell
containing a zero
© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Example:Simplify
f (A, B,C) m(0, 2, 4,5, 6) . 2.3.4 DON’T CARE CONDITION
Solution:
Don't cares in a Karnaugh map, or truth
table, may be either 1s or 0s, as long as we
don't care what the output is for an input
condition we never expect to see. We plot
these cells with a cross, ×, among the
f ABC AB C normal 1s and 0s. When forming groups of
cells, treat the don't care cell as either
a 1 or a 0, or ignore the don't cares. This is
Example: Simplify
helpful if it allows us to form a larger group
f (A, B,C) M(1, 2, 3,5, 7) than would otherwise be possible without
Solution: the don't cares. There is no requirement to
group all or any of the don't cares. Only use
them in a group if it simplifies the logic.
Example:Simplify
F A, B, C, D m 1, 3, 7,11,15 d(0, 2,5)
f ABC C A B Solution:Substituting all the 1s & don’t
cares in the 4 variable K-map we get
2.3.3 4-VARIABLE K-MAP
© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission