0
\$\begingroup\$

I would like to make a 8 bit adder, with carry look ahead, but i only have 2-input logic gates. All I've heard about use some at least 4-input gates. Or do I need to use a totally different method, maybe like the Kogge–Stone adder? (I'm not completely sure how that one works)

\$\endgroup\$
0
\$\begingroup\$

Carry look-ahead allows a sum of any width to be computed in a fixed number of logic "levels" (layers of gates) between any input and any output. The downside is that it requires gates with as many inputs as there are bits in the numbers being added. Gates with high "fan-in" like that tend to be slower than gates with fewer inputs.

Any gate with a large number of inputs can be replaced by a group of gates that have fewer inputs. For example, an 8-input AND gate can be implemented as two 4-input gates feeding a 2-input gate.

Kogge-Stone, Brent–Kung, etc. are simply different ways of organizing the "trees" of logic that implement the look-ahead, using gates with a limited number of inputs. Picking a particular implementation depends on many things, such as the tradeoff between fan-in and speed for the technology being used, and on whether you put a higher priority on area or speed.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Thanks, so a 4-input AND gate made from 2-input AND gates, is as fast as one that is made as a 4-input AND gate? \$\endgroup\$ – Christian Bertram Apr 25 '15 at 19:13
  • \$\begingroup\$ Not necessarily. It's an optimization problem with many variables. But if all you have is 2-input gates, there are different ways of organizing them that give you different properties. It takes three 2-input AND gates to implement a 4-input AND function. You can either connect them all in series, which gives you a very regular layout that might be advantageous in terms of area, or you can connect them as a "tree", which has less total delay, but may take more area to lay out. \$\endgroup\$ – Dave Tweed Apr 25 '15 at 19:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.