0
woodpecker

2's complement

Recommended Posts

I'm trying to convert 625 into its 12-bit 2's compliment and cant get my head around this easy conversion.

When I convert 625 directly to binary I get

00 0110 0111 0001 but cant remember what to do in order to change it to 12-bits.

Can I just drop the first two zeros? When I did that it changed the variable, thus the question.

thanks in advance,

BS
SONIC WOODY #146

There is a fine line between cockiness and confidence -- which side of the line are you on?

Share this post


Link to post
Share on other sites

So its okay to just drop numbers on the left to make it work and the computer will just fill them in as need be?

I ask because when I run the new binary number (minus the two 0's) it doesnt represent 625 anymore.

>:(

We jumping tomorrow?

SONIC WOODY #146

There is a fine line between cockiness and confidence -- which side of the line are you on?

Share this post


Link to post
Share on other sites

It's ages since I did this in school, so I'm a bit rusty... NOBODY does this shite!! Only school kids.


Sorry, I have chores to do sunday.... before I pick the Muvver-In-Law up next week:(


(.)Y(.)
Chivalry is not dead; it only sleeps for want of work to do. - Jerome K Jerome

Share this post


Link to post
Share on other sites
Quote

I'm trying to convert 625 into its 12-bit 2's compliment and cant get my head around this easy conversion.

When I convert 625 directly to binary I get

00 0110 0111 0001 but cant remember what to do in order to change it to 12-bits.

Can I just drop the first two zeros? When I did that it changed the variable, thus the question.

thanks in advance,

BS



you do drop the first 2 zeros, dont know if there were needed in the first place in the problem or what but a 2's complement is just an inversion of all the bits plus 1

so 0110 0111 0001
becomes 1001 1000 1110
then add 1 so final answer is: 1001 1000 1111

if you have a TI-89 calculator it will do it for you too as well as conversions to hex and decimal from binary and vice versa

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

0