xlfdll Posted October 10, 2007 Share Posted October 10, 2007 My computer class, said 0-1=1 in binary computing...Why 0-1=1? Is it a standalone rule or a rule in practice?PS:The professor(teacher) said that it is lend a bit from a higher digit...I cannot understand how it lends...Thanks. Link to comment Share on other sites More sharing options...
phkninja Posted October 10, 2007 Share Posted October 10, 2007 (edited) Its hard to show in a digital form (its easier with paper and pen).Basically he borrows 2 from the next number up, then pays back in his subtraction. Because you can only deal with so many bits, the MSB finally gets lost. e.g with 4 bits0000 - 0001 = 1111. because 0000- 0001---------------he borrows from the bit above, (as its 2 times larger, you get 2 bits) so 20202020- 00011111--------------- 1111(2-1=1, then pay back a 1 in the next column. The 1 in the next column is equal to 2 in the current column. This is because you have 23222120keep on borrowing and subtracting till you hit your limit and the upper bit is lost)He constantly borrows and pays back till the bit limit is reached. Then the upper most subtraction is lost.If you try it with a calculator you get the same answer. Edited October 10, 2007 by phkninja Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now