Hassan Assignment 1 DLD
Hassan Assignment 1 DLD
MUHAMMAD Hassan
Teacher Name. Taimoor Fazal
Class. ADP-CS(2)
Subject. Digital logic design
Date. 28/11/2020
Assignment NO.1
Topic:
Introduction to K-Map
Truth tables and Boolean Expressions
Solve 2 variable boolean equation using K-Map
Solve 3 variable boolean equation using K-Map
Solve 4 variable boolean equation using K-Map
Introduction to K-Map:
So far we can see that applying Boolean algebra can be awkward in order to simplify
expressions. Apart from being laborious (and requiring the remembering all the laws)
the method can lead to solutions which, though they appear minimal, are not.
Definition:
A Karnaugh map (K-map) is a pictorial method used to minimize Boolean
expressions without having to use Boolean algebra theorems and equation
manipulations. A K-map can be thought of as a special version of a truth table .
Using a K-map, expressions with two to four variables are easily minimized.
Expressions with five to six variables are more difficult but achievable, and
expressions with seven or more variables are extremely difficult to minimize
using a K-map.
Always combine as many cells in a group as possible. This will result in the fewest
number of literals in the Term that represents the group.
Make as few groupings as possible to cover all Minterms. This will result in the
fewest product Terms.
Always begin with the largest group, which means if you can find eight members
group is better than two four groups and one four group is better than pair of
two-group.
Truth Tables:
A truthtable is a mathematical table used in logicspecifically in connection
with Boolean algebra, boolean functions, and propositional calculuswhich sets out
the functional values of logical expressions on each of their functional arguments,
that is, for each combination of values taken by their logical variables.
Boolean Expression:
A Boolean expression is a logical statement that is either true or False. Boolean
expressions can compare data of any type as long as both parts of the expression
have the same basic data type. You can test data to see if it is equal to, greater than,
or less than other data.
Note that the Boolean Expression for a two input AND gate can be written as: A.B
or just simply AB without the decimal point.
OR Gate:
For a 2-input OR gate, the output is true if EITHER input A “OR” input B is true,
giving the Boolean Expression.
Truth Table:
A B A+B
0 0 0
0 1 1
1 0 1
1 1 1
Not Gate:
For a single input NOT gate, the output is ONLY true when the input is “NOT” true,
the output is the inverse or complement of the input giving the Boolean
Expression
Truth Table:
A Ā
0 1
1 0
2 -Variable K-Map:
The number of cells in 2 variable K-map is four, since the number of variables is
two. The following figure shows 2 variable K-Map.
The groups of variables should be in rectangular shape, that means the groups
must be formed by combining adjacent cells either vertically or horizontally.
Diagonal shaped or L-shaped groups are not allowed. The following example
demonstrates a K-map simplification of a 2-variable Boolean equation
3- Variable K-Map:
The number of cells in 3 variable K-map is eight, since the number of variables is
three. The following figure shows 3 variable K-Map.
A typical plot of a 3-variable K-map is shown below. It can be observed that the
positions of columns 10 and 11 are interchanged so that there is only change in
one variable across adjacent cells. This modification will allow in minimizing the
logic.
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.