heman said:
i know how full adders work...but this concept of using adder as black box for anu no. of bits by cascading is not clear to me
It works that same way as when we add two multidigit numbers.
say 23457 and 38468:
we start by adding the 7 and 8 and get a 5 with a carry of 1.
we add this 1 to the 5 and 6, get 2 with a carry of 1
we add this 1 to the 4 and 4 and get 9 with no carry (a carry of zero)
we add this zero to the 8 and 3 and get 1 with a carry of 1
we add this 1 to the 2 and 3 and we get 6 with no carry
givng us 61925.
With a binary adder we just use binary addition where:
(here the last digit added is the carry in)
0+0+0 = 0 and a carry of 0
0+0+1 = 1 w/c of 0
1+0+0 or 0+1+0 = 1 w/c of 0
1+0+1 or 0+1+1 = 0 w/c of 1
1+1+0 = 0 w/c of 1
1+1+1 = 1 w/c of 1
When we cascade the adders,we take the carry from the lower Significant bit adder and feed it to the next adder along with the other two bits. This produces a result and a carry for the next adder. this is the same as when we took the carry from adding the 7 and 8, added it to the 5 and 6 and got a 2 for the tens digit and a carry of one to add to the 100s digit in the example given above.
Thus feeding 10101 and 00111 to a set of cascaded full adders produces.
1+1+
0 = 0 w/c
1 (LSB)
0+1+
1 = 0 w/c
1
1+1+
1 = 1 w/c
1
0+0+
1 = 1 w/c
0
1+0+
0 = 1 w/c
0 (MSB)
giving us 111000