Unless I'm wrong, the NOT of 0 is supposed to be 1 ...

//echo 0 $not(0)

returns

4294967295

$isbit seems to be off, too.