    Next: Multiplication (≥›§ĪĽĽ) Up: Fixed-Point Arithmetic (ł«ńÍĺģŅŰŇņ) Previous: Fixed-Point Arithmetic (ł«ńÍĺģŅŰŇņ)

### Addition and Subtraction (¬≠§∑ĽĽ°¶įķ§≠ĽĽ)

Unsigned base 2 adder: xm-1...x0 + ym-1...y0 + c0(see Figure 4.1) • Full adder: couts = (x+y+cin)2
• Example: x=0, y=1, cin=1 s=0, cout=1
• this is a ripple carry adder (ĹÁľ°∑ŚĺŚ§≤≤√ĽĽīÔ)
• operation is slow because the carry bit is propagated through every adder

2's Complement subtracter • 1's complement is easier to compute
• 2's complement is easier to use • subtract control = 0 for addition, 1 for subtraction

• determine the carry bits in advance
• Gj=1 if digit j generates a carry
• Pj=1 if a carry is propagated from input to output of digit j Gj = xj yj; Pj = xj + yj

• therefore, cj+1 = Gj + Pj cj • recursive calculation in groups of 2  • for an m-bit adder:
• the delay for a carry lookahead adder is proportional to • the delay for a ripple carry adder is proportional to m    Next: Multiplication (≥›§ĪĽĽ) Up: Fixed-Point Arithmetic (ł«ńÍĺģŅŰŇņ) Previous: Fixed-Point Arithmetic (ł«ńÍĺģŅŰŇņ)
David Asano
2001-05-29