01-08-2016 11:15 AM
How do you convert a hexidecimal I16 number to it's 2's complimnet number?
thanks
01-08-2016 11:36 AM
I realize that it is new and not many people have heard of it, but there is this wonderful new service called "Wikipedia" where you can find all sorts of interesting information on two's-complement, including this jem:
https://en.wikipedia.org/wiki/Two%27s_complement
Mike..
01-08-2016 11:42 AM
Oh my, number two, you sure are looking even today!
01-08-2016 11:44 AM - edited 01-08-2016 11:45 AM
Negative signed integers are stored as two's complement (not compliment, thank you!), no need for conversions.
01-08-2016 01:11 PM
I just realized that I asked my question wrong....
I have a 2's complement hexadecimal number and I want to convert that over to a normal hexidecimal number.
I tried the following but I get the following error:
01-08-2016 01:16 PM
01-08-2016 01:33 PM
The data that I am receivng is hexidecimal 2's complement and what I mean by a normal hexadecimal number is a hexidecimal number without the sign bit. Do I need to remove the sign bit (8000h if it is a negative #) and subtract 1?
If I knew how to do all these calculations to a cluster of all I16 numbers and then place these into a string to display on my front panel, then
I might not need use an array at all.
Thanks for the advice
01-08-2016 01:42 PM
01-08-2016 01:50 PM
A 15bit positive integer that is the absolute value of the original sounds good to me...
How do I do that?
01-08-2016 01:53 PM