Module 2 Part 1
Module 2 Part 1
• We know for a n variable, we can have Boolean expression. i.e for a 2 variable We
can have 16 different Boolean expressions
• As: 0, 1, A, A’, B, B’, AB, A’B, AB’, A’B’, A+B, A’+B, A+B’, A’+B’, AB’+A’B, A’B’+AB
• Among this 16 functions, two are equal to constant (0,1). Some are repeated, We
have 3 basic gates AND,OR,NOT. For other 4 Boolean expression, we have 4 other
digital logic gates.
• NOR (A+B)’= A’B’
• NAND (AB) = A’+B’
• EX-OR AB’+A’B
• EX-NOR A’B’+AB
Logic Gates
NAND and NOR as universal gate
• A universal gate is a gate which can implement any Boolean function without need to
use any other gate type.
• In practice, this is advantageous since NAND and NOR gates are economical and
easier to fabricate and are the basic gates used in all IC digital logic families.
NAND as Universal Gate
You can EX-NOR and gate by adding a NAND implementation as NOT gate in front of EX-OR gate
& NOR gate by adding a NAND implementation as NOT gate in front of OR gate.
NOR as universal gate
You can EX-OR and gate by adding a NOR implementation as NOT gate in front of EX-NOR gate
And NAND gate by adding a NOR implementation as NOT gate in front of AND gate.
Karnaugh Map
• Karnaugh map is a graphical representation of the logic system.
• Easy way you can say that, in K-Map, Only 1 variable should be change in the
adjacent cell (rows and column).
• A’B’ and AB’ can be adjacent cell because only one variable (A) has changed
between the two terms but A’B’ and AB cant be adjacent cell because two literals
(both A and B) has changed.
• Similarly ,
• A’B’C and AB’C adjacent cell
• A’B’C and A’BC’ not adjacent cell
•
2-Variable K-Map
• Variable s are A and B
* Note : 01 and 10 cant be adjacent cell because two literals have changed. For that while constructing
the K-Map we have placed 01 and 11 as adjacent cell.
4 Variable K-Map
*Note: For cell adjacency rule here also 01 and 10 are not adjacent cell.
Examples
• Simply using K-Map
1. F(x,y,z) = m (2,3,4,5) ans:- F = x’y + xy’
• Minterm 0 to 15 belongs with A=0 and minterms 16 to 31 with A=1. Each four variable
map retains the previously defined adjacency when taken separately. In addition, each
square in the A=0 map is adjacent to the corresponding squares in the A=1 map. For
example, minterm 4 is adjacent to minterm 20.
Examples
1) Minimize with five variable K-Map m(0,1,2,4,5,6,10,13,14,18,21,22,24,26,29,30)
Ans:- F= de’ + a’b’d’ + cd’e + abc’e’
I=5
PI = x’y’, xy , xz, y’z
yz
EPI = x’y’, xy
x 00 01 11 10 NEPI = xz , y’z
0 1 1 F = x’y’ + xy + xz
1 1 1 1 Or
F= x’y’ + xy + y’z
Examples
I=6
bc PI = b’ , a
a 00 01 11 10 EPI = b’ , a
0 1 1 NEPI = 0
1 1 1 1 1 F = b’ + a
bc I=5
a 00 01 11 10 PI = a’b, c’
0 1 1 1 EPI = a’b, c’
1 1 1 NEPI = 0
F = a’b + c’
Examples
cd
ab 00 01 11 10 I = 10
00 1 1 1 PI = ab’, ad , cd , b’c , b’d’
01 1 EPI = ad , b’d’ , cd
NEPI = ab’ , b’c
11 1 1
F = ad + b’d’ + cd
10 1 1 1 1
Examples: 1 I = 10
yz PI = x’z’, wy’, wx, xyz , wz’
EPI = x’z’, wy’, xyz
wx 00 01 11 10
1 1
NEPI = wx, wz’
00 F = x’z’ + wy’ + xyz + wx
01 1
11 1 1 1 1
10 1 1 1
2 3
5 variable K-map: We need to combine the digits from two maps if they are overlapping each other.
2 3
Watch video:
https://www.youtube.com/watch?v=CZPwYZdmMI0
x 00 01 11 10 F = (x+z)(x’ +z’)
x 0 0 0
x’ 1 0 0
Examples
yz y+z y+z’ y’+z’ y’+z
wx 00 01 11 10
w+x 00
w+x’ 01 0 0 0
w’+x’ 11 0 0 0
w’+x 10
F = (w+x’+y)(x’+z’)(w’+x’+y’)
Don’t Care condition
• Generally we see that, the Boolean function is defined for all the input conditions
(may be as 1 or 0). But in real world problem , It is not always necessary to fill in the
complete truth table. Example
• For example, when dealing with BCD (Binary Coded Decimal) numbers encoded as
four bits, we may not care about any codes above the BCD range of (0, 1, 2…9). The
4-bit binary codes for the hexadecimal numbers (A, B, C, D, E, F) are not valid BCD
codes.
• Thus, we do not have to fill in those codes at the end of a truth table, or K-map.
These unspecified minterms of the Boolean function are called don’t care conditions.
• We specify ‘x’ in that particular input combinations in the K-Map.
• We can use this ‘x’ to form different groups in the K-Map. But we cant make a ‘lone’
with this don’t care conditions.
Example
• Simplify the Boolean function F(w,x,y,z) = m (1, 3, 7, 11, 15) which has the don’t
care conditions d(w,x,y,z) = (0, 2, 5)
yz yz
wx 00 01 11 10 wx 00 01 11 10
X 1 1 X 00 X 1 1 X
00
X 1 01 X 1
01
1 11 1
11
1 10 1
10
F = yz + w’x’ F = yz + w’z
Example
• Implement the following Boolean function F , together with the don’t-care conditions
d
F(A,B,C,D) = (2,4,10,12,14), d(A,B,C,D) = (0,1,5,8)