Jump to content

two's complement


computerbum

Recommended Posts

I am trying to understand what how to use two's complement.

 

If I have the number 128, I know that I can find the number by converting 128 to binary such as:

 

0000 0000 1000 0000

 

Then invert the digits like so:

 

1111 1111 0111 1111

 

Then add one to it like so:

 

1111 1111 1000 0000

 

which will give me -128

 

but what about if I want to find 2's complement of -128 would I still do it the same way as above which would give me the value of 128?

 

 

I am new at this please help?:confused:

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
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.