Professional Documents
Culture Documents
Dlda - N - 08
Dlda - N - 08
III [CMPN]
Digital Logic Design and Applications
Nov. '08 : Mumbai University − Examination Paper Solution
Time : 3hrs] [Marks : 100
1. (a) Convert (157.63)8 into decimal, binary and hexadecimal system. [4]
Soln.:
(157.63)8
Octal to Decimal :
Step 1 : Get the octal no. 1 5 7 . 6 3
Step 2 : Write corresponding weights 82 81 80 . 8−1 8−2
Step 3 : Multiple columnwise 64 40 7 . 3/4 3/16
3 3
Step 4 : Add the contents of row 3 = 64 + 40 + 7 + + = (111.9375)10
4 16
Octal to Binary :
Step 1 : Get the octal no. 1 5 7 . 6 3
Step 2 : Convert each digits into binary 001 101 111 . 110 011
∴ (157.63)8 = (001 101 111 . 110 011)2
Octal to Hexadecimal :
Step 1 : Convert into binary (0 0 1 1 0 1 1 1 1 . 1 1 0 0 1 1)
Step 2 : Convert binary to hexadecimal (0 0110 1111 . 1100 11)2
Add three zeros on extreme left (on MSB) and
Add 2 zero on extreme right side.
Binary (0000 0110 1111 . 1100 1100) group of 4 bit,
Hexa number 0 6 F . C C
(157.63)8 = (6F.CC)16
Soln.:
Y = (AB + A + AB)
But AB = A + B … De-Morgan's first theorem
∴ Y = (A + B + A + AB)
But A + A = A (∵ A + A = A)
∴ Y = (A + B + AB)
∴ Y = A.B.AB
But A = A and B = B
∴ Y = A.B.AB
But AB = (A + B) … De-Morgan's first theorem
∴ Y = A.B(A + B) = AAB + ABB
But AA = 0 and BB = 0
∴ Y =0.B+A.0
=0+0 … since 0 . B = 0 and A . 0 = 0
∴ Y =0
1
(2) S.E. − DLDA (CMPN)
Soln.:
Full Adder using Half Adder :
• The full adder circuit can be constructed using two half adders as shown in fig.1 and the
detail circuit is shown in fig.2.
Fig.1
• A full adder can be implemented using two half adders and the OR gate as shown in fig.2
Fig.2
• Now let us prove that this circuit acts as a full adder.
Proof :
• Refer fig.2 and write the expression for sum output as,
S = (A ⊕ B) ⊕ Cin = A ⊕ B ⊕ Cin
This expression is same as that obtained for the full adder.
• Now write the expression for carry output C0 as
C0 = (A ⊕ B) Cin + AB
C0 = (AB + AB)Cin + AB
= ABCin + ABCin + AB
= ABCin + ABCin + AB(1 + Cin )
= ABCin + ABCin + AB + ABCin
= BCin (A + A) + ABCin + AB
= BCin + ABCin + AB
= BCin + ABCin + AB(1 + Cin )
= BCin + ABCin + AB + ABCin
= BCin + AB + ACin + (B + B)
∴ C0 = BCin + AB + ACin
• This expression is same that for a full adder. Thus we have proved that circuit shown in fig.2
really behaves like a full adder.
2
Examination Paper Solution (3)
Soln.:
De Morgan's theorem :
The two theorems suggested by De-Morgen and which are extremely useful in Boolean algebra
are as follows :
3
(4) S.E. − DLDA (CMPN)
1. (e) Implement the boolean function with NAND – NAND logic, F (A, B, C) = ∑ m(0, 1, 3, 5). [4]
Soln.:
F (A, B, C) = ∑ m (0, 1, 3, 5)
∴ F (A, B, C) = B0 + B1 + B + B5
(1) Prepare K-map
BC BC BC BC BC
A 00 01 11 10
3
A 0 1 1 1 0
1 0 1 3 2
L 1 0 1 0 0
4 2 5 7 6
F (A, B, C)
F (A, B, C)
F (A, B, C)
4
Examination Paper Solution (5)
2. (a) Using boolean laws, prove NAND and NOR gates as universal gates. [10]
Soln.:
• The NAND and NOR gates are called as "Universal Gates" because it is possible to
implement any Boolean expression with the help of only NAND or only NOR gates.
• Hence a user can build any combinational circuit with the help of only NAND gates or only
NOR gates.
• This is a great advantage because a user will have to make a stock of only NAND or NOR
gate ICs.
Universal Property
NAND Gate
The NAND gate can be used to generate the NOT function, the AND function, the OR function,
and the NOR function.
NOT Function:
An inverter can be made from a NAND gate by connecting all of the inputs together and creating,
in effect, a single common input, as shown in Fig. 1, for a two−input gate:
AND Function :
An AND function can be generated using only NAND gates. It is generated by simply inverting
output of NAND gate; i.e. AB = AB. Fig. 2 shows the two input AND gate using NAND gates.
A B AB A B AB AB
0 0 0 0 0 1 0
0 1 0 ≡ 0 1 1 0
1 0 0 1 0 1 0
1 1 1 1 1 0 1
Table : Truth Table
OR Function :
OR function is generated using only NAND gates as follows : We know that Boolean expression
for OR gate is
Y =A+B
5
(6) S.E. − DLDA (CMPN)
= A+B Rule 9 : [A = A]
= A.B DeMorgan’s Theorem 1
The above equation is implemented using only NAND gates as shown in the Fig. 3.
NOR Function :
NOR function is generated using only NAND gates as follows : We know that Boolean
expression for NOR gate is
Y = A+B
= A. B
= A. B DeMorgan’s Theorem 2
Rule 9 : [ A = A ]
The above equation is implemented using only NAND gates, as shown in the fig. 4.
6
Examination Paper Solution (7)
NOR Gate
Similar to NAND gate, the NOR gate is also a universal gate, since it can be used to generate the
NOT, AND, OR and NAND functions.
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. 5.
OR Function :
An OR function can be generated using only NOR gates. It can be generated by simply inverting
output of NOR gate; i.e. A + B = A + B. Fig. 6 shows the two input OR gate using NOR gates.
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. 7.
7
(8) 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.
8
Examination Paper Solution (9)
2. (b) Draw 3-bit binary up-down counter and explain the operation. [10]
Soln.:
• The requirements of counter are :
1. 3-bit : Hence three FFs are required.
2. UP/DOWN : So a mode control input is essential.
• We know that for a ripple up counter, the Q output of preceding FF is connected to the clock
input of the next one.
• And for a ripple down counter, the Q output of the preceding FF is connected to the clock
input of the next one.
• Let the selection of Q or Q output of the preceding FF be controlled by the mode control
input M such that,
If M = 0 … UP counting. So connect Q to CLK
If M = 1 … DOWN counting. So connect Q to CLK
• Let us design a combinational logic to satisfy all the requirements stated above.
Inputs Outputs
M Q Q Y
0 0 0 0
Y=Q
0 0 1 0
for up
0 1 0 1
counting
0 1 1 1
1 0 0 0 Y= Q
1 0 1 1
for down
1 1 0 0
counting
Fig.(a) : Block diagram of 1 1 1 1
combinational circuit Table 1 : Truth table.
QQ
M 00 01 11 10 MQ
0 0 0 1 1
1 0 1 1 0
Expression for Y : MQ
Y = MQ + MQ
Fig.(b) : K-map for Y. Fig.(c)
9
(10) S.E. − DLDA (CMPN)
3. (a) What is race condition ? How it is overcome in Master-slave J-K flip flop ? Explain. [10]
Soln.:
• The "Race Around Condition" that we are going to explain occurs when J = K = 1 i.e. when
the latch is in the toggle mode.
• Refer figure 1 which shows the waveforms for the various modes, when a rectangular
waveform is applied to the "Enable" input
10
Examination Paper Solution (11)
Interval t0-t1 :
• During this interval J = 1, K = 0 and E = 0.
• Hence the latch is disabled and there is no change in Q.
Interval t1-t2 :
• During this interval J = 1, K = 0 and E = l.
• Hence this is a set condition and Q becomes 1.
Interval t3-t4 :
• During this interval J = 0, K = 1 and E = 1. Hence it is the reset condition.
• So Q becomes zero.
11
(12) S.E. − DLDA (CMPN)
Operation :
• We will discuss the operation of the master slave JK FF with reference to its truth table.
• We must always remember one important thing that in the positive half cycle of the clock, the
master is active and in the negative half cycle, the slave its active. This is shown in figure 3.
Fig.3
Case 1 : Clock = ×, J = K = 0
(i) For clock = 1, the master is active, slave inactive. As J = K = 0. Therefore, outputs of master i.e. Q
and Q1 will not change. Hence the S and R inputs to the slave will remain unchanged.
(ii) As soon as clock = 0, the slave becomes active and master is inactive. But since the S and R
inputs have not changed, the slave outputs will also remain unchanged.
∴ he outputs will not change if J = K = 0.
12
Examination Paper Solution (13)
3. (b) State truth table of 3-bit gray to binary conversion and design using 3 : 8 decoder and additional
gates. [10]
Soln.:
A gray number can be converted to binary step by step as follows.
Step I : MSB bit is kept as it is.
Step II : This bit is EX−ORed (added) with next bit from gray code.
Step III : The resulting bit in step II is EX−ORed with next bit from gray code.
Step IV : Step III is repeated till you reach LSB.
13
(14) S.E. − DLDA (CMPN)
We will talk in terms of B3 B2 B1 B0 and G3 G2 G1 G0. Let’s say given gray code is G3 G2 G1 G0
(Refer table for EX−OR table 23).
(a) B3 (binary MSB) = G3 (MSB as it is)
(b) B3 bit should be EX−ORed with next of gray, means B3 ⊕ G2, this will give B2,
∴B2 = B3 ⊕ G2.
(c) Resulting bit in step II is B2, is EX−ORed with next bit from gray i.e. G1, i.e. B2 ⊕ G1. The
resulting bit is B1, B2 ⊕ G1 = B1.
(a) Step III Continued
∴B0 = B1 ⊕ G0.
Now we reached LSB so stop. The above procedure graphically represented as follows.
MS LSB
Gray G G2 G1 G
⊕ ⊕ ⊕
Binary Code B3 B2 B1 B0
(MSB (LSB)
)
Let’s take one example to understand the same convert 0 1 0 1 gray to equivalent binary.
MS LSB
Gray 0 1 0 1
⊕ ⊕ ⊕
Binar 0 1 1 0
MSB
B3 B2 B1 B0
B3 = G3 = 0.
B2 = B3 ⊕ G2 = 0 ⊕ 1 = 1
B1 = B2 ⊕ G1 = 1 ⊕ 0 = 1
B0 = B1 ⊕ G0 = 1 ⊕ 1 = 0
∴gray 0 1 0 1 ⇒ 0 1 1 0 binary.
Note : The same conversion you can perform by “Addition” method. For addition refer table 24.
14
Examination Paper Solution (15)
Figure (a) shows 3-to-8 line decoder. Here, 3 inputs are decoded into eight outputs, each output
represent one of the minterms of the 3-input variables. The three inverters provide the
complement of the inputs, and each one of the eight AND gates generates one of the minterms.
Enable input is provided to activate decoded output base don data inputs A, B and C. The table
shows the truth table for 3 to 8 decoder.
15
(16) S.E. − DLDA (CMPN)
4. (a) Simplify using K-map, f (A, B, C, D) = π M (0, 2, 3, 6, 7, 8, 9, 12, 13). Write simplified SOP and
POS equations and draw logical diagram using NAND gates only. [10]
Soln.:
f (A, B, C, D) = π M (0, 2, 3, 6, 7, 8, 9, 12, 13)
(1) The given expression,
y = M0 M2 M3 M6 M7 M8 M9 M12 M13
(2) In K-map enter 0's corresponding to these mixtures and enter is in the viewing cells as shown
in figure and group the zero, as show in figure for the further simplification.
CD CD CD AB CD
AB 00 01 11 10
AB 00 0 1 0 0
0 1 3 2
AB 01 1 1 0 0
4 5 7 6
AB 11 0 0 1 1
12 13 15 14
AB 10 0 0 1 1
8 9 11 10
Logic Diagram :
Step 1 :
A B C D
A B C D
16
Examination Paper Solution (17)
4. (b) Simplify the function using Quine McClusky method, f (A, B, C, D) = ∑ m (4, 5, 8, 9, 11, 12, 13,
15). Draw the logical diagram using NAND gates. [10]
Soln.:
(1) Arrays all minterms according to the number of 1's and group are form as one 1's, two 1's,
etc., as shown in table.
Group Minterm A B C D
1 4 0 1 0 0
8 1 0 0 0
2 5 0 1 0 1
9 1 0 0 1
12 1 1 0 1
3 11 1 0 1 1
13 1 1 0 1
4 15 1 1 1 1
Table (a)
(2) Combine the minterms into a group of two :
• Table shows the matched pairs of minterms in the adjacent groups of table (a) which
differ at only one location (bit position) with respect to each other. Place () mark on the
matched pairs in table (a).
• The bit position where the minterms differ are represented by dashes (−) in the new terms
written in front of matched pairs.
Group Minterm A B C D
1 4−12 − 1 0 0
8−12 1 − 0 0
2 5−13 − 1 0 1
9−11 1 0 − 1
8−13 1 − 0 1
12−13 1 1 0 −
3 11-15 1 − 1 1
13−15 1 1 − 1
Table (b)
No further grouping is possible after this. So the process of grouping stops here.
(6) In the PI table find the columns containing only 1 cross (×) and encircle those (×) marks. Put
() mark in front of the corresponding PIs.
These () marked prime implicants in table (d) are the essential prime implicants (EPIs).
Hence the simplified expression for F is
F (A, B, C, D) = BC + AD + AC
Logic Diagram :
Step 1 : A B C D
A B C D
18
Examination Paper Solution (19)
5. (a) Draw a 2-input TTL NAND gate and explain its operation. [10]
Soln.:
• A two input TTL-NAND gate is shown in Figure 1. A and B are the inputs while Y is the
output terminal of this NAND gate.
Operation :
• In order to understand the operation of this circuit, let us replace transistor Q1 by its
equivalent circuit shown in Figure 2.
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 2 will conduct to force the voltage at point C in Figure 3 to
0.7V.
Fig. 1 : Two input TTL NAND gate Fig. 2 : Transistor Q1 is replaced by its
equivalent
• This voltage is insufficient to forward bias-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).
19
(20) S.E. − DLDA (CMPN)
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 Q2 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 4.
• This discussion reveals that the circuit operates as a NAND gate.
20
Examination Paper Solution (21)
5. (b) Simplify F (P, Q, R, S) = π M (3, 4, 5, 6, 7, 10, 11, 15) and implement using minimum no. of
gates. [10]
Sol.:
1) The given Expression
y = M3 M4 M5 M6 M7 M10 M11 M15
2) In K map enter 01, corresponding mixtures and enter 1’s in the remaining as shown in figure
and Group the zero1, as shown in figure below for the further simplification.
CD CD CD CD CD
AB 00 01 11 10
A B 00 0
0 1 3 2
A B 01 0 0 0 0
4 5 7 6
AB 11 0
12 13 15 14
A B 10 0 0
8 9 11 10
y = (A + B) (C + D) (A + B + C + D)
3) Logic Diagram
A B C D
6. (a) Design MOD−6 synchronous counter and explain its operation. [10]
Soln.:
21
(22) S.E. − DLDA (CMPN)
State Table :
CP QC QB QA QC+1 QB+1 QA+1 TC TB TA
0 0 0 0 0 0 1 0 0 1
1 0 0 1 0 1 0 0 1 1
2 0 1 0 0 1 1 0 0 1
3 0 1 1 1 0 0 1 1 1
4 1 0 0 1 0 1 0 0 1
5 1 0 1 0 0 0 1 0 1
K-map Simplification :
Logic Diagram :
6. (b) Draw 4-bit universal shift register and explain its operation. [10]
Soln.:
1. A shift register which can shift the data in only one direction is called as a unidirectional shift
register.
2. A shift register which can shift the data in both the directions is called as a bi-directional shift
register.
3. Applying the same logic, a shift register which can shift the data in both the directions (shift
right or left) as well as load it parallely, then it is called as a universal shift register.
Figure shows the logic diagram of a universal shift register.
• This shift register is capable of performing the following operations :
1. Parallel loading (parallel input parallel output)
2. Left shifting
22
Examination Paper Solution (23)
3. Right shifting
• The Mode control input is connected to Logic 1 for parallel loading operation whereas it
is connected to 0 for serial shifting.
• With mode control pin connected to ground, the universal shift register acts as a bi-
directional register.
• For serial left operation, the input is applied to the serial input which goes to AND gate-1
in Figure 1.
• Whereas for the shift right operation, the serial input is applied to D input (input of AND
gate 8).
• The well known example of universal shift register in the IC form is IC7495.
Parallel inputs
A B C D
Mode
control
Serial
input 1 2 3 4 5 6 7 8
Clock 1 M
light shift
M
R R R R
Clock 2 left CK CK CK CK
shift (load) S QA S QB S QC S QD
(LSB) QA QB QC QD (MSB)
Outputs
5. Features :
The important features of this chip are as follows :
• Synchronous shift left capacity.
• Synchronous parallel loading is possible.
• It has separate clock inputs one for shift operation and the other for load operation.
• Expansion with shift right is possible. That means cascading of two or more 7495 ICs for
more than 4−bits is possible.
23
(24) S.E. − DLDA (CMPN)
2 3 4 5
A B C D +VCC
1
CLK 6
pulses 0 CLK 2 7495
8 Mode
QA QB QC QD
13 12 11 10
Outputs
Fig. 2: 7495 used for parallel loading
• The mode control (M) is connected to logic 1. This will enable the AND gates 2, 4, 6, 8. The
AND gates 1, 3, 5, 7 are disabled. This allows the data transfer from the inputs A, B, C, D to
the flip-flops and disables the serial transfer of data.
• The 4 bit binary number which is to be loaded parallely is applied to the A B C D inputs.
• The clock applied at clock − 2 input only will be passed through to the flip-flops because with
M = 1 the AND gate − 10 is enabled and gate − 9 is disabled.
• As soon as a falling edge of clock is applied, all the flip-flops will change their status
simultaneously and the binary number applied to ABCD inputs will be loaded into the shift
register.
• The unused inputs such as input and clock − 1 can be left open or connected to ground
because they are the don’t care inputs for this mode.
• The connection diagram of 7495 for the shift left operation is shown in figure 4. Note that QD
is connected to C, QC to B and QB to A and the serial data is+V
applied at input D.
CC
1 A QB
1 CLK 2 M
Clock 0 Mode control = 1
7495
D Serial input
B QB C QD
Soln.:
Multiplexer (Data Selector) :
• Multiplexer is a special type of combinational circuit. The block diagram of an n-to-1
multiplexer is shown in Figure 1(a) and its equivalent circuit is shown in Figure 1(b).
• As shown, there are n-data inputs, one output and a m select inputs, with 2m = n.
• A multiplexer is a digital circuit which selects one of the n data inputs and routes it to the
output. The selection of one of the n inputs is done by the select inputs.
• To select n inputs we need m select lines such that 2m = n. Depending on the digital code applied at
the select inputs, one out of n data sources is selected and transmitted to the single output Y.
• E is called as a strobe or enable input which is useful for cascading. It is generally an active
low terminal, that means it will perform the required operation when it is low.
• As shown in Figure 1(b) the multiplexer acts like a digitally controlled single pole, multiple way
switch. The output gets connected to only one of the n data inputs at given instant of time.
MUX
D0 D0
D1
D1
D2 n:1
Multiplexer Y (Output) D2 (Output)
Dn−1
E Dn−1
(Enable
input)
Sm−1 S1 S0 Sm−1 S0
Select inputs
(a) Block diagram of an n : 1 multiplexer (b) Equivalent circuit
Fig. 1
25
(26) S.E. − DLDA (CMPN)
Necessity of Multiplexers :
• In most of the electronic systems, the digital data is available on more than one lines. It is
necessary to route this data over a single line.
• Under such circumstances we require a circuit which select one of the many inputs at a time.
• This circuit is nothing else but a multiplexer. Which has many inputs, one output and some
select inputs.
• Multiplexer improves the reliability of the digital system because it reduces the number of
external wired connections.
Advantages of Multiplexers :
1. It reduces the number of wires.
2. So it reduces the circuit complexity and cost.
3. We can implement many combinational circuits using MUX.
4. It simplifies the logic design.
5. It does not need the k maps and simplification.
Types of Multiplexers :
The types of multiplexer
1) 2 : 1 multiplexer 2) 4 : 1 multiplexer 3) 8 : 1 multiplexer
4) 16 : 1 multiplexer 5) 32 : 1 multiplexer
Applications of a Multiplexer :
Some of the important applications of a multiplexer are as follows :
1. It is used as a data selector to select one out of many data inputs.
2. It is used for simplification of logic design.
3. In the data acquisition system.
4. In designing the combinational circuits.
5. In the D/A converters.
6. To minimize the number of connections.
Multiplexer Tree :
• The multiplexer having more number of inputs can be obtained by cascading two or more
multiplexers with less number of inputs.
• This is called as a multiplexer tree.
• This concept will be clear after solving the following examples.
Demultiplexer Principle :
• The block diagram of a demultiplexer or decoder is shown in Figure 2(a).
• It has only one input, “n” outputs, and “m” select inputs.
• A demultiplexer performs the reverse operation of a multiplexer i.e. it receives one input and
distributes it over several outputs.
• At a time only one output line is selected by the select lines and the input is transmitted to the
selected output line.
• Hence a demultiplexer is equivalent to a single pole multiple way switch as shown in Figure 2(b).
Y0 Y0
Data Y1 Y1
Dn
input Y2 Data Y2
Demultiplexer Outputs input Outputs
Enable E
Yn−1 Yn−1
Types of Demultiplexers :
Similar to the multiplexers, the demultiplexers are classified as follows :
1. 1:2 demultiplexer 2. 1:4 demutliplexer
3. 1:8 demultiplexer 4. 1:16 demultiplexer
Demultiplexer Tree :
• Similar to multiplexer we can construct the demultiplexer with more number of lines using
demultiplexers having lower number lines.
• This is called as demultiplexer tree. It is also called as cascading of demultiplexers.
• This concept will be clear by solving the following examples.
7. (b) 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.
27
(28) S.E. − DLDA (CMPN)
B0 − B3 Operand inputs
S0 − S3 Function select inputs
M Mode control input
Cn Carry input (active low)
F0 − F3 Function output
Pin Name Description
A=B Comparator output (equality output)
G Carry generate output
P Carry propagate otput
Cn + 4 Carry output (active low)
Fig. 1 : Block diagram of ALU IC 74181 Fig. 2 : Pin configuration of the ALU IC 74181
• G and P outputs are used when a number of 74181 circuits are to be used in cascade
alongwith 74182, the look ahead carry generator circuit to make the arithmetic operations
faster.
• When mode control input is high (M = 1), then the logic operations are performed on the
individual bits and all the internal carries are enabled.
28
Examination Paper Solution (29)
• 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 Cn = 1 i.e. no carry.
Table 2(a): Function table for IC 74181 with active high data and Cn = 1 (no carry)
29
(30) S.E. − DLDA (CMPN)
• It is possible to use IC 74181 with either active high inputs or with active low inputs. With
active low inputs the device produces active low outputs and with active high inputs it
produces active high outputs.
• 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).
Function Active Low data and Cn = 0
Select Inputs
S3 S2 S1 S0 Logic operations M = 0 Arithmetic operations M = 1
0 0 0 0 F = A (inversion) F = A minus 1
0 0 0 1 F = AB (NAND) F = AB minus 1
0 0 1 0 F= A+B F = A B minus 1
0 0 1 1 F=1 F = minus 1
0 0 1 1 F = A+B F = A plus (A + B )
0 1 0 1 F = B (inversion) F = AB plus (A + B )
Synchronous Counters
When counter is clocked such that each flip-flop in the counter is triggered at the same time, the
counter is called as synchronous counter. Figure 2 shows two stage synchronous counter.
30
Examination Paper Solution (31)
CP
QA
QB
Fig.3 : Timing diagram and state sequence for the 2-bit synchronous counter.
31
(32) S.E. − DLDA (CMPN)
0 0 0 0
1 0 0 1
2 0 1 0
3 0 1 1
4 1 0 0
5 1 0 1
6 1 1 0
7 1 1 1
Looking at figure 4(b), we can see that QA changes on each clock pulse as we progress from its
original state to its final state and then back to its original state. To produce this operation, flip-
flop A is held in the toggle mode by connecting J and K inputs to HIGH. Now let us see what
flip-flop B does. Flip-flop B toggles, when QA is 1. When QA is a 0, flip-flop B is in the no-
change mode and remains in its present state. We can notice that flip-flop C has to change its
state only when QB and QA both are at logic 1. This condition is detected by AND gate and
applied to the J and K inputs of flip-flop C. Whenever both QA and QB are HIGH, the output of
the AND gate makes the J and K inputs of flip-flop C HIGH, and flip-flop C toggles on the
following clock pulse. At all other times, the J and K inputs of flip-flop C are held LOW by the
AND gate output, and flip-flop does not change state.
Soln.:
Octal to Binary Encoder :
• The octal to binary encoder has 8 − input lines and 3 − output lines. Corresponding to the
eight input octal numbers we get three bit binary output.
• Note that in encoders only one input will have a one value at any given time.
• Figure 1 shows the block diagram of octal to binary encoder and Table gives its truth table.
0 0 0 0 0 1 0 0 1 0 1
0 0 0 0 0 0 1 0 1 1 0
0 0 0 0 0 0 0 1 1 1 1
B0 = D4 + D5 + D6 + D7
B1 = D2 + D3 + D6 + D7
B2 = D1 + D3 + D5 + D7
I4 1 16 VCC
Pins Description
I5 2 15 EO
I0 to I7 Active low inputs
I6 3 14 GS
A 0 to A 2 Ative low outputs
I7 4 13 I3
IC 74148 EI Enable Input
EI 5 12 I2
EO Enable Output
A2 6 11 I1
GS Group Singal
A1 7 10 I0
GND 8 9 A0
33
(34) S.E. − DLDA (CMPN)
Description :
• I0 to I7 are the eight active low inputs.
• A 0 to A 2 are the three active low outputs.
• EI is the active low enable input terminal. If EI is at logic 1 then it will force all the output to
become high i.e. inactive. This feature can be used to allow some time for the new input data
to settle down.
• GS is the group signal output. It is used for indication that one of the inputs is low i.e. active.
• If all the inputs are inactive (high) the enable output (EQ) goes to logic 0.
Truth table :
The truth table of IC 74148 is shown in Table.
Inputs Outputs
EI I0 I1 I2 I3 I4 I5 I6 I7 A2 A1 A0 GS EO
1 X X X X X X X X 1 1 1 1 1
0 1 1 1 1 1 1 1 1 1 1 1 1 0
0 0 1 1 1 1 1 1 1 1 1 1 0 1
0 X 0 1 1 1 1 1 1 1 1 0 0 1
0 X X 0 1 1 1 1 1 1 0 1 0 1
0 X X X 0 1 1 1 1 1 0 0 0 1
0 X X X X 0 1 1 1 0 1 1 0 1
0 X X X X X 0 1 1 0 1 0 0 1
0 X X X X X X 0 1 0 0 1 0 1
0 X X X X X X X 0 0 0 0 0 1
34