How can a byte-wide adder be created using full adders?

  • Thread starter Thread starter heman
  • Start date Start date
  • Tags Tags
    Adder
AI Thread Summary
The discussion centers on the concept of cascading full adders to create a multi-bit adder. A full adder can be combined to handle larger numbers by passing the carry bit from one adder to the next. The example illustrates adding two decimal numbers, showing how to manage carries when the individual adders can only handle two digits. The correct approach involves first adding the lower digits, managing any carry, and then adding the higher digits along with the carry to achieve the final result. This method is analogous to binary addition, where the carry from each bit addition is fed into the next significant bit's adder. The explanation clarifies that cascading works similarly in both decimal and binary systems, ensuring accurate results when adding multi-digit numbers.
heman
Messages
353
Reaction score
0
Can someone please explain this to me..

Once we have a full adder, then we can string eight of them together to create a byte-wide adder and cascade the carry bit from one adder to the next.
 
Computer science news on Phys.org
So what is the issue you're having? You don't understand how full adders work? You don't know how to cascade them?
 
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
 
Suppose we need to add the two numbers 4,256 and 3,124 in decimal rather than binary. Suppose the only adder we have available can support at most inputs with two decimal digits. What we can do is the following:

Code:
 42   56
+31  +24
---- ----
 73   80

And then concatenate the two together to get 7380. Of course you can see a problem with this, for example, try adding 4,256 and 3,150:

Code:
 42   56
+31  +50
---- ----
 73  106

If you concatenate them you get 73106 which is way off, the actual result is 7406. To fix this we can do the following:
.first, perform the addition of the lower digits:
Code:
   56
  +50
  ----
1  06
(we get 06 plus the carry out of 1, the carry out is always 1 or 0)
. second, perform the addition of the higher digits plus the carry out:
Code:
  42  
  31
+  1
---- 
  74
. now concatenate and get the correct result:7406

If the numbers we wanted to add had 10 digits instead of 4, we could use 5 adders. We need to cascade them because the second adder needs the carry out of the first one. The third adder needs the carry out of the second one ...etc. This example was in base 10, but with binary it's the same thing.
 
Last edited:
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
 
Thanks Job and Janus for detailed explanation,,

Its clear to me now.
 
In my discussions elsewhere, I've noticed a lot of disagreement regarding AI. A question that comes up is, "Is AI hype?" Unfortunately, when this question is asked, the one asking, as far as I can tell, may mean one of three things which can lead to lots of confusion. I'll list them out now for clarity. 1. Can AI do everything a human can do and how close are we to that? 2. Are corporations and governments using the promise of AI to gain more power for themselves? 3. Are AI and transhumans...
Thread 'ChatGPT Examples, Good and Bad'
I've been experimenting with ChatGPT. Some results are good, some very very bad. I think examples can help expose the properties of this AI. Maybe you can post some of your favorite examples and tell us what they reveal about the properties of this AI. (I had problems with copy/paste of text and formatting, so I'm posting my examples as screen shots. That is a promising start. :smile: But then I provided values V=1, R1=1, R2=2, R3=3 and asked for the value of I. At first, it said...
Back
Top