Unit 3
Unit 3
UNIT-3
Combinational Circuits
What are combinational logic circuits?
• Combinational circuits are a basic collection of logic gates.
• The output of a combinational circuit depends on its present inputs only.
Combinational circuits perform a specific information processing operation
fully specified logically by set of Boolean functions.
• A combinational circuit consists of input variables, logic gates and output
variables. The logic gates accept signals from the inputs and generate signals
to the outputs.
• For ‘n’ input variables, there are ‘2n’ possible combinations of binary input
variables. For each input combination, there is only one possible output
combination.
Boolean Expression: Z = (B + C) * A
Arithmetic Circuits
• Combinational Arithmetic Circuits perform
arithmetic functions like Addition, Subtraction
and Multiplication i.e., the logic circuits which are
used for performing the digital arithmetic
operations such as addition, subtraction,
multiplication and division are called ‘arithmetic
circuits’.
Logic Equations:
Logic Circuit:
Half adder using Universal gates
Full adder:
Full adder:
Full Adder using two Half Adders:
Full adder using Universal gates
Subtractors
The logic circuits used for binary subtraction, are known as binary
subtractors. There are two kinds of subtractors.
– A half subtractor is a combinational circuit which is used to perform
the subtraction of two bits.
– A full subtractor a combinational circuit that performs the subtraction
of three binary digits.
Truth Table:
Half subtractor:
0–0=0
0 – 1 = 1, borrow 1
1–0=1
1–1=0
Logic Equations:
Logic Circuit:
Half subtractors using Universal gates
Truth Table
Full subtractor:
Logic Symbol
Logic Equation:
Logic diagram:
Full subtractors using two Half subtractors:
Full subtractor using Universal gates
Binary Adder – 4 bit parallel adder
Consider a multiplier
circuit that multiplies
a binary number
represented by four
bits by a number
represented by three
bits.
Since K = 4 and J = 3,
we need 12 AND
gates and two 4-bit
adders to produce a
product of seven
bits.
Magnitude Comparator
A magnitude comparator is a combinational circuit designed primarily to compare the relative
magnitude of the two binary numbers A and B. Naturally, the result of this comparison is
specified by three binary variables that indicate, whether A > B, A = B or A < B.
EX-OR gate is considered as the
basic comparator circuit.
37
2x4 Decoder:
Functional Table of 2x4 Decoder
Logic Diagram
38
2x4 decoder with enable input:
Functional Table
Logic Diagram
Inputs Outputs
EN I1 I0 Y3 Y2 Y1 Y0
0 X X 0 0 0 0
1 0 0 0 0 0 1
1 0 1 0 0 1 0
1 1 0 0 1 0 0
1 1 1 1 0 0 0
39
3x8 decoder
Inputs outputs
X Y Z D7 D6 D5 D4 D3 D2 D1 D0
0 0 0 0 0 0 0 0 0 0 1
0 0 1 0 0 0 0 0 0 1 0
0 1 0 0 0 0 0 0 1 0 0
0 1 1 0 0 0 0 1 0 0 0
1 0 0 0 0 0 1 0 0 0 0
1 0 1 0 0 1 0 0 0 0 0
1 1 0 0 1 0 0 0 0 0 0
1 1 1 1 0 0 0 0 0 0 0
40
Three-to-eight-line decoder
3x8 decoder using two 2x4 decoders
• The inputs A0 and A1 is connected
as parallel inputs for both the
decoders and then the Enable pin
of the Second Decoder is made to
act as A2 (third input).
Logic Diagram
42
4x16 decoder
Inputs outputs
D C B A Y15 Y14 .. .. Y3 Y2 Y1 Y0
0 0 0 0 0 0 0 0 0 0 0 1
0 0 1 1 0 0 0 0 1 0 0 0
..
0 1 1 1
1 0 0 0
1 0 0 1
1 1 1 0 0 1 0 0 0 0 0 0
1 1 1 1 1 0 0 0 0 0 0 0
43
4x16 decoder using 3x8 decoder
44
2x4 decoder with active low output
45
BCD to Seven Segment decoder
Display devices are used to provide display of numbers, alphabets and symbols in response to
electrical input and are called as Electronic Display Systems. This display device accept input in
the form of BCD number and display the particular number on the display.
46
The K-map method can be used to derive the logic expression of the decimal numbers for display.
47
Encoders
⚫ An encoder has
− 2N inputs
− N outputs
⚫ An encoder outputs the binary value of the selected
(or active) input.
⚫ An encoder performs the inverse operation of a
decoder.
⚫ The encoder can be implemented with OR gates whose
inputs are determined directly from the truth table.
Output z is equal to 1 when the input octal digit is 1, 3,
5,or 7. Output y is 1 for octal digits 2, 3, 6, or 7, and
output x is 1 for digits 4, 5, 6, or 7.
48
Octal to Binary Encoder
The encoder can be implemented with OR gates whose inputs are determined directly from
the truth table. Output Y0 is equal to 1 when the input octal digit is 1, 3, 5,or 7. Output Y1
is 1 for octal digits 2, 3, 6, or 7, and output Y2 is 1 for digits 4, 5, 6, or 7.
49
Priority Encoders
⚫ If more than one input is active, the higher-order
input has priority over the lower-order input.
− The higher value is encoded on the output
⚫ A valid indicator, v, is included to indicate whether or
not the output is valid.
− Output is invalid when no inputs are active
⚫ v=0
− Output is valid when at least one input is active
⚫ v=1
50
Boolean Expressions
Inputs Outputs
D3 D2 D1 D0 X Y V
0 0 0 0 X X 0
0 0 0 1 0 0 1
0 0 1 X 0 1 1
0 1 X X 1 0 1
1 X X X 1 1 1
Logic Diagram
51
Multiplexers
⚫ A multiplexer has
− N control inputs(Select lines)
− 2N data inputs
− 1 output
⚫ A multiplexer routes (or connects)
the selected data input to the
output.
− The value of the control inputs
determines the data input that
is selected.
52
2X1 Multiplexer
S F
(Select
Line)
0 I0
1 I1
MSB LSB
54
8X1 Multiplexer
Select Line O/P
A B C F
(S2) (S1) (S0)
0 0 0 I0
0 0 1 I1
0 1 0 I2
0 1 1 I3
1 0 0 I4
1 0 1 I5
1 1 0 I6
1 1 1 I7
MSB LSB
56
8X1 MUX using two 4X1 MUXs
57
8X1 MUX using Seven 2X1 MUXs : This consists of 8 inputs and 3 select lines
58
16x1 MULTIPLEXER USING Two 8X1 MUX 16x1 MULTIPLEXER USING Five 4X1 MUX
59
Demultiplexers Out0 W
W = A'.B'.I
Out1 X
⚫ A demultiplexer has I In X = A.B'.I
Out2 Y
− N control inputs
− 1 data input Out3 Z Y = A'.B.I
S1 S0
− 2N outputs Z = A.B.I
⚫ A demultiplexer routes (or
connects) the data input to A B
the selected output.
− The value of the
control inputs Select Line Outputs
determines the A B W X Y Z
output that is (S1) (S0)
selected. 0 0 I 0 0 0
⚫ A demultiplexer performs 0 1 0 I 0 0
the opposite function of a 1 0 0 0 I 0
multiplexer. 1 1 0 0 0 I
60
W = A'.B'.I
X = A.B'.I
Y = A'.B.I
Z = A.B.I
61
1-line to 4-line Demultiplexer 1-line to 8-line Demultiplexer
Designing logic circuits using multiplexers
Using an n-input Multiplexer:
⚫ Use an n-input multiplexer to realize a logic circuit for a
function with n minterms.
− m = 2n, where m = # of variables in the function
⚫ Each minterm of the function can be mapped to an input
of the multiplexer.
⚫ For each row in the truth table, for the function, where
the output is 1, set the corresponding input of the
multiplexer to 1.
− That is, for each minterm in the minterm expansion of the
function, set the corresponding input of the multiplexer to 1.
⚫ Set the remaining inputs of the multiplexer to 0.
63
Example: Implement the following function
with multiplexer.
Y = F (A, B, C, D) = Σm (0, 1, 3, 4, 8, 9, 15)
64
Using an (n / 2)-input Multiplexer:
65
Using an (n / 2)-input Mux
Example: F(x,y,z) = Sm(1, 2, 6, 7)
66
Using an (n / 2)-input Mux
67
Code Converters
Coding was defined as the use of groups of bits to represent items of information that
are multi-valued. Assigning each item of information a unique combination of bits
makes a transformation of the original information. This we recognize as information
being processed into another form. Moreover, we have seen that there are many
coding schemes exist. Different digital systems may use different coding schemes. It is
sometimes necessary to use the output of one system as the input to other.
Therefore a sort of code conversion is necessary between the two systems to make
them compatible for the same information.
A code converter is a combinational logic circuit that changes data presented in one
type of binary code to another type of binary code.’ A general block diagram of a code
converter is shown in Fig.
Example: 4-bit Binary to Gray code conversion
It has four inputs (B3 B2 B1 B0) representing
4-bit binary numbers and four outputs (G3
G2 G1 G0) representing 4-bit gray code.
Functional Table
Functional Table
Logic Diagram
Logic Diagram
• Advantages:
➢ Low cost
➢ Design a larger circuit
➢ Reprogramming
(Modify the design)
81
TYPES OF PLD’s:
82
PROM
• Contains an fixed AND array & Programmable OR
array gates.
P2(X1’X2X3) 0 1 1
P3(X1’X2’) 0 0 -
P4(X1X2X3) 1 1 1
87
PAL PROGRAMMING TABLE
Product Inputs Outputs
Terms
X1 X2 X3 F1 F2
P1(X1X2X3’) 1 1 0 1 -
P2(X1’X2X3) 0 1 1 1 -
P3(X1X2’) 0 0 - - 1
P4(X1X2X3) 1 1 1 - 1
88
PLA
• Contains an Programmable AND array & Programmable
OR array gates.
89
90
PLA PROGRAMMING TABLE
Product Inputs Outputs
Terms
X Y Z A B
P1(XY) 1 1 - 1 -
P2(XZ’) 1 - 0 1 1
P3(XY’) 1 0 - - 1
P4(YZ) - 1 1 - 1
91
Implement the following function using PLA and draw its Programming Table
Solution:
92
93
Implement the following functions using PAL.
94
Implement the following functions using 3-input, 3 product terms and 3 output PAL.
F1(A, B, C) = σ(0,1,6,7)
F2(A, B, C) = σ(1,2,4,6)
F3(A, B, C) = σ(2,6)
95
96
Implement the following functions using PROM.
97
98
99
100
References
• https://www.elprocus.com/different-types-of-digital-logic-circuits/
• https://technobyte.org/sequential-combinational-logic-circuits-types/
• Kumar, A. Anand. Switching Theory and Logic Design. PHI Learning Pvt.
Ltd., 2014.
• http://electronics-course.com/combinational-logic-design
• https://electronicscoach.com/half-adder.html
• https://www.gatevidyalay.com/tag/full-adder-using-nand-gates/
• A.K. Singh, Foundation Of Switching Theory And Logic Design, New Age
International (P) Limited, 2007.
• https://www.geeksforgeeks.org/digital-electronics-logic-design-tutorials/
• M Morris Mano, Michael D. Ciletti. Digital design: with an introduction to
the verilog HDL, Pearson Publishing, 2013.