0% found this document useful (0 votes)
13 views29 pages

Module 2 Part 1

The document discusses different types of logic gates including AND, OR, NOT, NAND, NOR, EX-OR and EX-NOR gates. It explains that NAND and NOR gates can be used as universal gates to implement any Boolean function. The document also covers Karnaugh maps, their construction and how they can be used to simplify Boolean functions.

Uploaded by

matey.tushar5646
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views29 pages

Module 2 Part 1

The document discusses different types of logic gates including AND, OR, NOT, NAND, NOR, EX-OR and EX-NOR gates. It explains that NAND and NOR gates can be used as universal gates to implement any Boolean function. The document also covers Karnaugh maps, their construction and how they can be used to simplify Boolean functions.

Uploaded by

matey.tushar5646
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 29

Logic gates

• 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

Fig: NAND as EX-OR

Fig: NAND as NOT, AND, OR 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

Fig: NOR as NOT, AND, OR gate Fig: NOR as EX-NOR

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.

• It can be drawn directly from either minterm (sum-of-products) or


maxterm (product-of-sums) Boolean expressions.

• Minterm when your Boolean expression or function is giving


output ‘1’
• and Maxterms when your Boolean expression or function is giving
output logic ‘0’
Construction of K-Map
• An n variable Karnaugh Map has 2n squares, and each possible
input is allotted a square. Squares are also called cell.
• In the case of minterm, In K-Map we place a ‘0’ in all those squares
for which the output is ‘1’.
• Also, the extreme rows and extreme columns are considered
adjacent.
Rules for simplification of K-Map
• Rule 1: If you are doing with minterms, put a 1 in all specified minterms position.
• Rule 2: Group all adjacent 1s, Different types of groups we can form : Lone (1), Pair
(2), Quad (4), Octet (8), .. (all are in power of two form).
• Rule 3: Groups may be horizontal or vertical but not diagonal
• Rule 4: Each group should be as large as possible and the number of groups should
be as few as possible.
• Rule 5: Each cell containing a 1 must be in at least one group.
• Rule 6: Groups may overlap
• Rule 7: Extreme rows and columns are adjacent.
Cell Adjacency
• The designation of adjacent rows and adjacent columns should be the same except
for one of the literal being complemented.

• 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

• Where, 0,1,2,3 is the decimal equivalent position of variable A and B


• The combinations are : 00,01,10,11
• Literals combination : A’B’,A’B,AB’,AB
• In decimal : : 0,1,2,3
3 Variable K-Map

The combinations are : 000,001,010,011,100,101,110,111


Literals combination : A’B’C’,A’B’C,A’BC’,A’BC,AB’C’,AB’C,ABC’,ABC
In decimal : : 0,1,2,3,4,5,6,7

* 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

The combinations are :


0000,0001,0010,0011,0100,0101,0110,0111,1000,1001,1010,1011,1100,1101,1110,1111
Literals combination :
A’B’C’D’,A’B’C’D,A’B’CD’,A’B’CD,A’BC’D’,A’BC’D,A’BCD’,A’BCD,AB’C’D’,AB’C’D,AB’CD’,AB’CD,ABC’D’,ABC’D,ABCD’,
ABCD
In decimal : : 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15

*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’

2. F(x,y,z) = m (3,4,6,7) ans:- F = yz + xz’

3. F(x,y,z) = m (0,2,4,5,6) ans:- F = z’ + xy’

4. F(w,x,y,z) = m (0,1,2,4,5,6,8,9,12,13,14) ans:- F = y’ + w’z’ + xz’


Five Variable K-Map
• Maps for more than four variables are not as simple to use as maps for four or fewer
variables. A five-variable map needs 32 squares and a six-variable map needs 64 squares.

• 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’

2) Minimize with five variable K-Map F(a,b,c,d,e) =


m(0,4,6,8,12,13,14,15,16,17,18,21,24,25,26,28,29,31)
Ans:- F= ad’e + ac’e’ + bce + a’ce’ + b’de’ + a’d’e’
Implicants, Prime Implicants, Essential
Prime Implicants
• Implicants :- Number of 1’s present in the K-Map
• Prime Implicants :- A prime implicant is a product obtained by combining the
maximum possible number of adjacent squares in the map.
• Essential Prime Implicants :- If a minterm in a square is covered by only one prime
implicant, the prime implicant is said to be essential prime implicants.
• Examples :-

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

From 23:20minutes onwards


Product of Sums Simplification
• Rules:
1. Put the maxterms in the K-Map.
2. Maxterms are represented as ‘0’ in the Boolean function output.
3. Simplification rules are same.
Examples: F(x,y,z) =(0,2,5,7)

yz y+z y+z’ y’+z’ y’ +z

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)

You might also like