= Cin (X Y) + XY
Half Adder
Half Adder
X
Y S
Cin
Cout
C3 C2 C1
FA4 FA3 FA2 FA1
C4 C0 = 0
(Carry In)
S3 S2 S1 S0
(MSB) (LSB)
4-Bit Adder
Aloke Dutta/EE/IIT Kanpur 11
* FAs connected in cascade, with the o/p carry
from each FA connected to the i/p carry of the
next FA
* Also known as Ripple Carry Adder
* Limitation: Gate Delay :
S0 and C1 generated first, then S1 and C 2 , then
S2 and C3 , and finally S3 and C4
Thus, all o/ps will be valid only after 4
gate delays
This is known as the Carry Propagation
Problem
Aloke Dutta/EE/IIT Kanpur 12
Binary Subtractor:
* Recall: Subtraction is equivalent to adding two
numbers, with the number to be subtracted
expressed in 2's complement notation
* 2's complement: Invert all bits and add 1 to LSB
MSB MSB LSB LSB
B3 A3 B2 A2 B1 A1 B0 A0
C3 C2 C1
FA4 FA3 FA2 FA1
C4 C0 = 1
(Ignored) (Adding 1
to LSB)
S3 S2 S1 S0
(MSB) (LSB)
4-Bit Subtractor (Subtracting B3B2B1B0 from A3A2A1A0)
Aloke Dutta/EE/IIT Kanpur 13
Binary Adder /Subtractor:
* Uses a Control Signal M ( = 0 for Adder and = 1
for Subtractor ) (Note: 1 B = B, 0 B = B)
B3 B2 B1 B0
Control
Signal (M)
A3 A2 A1 A0
C3 C2 C1
FA4 FA3 FA2 FA1
C4
S3 S2 S1 S0
S0
HA HA
Carry
S Carry S1
(S3) 2
1 0 0 1 0 1 1 1 0
A A A
f1 f2 f3
B B B
E
(Enable)
X X
Y Y
D2 D5
Z Z
E=1 E=1
3-to-8
D8 to D15
Decoder
0 1 1 0 1
BCin
1 0 0 1 0 A 00 01 11 10
0 1 3 2
1 0 1 0 1 0 0 0 1 0
4 5 7 6
1 0 1 1 1
1 1 0 0 1
1 1 1 1 1 Cout = m(3,5,6,7)
1
A
S
2
3
3-to-8
B
Decoder
4
Cout
5
Cin
6
O0
I1
X0 0
X1 1
X2 2
o/p Line
X3 3
N-Bit
N-Bit Data
Address
X4 Address 4
. .
. .
XN–1 N–1
Data o/p Lines
MUX De-MUX
I0
2-to-1 S S = 0: I0 gets selected
Y Y
MUX S = 1: I1 gets selected
I1 I1
S
S
0 1 0 1
X Y
0 1 1 0 F = Z
1 0 0 0 Exercise: Implement
1 0 1 0 F=0 F(A,B,C,D) =
1 1 0 1 M 0, 2, 4,5,9,13,15
1 1 1 1 F=1 using an 8-to-1 MUX
Aloke Dutta/EE/IIT Kanpur 33
De -Multiplexer (De -MUX ):
* Also known as Data Router
* Selects binary information from one i /p line
and routes it to one of many o /p lines
* Needs Selection lines to select the o /p line to
which the i /p gets routed
* 2 n o /p lines and n selection lines
* Decoder + Enable De-MUX
Data S
E = 1: S = 0 (Disabled)
Enable (E) E = 0: S = Data
0 1 O1 S1
1 0 O2
O1
1 1 O3 S0
0 O0
O2
1 O1 I
I 1-to-4 Output
input De-MUX Lines
2 O2
3 O3 O3
S1 S0
Select Lines
Aloke Dutta/EE/IIT Kanpur 35
Higher -Order De -MUX :
1-to-8
D0-D7
* Construction of a De-MUX
1-to-32 De-MUX C B A