From WikiChip
Editing adder

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

This page supports semantic in-text annotations (e.g. "[[Is specified as::World Heritage Site]]") to build structured and queryable content provided by Semantic MediaWiki. For a comprehensive description on how to use annotations or the #ask parser function, please have a look at the getting started, in-text annotation, or inline queries help pages.

Latest revision Your text
Line 1: Line 1:
{{title|Adder}}
+
An '''adder''' (sometimes called a '''summer''') is a [[digital circuit]] that adds two ''N''-bit numbers and generates an ''N''-bit number. In addition to generating a sum, adders often also generate an [[overflow flag]] and a [[carry flag]]. Adders are used in many parts of the [[microprocessor]] such as the [[ALU]], [[program counter|PC]], [[counters]], calculating [[effective addresses]] and table indices, multipliers, filters, and in various other components.
An '''adder''' (sometimes called a '''summer''') is a device that adds two numbers and generates the summed result.
 
 
 
In [[digital circuit]]s, an adder usually adds two ''N''-bit numbers and generates an ''N''-bit number. In addition to generating a sum, adders often also generate an [[overflow flag]] and a [[carry flag]]. Adders are used in many parts of the [[microprocessor]] such as the [[ALU]], [[program counter|PC]], [[counters]], calculating [[effective addresses]] and table indices, multipliers, filters, and in various other components.
 
 
 
In [[analog circuit]]s, [[adder (analog)|adders]] usually deal with two [[real number]]s instead.
 
  
 
== Basic design ==
 
== Basic design ==
<math style="float:right;">
+
<div style="float:right;">
\begin{align}
+
<math>
A + B &= Q \\  
+
A + B = Q \\
0_2 + 0_2 &= 00_2 \\
+
0_2 + 0_2 = 00_2 \\
0_2 + 1_2 &= 01_2 \\
+
0_2 + 1_2 = 01_2 \\
1_2 + 0_2 &= 01_2 \\
+
1_2 + 0_2 = 01_2 \\
1_2 + 1_2 &= 10_2 \\
+
1_2 + 1_2 = 10_2
\end{align}
 
 
</math>
 
</math>
 +
</div>
 
A 1-bit adder adds two single-bit values together. There are four such possible operations. All but the 1+1 operation result in a single-digit sum. The 1+1 operation produces a sum with two digits. The higher significant bit of that value is known as a carry. The digital component that performs the addition of two bits is called a '''half adder'''. When two multi-bit numbers are added together, the carry out from the lower bit must be accounted for in the higher addition of the higher bits. When a half adder accounts for a carry in, it becomes a '''full adder'''.
 
A 1-bit adder adds two single-bit values together. There are four such possible operations. All but the 1+1 operation result in a single-digit sum. The 1+1 operation produces a sum with two digits. The higher significant bit of that value is known as a carry. The digital component that performs the addition of two bits is called a '''half adder'''. When two multi-bit numbers are added together, the carry out from the lower bit must be accounted for in the higher addition of the higher bits. When a half adder accounts for a carry in, it becomes a '''full adder'''.
  
 
=== Half Adders (HA) ===
 
=== Half Adders (HA) ===
 
{{main|Half adder}}
 
{{main|Half adder}}
 +
 
{| class="wikitable left" style="float:left; margin: 15px;"
 
{| class="wikitable left" style="float:left; margin: 15px;"
 
!colspan="5"|Half Adder
 
!colspan="5"|Half Adder
Line 39: Line 35:
  
 
<math>
 
<math>
\begin{align}
+
S = A \oplus B \\
S =& A \oplus B \\
+
C_{out} = A \cdot B
C_{out} =& A \cdot B
 
\end{align}
 
 
</math>
 
</math>
  
Line 48: Line 42:
 
=== Full Adder (FA) ===
 
=== Full Adder (FA) ===
 
{{main|full adder}}
 
{{main|full adder}}
 +
 
[[File:Full adder black box.svg|right|150px]]
 
[[File:Full adder black box.svg|right|150px]]
 
A major drawback of a half adder is that it lacks the ability to add two bits and account for a carry-in that might have been brought from the previous digit. As previously stated, the carry-out of one half adder is the carry-in of the next half adder. A '''full adder''' is a simple device that can receive a carry-in bit input in addition to adding two single bit inputs. A full adder has three inputs A, B, and C<sub>in</sub> and two outputs S and C<sub>out</sub>. Full adders are typically combined together in a cascading way (C<sub>in</sub> to <sub>out</sub>), creating ''N''-bit adders (16, 32, 64, etc..).
 
A major drawback of a half adder is that it lacks the ability to add two bits and account for a carry-in that might have been brought from the previous digit. As previously stated, the carry-out of one half adder is the carry-in of the next half adder. A '''full adder''' is a simple device that can receive a carry-in bit input in addition to adding two single bit inputs. A full adder has three inputs A, B, and C<sub>in</sub> and two outputs S and C<sub>out</sub>. Full adders are typically combined together in a cascading way (C<sub>in</sub> to <sub>out</sub>), creating ''N''-bit adders (16, 32, 64, etc..).
Line 54: Line 49:
  
 
<math>
 
<math>
\begin{align}
+
S = A \oplus B \oplus C \\
S =& A \oplus B \oplus C \\
+
C_{out} = \text{Majority}(A, B, C)
C_{out} =& \text{Maj}(A, B, C)
 
\end{align}
 
 
</math>
 
</math>
  
Line 131: Line 124:
 
===== Brent-Kung adder =====
 
===== Brent-Kung adder =====
 
{{main|Brent-Kung adder}}
 
{{main|Brent-Kung adder}}
{{Brent-Kung adder is a very well-known logarithmic
+
{{empty section}}
adder architecture that gives an optimal number of stages from
 
input to all outputs but with asymmetric loading on all
 
intermediate stages. It is one of the parallel prefix adders.
 
Parallel prefix adders are unique class of adders that are based
 
on the use of generate and propagate signals. The cost and
 
wiring complexity is less in brent kung adders. But the gate
 
level depth of Brent-Kung adders is 0 (log2(n)), so the
 
speed is lower.}}
 
  
 
===== Han-Carlson adder =====
 
===== Han-Carlson adder =====
Line 178: Line 163:
 
{{main|Dadda tree}}
 
{{main|Dadda tree}}
 
{{empty section}}
 
{{empty section}}
 
== See also ==
 
* [[adder (analog)]]
 
  
  
 
[[Category:Adders]]
 
[[Category:Adders]]

Please note that all contributions to WikiChip may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see WikiChip:Copyrights for details). Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)

This page is a member of 1 hidden category: