Addition Limits

Tom Kelliher, CS 240

Feb. 20, 2008

Administrivia

Announcements

Assignment

From Last Time

Decoders, encoders, muxes.

Outline

  1. A ``fast binary adder.''

  2. The lower bound for addition speed.

Coming Up

Carry lookahead addition, other integer representations.

A ``Fast Binary Adder''

  1. Ripple carry adder: example of reuse and divide and conquer.
    1. Wire together $n$ full binary adders in order to add two $n$ bit numbers.

    2. Running time of a ripple carry adder.

      Running time of a full binary adder is O$(1)$. Ripple carry adder?

      Excessive!!!

  2. An O$(1)$ (!!!) $n$ bit adder.
    1. Important equations (briefly explain):

      Carry generate at bit position $i$: $G_i = A_i B_i$.

      Carry propagate at position $i$: $P_i = A_i \oplus B_i$.

    2. Carry-in is $C_0$.

      $C_1 = G_0 + P_0 C_0$.

      $C_2 = G_1 + P_1 G_0 + P_1 P_0 C_0$.

      $C_3 = G_2 + P_2 G_1 + P_2 P_1 G_0 + P_2 P_1 P_0 C_0$.

      Etc.

    3. What's the circuit depth of $C_i$?

    4. What's wrong with this picture?

The Lower Bound for Addition Speed

  1. Due to Winograd.

  2. Our abstract gate for an idealized adder: the $(f, r)$ gate
    1. Independent of technology.

    2. $f$ is the fan-in.

    3. $r$ is the radix (binary).

    4. Assume that such a gate can compute any $r$-valued function of $f$ inputs.

  3. Adding $n$ bit numbers. How many inputs? How many outputs? What is the minimum number of inputs some output is dependent upon? The maximum?

  4. For the output dependent upon that maximum, consider the ideal circuit which reduces its inputs to the final output.
    1. What does it look like?

    2. How many intermediate signals remain after one level of gates?

    3. What is its depth? -- That's the lower bound for addition.



Thomas P. Kelliher 2008-02-18
Tom Kelliher