DLD Combination Logic
DLD Combination Logic
DLD Combination Logic
ADDER
HALF ADDER
A half-adder is a combinational circuit that can be
used
to add two binary bits.
LOGIC DIAGRAM
Inputs Outputs
Sum Carry
A B
Cin (S) (Cout)
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
LOGIC DIAGRAM 1 1 1 1 1
TRUTH TABLE
MODULE- 4 ECE2003 – DIGITAL LOGIC DESIGN 5
BINARY
ADDER
FULL ADDER
K-
MA P
Input Output
A B Difference (D) Borrow (Bout)
0 0 0 0
0 1 1 1
1 0 1 0
1 1 0 0
Inputs Outputs
A B Bin
Difference(D) Borrow(Bout)
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
Truth Table
MODULE- 4 ECE2003 – DIGITAL LOGIC DESIGN 18
BINARY
SUBTRACTOR
FULL SUBTRACTOR
K-map simplification for full Subtractor:
The three most significant bits and carry out of first partial
sum are then added to the third partial product.
Truth Table
MODULE- 4 ECE2003 – DIGITAL LOGIC DESIGN 44
MAGNITUDE
COMPARATOR
2-Bit Magnitude Comparator
K-Map Simplification
Logic Diagram
MODULE- 4 ECE2003 – DIGITAL LOGIC DESIGN 46
MAGNITUDE
COMPARATOR
4-Bit Magnitude Comparator
A = A3 A2 A1 A0
B = B3 B 2 B 1 B0
X i = A i Bi + A i ′ Bi ′ for i = 0, 1, 2, 3
Or, Xi = (A B)′ Or, Xi ′ = A B
Or, Xi = (Ai Bi ′ + A i ′Bi )
′
where, X i =1 only if the pair of bits in position i
are equal (i.e., if both are 1 or both are 0).
Logic diagram of 4-
Bit
magnitude comparator
Block diagram of 8-
Bit
magnitude comparator
0 0 0 1 0
0 0 1 0 1
0 1 0 0 1
0 1 1 1 0
1 0 0 0 1
1 0 1 1 0
1 1 0 1 0
1 1 1 0 1
= A’ (BC) + A (BC)’
= (A B C)
MODULE- 4 ECE2003 – DIGITAL LOGIC DESIGN 62
PARITY
GENERATOR
0 0 0 0 0
0 0 0 1 1
0 0 1 0 1
0 0 1 1 0
0 1 0 0 1
0 1 0 1 0
0 1 1 0 0
0 1 1 1 1
1 0 0 0 1
1 0 0 1 0
1 0 1 0 0
1 0 1 1 1
1 1 0 0 0
1 1 0 1 1
1 1 1 0 1
1 1 1 1 0
Truth table
MODULE- 4 ECE2003 – DIGITAL LOGIC DESIGN 73
MULTIPLEXE
RS 4:1 MUX
The data output is equal to I0 only if S1 = 0 and S0= 0; Y =
I0S1’S0’.
I2S1S0’.
When these terms are ORed, the total expression for the data
output is,
MODULE- 4 ECE2003 – DIGITAL LOGIC DESIGN 74
MULTIPLEXE
RS 4:1 MUX
The other three AND gates have at least one input equal
to 0, which makes their outputs equal to 0.
Implementation table
Truth table
Mux implementation
MODULE- 4 ECE2003 – DIGITAL LOGIC DESIGN 110
MULTIPLEXE
RS
Implementation of boolean function using MUX
The input variable Din has a path to all four outputs, but
the input information is directed to only one of the
output lines.
S1 S0 Y0 Y1 Y2 Y3
Din
0 0 0 0 0 0 0
1 0 0 1 0 0 0
0 0 1 0 0 0 0
1 0 1 0 1 0 0
0 1 0 0 0 0 0
1 1 0 0 0 1 0
0 1 1 0 0 0 0
1 1 1 0 0 0 1
Here, the input data line Din, is connected to all the AND
gates.
The two select lines S1, S0 enable only one gate at a time
and the data that appears on the input line passes through
the selected gate to the associated output line.
0 x x x 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0 0 1
1 0 0 1 0 0 0 0 0 0 1 0
1 0 1 0 0 0 0 0 0 1 0 0
1 0 1 1 0 0 0 0 1 0 0 0
1 1 0 0 0 0 0 1 0 0 0 0
1 1 0 1 0 0 1 0 0 0 0 0
1 1 1 0 0 1 0 0 0 0 0 0
1 1 1 1 1 0 0 0 0 0 0 0
Inputs Outputs
A B Bin Difference(D) Borrow(Bout)
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
Inputs Outputs
Enable A B 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
Truth table
Logic Diagram
MODULE-4 ECE2003 – DIGITAL LOGIC DESIGN 110
DECODE
RS
3 : 8 Decoders
A 3-to-8 line decoder has three inputs (A, B, C) and eight
outputs (Y0- Y7). Based on the 3 inputs one of the eight
outputs is selected.
Inputs Outputs
A B C Y0 Y1 Y2 Y3 Y4 Y5 Y6 Y7
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
Truth table
Logic Diagram
MODULE-4 ECE2003 – DIGITAL LOGIC DESIGN 113
DECODE
RS
Applications
Instruction decoder is the part of the CPU
Input D3, has the highest priority. So, regardless of the values of
the other inputs, when D3 is 1, the output for xy is 11. D2 has
the next priority level. The output is 10, if D2 = 1 provided D3 =
0. The output for D1 is generated only if higher priority inputs
MODULE-4 ECE2003 – DIGITAL LOGIC DESIGN 125
ENCODE
RS
4 to 2 Priority Encoder
One way would be to connect all 104 wires from the individual
keys on the keyboard directly to the computers input but this
would be impractical for a small home PC.
MODULE-4 ECE2003 – DIGITAL LOGIC DESIGN 130
ENCODE
RS Applications
Encoder