Professional Documents
Culture Documents
Boolean Algebra and Computer Hardware
Boolean Algebra and Computer Hardware
(Prepared by Er P K Tiwari)
PROPOSITIONAL LOGIC
A simple proposition is one that does not contain any other proposition as a part.
We will use the lower case letter p,q,r.... as symbol simple statements or
proposition. A compound proposition is one with two or more simple propositions
as parts or what will call component. A component of a compound is any whole
proposition that is part of a large proposition, component may themselves be
compounds.
Example:
If A=1, B=0, C=0 and D=1, then the maxterm will be:
Answer: A’+B+C+D’
[Hint: If value is 0 then simple variable, if value is 1 then complemented variable and join with +]
The reduced expression for the Boolean expression F(X,Y,Z) = ∑(0,1,2,3,4,5,6,7) is:
Solution:
Logic Gates
Derivation of Boolean Expression
The basic logic gate that represents the simplification of the Boolean expression
A.(A’+B). (A+B) is:
Solution:
Solution:
Universal Gates
Simplification using Karnaugh Map
Truth Tables provides a nice natural way to list all values of a function. There are several other
ways to represent function values. one of them is Karnaugh Map (in sort K-Map) named after
its originator Maurice Karnaugh. These maps are sometimes also called Veitch Diagrams.
What is Karnaugh Map? Karnaugh map or K-Map is a graphical display of the fundamental’s
products in a truth table. Karnaugh Map is nothing but a rectangle made up of certain number
of squares each squares representing a Maxterm or Minterm.
Sum of Product reduction using K-Map
In SOP reduction each square of K-Map represents a minterm of the given function. Thus for
a function of n variables there would be a map of 2n squares, each representing a minterm.
Given a K-Map for SOP reduction the map is filled in by placing 1's in squares whose minterm
lead to a 1 output.
A B F
0 0 0
0 1 0
1 0 1
1 1 1
X\Y 0 1
Now look for output 1 in the given truth table. 0
0 1
For minterm m2 and m3 the output is 1. Thus
marks 1 in the square for m2 and m3 i.e., the 1 1
1
square number as 2 and 3. Now our K-Map will 2 3
look like this as shown in figure.
X\Y 0 1
0 0
0
0 1
After entering 1's for all 1 output, enter 0's in 1 1 1
the blank squares. K-Map will now look like 2 3
this as shown in figure.
Same is the method for mapping 3 variable and 4 variable maps.
After reducing pairs, quad and octet there are certain other things to be taken care of before
arriving at the final expression. These are map rolling, overlapping groups and redundant
groups.
Map Rolling: means roll the map i.e. consider the map as if its left edges are touching the
right edges and top edges are touching bottom edges. This is a special property of K-Map that
its opposite edges squares and corners squares are considered contiguous. As even in
opposite edges squares and in corner squares only one variable changes its states from
complimented to un-complimented state or vice versa. Therefore while marking the pairs,
quad and octets, map must be rolled. Following pairs, quads and octets are marked after
rolling the map.
WX\YZ [00]Y'Z' [01]Y'Z [11]YZ [10]YZ' WX\YZ [00]Y'Z' [01]Y'Z [11]YZ [10]YZ'
[00]W'X' 1
[00]W'X' 1 1
0 1 3 2
0 1 3 2
[01]W'X 1 1
[01]W'X 1 1
4 5 7 6
4 5 7 6
[11]WX 1 1
12 13 15 14 [11]WX
12 13 15 14
[10]WX' 1
[10]WX' 1 1
8 9 11 10
8 9 11 10
Pair Quad
WX\YZ [00]Y'Z' [01]Y'Z [11]YZ [10]YZ' WX\YZ [00]Y'Z' [01]Y'Z [11]YZ [10]YZ'
[00]W'X' 1 1 [00]W'X' 1 1 1 1
0 1 3 2 0 1 3 2
[01]W'X [01]W'X
4 5 7 6 4 5 7 6
[11]WX [11]WX
12 13 15 14 12 13 15 14
[10]WX' 1 1 [10]WX' 1 1 1 1
8 9 11 10 8 9 11 10
Quad Octet
Overlapping Groups: Overlapping means same one can be encircled more then once. For
example if the following K-Map as shown in the figure,
observe that 1 for m7 has been encircled twice.
[00] [01] [11] [10] Once for pair-1(m5+m7) and again for
AB\CD quad(m7+m6+m15+m14). Also 1 for m14 has
C'D' C'D CD CD'
been encircled twice. For the Quad and for
[00]
pair-2(m14+m10). Overlapping always leads to
A'B' 0 1 3 2 simpler expressions. Hence reduce expression
[01] 1 1 1 for pair-1 is A'BD. reduced expression for the
A'B 4 5 7 6 Quad is BC. reduced expression for the pair-2
[11] 1 1 is ACD'. Thus final reduced expression for this
AB 12 13 15 14 map A'BD+BC+ACD'. This reduced expression
for entire K-Map is sum of all reduced
[10] 1 expressions in the every K-Map. but before
AB' 8 9 11 10 writing the final expression we must take care
of Reduntant Group.
Reduntant Group: is a group whose all 1's are overlapped by other groups (i.e. pairs, quads,
octets) Here as an example given below.
(a)(b)
[00] [01] [11] [10] [00] [01] [11] [10]
WX\YZ WX\YZ
Y'Z' Y'Z YZ YZ' Y'Z' Y'Z YZ YZ'
[00] [00]
W'X' 0 1 3 2 W'X' 0 1 3 2
[01] 1 1 [01] 1 1
W'X 4 5 7 6 W'X 4 5 7 6
[11] 1 1 [11] 1 1
WX 12 13 15 14 WX 12 13 15 14
[10] [10]
WX' 8 9 11 10 WX' 8 9 11 10
(a) K-Map with reduntant group (b) K-Map without reduntant group
Figure (a) has a reduntant group. there are three pairs: Pair-1 (m4+m5), Pair-2 (m5+m13),
Pair-3 (m13+m15). but Pair-2 is a reduntant group as its all 1's are marked by other groups.
With this reduntant group, the reduced expression will be A'BC' + BC'D + ABD. For a simpler
expression, Reduntant Group must be removed. After removing the reduntant group, we
get the K-Map shown in the figure (b). the reduced expression for K-Map in figure (b) will be
A'BC' + ABD which is much simpler expression. Thus removal of reduntant group leads to
much simpler expression.
Summary of all the rules for SOP reduction using K-Map,
1. Prepare the truth table for given function.
2. Draw an empty K-Map for the given function (i.e. 2 variable K-Map for 2 variable function 3
variables K-Map for 3 variables function and so on.)
3. Map the given function by entering 1's for the outputs as 1 in the corresponding squares.
4. Enter 0's in all left out empty squares.
5. Encircle adjacent 1's in form of octets, quad and pairs. Do not forget to roll the map and
overlap.
6. Remove redundant groups, if any.
7. Write the reduced expressions for all the groups and OR (+) them.
Example: Reduce F(a,b,c,d) =∑ (0,2,7,8,10,15) using Karnaugh Map.
Solution: given F(a,b,c,d) = ∑ (0,2,7,8,10,15) Input Output
=m0+m2+m7+m8=m10+m15 A B C D F
m0 = 0000 = A'B'C'D' 0 0 0 0 1
m2 = 0010 = A'B'CD' 0 0 0 1
m7 = 0111 = A'BCD 0 0 1 0 1
m8 = 1000 = AB'C'D'
0 0 1 1
m10 = 1010 = AB'CD'
m15 = 1111 = ABCD 0 1 0 0
truth table for the given function is as follows: 0 1 0 1
Mapping the given function in K-Map we get, 0 1 1 0
0 1 1 1 1
1 0 0 0 1
1 0 0 1
1 0 1 0 1
1 0 1 1
1 1 0 0
1 1 0 1
1 1 1 0
1 1 1 1 1
[00] [01] [11] [10] In the given K-Map two groups have been
AB\CD marked, one pair and one quad.
C'D' C'D CD CD'
[00] Pair is m7+m15
1 1
A'B' Quad is m0+m2+m8+m10
0 1 3 2
Reduced expression for pair is (m7+m15) is
[01] 1 BCD as A is removed. Reduced expression for
A'B 4 5 7 6 quad (m0+m2+m8+m10) is B'D' as for horizontal
[11] 1 corners C is removed and for vertical corners
AB 12 13 15 14 A is removed.
[10] 1 1
AB' 8 9 11 10
1
4 5 7 6
X' X'+Y+Z X'+Y+Z' X'+Y'+Z' X'+Y'+Z
4 variable K-Map representing POS 4 variable K-Map representing POS
WX\YZ Y+Z Y+Z' Y'+Z' Y'+Z WX\YZ 00 01 11 10
W+X W+X+Y+Z W+X+Y+Z' W+X+Y'+Z' W+X+Y'+Z 00
0 1 3 2
W+X' W+X'+Y+Z W+X'+Y+Z' W+X'+Y'+Z' W+X'+Y'+Z 01
4 5 7 6
W'+X' W'+X'+Y+Z W'+X'+Y+Z' W'+X'+Y'+Z' W'+X'+Y'+Z 11
12 13 15 14
Again, the numbers in the squares represent maxterm subscripts. Box with number 1
represent M1 number 6 box represents M6, and so on. Also notice box numbering scheme is
the same i.e., 0,1,3,2;4,5,7,6;12,13,15,14;8,9,11,10.
One more similarity in SOP K-Map and POS K-Map is that they are binary progression in Gray
Code Only. So here also same Gray Code appears at the top. But one major difference is that
in POS K-Map, complimented letters represent 1's and un-complimented letter represent 0's
where as it is just the opposite in SOP K-Map. Thus, in the figures for 0's un-complimented
letters appears and for 1's complimented letters appears.