Tell me more ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

How do I find two's complement for hex F3A1?

First I converted the number to binary 1111 0011 1010 0001 and then I found two's complement 0000 1100 0101 1111 givin' as result 0C5F which differs from the answer in the book: 0A57

What I'm doing wrong?

share|improve this question
You're not doing anything wrong. Your result is correct. – stevenvh May 18 '12 at 4:40
then the book is wrong, thanks – Jorge Zapata May 18 '12 at 5:16
That book's result is so off that I would suspect it may be the right answer to some other question (a question answer mixup). – Kaz May 18 '12 at 6:18

1 Answer

up vote 3 down vote accepted

Flip 1's to 0's and 0's to 1's (i.e. regular complement). Then add 1.

What you're doing wrong is having too much faith in a book.

But, on the bright side, at least it's some kind of technical book that is probably mostly correct.

share|improve this answer
i get the same result, maybe the book has a mistake – Jorge Zapata May 18 '12 at 4:39
1  
yep, just go into Windows 7, bring up the calculator, switch to Programmer under View, select Hex and Word mode, enter F3A1 and then press ±, result is C5F (doesn't display leading 0). – tcrosley May 18 '12 at 5:15
@tcrosley - nonsense, you can do it on sight! :-) – stevenvh May 18 '12 at 5:18
If this was comedians.stackexchange.com you I would vote for you as a moderator :) – MikeJ-UK May 18 '12 at 9:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.