A community for students.

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

Curry

  • one year ago

Can someone check my work? Show by counterexample that the statement, “To subtract b from a in a computer with a 4-bit, one’s complement architecture, simply negate b and add it to a” does not hold for all integers a and b.

  • This Question is Closed
  1. Curry
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    I'm a bit confused, so any help?

  2. Curry
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    @Luigi0210 @wio

  3. anonymous
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Are you using sublime?

  4. anonymous
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    I think that the correct ones compliment for -b is 1001

  5. Curry
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    yes, i am using sublime 2.

  6. Curry
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    but 1011 should evaluate to -4 right? not -3. Since it's one's complement architecture?

  7. anonymous
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    let me think

  8. anonymous
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Yeah, it should be -4

  9. anonymous
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    I'm wondering if one's complement architecture uses the same addition algorithm

  10. anonymous
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Since 1111 would be 0 (-0), then you would have 0001 + 1111 = 0000 which would say 1+ -0 = +0, but this doesn't seem correct since we should really have an answer of 1.

  11. Curry
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    no no we shouldn't have an answer of one. that's what the question tells us. to give a counter example that doesn't work when dealing with just 4 bit architecture.

  12. anonymous
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    So I think that if 1's complement has a carry, then it needs to be added back into our new number. So 1111 + 0001 = 1 0000. The carry 1 gets added back in to get us 0001, so our answer is 1

  13. Curry
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    oh sorry, i misreaed your previous comment. ok ok, so if there is a carry over like that, then it gets added back in. I don't know how that work sin the computer but i'll kkep it in mind.

  14. anonymous
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Well, I might be wrong

  15. anonymous
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Okay it looks like if b > a, then you'll need to do a borrow, and so simply doing ones complement and adding will not work.

  16. rsmith6559
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    FWIW, capture.png shows and answer of +11 plus the carry. If the carry triggered a one's compliment conversion, wouldn't that give you the answer? How you could tell -11 from +8 eludes me.

  17. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.