III [CMPN]
Digital Logic Design and Applications
May '09 : Mumbai University − Examination Paper Solution
Time : 3hrs] [Marks : 100
Soln.:
(670.17)8
Octal to Decimal :
Octal to Binary :
Octal to Hexadecimal :
Soln.:
Refer figure for implementation.
Description :
• The select inputs S1 and S0 of the multiplexers 1, 2, 3 and 4 are connected together.
• The select inputs S3 and S2 are applied to the select inputs S1 and S0 of MUX-5.
• The outputs Y1, Y2, Y3, Y4 are applied to the data inputs D0, D1, D2 and D3 of MUX-5 as
shown in figure.
1
(2) S.E. − DLDA (CMPN)
Soln.:
The full subtractor is a combinational circuit with three inputs A, B and Bin and two outputs D
and B.
2
Examination Paper Solution (3)
A is the minuend, B is subtrahend, Bin is the borrow produced by the previous stage, D is the
difference output and B0 is the borrow output.
Truth Table :
The truth table for full subtractor is shown in table.
3
(4) S.E. − DLDA (CMPN)
Soln.:
(i) A + AB + ABC + ABCD
A + B + AB(C + CD) (∵ A + AB = A + B)
A + B + AB(C + D) (∵ A (B + C) = AB + AC)
A + B + ABC + ABD
A + ABC + B + BAD
A + BC + B + AD
A + AD + B + BC
A+D+B+C
A+B+C+D
2. (a) Simplify using K-map, obtain SOP equation and realize using only NAND gates. [10]
f (A, B, C, D) = π M (1, 2, 3, 8, 9, 10, 11, 14) + d (7, 15)
Soln.:
f (A, B, C, D) = π M (1, 2, 3, 8, 9, 10, 11, 14) + d (7, 15)
(1) The given Expression :
Y = M1 M2 M3 M8 M9 M10 M11 M14 + d (7, 15)
4
Examination Paper Solution (5)
(2) In K-map inter, 0's corresponding to these mixtures, inter X's for don't cars and inter 1's in the
remaining cells as shown in figure for the further simplification :
CD CD CD CD CD
AB 00 01 11 10
3
AB 00 1 0 0 0
0 1 3 2
AB 01 1 1 × 1
4 5 7 6
4
AB 11 1 1 × 0
1 12 13 15 14
2
AB 10 0 0 0 0
8 8 11 10
f (ABCD) = BC + BD + ACD + AB
f (A, B, C, D)
f (A, B, C, D)
5
(6) S.E. − DLDA (CMPN)
2. (b) Consider a chemical mixing tank for which there are 3 variables of interest : liquid level, pressure
and temperature. The alarm will be triggered under the following conditions : [10]
(i) Low level with high pressure (ii) High level with low pressure
(iii) High level with low temperature and high pressure
Design the system, implement using only NOR gates.
Soln.:
(i)
Input
Output
L P T
0 0 0 0
0 0 1 0
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 0
L 1 1 1 0 1
4 5 7 6
0 = (L + P) (L + P + T)
6
Examination Paper Solution (7)
Soln.:
BCD to 7 Segment Display Decoder
In most practical applications, seven segment displays are used to give a visual indication of the
output states of digital ICs such as decade counters, latches etc. These outputs are usually in four
bit BCD (binary coded decimal) form, and are thus not suitable for directly driving seven segment
displays. The special BCD to seven segment decoder / driver ICs are used to convert the BCD
signal into a form suitable for driving these displays. In this sections, we are going to study LED
and LCD decoders / drivers for seven segment displays. Let us tabulate the segments activated
during each digit display.
b
1 b, c c
a
b
2 a, b, d, e, g e g
d
a
b
3 a, b, c, d, g g c
d
7
(8) S.E. − DLDA (CMPN)
a
f b
4 b, c, f, g g c
d
a
f
5 a, c, d, f, g g c
d
a
f
6 a, c, d, e, f, g e g c
d
a
b
7 a, b, c c
a
8 a, b, c, d, e, f, g f b
e g c
d
a
f b
9 a, b, c, d, f, g g c
d
From the above table we can determine the truth table for BCD−to−7 segment decoder / driver.
This truth table also depends on the construction of 7-segment display. If 7-segment display is
common anode, the segment driver output must be active low to glow the segment. In case of
common cathode type 7-segment display, the segment driver output must be active high to glow
the segment. Following table shows the truth tables for both BCD-to 7 segment decoder / driver
with common anode display and with common cathode display.
Digit A B C D a b c d e f g
0 0 0 0 0 1 1 1 1 1 1 0
1 0 0 0 1 0 1 1 0 0 0 0
2 0 0 1 0 1 1 0 1 1 0 1
3 0 0 1 1 1 1 1 1 0 0 1
4 0 1 0 0 0 1 1 0 0 1 1
5 0 1 0 1 1 0 1 1 0 1 1
6 0 1 1 0 1 0 1 1 1 1 1
7 0 1 1 1 1 1 1 0 0 0 0
8 1 0 0 0 1 1 1 1 1 1 1
9 1 0 0 1 1 1 1 1 0 1 1
8
Examination Paper Solution (9)
K-map Simplification
Digit A B C D a b c d e f g
0 0 0 0 0 0 0 0 0 0 0 1
1 0 0 0 1 1 0 0 1 1 1 1
2 0 0 1 0 0 0 1 0 0 1 0
3 0 0 1 1 0 0 0 0 1 1 0
4 0 1 0 0 1 0 0 1 1 0 0
5 0 1 0 1 0 1 0 0 1 0 0
6 0 1 1 0 0 1 0 0 0 0 0
7 0 1 1 1 0 0 0 1 1 1 1
8 1 0 0 0 0 0 0 0 0 0 0
9 1 0 0 1 0 0 0 0 1 0 0
Let us design the combinational circuit for common cathode 7-segment display / driver.
9
(10) S.E. − DLDA (CMPN)
Logic Diagram :
3. (b) Draw the 2-input TTL NAND gate and explain. List important characteristics of TTL family. [10]
Soln.:
Two Input TTL-NAND Gate (Totem Pole Output) :
A two input TTL-NAND gate is shown in figure 1. A and B are the two inputs while Y is the
output terminal of this NAND gate.
10
Examination Paper Solution (11)
1. A and B are the input terminals. The input voltages A and B can be either LOW (zero volts
ideally) or HIGH (+ VCC ideally).
2. A and B both LOW : If A and B both are connected to ground, then both the B-E junctions
of transistor Q1 are forward biased.
• Hence diodes D1 and D2 in figure will conduct to force the voltage at point C in figure 2
to 0.7 V.
• This voltage is insufficient to forward bias base-emitter junction of Q2. Hence Q2 will
remain OFF.
• Therefore its collector voltage VX rises to VCC.
• As transistor Q3 is operating in the emitter follower mode, output Y will be pulled up to
high voltage.
∴ Y = 1 (HIGH) … For A = B = 0 (LOW)
• The equivalent circuit for this input condition is shown in figure 3(a).
11
(12) S.E. − DLDA (CMPN)
4. A and B both HIGH : If A and B both are connected to +VCC, then both the diodes D1 and
D2 will be reverse biased and do not conduct.
• Therefore diode D3 is forward biased and base current is supplied to transistor Q2 via R1 and D3.
• As Q3 conducts, the voltage at X will drop down and Q3 will be OFF, whereas voltage at
Z (across R3) will increase to turn ON Q4.
• As Q4 goes into saturation, the output voltage Y will be pulled down to a low voltage.
• The equivalent circuit for this mode of operation is shown in figure 3(c).
• This discussion reveals that the circuit operates as a NAND gate.
Looking at the table we can say that, in the worst case, there is difference of 0.4V between the
driver output voltages and the required load input voltages. For instance, the worst-case low
values are
VOL(max) = 0.4V driver output
VIL(max) = 0.8V load input
Similarly, the worst-case high values are
VOH(min) = 2.4V driver output
VIH(min) = 2V load input
In either case, the difference is 0.4V. This difference is called noise margin. For TTL, Low state
noise margin, VNL and high state noise margin, VNH both are equal and 0.4V. This is illustrated in
12
Examination Paper Solution (13)
Figure. It provides built-in protection against noise. It ensures reliable operation of the device for
induced noise voltages less than 0.4V.
5V 5V
Logic 1 Logic 1
Fan-Out :
A standard TTL output can typically drive 10 standard TTL inputs. Therefore, standard TTL has
fanout 10.
Table summarizes the characteristics of standard TTL
Characteristics Values
Supply voltage For 74 series − (4.75 to 5.25) units
For 54 series − (4.5 to 5.5) units
Temperature range For 74 series − (0°C to 70°C)
For 54 series − (−55° to 125°C)
Voltage levels VOL(max) − 0.4V
VOH(max) − 2.4 V
VIL(max) − 0.8 V
VIH(min) − 2.0 V
Noise margin 0.4V
Power dissipation 10 mW per gate
Propagation delay Typically 10 ns
Fanout 10
Table : Standard TTL characteristics
4. (a) Design a BCD adder using 4-bit binary adders and explain. [10]
Soln.:
• A BCD adder adds two BCD digits and produces a BCD digit A-BCD cannot be greater than 9.
• The two given BCD numbers are to be added using the rules of binary addition.
• If sum is less than or equal to 9 and carry - 0, then no correction is necessary. The sum is
correct and in the true BCD form.
• But if sum is invalid BCD or carry - 1, then the result is wrong and needs correction.
• The wrong result can be corrected by adding six (0110) to it.
13
(14) S.E. − DLDA (CMPN)
Write K-map :
The K-map for Y output of the combinational circuit is as shown figure 2.
For Y output
S1S2
S3S2 00 01 11 10
00 0 0 0 0
01 0 0 0 0
11 1 1 1 1
10 0 0 1 1
Group 1 : S3S2
Group 2 : S3S1
Fig.2 : K-map for Y output.
14
Examination Paper Solution (15)
Operation :
Case 1 : Sum ≤ 9 and carry = 0.
The output of combinational circuit Y' = 0. Hence B3 B2 B1 B0 = 0000 for adder-2.
• Hence output of adder-2 is same as that of adder-1.
15
(16) S.E. − DLDA (CMPN)
4. (b) Design a MOD-6 synchronous up-counter and explain its operation. [10]
Soln.:
Flip-flops required : 2n ≥ N
N=6
n=3
i.e., three flip-flops required.
• The principle of operation of a 2-bit synchronous counter to a 3-bit counter shown in figure 1.
• FF-A acts as a toggle FF since JA = KA = 1.
• QA output of FF-A is applied to JB as well as KB. Hence if QA = 1 at the instant of triggering,
then FF-B will toggle but if QA = 0 then FF-B will not change its state.
• QA and QB are ANDed and the output of AND gate is applied to JC and KC.
• Hence when QA and QB both are simultaneously high, then JC = KC = 1 and FF-C will toggle.
Otherwise there is no change in the state of FF-3.
So in general we can say that each FF should have its J and K inputs connected such that
they are high only when the outputs of all lower order FFs are in the high state.
Operation :
Initially all the FFs are in their rest state. ∴ QC QB QA = 0 0 0
16
Examination Paper Solution (17)
• Hence on application of this clock pulse, FF-C will toggle and QC changes from 0 to 1.
• FF-A toggles as usual and QA becomes 0.
• Since QA was equal to 1 earlier, FF-B will also toggle to make QB = 0.
∴ QC QB QA = 1 0 0 … after the 4th clock pulse
• Thus the counting progresses.
• After the 7th clock pulse the output is 111 and after the 8th clock pulse, all the flip-flops toggle
and change their outputs to 0. Hence QC QB QA = 0 0 0 after the 8th pulse and the operation
repeats.
• Table summarizes operation of the three bit synchronous counter.
Timing diagram :
• Timing diagram for a 3-bit synchronous counter is shown in figure 2.
• Note that the waveforms of synchronous counter are exactly same as those of an
asynchronous counter.
5. (a) Simplify using K-map and realize using NOR gates. [10]
f (A, B, C, D) = π m (1, 3, 7, 11, 15) + d (0, 2, 5, 8, 14)
Soln.:
f (A, B, C, D) = π m (1, 3, 7, 11, 15) + d (0, 2, 5, 8, 14)
(1) The given expression
Let Y = M1 M3 M7 M11 M15 + d (0, 2, 5, 8, 14)
17
(18) S.E. − DLDA (CMPN)
CD CD CD CD CD
AB 00 01 11 10
AB 00 × 0 0 ×
0 1 3 2
AB 01 1 × 0 1
4 5 7 6
AB 11 1 1 0 ×
12 13 15 14
AB 10 × 1 0 1
8 9 11 10
5. (b) Draw a 4-bit Johnson counter using shift register and prove that it is "Divide by 4" logic. [10]
Soln.:
• In the ring counter the outputs of FF-3 were connected directly to the inputs of FF-0 i.e., Q3
to J0, Q3 to K0.
• Instead if the outputs are cross coupled to the inputs i.e., if Q3 is connected to K0 and Q3.5
connected to J0 then the circuit is called as twisted ring counter or Johnson's counter.
18
Examination Paper Solution (19)
• All the flip-flops are negative edge triggered, and clock pulses are applied to all of them
simultaneously.
• The clear inputs of all the flip-flops are connected together and connected to an external clear
signal. Note that all these clear inputs are active low inputs.
Operation :
• Initially a short negative going pulse is applied to the clear input of all the flip-flops. This
will reset all the flip-flops. Hence initially the outputs are,
Q3 Q2 Q1 Q0 = 0 0 0 0
• But Q3 = 1 and since it is coupled to J0 it is also equal to 1.
∴ J0 = 1 and K0 = 0 … Initially
19
(20) S.E. − DLDA (CMPN)
Decimal
CLEAR CLK Q3 Q2 Q1 Q0 State number
equivalent
Initially 0 0 0 0 1 0
1 ↓ 0 0 0 1 2 1
1 ↓ 0 0 1 1 3 3
1 ↓ 0 1 1 1 4 7
1 ↓ 1 1 1 1 5 15
1 ↓ 1 1 1 0 6 14
1 ↓ 1 1 0 0 7 12
1 ↓ 1 0 0 0 8 8
1 ↓ 0 0 0 0 1 0
Soln.:
f (A, B, C, D) = π m (0, 2, 3, 6, 7, 8, 9, 12, 13)
= ∑ M (1, 4, 5, 10, 11, 14, 15)
(1) Group the minterms according to number's of 1's.
Binary Representation
Group Minterms
A B C D
1 1 0 0 0 1
4 0 1 0 0
2 5 0 1 0 1
10 1 0 1 0
3 11 1 0 1 1
14 1 1 1 0
4 15 1 1 1 1
20
Examination Paper Solution (21)
In the PI table find the column only 1 cross (×) and encircle these (×) points. Put () in front
of the corresponding PI's.
y (A, B, C, D)
21
(22) S.E. − DLDA (CMPN)
A B C D
y (A, B, C, D)
y (A, B, C, D)
Soln.:
Below figure shows the implementation of given Boolean function with 8 : 1 multiplexer.
D0 D1 D2 D3 D4 D5 D6 D7
A 0 1 2 3 4 5 6 7
A 8 9 10 11 12 13 14 15
A 1 A 0 0 A 0 1
A 1 0
D0
D1
D2
D3 8 : 1
y
D4 MUX
D5
D6
D7
• This OR gate is called as "Bubbled OR". Thus we can state De-Morgans first theorem as,
NAND = Bubbled OR
• This theorem can be verified by writing a truth table for both the sides of the theorem
statement. This truth table is shown in fig.4, which shows that LHS = RHS.
A B A+B A B A.B
0 0 1 1 1 1
0 1 0 1 0 0
1 0 0 0 1 0
1 1 0 0 0 0
LHS A + B = A.B RHS
Fig.4 : Truth table to verify De-Morgan's theorem
23
(24) S.E. − DLDA (CMPN)
Description :
• The select inputs S1 and S0 of the multiplexers 1, 2, 3 and 4 are connected together.
• The select inputs S3 and S2 are applied to the select inputs S1 and S0 of MUX-5.
• The outputs Y1, Y2, Y3, Y4 are applied to the data inputs D0, D1, D2 and D3 of MUX-5 as
shown in figure.
24
Examination Paper Solution (25)
NOT Function :
An inverter can be made from a NOR gate by connecting all of the inputs together and creating,
in effect, a single common input, as shown in Fig. 1.
AND Function :
AND function is generated using only NOR gates as follows : We know that Boolean expression
for AND gate is
Y = A. B
= A.B Rule 9 : [ A = A ]
= A+B DeMorgan’s Theorem 2
The above equation is implemented using only NOR gates as shown in the Fig. 3.
25
(26) S.E. − DLDA (CMPN)
NAND Function :
NAND function is generated using only NOR gates as follows : We know that Boolean
expression for NAND gate is
Y = A.B
= A+B DeMorgan’s Theorem 1
= A+B Rule 9 : [ A = A ]
The above equation is implemented using only NOR gates, as shown in the Fig. 8.
7. (c) ALU
Arithmetic Logic Unit (ALU) :
• ALU is a very widely used and popular combinational circuit.
• It is capable of performing the arithmetic as well as the logic operations.
• ALU is the heart of any microprocessor.
• Figure 1 shows the block diagram of ALU IC 74181, Table 1 gives the pin description and
Figure 2 gives its pin configuration.
• 74181 is a 24-pin IC dual in line (DTP) package.
• A (A0 − A3) and B (B0 − B3) are the two 4 bit variables.
26
Examination Paper Solution (27)
Fig. 1 : Block diagram of ALU IC 74181 Fig. 2 : Pin configuration of the ALU IC 74181
27
(28) S.E. − DLDA (CMPN)
• When mode control input is low (M = 0), the arithmetic operations are performed on the two
4-bit words and all the internal carriers are enabled.
• IC 74181 incorporates full internal carry lookahead. This enhances its speed of operation to a
great extent.
• It provides a ripple carry between the devices using the Cn+4 output. (see cascading of two
74181s).
• Or for exploiting the option of carry lookahead between the packages, we have to use the P
(carry propagate) and G (carry generate) outputs. This option should be used only when the
speed requirements are stringent.
• If low speed of operation is acceptable, the ripple carry operation using Cn+4 and Cn should be
exercised.
A = B Output :
1. A = B output indicates the logical equality of the two operands. This output goes HIGH when
the unit is in the subtract mode and A = B.
2. This output also goes high when all the four “Function outputs” are HIGH.
3. It is possible to wire AND the A = B outputs when more than one 74181s are being used. The
wire ANDing becomes possible because A = B is an open collector output. This enables us to
compare words which are longer than 4-bits.
Function tables : (If the question is 10 marks, then mention the functional table in details)
• Table 2(a) shows the function table for IC 74181. It is valid for the active high operands and
active high outputs, and with C n = 1 i.e. no carry.
Table 2(a): Function table for IC 74181 with active high data and Cn = 1 (no carry)
• The function table for active low inputs and outputs has been given in Table 2(b).
Table 2(b) : Function table for IC 74181 with active low data and C n = 0 (with carry).
29