Professional Documents
Culture Documents
COURSE MATERIAL
UNIT 2
COURSE B.Tech
SEMESTER III
PREPARED BY Dr.G.CHANDRAIAH
(Faculty Name/s) Assoc.Professor
VERSION V-5
BTECH_CSE -SEM 21
SVCE TIRUPATI
BTECH_CSE -SEM 21
SVCE TIRUPATI
1. COURSE OBJECTIVES
The objectives of this course is to
1. Introduce the classification of digital circuits and combinational circuits.
2. Outline knowledge on analysis of combinational circuits and design procedure
of combinational circuits.
3. Apply knowledge of K-maps to attain simplified Boolean function.
4. Acquainting with classical hardware design of combinational circuits.
5. Knowledge and hands-on experience that will enable them to work in a digital
system design.
2. PREREQUISITES
Students should have knowledge on
1. Basic Electronics
2. Basic Mathematics
3. SYLLABUS
UNIT III
4. COURSE OUTCOMES
1. Apply Boolean algebra for describing combinational digital circuits.
2. Select fundamental combinational circuits.
3. Analyze standard combinational circuits such as adders, subtractors, decoders,
encoders etc.
4. Design various combinational logic circuits.
5. Implement Boolean function with decoders and multiplexer.
DLD PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 P10 PO11 PO12 PSO1 PSO2
CO1 3 3 2 2
CO2 3 3 2 2
CO3 3 3 2 2
CO4 3 3 2 2
CO5 3 3 2 2
6. LESSON PLAN
1 |DE&MP- U N I T - 2
BTECH_CSE-SEM 21
SVCE TIRUPATI
2 |DE&MP- U N I T - 2
BTECH_CSE-SEM 21
SVCE TIRUPATI
2.2.1 DESIGN PROCEDURE
The design procedure for combinational logic circuits starts with the
problem specification and comprises the following steps:
1. Determine required number of inputs and outputs from the
specifications.
2. Derive the truth table for each of the outputs based on their relationships
to the input.
3. Simplify the boolean expression for each output. Use Karnaugh Maps or
Boolean algebra.
4. Draw a logic diagram that represents the simplified Boolean expression.
Verify the design by analysing or simulating the circuit.
2.2.2. Different types of Combinational Circuit
There are three main types of combinational logic circuits.
1. Arithmetic and logical combinational circuits – Adders,
Subtractors, Multipliers, Comparators.
2. Data handling combinational circuits – Multiplexers,
Demultiplexers, priority encoders, decoders.
3. Code converting combinational circuits – Binary to Gray, Gray to
Binary, Binary to Excess 3, seven-segment, etc.
Block diagram
Truth Table
Circuit Diagram
Block diagram
5 |DE&MP- U N I T - 2
BTECH_CSE-SEM 21
SVCE TIRUPATI
2.4.2. Full-Subtractor
The disadvantage of a half subtractor is overcome by full subtractor. The full
subtractor is a combinational circuit with three inputs A,B,C and two output D
and C'. A is the 'minuend', B is 'subtrahend', C is the 'borrow' produced by the
previous stage, D is the difference output and C' is the borrow output.
Truth Table
7 |DE&MP- U N I T - 2
BTECH_CSE-SEM 21
SVCE TIRUPATI
2 .5. DECODER
A decoder is a combinational circuit. It has n input and to a maximum m = 2n
outputs. Decoder is identical to a demultiplexer without any data input. It
performs operations which are exactly opposite to those of an encoder.
Block diagram
8 |DE&MP- U N I T - 2
BTECH_CSE-SEM 21
SVCE TIRUPATI
Logic Circuit
Inputs Outputs
A B C D0 D1 D2 D3 D4 D5 D6 D7
0 0 0 1 0 0 0 0 0 0 0
0 0 1 0 1 0 0 0 0 0 0
0 1 0 0 0 1 0 0 0 0 0
0 1 1 0 0 0 1 0 0 0 0
1 0 0 0 0 0 0 1 0 0 0
1 0 1 0 0 0 0 0 1 0 0
1 1 0 0 0 0 0 0 0 1 0
1 1 1 0 0 0 0 0 0 0 1
Table.2.6. Truth table of 3 to 8 decoder.
9 |DE&MP- U N I T - 2
BTECH_CSE-SEM 21
SVCE TIRUPATI
• Using the above expressions, the circuit of a 3 to 8 decoder can be implemented
using three NOT gates and eight 3-input AND gates as shown in fig
• The three inputs A, B and C are decoded into eight outputs, each output
representing one of the midterms of the 3-input variables.
• The three inverters provide the complement of the inputs and each one of the
wight AND gates generates one of the midterms.
• This decoder can be used for decoding any 3-bit code to provide eight outputs,
corresponding to eight different combinations of the input code.
• UpThis is also called a 1 of 8 decoder, since only one of eight output lines is HIGH
for a particular input combination.
A function with a long list of min-terms requires an OR Gate with a large number
of inputs. A function F having a list of K min-terms can be expressed in its
complemented form F’ with 2^n-K min-terms. If the number of min-terms in a
function is greater than 2^n/2, then F’ can be expressed with fewer min-terms
than required for F. In such a case, it is suitable to use a NOR Gate to sum the
min-terms of F’. The output of the NOR Gate will generate the normal output F.
11 |DE&MP- U N I T - 2
BTECH_CSE-SEM 21
SVCE TIRUPATI
The decoder method can be used to implement any combinational circuit. It is
necessary to implementing with comparing to all other possible
implementations to determine the solution.
2.5.4.1. 3 to 8 Decoder
In this section, let us implement 3 to 8 decoder using 2 to 4 decoders. We
Know that 2 to 4 Decoder has two inputs, A1 & A0 and four outputs, Y3 to Y0.
Whereas, 3 to 8 Decoder has three inputs A2, A1 & A0 and eight outputs, Y7 to
Y0.
We can find the number of lower order decoders required for implementing
higher order decoder using the following formula.
Required number of lower order decoders=m2/m1
Where,m1 is the number of outputs of lower order decoder.
m2 is the number of outputs of higher order decoder.
Here, m1= 4 and m2 = 8. Substitute, these two values in the above formula.
Required number of 2to4 decoders=8/4=2.
Therefore, we require two 2 to 4 decoders for implementing one 3 to 8 decoder.
The block diagram of 3 to 8 decoder using 2 to 4 decoders is shown in the
following figure.
12 |DE&MP- U N I T - 2
BTECH_CSE-SEM 21
SVCE TIRUPATI
The parallel inputs A1 & A0 are applied to each 2 to 4 decoder. The
complement of input A2 is connected to Enable, E of lower 2 to 4 decoder in
order to get the outputs, Y3 to Y0. These are the lower four min terms. The input,
A2 is directly connected to Enable, E of upper 2 to 4 decoder in order to get the
outputs, Y7 to Y4. These are the higher four min terms.
2.5.4.2 4 to 16 Decoder
In this section, let us implement 4 to 16 decoder using 3 to 8 decoders. We know
that 3 to 8 Decoder has three inputs A2, A1 & A0 and eight outputs, Y7 to Y0.
Whereas, 4 to 16 Decoder has four inputs A3, A2, A1 & A0 and sixteen outputs,
Y15 to Y0
We know the following formula for finding the number of lower order decoders
required.
Required number of lower order decoder =m2/m1
Substitute, m1= 8 and m2= 16 in the above formula.
Required number of 3to8 decoders=16/8=2
Therefore, we require two 3 to 8 decoders for implementing one 4 to 16
decoder. The block diagram of 4 to 16 decoder using 3 to 8 decoders is shown
in the following figure.
Three parallel inputs A2, A1 & A0 are applied to each 3 to 8 decoder. The
13 |DE&MP- U N I T - 2
BTECH_CSE-SEM 21
SVCE TIRUPATI
complement of input, A3 is connected to Enable, E of lower 3 to 8 decoder in
order to get the outputs, Y7 to Y0. These are the lower eight min terms. The input,
A3 is directly connected to Enable, E of upper 3 to 8 decoder in order to get the
outputs, Y15 to Y8. These are the higher eight min terms.
2.6. Encoder
Encoder is a combinational circuit which is designed to perform the inverse
operation of the decoder. An encoder has n number of input lines and m
number of output lines. An encoder produces an m bit binary code
corresponding to the digital input number. The encoder accepts an n input
digital word and converts it into an m bit another digital word.
Block diagram
2.6.1. 4 to 2 Encoder
Let 4 to 2 Encoder has four inputs Y3, Y2, Y1 & Y0 and two outputs A1 & A0.
The block diagram of 4 to 2 Encoder is shown in the following figure.
14 |DE&MP- U N I T - 2
BTECH_CSE-SEM 21
SVCE TIRUPATI
Truth table
Inputs Outputs
Y3 Y2 Y1 Y0 A1 A0
0 0 0 1 0 0
0 0 1 0 0 1
0 1 0 0 1 0
1 0 0 0 1 1
From Truth table, we can write the Boolean functions for each output as
A1=Y3+Y2
A0=Y3+Y1
We can implement the above two Boolean functions by using two input OR
gates.
The circuit diagram of 4 to 2 encoder is shown in the following figure.
The above circuit diagram contains two OR gates. These OR gates encode the
four inputs with two bits.
Octal to binary Encoder has eight inputs, Y7 to Y0 and three outputs A2, A1 & A0.
Octal to binary encoder is nothing but 8 to 3 encoder. The block diagram of
octal to binary Encoder is shown in the following figure.
15 |DE&MP- U N I T - 2
BTECH_CSE-SEM 21
SVCE TIRUPATI
At any time, only one of these eight inputs can be ‘1’ in order to get the
respective binary code. The Truth table of octal to binary encoder is shown
below.
Inputs Outputs
Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 A2 A1 A0
0 0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 1 0 0 0 1
0 0 0 0 0 1 0 0 0 1 0
0 0 0 0 1 0 0 0 0 1 1
0 0 0 1 0 0 0 0 1 0 0
0 0 1 0 0 0 0 0 1 0 1
0 1 0 0 0 0 0 0 1 1 0
1 0 0 0 0 0 0 0 1 1 1
2.7. Multiplexers
Multiplexer is a special type of combinational circuit. There are n-data inputs,
one output and m select inputs with 2m = n. It 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 selected inputs. Depending on the digital code applied
at the selected inputs, one out of n data sources is selected and transmitted to
the single output Y. E is called the strobe or enable input which is useful for the
17 |DE&MP- U N I T - 2
BTECH_CSE-SEM 21
SVCE TIRUPATI
cascading. It is generally an active low terminal that means it will perform the
required operation when it is low.
Block diagram
2.7.1. 2 :1 multiplixer
Block Diagram
Truth Table
18 |DE&MP- U N I T - 2
BTECH_CSE-SEM 21
SVCE TIRUPATI
2.7.2 4x1 Multiplexer
4x1 Multiplexer has four data inputs I3, I2, I1 & I0, two selection lines s1 & s0 and
one output Y. The block diagram of 4x1 Multiplexer is shown in the following
figure.
One of these 4 inputs will be connected to the output based on the
combination of inputs present at these two selection lines. Truth table of 4x1
Multiplexer is shown below.
Truth table
S1 S0 Y
0 0 I0
0 1 I1
1 0 I2
1 1 I3
From Truth table, we can directly write the Boolean function for output, Y as
Y=S1′S0′I0+S1′S0I1+S1S0′I2+S1S0I3
We can implement this Boolean function using Inverters, AND gates & OR gate.
Now, let us implement the following two higher-order Multiplexers using lower-
order Multiplexers.
• 8x1 Multiplexer
• 16x1 Multiplexer
So, we require two 4x1 Multiplexers in first stage in order to get the 8 data inputs.
Since, each 4x1 Multiplexer produces one output, we require a 2x1Multiplexer in
second stage by considering the outputs of first stage as inputs and to produce
the final output.
Let the 8x1 Multiplexer has eight data inputs I7 to I0, three selection lines s2, s1 &
s0 and one output Y. The Truth table of 8x1 Multiplexer is shown below.
Truth table
20 |DE&MP- U N I T - 2
BTECH_CSE-SEM 21
SVCE TIRUPATI
Fig.2.25. 8*1 multiplexer using two 4*1 multiplexer and one 2*1 multiplexer
The same selection lines, s1 & s0 are applied to both 4x1 Multiplexers. The data
inputs of upper 4x1 Multiplexer are I7 to I4 and the data inputs of lower 4x1
Multiplexer are I3 to I0. Therefore, each 4x1 Multiplexer produces an output
based on the values of selection lines, s1 & s0.
The outputs of first stage 4x1 Multiplexers are applied as inputs of 2x1 Multiplexer
that is present in second stage. The other selection line, s2 is applied to 2x1
Multiplexer.
• If s2 is zero, then the output of 2x1 Multiplexer will be one of the 4 inputs I3 to
I0 based on the values of selection lines s1 & s0.
• If s2 is one, then the output of 2x1 Multiplexer will be one of the 4 inputs I 7 to
I4 based on the values of selection lines s1 & s0.
Therefore, the overall combination of two 4x1 Multiplexers and one 2x1
Multiplexer performs as one 8x1 Multiplexer.
So, we require two 8x1 Multiplexers in first stage in order to get the 16 data
inputs. Since, each 8x1 Multiplexer produces one output, we require a 2x1
Multiplexer in second stage by considering the outputs of first stage as inputs
and to produce the final output.
21 |DE&MP- U N I T - 2
BTECH_CSE-SEM 21
SVCE TIRUPATI
Let the 16x1 Multiplexer has sixteen data inputs I15 to I0, four selection lines s3 to
s0 and one output Y. The Truth table of 16x1 Multiplexer is shown below.
Truth table
Fig.2.26. 16*1 multiplexer using two 8*1 multiplexer and 2*1 multiplexer
22 |DE&MP- U N I T - 2
BTECH_CSE-SEM 21
SVCE TIRUPATI
The same selection lines, s2, s1 & s0 are applied to both 8x1 Multiplexers. The data
inputs of upper 8x1 Multiplexer are I15 to I8 and the data inputs of lower 8x1
Multiplexer are I7 to I0. Therefore, each 8x1 Multiplexer produces an output
based on the values of selection lines, s2, s1 & s0.
The outputs of first stage 8x1 Multiplexers are applied as inputs of 2x1 Multiplexer
that is present in second stage. The other selection line, s3 is applied to 2x1
Multiplexer.
• If s3 is zero, then the output of 2x1 Multiplexer will be one of the 8 inputs Is 7 to
I0 based on the values of selection lines s2, s1 & s0.
• If s3 is one, then the output of 2x1 Multiplexer will be one of the 8 inputs I15 to
I8 based on the values of selection lines s2, s1 & s0.
Therefore, the overall combination of two 8x1 Multiplexers and one 2x1
Multiplexer performs as one 16x1 Multiplexer.
2.8. Demultiplexers
A demultiplexer performs the reverse operation of a multiplexer i.e. it receives
one input and distributes it over several outputs. It has only one input, n outputs,
m select input. At a time only one output line is selected by the select lines and
the input is transmitted to the selected output line. A de-multiplexer is equivalent
to a single pole multiple way switch as shown in fig.
Demultiplexers come in multiple variations.
• 1 : 2 demultiplexer
• 1 : 4 demultiplexer
• 1 : 16 demultiplexer
• 1 : 32 demultiplexer
Thee single input ‘I’ will be connected to one of the four outputs, Y3 to Y0 based
on the values of selection lines s1 & s0. The Truth table of 1x4 De-Multiplexer is
shown below.
23 |DE&MP- U N I T - 2
BTECH_CSE-SEM 21
SVCE TIRUPATI
Truth table
S1 S0 Y3 Y2 Y1 Y0
0 0 0 0 0 I
0 1 0 0 I 0
1 0 0 I 0 0
1 1 I 0 0 0
From the above Truth table, we can directly write the Boolean functions for
each output as
Y3=s1s0I
Y2=s1s0′I
Y1=s1′s0I
Y0=s1′s0′I
We can implement these Boolean functions using Inverters & 3-input AND gates.
The circuit diagram of 1x4 De-Multiplexer is shown in the following figure.
• 1x8 De-Multiplexer
• 1x16 De-Multiplexer
So, we require two 1x4 De-Multiplexers in second stage in order to get the final
eight outputs. Since, the number of inputs in second stage is two, we require 1x2
DeMultiplexer in first stage so that the outputs of first stage will be the inputs of
second stage. Input of this 1x2 De-Multiplexer will be the overall input of 1x8 De-
Multiplexer.
Let the 1x8 De-Multiplexer has one input I, three selection lines s2, s1 & s0 and
outputs Y7 to Y0. The Truth table of 1x8 De-Multiplexer is shown below.
s2 s1 s0 Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
0 0 0 0 0 0 0 0 0 0 I
0 0 1 0 0 0 0 0 0 I 0
0 1 0 0 0 0 0 0 I 0 0
0 1 1 0 0 0 0 I 0 0 0
25 |DE&MP- U N I T - 2
BTECH_CSE-SEM 21
SVCE TIRUPATI
1 0 0 0 0 0 I 0 0 0 0
1 0 1 0 0 I 0 0 0 0 0
1 1 0 0 I 0 0 0 0 0 0
1 1 1 I 0 0 0 0 0 0 0
Logic Diagram
The common selection lines, s1 & s0 are applied to both 1x4 De-Multiplexers. The
outputs of upper 1x4 De-Multiplexer are Y7 to Y4 and the outputs of lower 1x4
De-Multiplexer are Y3 to Y0.
26 |DE&MP- U N I T - 2
BTECH_CSE-SEM 21
SVCE TIRUPATI
The other selection line, s2 is applied to 1x2 De-Multiplexer. If s2 is zero, then one
of the four outputs of lower 1x4 De-Multiplexer will be equal to input, I based on
the values of selection lines s1 & s0. Similarly, if s2 is one, then one of the four
outputs of upper 1x4 DeMultiplexer will be equal to input, I based on the values
of selection lines s1 & s0.
2.8.2.2. 1x16 De-Multiplexer
In this section, let us implement 1x16 De-Multiplexer using 1x8 De-Multiplexers
and 1x2 De-Multiplexer. We know that 1x8 De-Multiplexer has single input, three
selection lines and eight outputs. Whereas, 1x16 De-Multiplexer has single input,
four selection lines and sixteen outputs.
So, we require two 1x8 De-Multiplexers in second stage in order to get the final
sixteen outputs. Since, the number of inputs in second stage is two, we
require 1x2 DeMultiplexer in first stage so that the outputs of first stage will be
the inputs of second stage. Input of this 1x2 De-Multiplexer will be the overall
input of 1x16 De-Multiplexer.
Let the 1x16 De-Multiplexer has one input I, four selection lines s3, s2, s1 & s0 and
outputs Y15 to Y0. The block diagram of 1x16 De-Multiplexer using lower order
Multiplexers is shown in the following figure.
27 |DE&MP- U N I T - 2
BTECH_CSE-SEM 21
SVCE TIRUPATI
The common selection lines s2, s1 & s0 are applied to both 1x8 De-Multiplexers.
The outputs of upper 1x8 De-Multiplexer are Y15 to Y8 and the outputs of lower
1x8 DeMultiplexer are Y7 to Y0.
The other selection line, s3 is applied to 1x2 De-Multiplexer. If s3 is zero, then one
of the eight outputs of lower 1x8 De-Multiplexer will be equal to input, I based on
the values of selection lines s2, s1 & s0. Similarly, if s3 is one, then one of the 8
outputs of upper 1x8 De-Multiplexer will be equal to input, I based on the values
of selection lines s2, s1 & s0.
9. Practice Quiz
1.A binary adder can be constructed with
a) Cascaded connection of full adders
b) parallel connection of half adders
c) Cascaded connection of Half adders
d)parallel connection of full adders
10.Assignments
S.No Question BL CO
1 Design a full adder and full subtractor? 4 1
Design of a combinational circuit to produce the 2’s
2 4 1
complement of a 4-bit binary number?
3 Design a decimal to BCD encoder circuit ? 4 1
4 Design a 2 line to 4 line decoder using NAND gates? 4 1
Implement the following logic function using an 8*1 MUX
5 F(A,B,C,D)=m(1,3,4,11,12,13,14,15) 3 1
6 Design a 32:1 MUX using two 16:1 muxs and one 2:1 mux? 4 1
29 |DE&MP- U N I T - 2
BTECH_CSE-SEM 21
SVCE TIRUPATI
A combinational circuit that performs the addition of
two bits is called a half adder. A half adder needs two binary
inputs and two binary outputs. The input variables designate
the augend and addend bits; the output variables produce
the sum and carry
4 Define full adder?
A combinational circuit that performs the adtion of
4 3
three bits is a full adder.It consists of three inputs and two
outputs.
5 Define binary adder.
A binary adder is a digital circuit that produces the
arithmetic sum of two binary numbers. It can be constructed
4 3
with full adders constructed in cascade, with the output
carry from each full adder connected to the input carry of
the next full adder in the chain.
6 Define multiplexer?
A multiplexer is combinational circuit that selects
binary information from one of many input lines and directs it
to a single output line. The selection of a particular input line is 4 4
controlled by a set of selection lines. Normally there are 2n
input lines and n selection lines whose bit combinations
determine which input is selected.
7 Define magnitude comparator?
A magnitude comparator is a combinational circuit
that compares two numbers, A and B, and determines their
4 3
relative magnitudes. The outcome of the comparison is
specified by three binary variables that indicate whether
a>b, A = b, or A < B.
8 What are decoders?
A decoder is a combinational circuit that converts
binary information from n input lines to a maximum of 2n 2 4
unique output lines. If the n bit coded information has unused
combinations, he decoder may have fewer than 2n outputs.
9 What are encoders?
An encoder is a digital circuit that performs the inverse
operation of a decoder. An encoder has 2n and n output 2 4
lines. The output lines generate the binary code
corresponding to the input value
10. Define priority encoder?
A priority encoder is an encoder circuit that includes the
priority function. The operation of priority encoder is such that 4 4
if two or more inputs are equal to 1 at the same time, the
input having the highest priority will take precedence.
30 |DE&MP- U N I T - 2
BTECH_CSE-SEM 21
SVCE TIRUPATI
12. Part B- Questions
S.No Question BL CO
1 What is a combinational circuit? Explain with one example. 1 1
2 Design a full adder with two halfadders and OR gate. 4 3
3 Design a 4-bitadder-subtractorcircuitand explain the operation 2 3
in detail
4 With neat diagram,explain 3 to 8 line decoder. 2 3
5 With neat diagram,explain decimal adder. 2 3
6 3 5
ImplementthefollowingBooleanfunctionusing4x1MUX.
F(a,b,c)=∑m (1,3,5,6)
7 Realize the functionF(a,b,c)=∑m (0,3,5,6,7)using 8:1 multiplexer. 3 5
8 Design 2 bit magnitude comparator and draw its logic circuit 4 3
diagram.
9 Design 32:1 Multiplexer using two 16:1 Multiplexers and one 2:1 3 4
Multiplexer.
10 Briefly explain the operation of a carry look ahead adder 3 4
2. Excess-3 adder
It is a basically a binary code which is made by adding 3 with the equivalent
decimal of a binary number and again converting it into binary number. So if
we consider any binary number we have to first convert it into decimal number
then add 3 with it and then convert it into binary and we will get the excess 3
equivalent of that number.
The operation of addition can be done by very simple method we will illustrate
the operation in a simple way using steps.
1.Convert the numbers (which are to be added) into excess 3 forms by adding
0011 with each of the four bit groups them or simply increasing them by 3.
2. Now the two numbers are added using the basic laws of binary addition,
there is no exception for this method.
3. Now which of the four groups have produced a carry we have to add 0011
with them and subtract 0011 from the groups which have not produced a carry
during the addition.
4. The result which we have obtained after this operation is in Excess 3 form and
this is our desired result
33 |DE&MP- U N I T - 2
BTECH_CSE-SEM 21