Adder (electronics): Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Pat Palmer
(some word were imprecise)
imported>Paul Derry
No edit summary
Line 1: Line 1:
An adder is a [[digital circuit]] designed to perform [[integer]] [[addition]]. It is composed of several [[logic gate]]s.  In [[computer]] [[CPU|processor]]s, adders operate on [[binary]] integers.  When [[two's complement]] binary representation is used, then an adder can also be modified for subtraction.
An adder is a [[digital circuit]] designed to perform [[integer]] [[addition]] in the Arithmetic Logic Unit on board a computer. These circuits are fundamental to the operation of a computer and have an analog in traditional pencil-and-paper addition.  


A half-adder is a single [[bit]] adder that can take in two inputs (A and B) and produce a Sum and a Carry.  The output is the sum of A+B, with Carry being the most significant digit.  The Carry can be represented by the [[And (electronics)|AND]] of A and B, while the Sum is the [[Xor|XOR]] of A and B.
Integers can be represented by the sum of a series from 0 to infinity.


A full-adder is a single bit adder that takes three inputs (A, B, and a Carry-in) and produces a Sum and a Carry-out.  The Sum is represented by (A XOR B) XOR Cin, and the Carry-out is true if any two inputs are true.
<math>
\sum_{k=0}^\infty nx^k
</math>


Single-bit full adders can be chained together to form multiple-bit adders, if the Carry-out of the first adder is linked to the Carry-in of the second, and so forth. This is called a [[ripple-carry adder]], and allows the linking of an infinite number of full-adders. However, the [[gate delay]] of a ripple-carry adder grows quickly, since each operation must wait on the previous operation to complete.  Thus a 4-bit adder would consist of 4 single-bit additions working in succession.
*Where ''n'' is an integer from zero to (base - 1)
*Where ''x'' is an integer equal to the base value.
 
An adder performs a binary operation (two operands) where the ''n'' of one power in integer ''A'' is added to the ''n'' of the same power in integer ''B''. This produces two outputs, a '''sum''', and a '''carry'''. The '''carry''' is always equal to ''(sum - (base - 1))''. The carry is then added to the sum of the next power's sum, and so on. This represents what is known as a '''Full Adder'''. Each addition operation performed is known as a '''Half Adder'''. Chain a number of half adders together, and a full adder emerges.
 
== The Half Adder ==
 
Computers operate in base-2, or binary. To the computer, a presence of electrons represents a '''1''' and a lack of electrons represents a '''0'''. A computer's ALU (Arithmetic Logic Unit) consists of a variety of circuits that perform different operations, the Adders are composed mostly of '''half adders'''. [[Image:halfadderschematic.png|left|thumb|Lines ''A'' and ''B'' represent the inputs to the adder, and lines ''S'' and ''C'' represent sum and carry respectively.]]


[[Category:Computers Workgroup]]
[[Category:Computers Workgroup]]
[[Category:Engineering Workgroup]]
[[Category:Engineering Workgroup]]
[[Category: CZ Live]]
[[Category: CZ Live]]

Revision as of 16:26, 31 July 2007

An adder is a digital circuit designed to perform integer addition in the Arithmetic Logic Unit on board a computer. These circuits are fundamental to the operation of a computer and have an analog in traditional pencil-and-paper addition.

Integers can be represented by the sum of a series from 0 to infinity.

  • Where n is an integer from zero to (base - 1)
  • Where x is an integer equal to the base value.

An adder performs a binary operation (two operands) where the n of one power in integer A is added to the n of the same power in integer B. This produces two outputs, a sum, and a carry. The carry is always equal to (sum - (base - 1)). The carry is then added to the sum of the next power's sum, and so on. This represents what is known as a Full Adder. Each addition operation performed is known as a Half Adder. Chain a number of half adders together, and a full adder emerges.

The Half Adder

Computers operate in base-2, or binary. To the computer, a presence of electrons represents a 1 and a lack of electrons represents a 0. A computer's ALU (Arithmetic Logic Unit) consists of a variety of circuits that perform different operations, the Adders are composed mostly of half adders.

Lines A and B represent the inputs to the adder, and lines S and C represent sum and carry respectively.