0

I am trying to figure out how to convert decimal to two's complement hexadecimal.

I completely understand how to take a decimal and find the two's complement of it (for both positive and negative values).

I also completely understand how Hexadecimal works for unsigned ints.

However, I am not sure how the two's complement rule can be used with hexadecimal. Is there a procedure to use Two's complement with hexadecimal?

Or is the procedure this: Convert decimal to two's compliment binary, then convert that to Hex. Is this the only thing that I would have to do? Or is there a more complex formula for find a twos complement hexadecimal number given a decimal number?

Thanks!

Edit: My latter thoughts were correct. I was supposed to convert the decimal number to two's compliment binary, then convert that binary to Hex. This is a very simple procedure.

Midgar77
  • 19
  • 1
  • 6
  • 1
    take a look at http://stackoverflow.com/q/28117444/3684343 . It is about base 5 1's complement, but it is similar. Let me know if it helps, otherwise I can write an answer. – mch Feb 03 '15 at 15:47
  • This was a big help! I think I understand now, thank you! – Midgar77 Feb 03 '15 at 21:03

0 Answers0