Welcome to the Monastery | |
PerlMonks |
Re: Flipping partial bitsby roboticus (Chancellor) |
on Nov 12, 2020 at 20:55 UTC ( [id://11123624]=note: print w/replies, xml ) | Need Help?? |
From your description, I'd say that jwkrahn is correct, and that it's essentially the two's complement of a number from -128 to 127. The advantage of two's complement is that addition "just works" and you don't need to do any special logic to handle the sign. ...roboticus When your only tool is a hammer, all problems look like your thumb.
In Section
Seekers of Perl Wisdom
|
|