Hey there! Sign in to join this conversationNew here? Join for free
x Turn on thread page Beta

Subtracting in Two’s Compliment Binary watch

Announcements
    • Thread Starter
    Offline

    3
    ReputationRep:
    Hello I’m struggling in how to do this, there are plenty of tutorials online but they aren’t particularly helpful. For example, if I have 1010 (10) minus 0101 (5) how to get to the answer? I have realised that when doing:
    1010
    -0101
    Then by borrowing from the left in 1010 I end up with 0101 which equals 5, is this a coincidence that by borrowing the left I get the correct answer I want?

    Thank you for your help
    Posted on the TSR App. Download from Apple or Google Play
    • Very Important Poster
    Offline

    21
    ReputationRep:
    Very Important Poster
    (Original post by ManDilne)
    Hello I’m struggling in how to do this, there are plenty of tutorials online but they aren’t particularly helpful. For example, if I have 1010 (10) minus 0101 (5) how to get to the answer? I have realised that when doing:
    1010
    -0101
    Then by borrowing from the left in 1010 I end up with 0101 which equals 5, is this a coincidence that by borrowing the left I get the correct answer I want?

    Thank you for your help
    Although I'm not familiar with this, it looks like you borrow from the left.

    Start with the 4th digits, 0-1 means you borrow 1 from the left digit to make it 10-1, which is 1.

    3rd digits are now 0-0 = 0.

    Second, 0-1 again = 1 with borrowing from left.

    First digits are now 0-0 = 0.

    So you end up with 0101.

    So you work from right to left and borrow as necessary.

    http://sandbox.mc.edu/~bennet/cs110/pm/sub.html

    Extra practice here
 
 
 
Reply
Submit reply
Turn on thread page Beta
Updated: February 27, 2018
Poll
Do you agree with the proposed ban on plastic straws and cotton buds?

The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Write a reply...
Reply
Hide
Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.