DaveMonk has asked for the wisdom of the Perl Monks concerning the following question:

Sup, I was wondering what the quickest way to convert memory addresses like 0xffffffff to stuff like -0x1. Implement two's compliment or are there quicker ways?

Replies are listed 'Best First'.
Re: Memory Addressing conversions
by JavaFan (Canon) on Apr 12, 2012 at 00:25 UTC
    $ perl -wE 'say unpack "l", pack "L", 0xffffffff' -1 $
    Changing the decimal value into hex is left as an exercise for the reader.