Digital Logic Basics
Digital Logic Basics
Ravish Aradhya
A. Review of Basics:
1. Write out the truth table and draw the circuit corresponding to the
Boolean function
Soln:The product terms (which contain all of the input variables) are
calledfundamentalproduct terms or 'canonical‟ SOP terms.
Using the truth table written out for this function in Problem-1, we can write
is
Soln:
Soln:
6. Minimize the logic expression below and draw the logic circuit for the
simplified expression .
Soln:
Soln: F= (A‟ + C‟) + ABC + AC; Using De-Morgan‟s law (Similarly, readers
are required list out all applicable laws in each step)
= (A + A‟) + B‟ + C‟ =1
Karnaugh Maps:
The map for Y contains six prime implicants: the quads C‟D and AB;
and duals A‟B‟D, A‟B‟C, ACD‟ and B‟CD‟. Only two of these are
essential prime implicants, namely" AB and C‟D. The remaining three
minterms A‟B‟CD, A‟B‟CD‟ and AB‟CD‟ must also be covered by
choosing appropriate non-essential prime implicants from the four
remaining. This can be achieved a number of ways, any of which provide a
complete and therefore adequate minimized expression. These are
Soln:
Soln:
5-Variable K-maps
4= 00100 10 01010
15 01111
20 10100
26 11010
31 11111
Cell Adjacent Cells Cell Adjacent Cells Cell Adjacent Cells Cell Adjacent Cells
0 1, 2, 4, 8, 16 8 0, 9, 10, 12, 24 16 0, 17, 18, 20, 24 24 8, 16, 25, 26, 28,
1 0, 3, 5, 9, 17 9 1, 8, 11, 13, 25 17 1, 16, 19, 21, 25 25 9, 17, 24, 27, 29
2 0, 3, 6, 10, 18 10 2, 8, 11, 14, 26 18 2, 16, 19, 22, 26 26 10, 18, 24, 27, 30
3 1, 2, 7, 11, 19 11 3, 9, 10, 15, 27 19 3, 17, 18, 23, 27 27 11, 19, 25, 26, 31
4 0, 5, 6, 12, 20 12 4, 8, 13, 14, 28 20 4, 16, 21, 22, 28 28 12, 20, 24, 29, 30
5 1, 4, 7, 13, 21 13 5, 9, 12, 15, 29 21 5, 17, 20, 23, 29 29 13, 21, 25, 28, 31
6 2, 4, 7, 14, 22 14 6, 10, 12, 15, 30 22 6, 18, 20, 23, 30 30 14, 22, 26, 28, 31
7 3, 5, 6, 15, 23 15 7, 11, 13, 14, 31 23 7, 19, 21, 22, 31 31 15, 23, 27, 29, 30
Figure 1.11: Adjacent Cells in a five variable K-Map
bc 0 1 3 2 16 17 19 18
00
bc 4 5 7 6 20 21 23 22
01
bc 12 13 15 14 28 29 31 30
11
bc 8 9 11 10 24 25 27 26
Row 10
Variables
bc
Figure 1.12: Five Variable K-Map
Let us see some examples of grouping the cells in a 5-variable map and the
process of obtaining their reduced expressions. Fig. 1.13 shows a 5-variable
map where there is no matching terms i.e. minterms in the same locations,
on both the maps. Observe in such a case that the variable 'a' appears,
either in complemented form (if the group is present on the left side map) or
un-complemented form (if the group is present on the right side map), in
the reduced expression for every group. Except for this difference, the rules
for obtaining the reduced expression are same as those of a 4-variable K-
Map. In contrast to Fig. 1.13, note that exact matching of terms are shown
in Fig. 1.14. Observe that the variable 'a' is missing in all the reduced
expressions for the reason that the groups have been spread over two maps.
For example, the reduced expression for the pair and quad in Figure 1.13 is
as below:
Pair
Minterms 1 17
Binary 00001 10001
Expression a b c de + ab c de = b c de
Quad
2 =
00010
18 = 10010
6 =
00110
22 = 10110
Expression =
abcde
abcde
Reduced Expression ab de + ab de = bde
It is easy to see that the octet in the 3rd row of Fig. 1.14 corresponds to the
reduced expression 'bc', as it eliminates 3 variables. The following examples
will reinforce the above concepts in a clear way.
12.Simplify the following Boolean function and obtain the most optimal sum
of products expression.
f(a,b,c,d,e) = Σm (0, 1, 4, 5, 6, 7, 9, 12, 13, 14, 15, 16, 17, 20, 21, 22, 23, 25, 29)
a=0 a=1
de de de de de de de de
00 01 11 10 00 01 11 10
0 1 3 2 16 17 19 18
bc 1 1 1 1
00
4 5 7 6 20 21 23 22
bc 1 1 1 1 1 1 1 1
01
12 13 15 14 28 29 31 30
bc 1 1 1 1 1
11
8 9 11 10 24 25 27 26
bc 1 1
10
Figure 1.15: Five Variable K-Map for Example 3.1
1.15.
First of all we should see if a group of minterms are available in the same
locations on both the maps. Suppose we group cells (4, 5, 6, 7) as a quad,
we see that it can be combined into an octet with another group of cells (20,
21, 22, 23) which are exactly in the same locations on the other map, as
shown in Fig. 1.16.
a=0 a=1
de de de de de de de de
00 01 11 10 00 01 11 10
0 1 3 2 16 17 19 18
bc 1 1 1 1
00
4 5 7 6 20 21 23 22
bc Octet
11 11 11 1 1 11 11 11 11
01 bc
12 13 15 14 28 29 31 30
bc 1 1 1 1 1
11
8 9 11 10 24 25 27 26
bc 1 1
10
Figure 1.16: Grouping of Minterms for Example 3.1 - Step 1
The cells covered after step 1 are identified with a 'X' symbol as shown
below.
Minterms 0 1 4 5 6 7 9 12 13 14 15 16 17 20 21 22 23 25 29
Covered after step 1 X X X X X X X X
a=0 a=1
de de de de de de de de
00 01 11 10 00 01 11 10
0 1 3 2 16 17 19 18
bc 1 1 Octet 1 1
00 1 1 1 1
bd
4 5 7 6 20 21 23 22
bc 11 1
01 11 1 111 11 1 1 111 11 11
12 13 15 14 28 29 31 30
bc 1 1 1 1 1
11
8 9 11 10 24 25 27 26
bc 1 1
10
Figure 1.17: Grouping of Minterms for Example 3.1 - Step 2
Minterms 0 1 4 5 6 7 9 12 13 14 15 16 17 20 21 22 23 25 29
Covered after step 2 X X X X X X X X X X X X
a=0 a=1
de de de de de de de de
00 01 11 10 00 01 11 10
0 1 3 2 16 17 19 18
bc 1 1 1 1
00 1 11 1 11
4 5 7 6 20 21 23 22
bc 111
01 111 111 11 1 1 1111 11 11
12 13 15 14 28 29 31 30
bc 1 11 1 1 Octet 11
11
de
8 9 11 10 24 25 27 26
bc 1
1 11
10
Figure 1.18: Grouping of Minterms for Example 3.1 - Step 3
Minterms 0 1 4 5 6 7 9 12 13 14 15 16 17 20 21 22 23 25 29
Covered after step 3 X X X X X X X X X X X X X X X X
a=0 a=1
de de de de de de de de
00 01 11 10 00 01 11 10
0 1 3 2 16 17 19 18
bc 1 1 1 1
00 1 11 1 11
4 5 7 6 20 21 23 22
bc 111
01
111 11 11 11 1 1111 11 11
12 13 15 14 Octet
28 29 31 30
bc 1 11 1 1 ac 1
11
8 9 11 10 24 25 27 26
bc 11 1
10
Minterms 0 1 4 5 6 7 9 12 13 14 15 16 17 20 21 22 23 25 29
Covered after step 4 X X X X X X X X X X X X X X X X X X X
Since all the minterms are covered at least once, by step 4, we stop the
process. Hence, the MSOP expression, consisting of four octets, is finally
obtained as
f(a,b,c,d,e) = b c + b d + d e + a c
13.Draw the 2-level NAND circuit for the following Boolean expression
1 0 0 0 1 = 17 0 0 1 0 1 = 5 1 1 1 0 0 = 28 0 1 1 0 0 = 12
1 0 0 1 1 = 19 0 1 1 0 1 = 13 1 1 1 0 1 = 29 0 1 1 0 1 = 13
1 1 1 0 1 = 21 1 0 1 0 1 = 21 1 1 1 1 0 = 30 0 1 1 1 0 = 14
1 0 1 1 1 = 23 1 1 1 0 1 = 29 1 1 1 1 1 = 31 0 1 1 1 1 = 15
1 1 1 0 0 = 28
1 1 1 0 1 = 29
1 1 1 1 0 = 30
1 1 1 1 1 = 31
Figure 1.20: Product terms of ‘F’
On removing the repeated minterms, which are shown as cut in the above
table, the function F can be expressed as
F(a,b,c,d,e) = Σm (5, 12, 13, 14, 15, 17, 19, 21, 23, 28, 29, 30, 31)
The 2-level NAND circuit that implements the original function F, along with
the simplified circuit drawn based on the minimal SOP expression obtained
through K-Map, is shown in Fig. 1.22. The simplification process has
removed one 3-input NAND gate.
a
b a
e b
c e
d c
e F d
a F
e
b
c b
b c
c
(b) Simplified Circuit
(a) Original Circuit
14. Simplify the following Boolean function and obtain the most optimal sum
of products expression.
f(a,b,c,d,e) = Σm (8, 12, 13, 18, 19, 21, 22, 24, 25, 28, 30, 31) + d.c (1, 2, 4, 6, 7, 11, 26)
The grouping of minterms is as shown in Figure 1.24. Observe that all the
don't care terms, except the one in cell 26, remain unused. There are 2
quads, 3 pairs and an isolated minterm. The reduced expression for each
group is also shown in Fig. 3.24. The MSOP expression is given by
f(a,b,c,d,e) = b d e + a d e + a b c d + a b c d + a b c d + a b c d e
15. Design an SOP logic circuit, which will output a 1(logic High) whenever
the input is the binary equivalent of decimal 0, 1, 5, 7, 8, 10, 13, 15, 16, 17,
23, 24 and 31. JNTU-Nov/2009
Soln:The circuit to be designed will have 5-inputs for the reason that the
binary representation of 31, the largest decimal to be detected, needs 5 bits.
Assuming the five input variables as a, b, c, d,e and the output as F, the
equation for the output can be written as
F(a,b,c,d,e) = m (0, 1, 5, 7, 8, 10, 13, 15, 16, 17, 23, 24, 31)
Code Converters
BCD EXESS 3
A B C D W X Y Z
0 0 0 0 0 0 1 1
0 0 0 1 0 1 0 0
0 0 1 0 0 1 0 1
0 0 1 1 0 1 1 0
0 1 0 0 0 1 1 1
0 1 0 1 1 0 0 0
0 1 1 0 1 0 0 1
0 1 1 1 1 0 1 0
1 0 0 0 1 0 1 1
1 0 0 1 1 1 0 0
Circuit diagram:
Soln:K-maps are drawn similar to Ex.10 and the expressions are inEq. 1.2.
D = Z, C = Y ⊕ Z, B = X ⊕ YZ, A = W(X + YZ). . . . . .Eq. 1.2
Circuit diagram:
K-maps are drawn similar to Ex.10 and the expressions areinEq. 1.3.
G3 = B3, G2 = B3 + B2, G1 = B2 + B1, G0 = B1 + B0 . . . . . . Eq. 1.3
Soln:K-maps are drawn similar to Ex.10 and the expressions areinEq. 1.4.
B3 = G3, B2 = G2 + B3, B1 = G1 + B2, B0 = G0 + B1 . . . . . . Eq. 1.4
B. MSI Circuits:
Adders: Abinary adder is a circuit which adds the two input binary numbers
A and B.The circuit produces the two outputsnamely Sum (S O) and Carry
(CO).
On the other hand, if the borrow output from the previous stage
is also consideredfor subtraction, along with the two input digits then, the
subtractor circuit is called “Fullsubtractor.”
I. ADDER CIRCUITS:
(a) HALF-ADDER:
Function Table Design:
Soln:
Figure 1.44: Parallel adder/subtractor
Y1 = A B A B Y2 = A B A B Y3 = A B A B A B
OR
(c) K-maps
Figure 1.61:A 4-2 Priority Encoder
Output Expressions:
x1 = d2 + d3 x0 = d3 + d3 d2‟ v = d0 + d1 + d2 + d3
(ii) DECODERS
and A, and eight outputs Yo, Y,, Y,, ..., Y,. With CBA = 001 and the
decoder enabled, the selected output line Y, (line 1) goes to LOW while the
other output lines stay HIGH.
Figure 1.64 (a): Full adder using the 2x4 Decoder IC-74139
Figure 1.64 (b): Full adder using the 3x8 Decoder IC-74138
22. Realization of Full Subtractor-using Decoder (IC 74139):
Figure 1.66: 3-bit Binary to Gray code converter using IC- 74139
G0 = m( 1,2,5,6)G1 = m(2,3,4,5) G2 = m(4,5,6,7)G2 = B2
24. Realization of BCD to Excess-3 code converter using IC- 74139:
Figure 1.67: 3-bit BCD to Excess-3 code converter using IC- 74139
E0 = m (0,2,4,6,8) E1 = m (0,3,4,7,8)
E2 = m (1,2,3,4,9) E3 = m (5,6,7,8,9)
Soln:
Soln:
Soln:
(ii) De-multiplexer:
Given an input line and a set of selection lines, the de-multiplexer will direct
data from input to a selected output line.