






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







Chapter 5, Basic Addition and Counting Sections 5.1-5.5, pp. 75-85.
Behrooz Parhami, Computer Arithmetic: Algorithms and Hardware Design
x y
c s
HA
x + y = ( c s ) 2
2 1
x y c s 0 0 1 1
0 1 0 1
0 0 0 1
0 1 1 0
s = xy + xy
b)
a)
s = x โ y
c = xy
c = x + y
c) c = xy
s = xc + yc = xc โ yc
x y
cout s
FA
x + y + cin = ( cout s ) 2
2 1
x y cout s 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 0 0 1 0 1 1 1 0 1 1 0 1 0 0 1
cin
0 1 0 1 0 1 0 1
cin
x y
A A1^ XOR^
D
0 1
Cin
Cout
S p
g
Implementation used to generate fast carry logic in Xilinx FPGAs
x y cout 0 0 1 1
0 1 0 1
y
y
cin cin
p = x โ y g = y s= p โ cin = x โ y โ cin
Latency โ k โ TFA
Latency โ k
ai bi
si
c 0
ci start
clk
d d
d
ai bi
si
c 0
ci start
clk
xk-1 xk-2... x 1 x 0 yk-1 yk-2... y 1 y 0
variable
xk-1 xk-2... xh+1 xh xh-1... x 0 yk-1 yk-2... yh+1 1 0... 0
variable
xh xh-1... x 0
sk-1 sk-2... s 1 s 0
sk-1 sk-2... sh+
HA/^... MHA
HA/ MHA
HA/ MHA
HA/ MHA
xk-1 xk-2... xh+2 xh+1 xh^ xh-1... x 0
..
sk-1 sk-2... (^) sh+2 sh+1 xh xh-1... x 0
If yi = 0 Half-adder (HA) yi = 1 Modified half-adder (MHA)
ck
x y
c s
MHA
x + y + 1 = ( c s ) 2
2 1
x y c s 0 0 1 1
0 1 0 1
0 1 1 1
1 0 0 1
Probability of carry generation = 41 (xiyi = 11)
Probability of carry propagation = 2 (xiyi = 01 or 10) 1
Probability of carry anihilation = 21 (xiyi = 00 or 11)
j j-1....... i+1 i 1 0 โฆ 1 โฆ0 โฆ 1 1 1 1 โฆ 0 โฆ1 โฆ 0 1
Probability of carry propagating from position i to position j
=
11 or 00 (^) 01 or 10 1 2
1 j โ^ i โ โ 21 probability of propagation
probability of anihilation
=
j โ i 2
1
Expected length( i , k ) =