Professional Documents
Culture Documents
Boolean Algebra and Karnaugh Maps: Learning Objectives
Boolean Algebra and Karnaugh Maps: Learning Objectives
”
... Albert Einstein
1
2
CHAPTER
Boolean Algebra
Important Points
Boolean algebra works with binary variables.
A Boolean algebra is an algebraic system consisting of the set {0, 1}, the binary operations called
OR, AND, NOT denoted by the symbols “+”, “.”, and “ ′ ” [prime] respectively.
Boolean algebra enables the logic designer to simplify the circuit used, achieving economy of
construction and reliability of operation.
Boolean algebra suggests the economic and straightforward way of describing the circuitry used
in any computer system.
Boolean algebra is unique in the way that it takes only two different values either 0 or 1. It does
not have negative number. It does not have fraction number.
V
Switches in Series – Logic AND
Note:
‘0’→ Switch is Off
‘1’→ Switch is On
Logical Additions based on OR Function
(a) 0 + 0 = 0
(b) 0 + 1 = 1
(c) 1 + 0 = 1
(d) 1 + 1 = 1
A
B L
Boolean Properties
(a) Properties of AND Function
X. 0 = 0
0. X = 0
X. 1 = X
1. X = X
(b) Properties of OR Function
X+0=X
0+X=X
X+1=1
1+X=1
(c) Combining a Variable with itself or its Complement
X . X′ = 0
X.X=X
X+X=X
X + X′ = 1
(X′)′ = X
(d) Commutative Laws
x. y = y. x
x+y=y+x
(e) Distributive Laws
x(y + z) = x. y + x. z
x + y. z = (x + y)(x + z)
Logic Circuits can be simplified by simplifying the Boolean equation using any one of the following
methods:
(a) Applying Boolean properties.
(b) Karnaugh – Map method of simplification.
(c) Tabulation method.
Boolean properties can be applied successively to minimize the given Boolean equations. But
there is no guarantee that we always get minimal equation in this method.
2, 3 and 4 variable equations can be simplified to minimal value quickly using K – map method.
Tabulation method is used to minimize the equations with high order variables.
The properties of Boolean algebra are useful for the simplification of Boolean equation leading to
minimal gate structure.
Duality Principle
The important property of Boolean algebra is the duality principle. “It states that every algebraic
expression deducible from theorems of Boolean algebra remains valid if the operators and identify
elements are interchanged.”
E.g.:
x+x=x x.x = x By Duality
x+1=1 x. 0 = 0 By Duality
x + xy = x x(x + y) = x By Duality
x+y=y+x xy = yx By Duality
x + (y + z) = (x + y) + z x(yz) = (xy)z By Duality
Complement of a Function
It can be obtained by two ways
1. By using De Morgan’s Theorem
2. Take dual of function and then complement each literal
Example: Find the complement of functions
F1 = x y z + x y z
F2 = xy (z̅ + x̅ z)
Solution:
(a) By De Morgan’s Theorem
F1′ = x y z + x y z
= (x y z) . (x y z)
= (x + y + z)( x + y + z)
(b) Dual of F1 is F1dual = ( x + y + z) (x + y + z)
For complement of F1 , complement each literal of
F1dual ⇒ F1′ = (x + y + z)( x + y + z )
(II) Dual of F2 = (x + y) + z( x + z)
Complement each literal F2′ = ( x + y) + z( x + z)
Operator Precedence:
The operator precedence for evaluating Boolean expression is
1. Parenthesis
2. NOT
3. AND
4. OR
Canonical Form
Expressing the Boolean function in Standard Sum of Product form (SSOP) or Standard Product of
Sum form (SPOS) is called Canonical Form.
A Boolean function may be expressed algebraically from a given truth table by forming a minterm
for each combination of the variables which produces ‘1’ in the function output and then taking
the OR of all those terms.
X Y F
0 0 0
0 1 1
1 0 1
1 1 0
F(X, Y) = XY′ + X′ Y = Σm (1, 2). This representation is called SSOP form.
A Boolean function may be expressed algebraically from a given truth table by forming the
maxterms for each combination of the variables which produces ‘0’ in the function output and
then taking the AND of all those terms.
X Y F
0 0 0
0 1 1
1 0 1
1 1 0
F(X, Y) = (X + Y)(X ′ + Y ′ ) = ∏M (0, 3).
This representation is called SPOS form.
= Σ(1, 4, 5, 6, 7)
Important Points
Sum of products form can be implemented by using two-level Gate network, NAND- NAND logic.
NAND – NAND realization is same as AND – OR.
Product of sums form can be implemented by using two – level Gate network, NOR – NOR logic.
NOR – NOR realization is same as OR – AND.
If the signals are propagating through two stages of Gates, then it is called two level Gate network.
Degenerative Form: A two level Gate network is said to be Degenerative if it degenerates to a single
operation.
E.g.: AND – AND is equivalent to AND.
1 x y’ 3 x y’ 2
Tabulation Method
Tabulation method is used to simplify Boolean expression when there are more than 5 variables.
In an n-variable K-map combining 8 adjacent cells containing 1′s as a group will result a term of
(n−3) literals.
In an n-variable K-map combining 8 adjacent cells containing 1′s as a group will eliminate 3
variables.
Number of No. of Cells Containing No. of Variables No. of Literals Present
Variables 𝟏′𝐬 Grouped Eliminated in the Resulting Term
4 2 0
2 2 1 1
1 0 2
8 3 0
4 2 1
3
2 1 2
1 0 3
16 4 0
8 3 1
4 4 2 2
2 1 3
1 0 4
Sum of number of variables eliminated and number of literals present in the resulting term is
always equal to the number of variables in the K – map.
Comparator
Often in the evaluation of digital information it is important to compare two Binary strings (or)
Binary words to determine if they are exactly equal. This comparison process is performed by a
“Digital Comparator”.
The basic comparator evaluates two Binary strings bit by bit and output 1 if they are exactly equal.
An Exclusive-NOR Gate is the easiest way to compare the equality of bits. If both bits are equal
(0-0 or 1-1), the Ex-NOR puts out a ‘1’.
To compare more than just 2 bits, we need additional Ex − NORs and the output of all of them must
be 1.
For example, to design a comparator to evaluate two 4-bit number, we need four Ex - NOR. To
determine total equality, connect all four outputs into an AND Gate. That way, if all four outputs are
1′s, the AND Gate puts out a 1. Below Figure shows as comparator circuit built from Ex−NORs and
an AND Gate.
Each Ex-NOR
A0 check for
B0 equality
A1
B1
Out =1 If
A2 A 0 = B0
B2 A1 = B1
A 2 = B2
A3 A 3 = B3
B3
Binary Comparator for Comparing Two 4-bit Binary Strings
Decoder
A Decoder is a combinational circuit that converts Binary information from n input lines to a max of
2n unique o/p lines. If the decoded information has unused or don’t care conditions then the o/p
will have less than 2n output lines.
The purpose of a decoder is to generate 2n or less minterms of n input variables.
xX D0
D1
D2
3×3 D3
yY
decoder
D D4
D5
D6
zZ D7
D0 (000)
(x̅ y̅ z̅)
D1 (000)
(x̅ y̅ z )
D2 (000)
(111) (x y z)
Inputs Outputs
w x y z D0 D1 D2 D3 D4 D5 D6 D7 D8 D9
0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
1 0 0 0 1 0 1 0 0 0 0 0 0 0 0
2 0 0 1 0 0 0 1 0 0 0 0 0 0 0
3 0 0 1 1 0 0 0 1 0 0 0 0 0 0
4 0 1 0 0 0 0 0 0 1 0 0 0 0 0
5 0 1 0 1 0 0 0 0 0 1 0 0 0 0
6 0 1 1 0 0 0 0 0 0 0 1 0 0 0
7 0 1 1 1 0 0 0 0 0 0 0 1 0 0
8 1 0 0 0 0 0 0 0 0 0 0 0 1 0
9 1 0 0 1 0 0 0 0 0 0 0 0 0 1
Don’t care conditions = D10 D11 … . D15
Karnaugh Map
wx
yz 00 01 11 10
0 4 12 8
D8
00 D0 D4 d
1 5 13 9
01 D1 D5 d D9
3 7 15
D3 11
11 D7 d d
2 6 14 10
10 D2 D6 d
d
D0 = w̅ x̅ y̅ z̅
D1 = w̅ x̅ y̅ z
D2 = x̅ y z̅
D3 = x̅ y z
D4 = x y̅ z̅
D5 = x y̅
D6 = x y z̅
D7 = x y z
D8 = w z̅
D9 = w z
w x y z
D0 (000)
(wx̅ y̅ z̅)
D8 (1000)
(w z̅)
D9 (1001)
(w z)
Full Subtractor
A B B1 D0 B0
0 0 0 0 0 0
1 0 0 1 1 1
2 0 1 0 1 1
3 0 1 1 0 1
4 1 0 0 1 0
5 1 0 1 0 0
6 1 1 0 0 0
7 1 1 1 1 1
D0 = f(A, B, B1 )
= Σ(1, 2, 4, 7)
B0 = Σ(1, 2, 3, 7)
0
A 1
2 D0
B 3×8 3
4
Ddecoder 5
B1
6 B0
7
A D0
B F. S.
C B0
(a) Y1 = f(x, y, z) = x̅ y̅ + y̅ z̅
(b) Y2 = f(x, y, z)
= (x̅ + y̅)(x̅ + z̅)
Solution:
(a) Y1 = f(x, y, z) = x̅ y̅ + y̅ z̅
= x̅ y̅ (z + z̅) + y̅ z (x + x̅)
= x̅ y̅ z + x̅ y̅ z̅ + xyz + y̅ z x̅
= 001 000 100
= Σ(0, 1, 4)
(b) Y2 = f(x, y, z)
= (x̅ + y̅)(x̅ + z̅)
= (x + y + z)(x + y + z)(x + y + z)(x + y + z)
= (x + y + z)(x + y + z)(x + y + z)
= (x̅ + y̅ + z̅) (x̅ + y̅ + z̅) (x̅ + y + z̅)
↓ ↓ ↓
110 111 101
Y2 = f(x, y, z)
= π(5, 6, 7) … POS
= Σ(0, 1, 2, 3, 4, ) … SOP
0
x 1 Y2
2
y 3×8 3
4
Ddecoder 5
z Y1
6
7