+ Reply to Thread
Results 1 to 5 of 5

4 Bit Full Adder

  1. #1
    Registered User
    Join Date
    10-27-2011
    Location
    Lahore, Pakistan
    MS-Off Ver
    Excel 2010
    Posts
    2

    4 Bit Full Adder

    Hello Guys I have a huge problem
    I have designed a full 4 Bit Full Adder, and taken input too but problem is I am unable to use AND, OR, and other logical functions in EXCEL whatever I write it gives me error "#VALUE" just keeps written there

    Now I have circuit all designed just don't how to resolve this. The thing is I need to use 0, and 1 and I can't use TRUE and FALSE as that is required by the assignment. I have attached what I have done.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: 4 Bit Full Adder

    Generally, this forum is not a place to get homework done. However, maybe we can help with a specific Excel issue you are encountering.

    First, use the 'Evaluate Formula' tool in the 'Formulas' Ribbon. That should show you where Excel is getting confused and sending you the "#VALUE" error.

    Second, an example of an OR function in Excel could be something like this:
    = OR(if(A5="1", True, False), if(A6="1", True, False))

    The above is not the cleanest, personally, I would convert the text to a number using the VALUE function.

    The above also provides a Boolean answer. You can convert it to a 1 or 0 by putting in two negative signs (ex. =--TRUE will give you a 1).

    Hopefully, these are enough pointers to get you to your own solution.

    Pauley

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: 4 Bit Full Adder

    Excel isn't a great tool to do logic simulation.

    A place to start is to change the inputs from the text they are now to numbers. So in N4, for example, change the formula to =--MID(A,4,1) and similarly throughout the row.

    Then in N12 =IF(B0, 1-A0, A0)

    In K12, =IF(B0*A0, 1-IF(B1_, 1-A1_, A1_), IF(B1_, 1-A1_, A1_))

    You'd be better off naming each gate and computing its output, and using variable names that don't conflict with cell references.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    10-27-2011
    Location
    Lahore, Pakistan
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: 4 Bit Full Adder

    Sorry I don't want anyone to do homework for me I just want help in right direction as I can't get it to work :S

    How do I do that? I mean how can I name each gate and calculate its output and so fourth?

    If possible can you explain what -- does if added to MID and don't we use AND, OR functions? Or we use IF function only?
    Last edited by khizaraq; 10-27-2011 at 02:26 PM.

  5. #5
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: 4 Bit Full Adder

    Both shg and I were recommending you convert your text string to a number when dealing with bits, so start there.

    Once you have the bits as numbers, you can use any mathematical calculation as long as it gives you the answer you want. You could use logical operations only, but AND(x,y) is the same as x*y when dealing with 1s and 0s. Furthermore, you can use IF statements to improve the clarity of your equation.

    As for naming the gate, you can't do that to your picture. You have already named your input cells. I believe what shg recommended was to create other cells that represented your output for each gate in order to keep your equations fairly straight forward. So, for example, you would name another cell AND0, and it would be =and(A0,B0). Then you would use AND0 as an input to the appropriate XOR and AND gates. Doing it in pieces may be easier than coming up with a 'super equation' at each of the final outputs.

    Pauley

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1