DLD Lab Assignment
DLD Lab Assignment
DLD Lab Assignment
4 Variable K-Map
The number of cells in 4 variable K-map is sixteen, since
the number of variables is four. The following figure
shows 4 variable K-Map.
There is only one possibility of grouping 16 adjacent
min terms.
Let R1, R2, R3 and R4 represents the min terms of first
row, second row, third row and fourth row
respectively. Similarly, C1, C2, C3 and C4 represents
the min terms of first column, second column, third
column and fourth column respectively. The
possible combinations of grouping 8 adjacent min
terms are {(R1, R2), (R2, R3), (R3, R4), (R4, R1), (C1, C2),
(C2, C3), (C3, C4), (C4, C1)}.
If w=0, then 4 variable K-map becomes 3 variable K-
map.
Question
f(a,b,c,d) = ∑ m ( 0,1,2,3,12,13,14,15)
a b c d f
a'b'c'd' 0 0 0 0 1 m0
a'b'c'd 0 0 0 1 1 m1
a'b'cd' 0 0 1 0 1 m2
a'b'cd 0 0 1 1 1 m3
a'bc'd' 0 1 0 0 0 m4
a'bc'd 0 1 0 1 0 m5
a'bcd' 0 1 1 0 0 m6
a'bcd 0 1 1 1 0 m7
ab'c'd' 1 0 0 0 0 m8
ab'c'd 1 0 0 1 0 m9
ab'cd' 1 0 1 0 0 m10
ab'cd 1 0 1 1 0 m11
abc'd' 1 1 0 0 1 m12
abc'd 1 1 0 1 1 m13
abcd' 1 1 1 0 1 m14
abcd 1 1 1 1 1 m15
AND = 8 4 INPUTS
OR = 1 8 INPUTS
NOT = 4
TOTAL =13
Y = A'B' + AB
and = 2 2 inputs
or = 1 2 inputs
Not = 2
Total 5
Example:
OR gates are used in Door Bell Switches.
AND Gate
In AND gate the output of an AND gate attains the state 1 if and only if all the inputs are in state 1.
Example:
AND gates are also used in alarm circuits.
NOT Gate
In NOT gate the output of a NOT gate attains the state 1 if and only if the input does not attain the
state 1.
The Boolean expression is Y = Aˉ, read as Y equals NOT A.
The truth table of NOT gate is as follows;
Example:
NOT gates are also used in temperature detector circuits.
The three gates (OR, AND and NOT), when connected in various combinations, give us basic logic
gates such as NAND, NOR gates, which are the universal building blocks of digital circuits.
NAND Gate
This basic logic gate is the combination of AND and NOT gate.
The Boolean expression of NAND gate is Y = Aˉ.B
The truth table of a NAND gate is given as;
Example:
NAND gates are used in buzzer circuits.
NOR Gate
This gate is the combination of OR and NOT gate.
Example:
It behaves as a parity checker and a controlled inverter as well.
Exclusive-NOR Gate (XNOR Gate)
In XNOR gate the output is in state 1 when its both inputs are the same that is, both 0 or both 1.
The Boolean expression of XNOR gate Y =
The truth table of an XNOR gate is given below;
Example:
It is used in arithmetic and encryption circuits.