Académique Documents
Professionnel Documents
Culture Documents
Prepared By:
Ahmed Darwish
Electronics and Electrical Telecom. Engineer
SIMPLY, DIGITAL
Eng. Ahmed Darwish Tel: 00965 51105252 (Calls only) WhatsApp: 00965 514 98065
Simply, DIGITAL provides professional solutions for:
Electronics and Electrical Circuits Designs and Assembly
Digital Circuits Designs
Arduino Projects Programming
OrCAD Pspice Simulation Projects Designs
Multisim Simulation Projects Designs
Fritzing Circuit Designs
Twitter: @Simply01Digital
Instagram: @simplydigital010
Mail: simply_digital@outlook.com
Eng. Ahmed Darwish Tel: 00965 51105252 (Calls only) WhatsApp: 00965 514 98065
Introduction:
The main purpose of the design minimization is to find a simpler, cheaper and
equivalent realization of the digital circuit. That way the manufacturers can reduce
the overall cost.
The Boolean algebra helps us to minimize the function, but sometimes it’s very
difficult and long process to minimize some functions that have many minterms.
The computer software does the job in much less time and more accuracy. So, we
shall study the methodologies of function minimization for 2, 3, and 4 inputs
designs.
Karnaugh Map:
The Boolean functions can be simplified with direct procedures using the Karnaugh
Maps (K-Map). The K-Map is made up of squares represent the output of the
function. We can apply the K-Map to minimize the SOP function or the POS function
using the same procedures.
Sometimes the K-Map has more than one solution or minimization result. That is
totally accepted as long as the realization satisfies the final output. The purpose of
the K-Map is to minimize the terms of the Boolean function and to get the smallest
number of literals per term.
Minimization Procedures:
Find the truth table of the function or the minterms/maxterms expression
Draw a map with squares equal to the number of the function possibilities
- 2 inputs 4 possible combinations Map with 4 squares
- 3 inputs 8 possible combinations Map with 8 squares
- 4 inputs 16 possible combinations Map with 16 squares
- 5 or more inputs ???
Start to combine neighbor squares with equal minterms/maxterms together
Derive the final minterms/maxterms expression
Check if more simplification is possible
Draw the final logic circuit
Eng. Ahmed Darwish Tel: 00965 51105252 (Calls only) WhatsApp: 00965 514 98065
Two Variables Map
X Y F
0 0 M0
0 1 M1
1 0 M2
1 1 M3
Y
X 0 1
0 M0 M1
1 M2 M3
Y
X 0 1
0 X`Y` X`Y
1 XY` XY
Y
X Y
M0 M1
X M2 M3
Eng. Ahmed Darwish Tel: 00965 51105252 (Calls only) WhatsApp: 00965 514 98065
Combining neighbor squares if similar:
Y
X Y
M0 M1 Four adjacent squares produce a
X M2 M3 function equals 1
Y
X Y
M0 M1 Two adjacent squares represent
X M2 M3 a term with one literals
Groups are:
M0 – M2 M1 – M3
Y
X Y
M0 M1 Groups are:
X M2 M3 M0 – M1 M2 – M3
Y
X Y
M0 M1 One square represents a term
X M2 M3 with two literals
Eng. Ahmed Darwish Tel: 00965 51105252 (Calls only) WhatsApp: 00965 514 98065
Example
For the following truth table, find the minimum expression using K-Map
X Y F
0 0 0
0 1 1
1 0 1
1 1 1
Solution:
Y
Y
X
0 1
X 1 1
F(X,Y) = X+Y
Eng. Ahmed Darwish Tel: 00965 51105252 (Calls only) WhatsApp: 00965 514 98065
Three Variables Map
Assume a Boolean function F that is a function of inputs X, Y, and Z
X Y Z F
0 0 0 M0
0 0 1 M1
0 1 0 M2
0 1 1 M3
1 0 0 M4
1 0 1 M5
1 1 0 M6
1 1 1 M7
YZ
X 00 01 11 10
0 M0 M1 M3 M2
1 M4 M5 M7 M6
YZ
X 00 01 11 10
0 X`Y`Z` X`Y`Z X`YZ X`YZ`
YZ
X Y
M0 M1 M3 M2
X M4 M5 M7 M6
Eng. Ahmed Darwish Tel: 00965 51105252 (Calls only) WhatsApp: 00965 514 98065
Combining neighbor squares if similar:
YZ
X Y
M0 M1 M3 M2 Eight adjacent squares produce a
X M4 M5 M7 M6 function equals 1
Z
YZ
X Y
M0 M1 M3 M2 Four adjacent squares represent
a term with one literal
X M4 M5 M7 M6 Groups are:
Z M0 – M1 – M4 – M5
M3 – M2 – M7 – M6
YZ
X Y
M0 M1 M3 M2 Groups are:
M0 – M2 – M4 – M6
X M4 M5 M7 M6 M3 – M1 – M7 – M5
Z
YZ
X Y
M0 M1 M3 M2 Groups are:
M0 – M1 – M3 – M2
X M4 M5 M7 M6 M4 – M5 – M7 – M6
Z
Eng. Ahmed Darwish Tel: 00965 51105252 (Calls only) WhatsApp: 00965 514 98065
YZ
X Y
M0 M1 M3 M2 Two adjacent squares represent
a term with two literals
X M4 M5 M7 M6 Groups are:
Z M0 – M1 M4 – M5
M3 – M2 M7 – M6
YZ
X Y
M0 M1 M3 M2 Groups are:
M0 – M4 M3 – M7
X M4 M5 M7 M6 M6 – M2 M1 – M5
Z
YZ
X Y
M0 M1 M3 M2 Groups are:
M0 – M2 M3 – M1
X M4 M5 M7 M6 M6 – M4 M7 – M5
Z
YZ
X Y
M0 M1 M3 M2 One square represents a term
with three literals
X M4 M5 M7 M6
Z
Eng. Ahmed Darwish Tel: 00965 51105252 (Calls only) WhatsApp: 00965 514 98065
Example
For the following Boolean function, find the minimum expression using K-Map.
(Simplify the following Boolean function)
F(X,Y,Z) = ∑ (2,3,4,5)
Solution:
YZ
X Y
0 0 1 1
X 1 1 0 0
Z
F (X,Y,Z) = X`Y + XY` = X⊕Y
Example
For the following Boolean function, find the minimum expression using K-Map.
(Simplify the following Boolean function)
F(X,Y,Z) = ∑ (3,4,6,7)
Solution:
YZ
X Y
0 0 1 0
X 1 0 1 1
Z
F(X,Y,Z) = YZ + XZ`
Eng. Ahmed Darwish Tel: 00965 51105252 (Calls only) WhatsApp: 00965 514 98065
Example
For the following Boolean function, find the minimum expression using K-Map.
(Simplify the following Boolean function)
F(X,Y,Z) = ∑ (0,2,4,5,6)
Solution:
YZ
X Y
1 0 0 1
X 1 1 0 1
Z
F(X,Y,Z) = Z` + XY`
Eng. Ahmed Darwish Tel: 00965 51105252 (Calls only) WhatsApp: 00965 514 98065
Example
For the following Boolean function, find the minimum expression using K-Map.
(Simplify the following Boolean function)
F(A,B,C) = A`C + A`B + AB`C + BC
Solution:
First, we must find the minterms
A`C = A`C (B+B`)
= A`C B+ A`CB` (M3, M2)
A`B = A`B (C+C`)
= A`BC + A`B`C (M3, M1)
AB`C (M5)
BC = BC (A+A`)
= ABC + A`BC (M7, M3)
So, we have: F(A,B,C) = ∑ (1,2,3,5,7)
BC
A B
0 1 1 1
A 0 1 1 0
C
F(A,B,C) = C + A`B
Eng. Ahmed Darwish Tel: 00965 51105252 (Calls only) WhatsApp: 00965 514 98065
Four Variables Map
W X Y Z F
0 0 0 0 M0
0 0 0 1 M1
0 0 1 0 M2
0 0 1 1 M3
0 1 0 0 M4
0 1 0 1 M5
0 1 1 0 M6
0 1 1 1 M7
1 0 0 0 M8
1 0 0 1 M9
1 0 1 0 M10
1 0 1 1 M11
1 1 0 0 M12
1 1 0 1 M13
1 1 1 0 M14
1 1 1 1 M15
YZ
WX 00 01 11 10
00 M0 M1 M3 M2
01 M4 M5 M7 M6
11 M12 M13 M15 M14
10 M8 M9 M11 M10
Eng. Ahmed Darwish Tel: 00965 51105252 (Calls only) WhatsApp: 00965 514 98065
YZ
WX 00 01 11 10
00 W`X`Y`Z` W`X`Y`Z W`X`YZ W`X`YZ`
YZ
WX Y
M0 M1 M3 M2
M4 M5 M7 M6
X
M12 M13 M15 M14
W
M8 M9 M11 M10
Z
Eng. Ahmed Darwish Tel: 00965 51105252 (Calls only) WhatsApp: 00965 514 98065
Combining neighbor squares if similar:
YZ
WX Y
M0 M1 M3 M2 Sixteen adjacent squares produce
a function equals 1
M4 M5 M7 M6
X
M12 M13 M15 M14
W
M8 M9 M11 M10
Z
YZ
WX Y
M0 M1 M3 M2 Eight adjacent squares represent
a term with one literal
M4 M5 M7 M6
X
M12 M13 M15 M14
W
M8 M9 M11 M10
Z
YZ
WX Y
M0 M1 M3 M2
M4 M5 M7 M6
X
M12 M13 M15 M14
W
M8 M9 M11 M10
Z
Eng. Ahmed Darwish Tel: 00965 51105252 (Calls only) WhatsApp: 00965 514 98065
YZ
WX Y
M0 M1 M3 M2
M4 M5 M7 M6
X
M12 M13 M15 M14
W
M8 M9 M11 M10
Z
YZ
WX Y
M0 M1 M3 M2
M4 M5 M7 M6
X
M12 M13 M15 M14
W
M8 M9 M11 M10
Z
YZ
WX Y
M0 M1 M3 M2 Four adjacent squares represent
a term with two literals
M4 M5 M7 M6
X
M12 M13 M15 M14
W
M8 M9 M11 M10
Z
Eng. Ahmed Darwish Tel: 00965 51105252 (Calls only) WhatsApp: 00965 514 98065
YZ
WX Y
M0 M1 M3 M2
M4 M5 M7 M6
X
M12 M13 M15 M14
W
M8 M9 M11 M10
Z
YZ
WX Y
M0 M1 M3 M2
M4 M5 M7 M6
X
M12 M13 M15 M14
W
M8 M9 M11 M10
Z
YZ
WX Y
M0 M1 M3 M2
M4 M5 M7 M6
X
M12 M13 M15 M14
W
M8 M9 M11 M10
Z
Eng. Ahmed Darwish Tel: 00965 51105252 (Calls only) WhatsApp: 00965 514 98065
YZ
WX Y
M0 M1 M3 M2
M4 M5 M7 M6
X
M12 M13 M15 M14
W
M8 M9 M11 M10
Z
YZ
WX Y
M0 M1 M3 M2
M4 M5 M7 M6
X
M12 M13 M15 M14
W
M8 M9 M11 M10
Z
YZ
WX Y
M0 M1 M3 M2 Two adjacent squares represent
a term with three literals
M4 M5 M7 M6
X
M12 M13 M15 M14
W
M8 M9 M11 M10
Z
Eng. Ahmed Darwish Tel: 00965 51105252 (Calls only) WhatsApp: 00965 514 98065
YZ
WX Y
M0 M1 M3 M2
M4 M5 M7 M6
X
M12 M13 M15 M14
W
M8 M9 M11 M10
Z
YZ
WX Y
M0 M1 M3 M2
M4 M5 M7 M6
X
M12 M13 M15 M14
W
M8 M9 M11 M10
Z
YZ
WX Y
M0 M1 M3 M2
M4 M5 M7 M6
X
M12 M13 M15 M14
W
M8 M9 M11 M10
Z
Eng. Ahmed Darwish Tel: 00965 51105252 (Calls only) WhatsApp: 00965 514 98065
YZ
WX Y
M0 M1 M3 M2
M4 M5 M7 M6
X
M12 M13 M15 M14
W
M8 M9 M11 M10
Z
YZ
WX Y
M0 M1 M3 M2
M4 M5 M7 M6
X
M12 M13 M15 M14
W
M8 M9 M11 M10
Z
YZ
WX Y
M0 M1 M3 M2 One square represents a term
with four literals
M4 M5 M7 M6
X
M12 M13 M15 M14
W
M8 M9 M11 M10
Z
Eng. Ahmed Darwish Tel: 00965 51105252 (Calls only) WhatsApp: 00965 514 98065
Example
For the following Boolean function, find the minimum expression using K-Map.
(Simplify the following Boolean function)
F(W,X,Y,Z) = ∑ (0,1,2,4,5,6,8,9,12,13,14)
Solution:
YZ
WX
Y
1 1 0 1
1 1 0 1
X
1 1 0 1
W
1 1 0 0
Z
Eng. Ahmed Darwish Tel: 00965 51105252 (Calls only) WhatsApp: 00965 514 98065
Example:
For the following Boolean function, find the minimum expression using K-Map.
(Simplify the following Boolean function)
F(A,B,C,D) = A`B`C` + B`CD` + A`BCD` + AB`C`
Solution:
First, we must find the minterms
A`B`C` = A`B`C` (D+D`)
= A`B`C`D + A`B`C`D` (M1, M0)
B`CD` = B`CD` (A+A`)
= AB`CD` + A`B`CD` (M10, M2)
A`BCD` (M6)
AB`C` = AB`C` (D+D`)
= AB`C`D + AB`C`D` (M9, M8)
So, we have: F(A,B,C,D) = ∑ (0,1,2,6,8,9,10)
CD
AB
C
1 1 0 1
0 0 0 1
B
0 0 0 0
A
1 1 0 1
Eng. Ahmed Darwish Tel: 00965 51105252 (Calls only) WhatsApp: 00965 514 98065
Prime Implicants:
When using K-Map simplification, you must ensure that:
All minterms are covered and included in a square
Minimum number of terms per expression
No redundant terms (no square covered twice)
Prime implicant is a term obtained by combining maximum number of adjacent
squares. Essential prime implicant is found if a minterm in the adjacent squares is
covered by only one prime implicant
For the Boolean function F(A,B,C,D) = ∑ (0,2,3,5,7,8,9,10,11,13,15)
CD
AB
C
1 0 1 1 Prime implicants of the function
are: CD B`C AD AB`
0 1 1 0
B
0 1 1 0
A
1 1 1 1
D
CD
AB C
Eng. Ahmed Darwish Tel: 00965 51105252 (Calls only) WhatsApp: 00965 514 98065
So, the function F can have more than a solution:
F(A,B,C,D) = BD + B`D` + CD + AD
= BD + B`D` + CD + AB`
= BD + B`D` + B`C + AD
= BD + B`D` + B`C + AB`
Don’t Care Condition:
The function may be presented with minterms that are considered nor 1 neither 0.
They are denoted as X and they are supposed to be not effective terms. Meaning if
they hold the value of 0 or 1, the final expression shall not be affected by those
minterms.
In map simplification, we consider the X minterms as 1s just to ease the
simplification process. Any adjacent squares must have at least a minterm holding
the value of 1 among other minterms that hold the X value.
Example:
For the following Boolean function, find the minimum expression using K-Map.
(Simplify the following Boolean function)
F(W,X,Y,Z) = ∑ (1,3,7,11,15) d(W,X,Y,Z) = ∑ (0,2,5)
Solution:
YZ
WX
Y
X 1 1 x
0 X 1 0
X
0 0 1 0
W
0 0 1 0
Z
The implementation of any Boolean function with NAND gates requires the
function to be expressed as SOP. The steps to be followed are:
Simplify the function as SOP
Convert each AND to a NAND with AND-Invert
Convert each OR to a NAND with Invert-OR
A single literal term is inverted
Eng. Ahmed Darwish Tel: 00965 51105252 (Calls only) WhatsApp: 00965 514 98065
Now replacing each inverter-OR with a NAND:
Eng. Ahmed Darwish Tel: 00965 51105252 (Calls only) WhatsApp: 00965 514 98065
Multi-Level NAND circuit:
Procedures to convert multi-level AND – OR to all NAND diagram are:
Convert all AND to NAND with AND-invert
Convert all OR gates to NAND gates with invert-OR
For every bubble that is not compensated by another bubble along the same
line, do one of the following:
- Insert an inverter
- Use a single input NAND
- Complement the input literal
Consider F(A,B,C,D) = A (CD + B) + BC`. By implementing the function using logic
gates:
Eng. Ahmed Darwish Tel: 00965 51105252 (Calls only) WhatsApp: 00965 514 98065
Another example by considering F(A,B,C,D) = (AB` + A`B)(C + D). By implementing
the function using logic gates:
Eng. Ahmed Darwish Tel: 00965 51105252 (Calls only) WhatsApp: 00965 514 98065
NOR implementation:
The implementation of any Boolean function with NOR gates requires the function
to be expressed as POS. The steps to be followed are:
Simplify the function as POS
Convert each OR to a NOR with OR-Invert
Convert each AND to a NOR with Invert-AND.
A single literal term is inverted.
Eng. Ahmed Darwish Tel: 00965 51105252 (Calls only) WhatsApp: 00965 514 98065
Consider the function F(A,B,C,D) = (AB` + A`B) (C + D). Implementing the function
using logic gates:
Eng. Ahmed Darwish Tel: 00965 51105252 (Calls only) WhatsApp: 00965 514 98065