But why must it be used to "compute the sum of three or more n-bit
numbers" why can't it compute 2 n-bit numbers?
The carry save addition of 2 N-bit numbers results in two (N + 1)-bit numbers being produced, the virtual carry (VC) and the virtual sum (VS).But after getting VC and VS you still have to add the two values together with a convectional adder to get your final result, so only adding 2 numbers is pointless.Take this example, lets say one carry-save addition takes k*T ms, where k = number of N - bit numbers being added, and a convectional adder takes 5T ms to add 2 numbers (regardless of bit width), then if:
1) you added 2 numbers, then
$$
\text{Time(Carry-Save) = 2T + 5T = 7T}
$$
$$
\text{Time(Convectional Adder) = 5T}
$$
2) you added 3 numbers, then
$$
\text{Time(Carry-Save) = 3T + 5T = 8T}
$$
$$
\text{*Time(Convectional Adder) = 5T + 5T = 10T}
$$
So carry-save addition is only useful if you have at least 3 operands to add.
Also the example given under the basic concept (where the result is
21122120202022022122111011102212) confuses me more because that is
just one output, not two?
In reality there are two outputs, the representation that has been used there is a redundant arithmetic type representation.The number "21122120202022022122111011102212" will actually be represented as two different numbers, the virtual carry (VC) and the virtual sum (VS)
So A = 21122120202022022122111011102212 will be represented as
VC = 100110101010110110110000000011010
VS = 011001000000000000100111011100010
in your carry save adder.The VC number is obtained by looking at each and digit of A in turn, starting from the LSB, if the digit in a particular bit position, say bit position m, is 2 then place a 1 in the m th bit position of VC, otherwise place a zero.VS is obtained by setting all digits that are non-one in A to zero.You could also convert a redundant number to two non-redundant numbers by using the alternative method below.
Say you have B = 22012
Re-Write B using just binary by using 2 bits per digit, ie B = 10,10,00,01,10
Extract the first bit of each digit to form VC and the extract the last bit of each digit to form VS, ie( VC = 11001, VS =00010 )
Your solution is wrong. The output of your 1st FA is a+b
. the output of your 2nd FA is LSB(a+b) + MSB(a+b) + c
. Which is wrong.
Solution:
What we want is a+b+c+d
. so produce the sum a+b+c
using one FA. use second FA to add d
with this sum. this will give the LSB of output. Adding carries of these FA's will give the MSB's. Use the 3rd FA to get the MSB's. See the figure given below.
A,B,C and D are the inputs.
Y2 is the MSB of output, Y0 the LSB and Y1 is the second LSB of output.
Best Answer
You can combine n full adder circuits to make an adder for n-bit numbers. When you do this, you connect the carry-out from each adder to the carry ins of the adder for the next most significant bit.
Here's an example adding 2 3-bit numbers, X = A + B:
simulate this circuit – Schematic created using CircuitLab
It's more efficient to just calculate the sum of 3 bits in one operation than to add
x
andy
, and then addcin
in a 2nd step.