Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Create a byte-wide adder

  1. Jan 2, 2006 #1
    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.
     
  2. jcsd
  3. Jan 2, 2006 #2

    dduardo

    User Avatar
    Staff Emeritus

    So what is the issue you're having? You don't understand how full adders work? You don't know how to cascade them?
     
  4. Jan 2, 2006 #3
    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
     
  5. Jan 2, 2006 #4

    -Job-

    User Avatar
    Science Advisor

    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 (Text):
     
     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 (Text):

     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 (Text):

       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 (Text):

      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: Jan 2, 2006
  6. Jan 2, 2006 #5

    Janus

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    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
     
  7. Jan 2, 2006 #6
    Thanks Job and Janus for detailed explanation,,

    Its clear to me now.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Create a byte-wide adder
  1. Bits and Bytes (Replies: 2)

  2. Designing 8 bit adder? (Replies: 2)

  3. Bits and bytes (Replies: 2)

Loading...