addition/subtraction negative number

Discussion in 'Homework Help' started by zaidsh, Apr 21, 2015.

  1. zaidsh

    Thread Starter New Member

    Apr 20, 2015
    12
    0
    Whats wrong with my circuit? its supposed to do addition if the c in is 0 and do subtraction if the c in is 1, the subtraction part doesnt function correctly if the result is negative??
     
  2. blocco a spirale

    AAC Fanatic!

    Jun 18, 2008
    1,438
    368
    The schematic is completely meaningless.
     
  3. zaidsh

    Thread Starter New Member

    Apr 20, 2015
    12
    0
    how come? please explain im not that good in it and i really really REALLY need to pass it so please more details
     
  4. WBahn

    Moderator

    Mar 31, 2012
    17,716
    4,788
    Why do you think the result is wrong?

    What is (-1) - (3)?

    What decimal value does a four-bit 2's complement bit pattern of (1100) represent?
     
  5. zaidsh

    Thread Starter New Member

    Apr 20, 2015
    12
    0
    What should I do to correct it?
     
  6. WBahn

    Moderator

    Mar 31, 2012
    17,716
    4,788
    First tell us what you think is wrong? What is it doing that it shouldn't? Or, more to the point, what do you believe it should be doing?
     
  7. zaidsh

    Thread Starter New Member

    Apr 20, 2015
    12
    0
    well the whole circuit is supposed to input two 4-bit numbers and :
    1. output the larger number (no problem here).
    2. either perform addition OR subtraction depending on the C in (if Cin = 0 its + , if Cin = 1 its -), the addition part works but the subtraction is just one big mess.
     
  8. WBahn

    Moderator

    Mar 31, 2012
    17,716
    4,788
    Again, WHY do you claim that the subtraction is one big mess? What are you basing that conclusion on?

    In order to decide that it isn't working properly, presumably you know what you expect the output to be for a given set of inputs and you aren't seeing that.

    Yet I can't get you to simply state what you expect to see and what you are actually seeing.

    You have shown a circuit in which when you put in A=1111 and B=0011 and you set C to perform subtraction, namely (A-B), and you get an output of 1100.

    What do you think the output SHOULD be?
     
  9. zaidsh

    Thread Starter New Member

    Apr 20, 2015
    12
    0
    I remade the design and please notice the input this time if its 1-2 (0001 - 0010) then the output goes crazy HOW do I fix it to make it output the correct answer? thanks
     
  10. WBahn

    Moderator

    Mar 31, 2012
    17,716
    4,788
    I'm pretty sure you wouldn't know the correct answer if you saw it.

    Again, yet one more time (and very possibly the last time), you keep saying things like "the output goes crazy". What does this mean? You obviously think that the result (1111) is wrong if you subtract 2 from 1. What do you believe the answer SHOULD be? If you don't know what the answer should be, then how can you possibly declare that the answer you are seeing is wrong?
     
  11. zaidsh

    Thread Starter New Member

    Apr 20, 2015
    12
    0
    I did admit that I'm guilty of being bad at this but I really REALLY need to finish this project or I will lose my scholarship so please tell me what does this output mean and is it correct ? thanks
     
  12. MrChips

    Moderator

    Oct 2, 2009
    12,429
    3,360
    What is the result of 1 - 2?
    How would you represent this in binary notation?

    Go back and study your lecture notes to find the answer.
     
  13. WBahn

    Moderator

    Mar 31, 2012
    17,716
    4,788
    Ask yourself why someone that is really bad at this deserves a scholarship for this?

    Us just giving you answers is not going to help you. Most likely, the concepts you are missing (which are all basic concepts) were presented in your text or other reading material, were presented in class, and have been demonstrated via examples in both. Being spoon fed this stuff yet one more time isn't going to magically make it sink in. You need to fight and struggle with it so that you can learn it in a way that will let it make sense to the way that you think about things.

    Frankly, the last thing I'm worried about is your scholarship -- the level of comprehension of the basic fundamentals that you are demonstrating are a pretty strong indicator that you do not deserve to keep your scholarship and that someone else would be much better served by that financial support. If you want to change that, then you are going to have to buckle down and put in the effort to learn those fundamentals instead of asking strangers to do the work for which you want to take the credit (and the scholarship).
     
  14. zaidsh

    Thread Starter New Member

    Apr 20, 2015
    12
    0
    id say you are correct if my major actually is about that material, im a buisness information technology student! I have no idea why do I have to take this because I'll never ever ever use it in my major, and just so you know I'm a straight A student its just this subject. so please stop talking like I stol someone's seat I earned this scholarship!
     
  15. WBahn

    Moderator

    Mar 31, 2012
    17,716
    4,788
    Oh, I'm so sorry. I didn't realize that since you "earned" that scholarship, you are apparently entitled to have strangers do your work for you in a required course without any significant effort on your part to learn and demonstrate an understanding of the concepts as long as YOU decide that there is no reason for YOU to learn it. Now that we know that you are in a program that starts with the word "buisness", things make a lot more sense.
     
  16. MrChips

    Moderator

    Oct 2, 2009
    12,429
    3,360
    But you did say you are a student in "information technology".

    This stuff is as basic as 1 + 1 = 2.

    If you have no desire to master this stuff how can you call yourself a scholar?
     
  17. WBahn

    Moderator

    Mar 31, 2012
    17,716
    4,788
    Isn't it amazing how some people don't have time to learn the basic concepts or answer basic questions about their assignment yet have plenty of time to go on at length about how they don't have time to learn the basic concepts and about how they will never need it?
     
Loading...