









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!










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
s = x โ y โ cin = xycin + xycin + xycin + xycin
b) cout = xy + xcin + ycin
c)
x y cout s 0 0 1 1
0 1 0 1
0
1
cin cin
cin
cin
cin 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
Indication of overflow Positive
Negative
Formulas
Overflow2โs complement = xk-1 yk-1 sk-1 + xk-1 yk-1 sk-1 =
= ck โ ck-
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
HA HA HA HA
xk-1 xk-2... x 2 x 1
..
sk-1 sk-2... s 2 s 1
x 0
x 0
ck
Incrementer
MHA MHA MHA MHA
xk-1 xk-2... x 2 x 1
..
sk-1 sk-2... s 2 s 1
x 0
x 0
ck
Decrementer
Probability of carry generation = 41 (xiyi = 11)
Probability of carry propagation = 21 (xiyi = 01 or 10)
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 โ โ 2
1
probability of propagation
probability of anihilation
=
j โ i 2
1
Expected length( i , k ) =