Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Multi-Operand Addition • • • • • Using 2-opr adder Carry-save adder Wallace Tree Dadda Tree Parallel Counters 1 Two-Operand Adders • X1+X2+ …+Xk with n-bit each • Sum= n +log2(k) bits • Serial Addition Tadd= (k–1) (TAdder + TReg ) X Aadd= AAdder + AReg i Adder Reg. n+log 2 (k) 2 Two-Operand Adders(2) • Serial Addition: Cascading k 1 Tadd= i1T (n log2 i ) k 1 Aadd= AAdder= (n log2 i )bits adders X3 ... Adder X2 Adder X1 Adder i 1 Xk 3 Two-Operand Adders(3) (k / 2i )A(n i 1) i 1 log2 k i 1 X1 X2 X3 X4 / n+1 / n+2 ... / Adder T (n i 1) Adder Aadd= Adder Tadd= log2 k Adder • Parallel Addition: Binary tree / n+log2K 4 Carry-Save Adder • Add more than two numbers (says n) • Carry not added (Carry save) • 3 # (3,2) 2# 0 1 0 1 1 0 0 1 0 1 1 1 FA FA FA FA 0 1 1 0 0 1 1 1 5 Carry-Save Adder(2) CPA CSaveA CSaveA X1 X2 X3 CSaveA CsaveA • CPA in the last step • 3 # (3,2) 2#; • TCPA+log3/2kTFA 6 Carry-Save Adder(3) • 4# (4,2) 2#; • TCPA+ 2 log2kTFA FA FA FA FA FA FA FA FA 7 Carry-Save Adder(4) • 7# (7,3) 3#; • TCPA+ 2 log7/3kTFA FA FA FA FA (7,3)-counter 8 Carry-Save Adder(5-1) • Applying (3,2) FA & (2,2) HA with dot notation n=6&k=6 12 FA in 1st level 9 Carry-Save Adder(5-2) • Applying (3,2) FA & (2,2) HA with dot notation n=6&k=6 5 FA & 2HA in 2nd level 10 Carry-Save Adder(5-2-1) • Applying (3,2) FA & (2,2) HA with dot notation n=6&k=6 12HA in 2nd level 4 numbers (same) Not so good 11 Carry-Save Adder(5-3) • Applying (3,2) FA & (2,2) HA with dot notation n=6&k=6 5 FA & 1HA in 3rd level 7-bit CPA in last level 12 Wallace Tree • k-input Wallace Tree reduces to two (n+log2k –1)-bit outputs h(k)=1+h(2k/3) h(k): the smallest height of an k-input Wallace tree h(k)= 0 k= 2 1 3 2 4 3 6 4 9 5 6 13 19 13 Wallace Tree(2) • 7-input Wallace Tree reduces to two (n+log2k –1)=(n+2)-bit outputs (n,1)(n-1,0) csa csa csa csa csa (1) (0) (n+1,2) 14 Dadda Tree • Reduce the number to the next lower number h(k)= 0 k= 2 1 3 2 4 h(k)= 7 k= 28 8 42 9 63 3 6 4 9 10 94 5 6 13 19 11 12 13 141 211 316 15 Dadda Tree(2) • Reduce the number to the next lower number • Ex1: k=8 8 (2CSA)6 (2CSA)4 (1CSA)3(1CSA)2CPA • Ex2: k=12 12 (3CSA)9 6 4 2 h(k)= 0 1 2 3 4 5 6 k= 2 3 4 6 9 13 19 16 Parallel Counters • One column (3,2) counter at most 3 1’s 2 bits (k,m) counter at most k 1’s m=log2(k+1) bits • How about multi-column? (k,k,m) counter: at most k 3’s m=log2(3k+1) bits 17 Parallel Counters(2) • Ex: (5,5,m); m= log2(3*5+1)= 4 bits Overlapped m/(# of col.) = 2 bits CPA at last stage too 18 Parallel Counters(3) • Ex: (5,5,5,m); m= log2(7*5+1)= 6 bits Overlapped m/(# of col.) = 2 bits CPA at last stage too 19