public static function zeroFill($a, $b)
    {
        $z = hexdec(80000000);
        if ($z & $a) {
            $a = ($a>>1);
            $a &= (~$z & 0xffffffff);
            $a |= 0x40000000;
            $a = ($a >> ($b-1));
        } else {
            $a = ($a >> $b);
        }
        return $a;
    }