Ad
  • Default User Avatar

    I used mask to get only sign bit and reversed it with bitwise negation
    (because I didn't want to use logic one) to get true when it needs reversing.

    Negation was done using inline assembly
    by taking 'num' to register, negation
    and putting it back to it's place.

    Literally you summoned me back.
    I wasn't using this site for more than year and
    I spotted your question in recieved e-mails.