quote:
Originally posted by Shondoit
For the functionality
Something like:
-hF*hF + h100 = h1
(It's no problem if this it implemented, is it?)
But he already got it to work...
it depends on what you mean with the negative sign. Normally a negative sign is part of the number (negative number) if used alone, not part of the calculation. Hence why you shouldn't do: -hF and interpret that as:
- convert hF to 15
- make 15 negative
The "make x negative" should come before "convert x to y", not before! Hence why negative hexadecimal/octal/binary numbers don't exist.
A hexadecimal number produces a negative decimal number if that hexadecimal number wraps around the edge you have defined for the hexadecimal environment.
If you want -15 in hexadecimal it should be hFE or hFFFE or hFFFFFFFE or hFFFFFFFFFFFFFFFE, depending on the range...
btw: "-hF*hF + h100 = h1" is wrong, it should be "h
1F"
----------------
To give a better example of why you can't do all that: you will find it even more complex when you're dealing with floating points. Again, you can't do "hF.EF" as that does not exist, almost the same goes for the use of the sign.
----------------
(can't explain this too well, someone else?)