On 20 August 2010 17:00, Andy McKenzie <amckenz...@gmail.com> wrote: > Thanks to everyone who responded. I've dealt with binary math > before, but it never occurred to me (and doesn't seem to be anywhere > in the document page at php.net!) that it would automatically pad the > number I entered.
There is no padding. php -r "echo decbin(~2), PHP_EOL, decbin(-3);" 11111111111111111111111111111101 11111111111111111111111111111101 That's 100% correct and proper. Not "padded". The example in  regarding E_ALL & ~E_NOTICE is a perfect example. Richard.  http://docs.php.net/manual/en/language.operators.bitwise.php -- Richard Quadling. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php