Two’s complement of hexadecimal

digital-logic

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?

Best Answer

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.