|
|
| Perl: the Markov chain saw | |
| PerlMonks |
Negating a numberby flamey (Beadle) |
| on Mar 04, 2009 at 17:10 UTC ( #748242=perlquestion: print w/ replies, xml ) | Need Help?? |
|
flamey has asked for the
wisdom of the Perl Monks concerning the following question:
This is how I thought I can negate a number:
But in the document i'm reading, it says to negate the number, and the example says the result of negating 0x0007 is FFF8. I looked on the web, and found someone gave an example of negating a number (in another programming lang) by XOR-ing the number with 0xFF: So, im confused, what's right?
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||