Function to get the signed dec-value of a hex-number
Issue #1069
closed
Hello,
for my projects it would be nice to have a function to get the signed decimal value of a hex-number. There are only functions to get the unsigned value of hex-numbers.
E.g. sign_int(0xFFFF) = -1 instead of int(0xFFFF) = 65535.
Is it possible to get such a function?
Kind regards, otti
Please answer to dirk@otterpohl.net
Comments (3)
-
-
I didn’t realize there was an unmask function either; I’d seriously suggest in the bitfield section of the window at the top, give an option for signed/unsigned, bit depth, and a box that shows the value. It’d be way clearer.
-
repo owner - changed status to closed
- Log in to comment
This is possible with the unmask function. For example,
unmask(0xFFFF;16) = -1