Professional Documents
Culture Documents
Solution
The truth table for the given 8×1 Multiplexer is as shown:
2. Solution
Given logic function:
F ( A , B ,C , D ) =∑ ( 2,3,4,7,8,12 )
The K-map of given function is as shown:
AB 00 01 11 10
CD
00 1 1
01 1 1
11 1
10 1
The sum of product expression from the K-map is:
F= Á B́ C + Á C D+ B Ć D́+ A Ć D́
Á
C
B́
F
D
Ć
D́
A
Á
A+ Ć +( B D́)
C
B
B́+ D Á C ( B́+ D ) +¿
D́ Ć D́( A+ B)
Ć
D́ C+ D+( Á B́)
Á A+ B
B́
3. Solution
Given logic function:
F= Á B́ C + A D́+B D
a. K-map of the given function:
AB 00 01 11 10
CD
00 1 1
01 1 1
11 1 1 1 1
10 1 1
b. The corresponding logic circuit experiences 1-Hazard type of static hazard.
c. There are 3 static 1-Hazard which are indicated in the above K-map with the dotted
rectangles.
d. Now to express the corresponding circuit as hazard-free circuit, we add the corresponding
expressions (terms represented by dotted rectangles) to the given logic function. Hence the
hazard free logic function is given by,
F= Á B́ C + A D́+B D+ A B Ć+ A B C+ Á C D
A B C D
4. Solution
The given function is
F=2∗X +1= X+ X +1
Here, X = X3X2X1X0 is the unsigned four bit binary number.
The full adder is an adder that takes three inputs and outputs two results. The first two inputs
are A and B, with the third being an input carry C-IN input. The carry output is labeled C-
OUT, whereas the regular output is labeled S, which stands for SUM.
So, we will input some X to both the input of 4-bit full adder and the carry will be initially
one.
X3 X2 X1 X0
C-OUT = C3 S3 S2 S1 S0
5. Solution
The 74LS151 Multiplexer is an 8×1 multiplexer having 3 select lines to select 8 input lines to
produce one required output. Hence, we require three multiplexers to convert the 3-bits
binary code into gray code and vice-versa.
a. Binary-to-gray code converter:
Truth table of binary-to-gray converter:
The bits of given binary number will be fed into the supply lines of the MUX. One
multiplexer for each bit of gray code i.e. G2, G1 and G0 is required. For the case of G0 bit,
with B2, B1, B0 at the supply lines, the required output G0 is shown in the “G0 column” of
above truth table. Hence the input I0, I1… I7 should be such that the output bit corresponds
to the input binary number as shown by the circuit diagram of binary to gray converter.
Similarly, for G1 and G2 bits, the corresponding input values I0, I1… I7 for the respective
binary bits B2, B1, B0 are shown in truth table.
0 1
74LS151
G0
MUX
B2 B1 B0
74LS151
G1
MUX
B2 B1 B0
74LS151 G2
MUX
Similarly for gray-to-binary converter, the bits of gray code G2, G1, G0 will be provided in
the supply lines of all 3 multiplexers with the input values I1, I2… I7 provided by the truth
table. Each multiplexer is used to provide the output for each of the 3 bits of the equivalent
binary number.
The converter circuit for gray to binary converter using 3 74LS151 MUX is shown in the
following figure.
0 1
74LS151
B0
MUX
G2 G1 G0
B1
G2 G1 G0
B2
B2 00 01 11 10
B1B0
0 0 0 0 0
1 1 1 1 1
From the K-map,
G 2=B 2
Using K-map for G1:
B2 00 01 11 10
B1B0
0 0 0 1 1
1 1 1 0 0
From the K-map,
G 1= B´ 2 B 1+ B 2 B´1=B 1⊕ B 2
B2 00 01 11 10
B1B0
0 0 1 0 1
1 0 1 0 1
From the K-map,
G 0= B´ 1 B 0+ B 1 B´0=B 0 ⊕ B1
Showing these with the help of logic gates,
B2 G2
G1
B1
G0
B0
Figure: Logic gate of binary-to-gray converter
b. Gray-to-Binary Converter
Truth table for Gray-to-Binary Converter
G2 00 01 11 10
G1G0
0 0 0 0 0
1 1 1 1 1
From the K-map,
B 2=G 2
G2 00 01 11 10
G1G0
0 0 0 1 1
1 1 1 0 0
From the K-map,
B1=G´ 2G 1+ G2 G1=G1
´ ⊕G 2
G2 00 01 11 10
G1G0
0 0 1 0 1
1 1 0 1 0
From the K-map,
B 0=G 2 G´ 1 G0+
´ G2
´ G1
´ G 0+G 2G 1G 0+ G´ 2 G1 G´ 0
¿ G´ 1 ( G 2 G´ 0+ G´ 2 G0 ) +G1(G 2 G0+ G2
´ G´ 0)
¿ G´ 1 ( G 2⊕ G 0 ) +G 1(G 2ʘ G 0)
¿ G´ 1 ( G 2⊕ G 0 ) +G 1( G 2⊕
´ G 0)
¿ ( G 2⊕G 1⊕G 0 )
G2 B2
B1
G1
B0
G0
a) A.B = 0 means either one of A and B is zero or both A and B are equal to zero.
If variables A, B satisfy both the conditions then they must be compliment to each other.
So, A=B́
If variables X, Y satisfy both the conditions then they must be compliment to each other.
i.e. Y´ .Y = 0, Ý +Y =1
So, X =Ý
8. Solution
Inputs Output
A B Z
0 0 0
0 1 1
1 0 1
1 1 0
From the above truth table, the sum of product Boolean expression is
Z= Á B+ A B́
A
Á B
Z= Á B+ A B́
A B́
B
Z= Á B+ A B́
9. Solution
Truth table of Exclusive NOR (XNOR) gate:
Inputs Output
A B Z
0 0 1
0 1 0
1 0 0
1 1 1
From the above truth table, the sum of product Boolean expression is
Z= Á B́+ A B
A Á B́
B
Z= Á B́+ A B
AB
10. Solution
For XNOR gate, the output is true only if both bits are equal. Hence the XNOR function can
be used to assist in comparing bits. The logic expression of XNOR gate is:
Z=PQ+ Ṕ Q́
Where, Z = 1 if P = Q. So, for each bits of P and Q, the XNOR expression can be written as;
( P<Q )= Ṕ2 Q 2 +Z 2 Ṕ 1 Q 1 +Z 2 Z 1 Ṕ 0 Q 0
For the case of P2 < Q2, Z2 = 0 and hence 2nd and 3rd terms will be 0. Further, P2 will be 0 and
Q2 will be 1 for P2 < Q2. Hence for the first term to give “true” value, the complement of P 2 is
required and so on.
P2 Q2 P1 Q1 P0 Q0
Z2
P <
Q
Z1
11. Solution
First level:
There are NAND, NOR and NOT gates in parallel and has the same T PD of 10 ns. Therefore,
for first level (TPD1) is
TPD1 = 10 ns
Second level:
There is an inverter and AND gate with bubble in parallel. The T PD of inverter is 10 ns while
that of AND gate with bubble is 10 + 20 = 30 ns. Hence, the T PD of AND gate with bubble is
greater, the largest propagation delay for this level is TPD2 = 30 ns.
Third level:
XOR gate is present in the third level with TPD of 30 ns. So, in this level, TPD3 = 30 ns.
First level:
There are 2 NAND gates, 2 NOR gates and an inverter in parallel with T PD of 10 ns each.
Therefore, for first level (TPD1) is
TPD1 = 10 ns
Second level:
Second level comprises of an AND gate with a bubble (20 + 10 = 30 ns) and an inverter (T PD
= 10 ns) in parallel with OR gates incorporating bubble (T PD = 20 + 10 = 30 ns). The largest
TPD of this parallel branch is 30 ns which is fed into an AND gate (T PD = 20 ns) in the second
level. Hence, the largest propagation delay of second level is;
TPD2 = 30 + 20 = 50 ns
Third level:
XOR gate is present in the third level with TPD of 30 ns. So, in this level, TPD3 = 30 ns.
There are 3 NAND gates, 3 NOR gates and an inverter in parallel with T PD of 10 ns each.
Therefore, for first level (TPD1) is
TPD1 = 10 ns
Second level:
Second level comprises of an AND gate with a bubble (20 + 10 = 30 ns) and an inverter (T PD
= 10 ns) in parallel with two OR gates incorporating two and three bubbles. However, since
the bubble are in parallel, the TPD for both OR gates is, TPD = 20 + 10 = 30 ns. The largest TPD
of this parallel branch is 30 ns which is fed into an AND gate (T PD = 20 ns) in the second
level. Hence, the largest propagation delay of second level is;
TPD2 = 30 + 20 = 50 ns
Third level:
XOR gate is present in the third level with TPD of 30 ns. So, in this level, TPD3 = 30 ns.
First level:
There are 4 NAND gates, 4 NOR gates and an inverter in parallel with T PD of 10 ns each.
Therefore, for first level (TPD1) is
TPD1 = 10 ns
Second level:
TPD of OR gate with two/three/four parallel bubbles in series with AND gate = 20 + 10 +20
= 50 ns
Third level:
XOR gate is present in the third level with TPD of 30 ns. So, in this level, TPD3 = 30 ns.
First level:
There are 4 NAND gates, 4 NOR gates and an inverter in parallel with T PD of 10 ns each.
Therefore, for first level (TPD1) is
TPD1 = 10 ns
Second level:
TPD of OR gate with two/three/four/five parallel bubbles in series with AND gate = 20 + 10
+20 = 50 ns
12. Solution
When EN_L is asserted, the circuit illustrated in Figure is incorrect because both sides of the
74×139 are enabled at the same time. As a result, two three-state drivers are enabled to drive
SDATA at the same time, causing problems.
The problem may be rectified by adding an additional inverter to the signal flowing to 1G or
2G, ensuring that only one source is driving SDATA at any one moment.
13. Solution
For the given CMOS circuit in Figure 2, the truth table is given as;
S Z
0 B
1 A
From the truth table,
Z=A S +B Ś
Logic diagram:
A AS
S
Z=A S +B Ś
B B Ś
14. Solution
For the given CMOS circuit in Figure 3, the truth table is given as;
Inputs Output
A B Z
0 0 0
0 1 1
1 0 1
1 1 0
From the truth table,
Z=( Á B+ A B́ ) =A ⊕ B
Hence, the given CMOS circuit performs the XOR operation between the two inputs A and
B.
Logic gate:
A
Á B
Z= Á B+ A B́
A B́
B
15. Solution
Odd Parity=X 0 ⊕ X 1 ⊕ X 2 ⊕ X 3 ⊕ … …⊕ X n
X1
Second Delay
X2
2n−1 Delay
Odd Parity
X2 n
Hence for the first method, the single input corresponds to n-1 number of XOR gates delays.
Odd parity= ( ( X 0 ⊕ X 1 ) ⊕ ( X 2 ⊕ X 3 ) ) ⊕… ⊕ [ X n ]
[ ]
Circuit diagram of 2nd method is shown in the next page.
When 2n inputs are given, the input-to-output propagation delay for the cascaded structure is
2n – 1 XOR gate delays, as shown in the circuit schematics for both approaches. The tree-like
structure, on the other hand, has just 3 XOR gate delays from input to output for 2 n inputs. As
can be seen, the cascaded structure has the highest worst-case delays, while the tree-like form
has the lowest. As a result, cascaded structures are favored only when a time delay is
necessary, such as in high-speed circuit design; otherwise, tree-like structures are preferred.
First Delay
X0
X1 Second Delay
X2
X3
X4
Figure: Circuit diagram of tree-like odd parity structure