CHPT 4
CHPT 4
Combinational Logic
• Combinational Circuits • Magnitude Comparator
• Analysis Procedure • Decoders
• Design Procedure • Encoders
• Binary Adder-Subtractor • Priority Encoder
• Decimal Adder • Multiplexers
• Binary Multiplier
Combinational Circuits
• The circuit has three binary inputs- A,B and C and two
binary outputs- F1 and F2
• The outputs of various gates are labeled with intermedi
ate symbols
• The output of gates that are a function of input variable
s are T1 and T2
• Output F2 can be easily derived from the input variable
s
• The boolean function for these three outputs are:
– F2 = AB + AC + BC
– T1 = A + B + C
– T2 = ABC
• Next we consider output of gates that are a function of
already defined symbols
– T3 = F’2T1
– F1 = T3+T2
Analysis Procedure-Example
Input Output
BCD Excess-3 Code
A B C D w x y z
0 0 0 0 0 0 1 1
0 0 0 1 0 1 0 0
0 0 1 0 0 1 0 1
0 0 1 1 0 1 1 0
0 1 0 0 0 1 1 1
0 1 0 1 1 0 0 0
0 1 1 0 1 0 0 1
0 1 1 1 1 0 1 0
1 0 0 0 1 0 1 1
1 0 0 1 1 1 0 0
K-Maps
c
Simplified Expressions for Full Adder
Half adder
Binary Adder
Augend 1 0 1 1 A
adds the bits one higher significant Addend 0 0 1 1 B
i
Output 0 0 1 1 Ci+1
carry
Binary Adder
• The sum bits are thus generated starting from the
rightmost position and are available as soon as the
corresponding previous carry bit is generated
• All the carries must be generated for the correct sum
bits to appear at the outputs
Subscript i 3 2 1 0
Input carry 0 1 1 0 Ci
Augend 1 0 1 1 Ai
Addend 0 0 1 1 Bi
Sum 1 1 1 0 Si
Output 0 0 1 1 Ci+1
carry
Carry Propagation
Note: Negative
numbers are in
2’s complement
form
Overflow
Decides to add 6
Adds 6
BCD Adder – Block Diagram
Numbers that need correction (add 6) are:
K Z8 Z4 Z2 Z1
0 1 0 1 0 (10)
0 1 0 1 1 (11)
0 1 1 0 0 (12)
0 1 1 0 1 (13)
0 1 1 1 0 (14)
0 1 1 1 1 (15)
1 0 0 0 0 (16)
1 0 0 0 1 (17)
1 0 0 1 0 (18)
1 0 0 1 1 (19)
C = K + Z8Z4 +Z8Z2
Binary Multiplier
B3 B2 B1 B0
X A2 A1 A0
x3A2'B2
= A3'B3+x3A2'B2+x3x2A1'B1+x3x2x1 A0'B0
= A3B3'+x3A2B2'+x3x2A1B1'+x3x2x1 A0B0'
Decoder
Inputs Outputs
X Y Z 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
Decoders with NAND gates
Generates from
1000 to 1111
Combination Logic Implementation
• A decoder provides the 2n minterms of n input
variables.
• Any function is can be expressed in sum of minterms.
• Use a decoder to make the minterms and an external
OR gate to make the logical sum.
• In this way any combinational circuit with n inputs
and m outputs can be implemented with an n-to-2n line
decoder and m OR gates. Such implementation needs
that the Boolean function is expressed in sum of
minterms x y z c s
• For example: consider a full adder. 0 0 0 0 0
0 0 1 0 1
– S(x,y,z) = Σ(1,2,4,7) 0 1 0 0 1
– C(x,y,z) = Σ (3,5,6,7) 0 1 1 1 0
1 0 0 0 1
1 0 1 1 0
1 1 0 1 0
1 1 1 1 1
Implementation of Full Adder with a Decoder
Outputs Inputs
X Y Z 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
Input Output
D0 D1 D2 D3 x y v
0 0 0 0 X X 0
1 0 0 0 0 0 1
X 1 0 0 0 1 1
X X 1 0 1 0 1
X X X 1 1 1 1