Combinational Circuits
Combinational Circuits
(or)Equivalence gate
Exclusive-OR and Equivalence gates perform the following
Boolean functions
A ⊕ B = A B + AB
A•B = AB + AB
( A ⊕ B ) ⊕ C = A ⊕ (B ⊕ C ) = A ⊕ B ⊕ C
EC214 Digital Logic Design
J Ravindranadh 1
Implementation of a two-input exclusive-OR function with
AND, OR, and NOT gates.
A⊕ B
A⊕ B
BC 00 01 11 10 BC 00 01 11 10
A A
0 1 1 0 1 1
1 1 1 1 1 1
CD 00 01 11 10 CD 00 01 11 10
AB AB
00 1 1 00 1 1
01 1 1 01 1 1
11 1 1 11 1 1
10 1 1 10 1 1
sum(A,B) = ∑ (1,2)
carry(A,B) = ∑(3)
1 1 1 1
sum = A B + A B
carry = AB
A⊕ B
Logic diagram of the Half Adder is show in Fig.
Full Adder consist of a three input and two output, three input
denote A B and C two outputs denotes sum and carry
sum(A B C) = ∑ (1,2,4,7)
sum(A,B,C) (1 2 4 7) carry(A B C) = ∑(3,5,6,7)
carry(A,B,C) ∑(3 5 6 7)
EC214 Digital Logic Design
J Ravindranadh 12
BC 00 01 11 10 BC 00 01 11 10
A A
0 1 1 0 1
1 1 1 1 1 1 1
sum = A ⊕ B ⊕ C carry = AB + BC + AC
the circuit
th i it di
diagram of
f th
the full
f ll adder
dd implementing
i l ti with
ith two
t
half adders and OR gate is show in Fig
Diff(A B C) = ∑ (1,2,4,7)
Diff(A,B,C) (1 2 4 7) Borrow (A,B,C)
(A B C) = ∑(1,2,3,7)
∑(1 2 3 7)
EC214 Digital Logic Design
J Ravindranadh 18
BC 00 01 11 10 BC 00 01 11 10
A A
0 1 1 0 1 1 1
1 1 1 1 1
__ __
Difference = A ⊕ B ⊕ C Borrow = AB+ AC + BC
the circuit
th i it di
diagram of
f th
the full
f ll Subtractor
S bt t implementing
i l ti with
ith
two half subtractor and OR gate is show in Fig
A< B = AB
A> B = AB
A= B = AB + AB
Logic diagram of the 1 Bit Comparator is show in Fig.
A<B = ∑ (1,2,3,6,7,11)
(1 2 3 6 7 11)
A=B = ∑(0,5,10,15 )
A> B= ∑(4,8,9,12,13,14)
A=B = ∑(0,5,10,15 )
xi = Ai Bi + Ai Bi
B1 B0 00 01 11 10
A1 A0
00 1
A1 A0 B1 B0 + A1 A0 B1 B0 + A1 A0 B1 B0 + A1 A0 B1 B0
01 1
( A1B1 + A1 B1 ) ( A0 B0 + A0 B0 )
11 1
10 1
x1 x 0
B1 B0 00 01 11 10
B1 B0 00 01 11 10
A1 A0
A1 A0
00 1 1 1
00
01 1 1
01 1
11
11 1 1 1
10 1
10 1 1
A1 B1 + A1 A0 B1 B0 + A1 A 0 B1 B0
A1 B1 + A1 A0 B1 B0 + A1 A0 B1 B0
A1 B1 + x1 A0 B0 A1 B1 + x1 A0 B0
xi = A i Bi + A i Bi i = 0,1,2,3
( A = B ) = x 3 x 2 x1 x0
( A. > B ) = A3 B3 + x 3 A2 B 2 + x 3 x 2 A1 B1 + x 3 x 2 x1 A0 B 0
( A. < B ) = A3 B3 + x3 A 2 B2 + x 3 x 2 A1 B1 + x3 x 2 x1 A 0 B0
EC214 Digital Logic Design
J Ravindranadh 28
Logic diagram of the 4 Bit Comparator is show in Fig.
Applications
Decoder are used in counter systems
It is also used in analog to digital converter
Decoder output can be used to display the system.
31
Design 2-to-4 line decoder
The block diagram of the 2-to -4 line decoder is show in Fig.
INPUT OUTPUTS
A B D0 D1 D2 D3
0 0 1 0 0 0
0 1 0 1 0 0
1 0 0 0 1 0
1 1 0 0 0 1
32
The Boolean expression of 2-to-4 line decoder
D0 = A
A’ B
B’ , D1 = A
A’ B,
B D2 = A B
B’, D3 = A B
Logic diagram of the 2-to-4 line decoder is show in Fig.
Th B
The Boolean
l expression
i off 3-to-8
3 t 8 li
line d
decoder
d
01 1 1 1 1
11 X X X X
10 1 1 X X
D8 = AD’, D9 = AD
sum(x,y,z)
( ) = ∑ (1,2,4,7)
(1 2 4 7) carry(x,y,z)
( ) = ∑(3,5,6,7)
∑(3 5 6 7)
D0 D1 D2 D3 D4 D5 D6 D7 x y z
1 0 0 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0 0 1
0 0 1 0 0 0 0 0 0 1 0
0 0 0 1 0 0 0 0 0 1 1
0 0 0 0 1 0 0 0 1 0 0
0 0 0 0 0 1 0 0 1 0 1
0 0 0 0 0 0 1 0 1 1 0
0 0 0 0 0 0 0 1 1 1 1
45
The Boolean expression of octal to binary encoder
x= D4 + D5 + D6 + D7
Y D2 + D3 + D6 + D7
Y=
z= D1 + D3 + D5 + D7
Logic diagram of octal to binary encoder is show in Fig.
46
Design decimal to BCD Encoder
The block diagram of decimal to BCD Encoder is show in Fig.
49
Multiplexer (or) MUX (or)
Data selector
The term “multiplex” means “many into one”.
A digital
di i l multiplexer
l i l i a combinational
is bi i l circuit
i i that
h selects
l
binary information from one of many input lines and directs it to
g output
a single p line.
(or)
Multiplexer
p is define as transmitting g a large
g number of
information units over a smaller number of channels.
It is consisting
g of a 2n input
p lines and n selection lines and
one output.
S0 S1 output
0 0 I0
0 1 I1
1 0 I2
1 1 I3
I1
I2 Input
Data
I3
S1
S0 Select
Line
Output
I0 I1 I2 I3 I0 I1 I2 I3 Output
Data
EC214 Digital Logic Design
J Ravindranadh 56
Implement given function f( x,y,z)= Σ (1,3,5,6) with
(a) 8:1 MUX (b) Dual 4:1 MUX (c) 4 : 1 MUX
(a)
f( A,B,C,D) = Σ (4,5,6,7,8,13,14,15)
F ( A , B , C , D ) = AB D + AC D + BC D + AC D
F ( A, B , C , D ) = ∑ (1, 3, 4, 5, 6,11,15)
D0 = S 0 S1 D D1 = S 0 S1 D
D2 = S 0 S1 D D 3 = S 0 S1 D
L i di
Logic diagram of
f implementation
i l t ti off 1 X 4 DEMUX
0 0 0 0 1 1 1 1 1 1 0
0 0 0 1 0 1 1 0 0 0 0
0 0 1 0 1 1 0 1 1 0 1
0 0 1 1 1 1 1 1 0 0 1
0 1 0 0 0 1 1 0 0 1 1
0 1 0 1 1 0 1 1 0 1 1
0 1 1 0 0 0 1 1 1 1 1
0 1 1 1 1 1 1 0 0 0 0
1 0 0 0 1 1 1 1 1 1 1
1 0 0 1 1 1 1 0 0 1 1
e =B'D'
B'D' + C D' f C'D'
f= 'D' + B C'' + B D' + A
01 1 1 1
11 X X X X
10 1 1 X X
P(A,B,C) = ∑ (0,3,5,6)
BC 00 01 11 10
A
0 1 1
1 1 1
P(A,B,C) = ∑ (1,2,4,7)
BC 00 01 11 10
A
0 1 1
1 1 1
C (x,y,z,p) = ∑ (1,2,4,7,8,11,13,14)
ZP 00 01 11 10
XY
00 1 1
01 1 1
C = X ⊕Y ⊕ Z ⊕ P
11 1 1
10 1 1
I puts
In t Odd I puts
In t Odd
parit parit
y y
x y z p C x y z p C
0 0 0 0 1 1 0 0 0 0
0 0 0 1 0 1 0 0 1 1
0 0 1 0 0 1 0 1 0 1
0 0 1 1 1 1 0 1 1 0
0 1 0 0 0 1 1 0 0 1
0 1 0 1 1 1 1 0 1 0
0 1 1 0 1 1 1 1 0 0
0 1 1 1 0 1 1 1 1 1
EC214 Digital Logic Design
J Ravindranadh 87
ZP 00 01 11 10
XY
00 1 1
01 1 1
11 1 1
10 1 1
2 ≥ m + p +1
p
2 p ≥ m + p +1 Let p=3 8 = 4 + 3 +1
Bit Designation P1 P2 M1 P4 M2 M3 M4
Bit Position 1 2 3 4 5 6 7
Binary Position 001 010 011 100 101 110 111
Number
Information bits 1 0 0 1
y Bits
Parity 0 0 1
2 p ≥ m + p +1 Let p=3 8 = 4 + 3 +1
Bit Designation P1 P2 M1 P4 M2 M3 M4
Bit Position 1 2 3 4 5 6 7
Binary Position 001 010 011 100 101 110 111
Number
Information bits 1 0 1 1
y Bits
Parity 1 0 1
2 p ≥ m + p +1 Let p=4 16 ≥ 5 + 4 + 1
Bit Designation P1 P2 M1 P4 M2 M3 M4 P4 M5
Bit Position 1 2 3 4 5 6 7 8 9
Binary Position 0001 0010 0011 0100 0101 0110 0111 1000 1001
Number
Information bits 1 0 1 1 0
Parity
y Bits 1 0 1 1
Bit Designation P1 P2 M1 P4 M2 M3 M4
Bit Position 1 2 3 4 5 6 7
Received code 0 0 1 0 0 0 1
Bit P1 checks
h k bit positions
iti 1 3 5 7
1,3,5,7 parity check is good 0 LSB
Bit P1 P2 M1 P3 M2 M3 M4 P4 M5 M6 M7 M8
Designation
Bit Position 1 2 3 4 5 6 7 8 9 10 11 12
Received 0 0 0 0 1 1 1 0 1 0 1 0
code
d
Sum 1 110 Si
0 0 11 Ci + 1
Output Carry
EC214 Digital Logic Design
J Ravindranadh 95
4-bit Parallel adder show in figure
C 2 = G1 + P1C1 = G1 + P1 (G0 + P0 C 0 )
= G1 + P1G0 + P1 P0 C 0
C 3 = G 2 + P2 C 2
= G 2 + P2 ( G 1 + P1G 0 + P1 P0 C 0 )
= G 2 + P2 G 1 + P2 P 1 G 0 + P2 P1 P0 C 0
BCD subtraction
9’ss complement
9
9 1001
-4 1011 -4 0101
+1010 1110
10101 0110
10100
1
EC214 01
Digital Logic 01
Design
J Ravindranadh 106
EC214 Digital Logic Design
J Ravindranadh 107
Code Converter
Convert 4 bit binary to gray code
Bl k di
Block diagram of
f 4 bit
bi bi
binary to gray code
d is
i shown
h in
i fig
fi
G1 ∑ (8,9,10,11,12,13,14,15) G2 = ∑ (4,5,6,7,8,9,10,11)
B3 B4 00 01 11 10
B3 B4 00 01 11 10
B1 B2
B1 B2
00
00
01
01 1 1 1 1
11 1 1 1 1
11
10 1 1 1 1
10 1 1 1 1
G1 = B1 G 2 = B1 B 2 + B1 B 2
= B1 ⊕ B 2
G3 ∑ (2,3,4,5,10,11,12,13) G4 ∑ (1,2,5,6,9,10,13,14)
B3 B4 00 01 11 10
B3 B4 00 01 11 10
B1 B2
B1 B2
00 1 1
00 1 1
01 1 1
01 1 1
11 1 1
11 1 1
10 1 1
10 1 1
G 3 = B 2 B3 + B 2 B3 G 4 = B3 B4 + B3 B4
= B 2 ⊕ B3 = B 3 ⊕ B4
B1 ∑ (8,9,10,11,12,13,14,15) B2 = ∑ (4,5,6,7,8,9,10,11)
G3 G4 00 01 11 10
G3 G4 00 01 11 10
G1 G2
G1 G2
00
00
01
01 1 1 1 1
11 1 1 1 1
11
10 1 1 1 1
10 1 1 1 1
B1 = G1 B 2 = G1 G 2 + G1G 2
= G1 ⊕ G2
B3 ∑ (2,3,4,5,8,9,14,15) B4 ∑ (1,2,4,7,8,11,13,14)
G3 G4 00 01 11 10 G3 G4 00 01 11 10
G1 G2 G1 G2
00 1 1 00 1 1
01 1 1 01 1 1
11 1 1 11 1 1
10 1 1 10 1 1
B3 = G1 G2 G3 + G1G2 G3 + G1G2 G3 + G1 G2 G3 B 4 = G1 ⊕ G 2 ⊕ G 3 ⊕ G 4
= G1 ⊕ G2 ⊕ G3
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
CD 00 01 11 10
CD 00 01 11 10
AB
AB
00
00 1 1 1
01 1 1 1
01 1
11 X X X X
11 X X X X
10 1 1 X X
10 1 X X
W = A + BD + BC X = BC + B D + B C D
CD 00 01 11 10
CD 00 01 11 10
AB
AB
00 1 1
00 1 1
01 1 1
01 1 1
11 X X X X
11 X X X X
10 1 X X
10 1 X X
Y = C D + CD Z = D
W X Y Z A B C D
0 0 1 1 0 0 0 0
0 1 0 0 0 0 0 1
0 1 0 1 0 0 1 0
0 1 1 0 0 0 1 1
0 1 1 1 0 1 0 0
1 0 0 0 0 1 0 1
1 0 0 1 0 1 1 0
1 0 1 0 0 1 1 1
1 0 1 1 1 0 0 0
1 1 0 0 1 0 0 1
A= ∑ (11,12)+d(0,1,2,13,14,15) B=
B ∑(7,8,9,10)+d(0,1,2,13,14,15)
∑(7 8 9 10) d(0 1 2 13 14 15)
YZ 00 01 11 10
YZ 00 01 11 10
WX
WX
00 X X X
00 X X X
01
01 1
11 1 X X X
11 X X X
10 1
10 1 1 1
A = WX + WYZ B = W Y + W YZ + WY Z
YZ 00 01 11 10
YZ 00 01 11 10
WX
WX
00 X X X
00 X X X
01 1 1
01 1 1
11 X X X
11 1 X X X
10 1 1
10 1 1
C = YZ +Y Z D = Z