Jump to content

A simple question, puzzling me...


Recommended Posts

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


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 bits

0000 - 0001 = 1111. because

0000

- 0001

---------------

he borrows from the bit above, (as its 2 times larger, you get 2 bits) so

20202020

- 0001

1111

---------------

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 23222120

keep 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 by phkninja
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...