Unit 3 Combinational Functions1
Unit 3 Combinational Functions1
Combinational Functions
Text Books:
1. R.P. Jain, “Modern Digital Electronics”, Tata McGraw Hill Publication, 4th Edition, 2010.
2. M. M. Mano, “Digital Logic and Computer Design”, Prentice Hall of India Publication, 4 th
Edition, 2006.
Reference Books:
1. D. P. Leach, A. P. Malvino, G. Saha, “Digital Principles and Applications”,Tata McGraw Hill
Publication, 8th Edition, 1993.
2. Comer, “Digital Logic & State Machine Design”, Oxford Universities Press, 3rd Edition,
2014
E-Sources:
NPTEL videos
Introduction
• The traditional methods of combinational circuit designs discussed
involve simplification and realization using gates.
• Using these methods, complex functions have been integrated (MSI)
and are easily available in IC form.
• This chapter presents these complex ICs and their applications in
combinational system design.
• Examples of these devices are:
– Multiplexers, Demultiplexers
– Adders
– Parity generators/checkers
– Priority encoders, decoders
– Comparators etc.
• These devices significantly reduce IC package count thereby reducing
the system cost.
Multiplexers and their use in
Combinational Logic Design
• The Multiplexer (data selector) is a logic circuit that allows one of the n
data inputs at the output. Fig shows a 4:1 multiplexer. It has
– 4 data input lines (I0 to I3)
– 2 select lines (S1, S0)
– 1 data output line Y
• One of the four data inputs will appear at the output depending on the
value of S1, S0.
Multiplexers and their use in
Combinational Logic Design
• Its truth table and realization
is given as follows:
S1 S0 Y
0 0 I0
0 1 I1
1 0 I2
1 1 I3
Multiplexers and their use in
Combinational Logic Design
• Multiplexers are one of the widely used standard
logic circuits in digital design.
• So, commercially available in various sizes, such as
2:1, 4:1, 8:1 and 16:1 multiplexers.
• Its output Y is given by:
Multiplexers and their use in
Combinational Logic Design
• As it is available in various sizes, the input selected is controlled by
a set of select inputs.
Multiplexers and their use in
Combinational Logic Design
• Following table gives the truth table of a 4:1
multiplexer with active low enable input (G).
Enable Input Select Inputs Output
G S1 S0 Y
0 0 0 I0
0 0 1 I1
0 1 0 I2
0 1 1 I3
1 X X 0
Inputs Outputs
A B D C
0 0 0 0
0 1 1 1
1 0 1 0
1 1 0 0
Design Examples
• Arithmetic Circuits:
• Full Subtractor: This needs full subtractor circuit for performing
multibit subtraction wherein a borrow from the previous bit position
may also be there.
• Inputs: An, Bn, Cn-1. Outputs: Dn, Cn
• TT for Full Subtractor:
Inputs Outputs
A B C S C
0 0 0 0 0
0 0 1 1 1
0 1 0 1 1
0 1 1 0 1
1 0 0 1 0
1 0 1 0 0
1 1 0 0 0
1 1 1 1 1
Adders and their use as Subtractors
• Using half and full adders and subtractors one
can design adders and subtractors for n bit
numbers.
• Addition and subtraction can be performed using
only adders (we can perform subtraction using
adders and 2’sc).
• An adder circuit for addition of two n-bit binary
numbers consists of n full adder circuits.
• It accepts two n-bit binary numbers as inputs and
produces an (n+1)-bit binary number as the sum.
Adders and their use as Subtractors
• A and B are the two n-bit inputs to be added and
Cn-1Sn-1Sn-2…..S2S1S0 is their sum.
• A half adder may be used to add the LSBs A0 and B0.
• For cascading these adders to increase the number
of bits to be added, the CARRY input terminal is
required for the adder to add the LSBs.
• All the adders used are full adders.
• Using this scheme, the carry has to ripple down the
line of cascaded adders from the LSB to MSB
position which decreases the operating speed of
the adder.
Digital Comparators
• Comparators can be
designed for comparing
multibit numbers.
• Figure shows the block
diagram of an n-bit
comparator.
• Inputs: two n-bit numbers A
and B
• Output:
– high: A>B, A=B and A<B
Digital Comparators
• 1 bit Comparator
• Inputs: two 1-bit numbers A and B
• Output: high: A>B, A=B and A<B
Circuit of a 2 bit
comparator
Digital Comparators
• In a 4-bit comparator the condition of A>B can
be possible in the following four cases:
– If A3 = 1 and B3 = 0
– If A3 = B3 and A2 = 1 and B2 = 0
– If A3 = B3, A2 = B2 and A1 = 1 and B1 = 0
– If A3 = B3, A2 = B2, A1 = B1 and A0 = 1 and B0 = 0
Digital Comparators
• Similarly the condition for A<B can be possible in
the following four cases:
– If A3 = 0 and B3 = 1
– If A3 = B3 and A2 = 0 and B2 = 1
– If A3 = B3, A2 = B2 and A1 = 0 and B1 = 1
– If A3 = B3, A2 = B2, A1 = B1 and A0 = 0 and B0 = 1
• The condition of A=B is possible only when all the
individual bits of one number exactly coincide
with corresponding bits of another number.
Digital Comparators
Comparing inputs Outputs
The truth
A3B3 A2B2 A1B1 A0 B0 A>B A<B A=B
table of a
A3>B3 X X X H L L
4 bit
A3<B3 X X X L H L
comparat
or is A3=B3 A2>B2 X X H L L
A B EX-NOR
0 0 1
0 1 0
1 0 0
1 1 1
1) A=10001
B=11000
2) A=11001
B=11000
A<B
3) A=01011
B=10111
4) A=11111
B=11111
5) A=11110
B=11111
• 6.14 Design a 8 bit comparator using only 2 7485s.
• Solution:
• The comparator C1 compares the least significant 4 bits.
• It’s A>B, A=B, A<B outputs are connected to the corresponding
cascading inputs of C2 resp. The complete circuit is as follows:
• Example 6.7
• Design a 24
bit
comparator
using six
7485
comparator
s in two
levels.
• 6.15 Verify the operation of the 24 bit comparator of following figure
for the following numbers:
• A=100110000111011001010010
• B=101110000111011000100011
• Solution:
• 6.15 Verify the operation of the 24 bit comparator of following figure
for the following numbers:
• A=100110000111011001010010
• B=101110000111011000100011
• Solution:
BCD to 7 Segment Decoder
• A digital display that consists of 7 LED segments is used to display decimal
numerals in digital systems.
• For using this display device, the data has to be converted from some
binary code to the code required for the display.
• The binary code used is natural BCD.
Truth Table of BCD to 7 segment
Decoder
Decimal Inputs Outputs
Digit
Displayed 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 0 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 0 0 1 1
BCD to 7 Segment Decoder
• ABCD is the natural BCD code for numerals 0
through 9.
• The K-maps for each of the outputs a through g
are given below:
• The entries in the K-map corresponding to six
binary combinations not used in the truth table
are X-don’t-care.
a b
1 1
0 1
1 1
1 1
0 1
1 0
0 0
1 1
1 1
1 1
c d
1 1
1 0
0 1
1 1
1 0
1 1
1 1
1 0
1 1
1 0
e f
1 1
0 0
1 0
0 0
0 1
0 1
1 1
0 0
1 1
0 1
g
0
0
1
1
1
1
1
0
1
1
Code Converters
• There is a wide variety of binary codes used in digital systems.
• Some of these are:
– BCD
– Excess-3
– Gray
– Octal
– Hexadecimal
• Often it is required to convert from one code to another.
• Ex. The input to a digital system may be in natural BCD and the
output may be seven segment LEDs.
• The digital system used may be capable of processing the data in
straight binary format.
• So the data has to be converted from BCD to binary at the output.
BCD to Binary Converters
• The block diagram of BCD to binary converter IC 74184 is
given in the following fig.:
• This device can be used as a 1 ½ decade BCD-to-Binary
converter.
BCD to Binary Converters
• The BCD inputs are applied at the input terminals A through E and
the LSB of the least significant BCD digit bypasses the converter and
appears as the LSB of the binary output.
A= WX + WYZ
C= Y’Z + YZ’
D=Z’
Here,
E3, E2, E1 and E0
corresponds to W, X, Y, Z
and B3, B2, B1 and B0
corresponds to A, B, C, D
6.5 Design a Gray to BCD code converter using two
dual 4:1 multiplexer ICs (74153) and some gates
Solution b)
BCD Code Gray Code This can be solved using the procedure
D C B A G3 G2 G1 G0 used in previous problem.
The circuit can be designed using two
0 0 0 0 0 0 0 0
74153 ICs and two (7486) Ex-OR gates.
0 0 0 1 0 0 0 1
0 0 1 0 0 0 1 1
0 0 1 1 0 0 1 0
0 1 0 0 0 1 1 0
0 1 0 1 0 1 1 1
0 1 1 0 0 1 0 1
0 1 1 1 0 1 0 0
1 0 0 0 1 1 0 0
1 0 0 1 1 1 0 1
Assignment
• Solve following exercises:
– 6.1 a) and b)
– 6.4
– 6.5 a) and b)
– 6.6 a) and b)
– 6.14