How to I determine whether an ASCII representation of integer is negative or positive

0

Here is an example: given the number -4, which is 0xFFFFFFFF in hex. I need to somehow get the first F (1111), then AND it with 8 If the result is greater or equal to 8, then it is negative.

    1111
AND 1000
 ----------
    1000

I have no idea how to get the first F (1111).

mips
asked on Stack Overflow Dec 6, 2019 by Kai

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0