Function to get the signed dec-value of a hex-number

Issue #1069 closed
Former user created an issue


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

Comments (3)

  1. Jim O'Hagan

    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.

  2. Log in to comment