in reply to Bit by a Hex String

Shifting one bit to the left is the same as multilpying by 2. Can you just multiply the number by two and add one? Wouldn't that be a lot easier?

-ted-

Replies are listed 'Best First'.
Re: Re: Bit by a Hex String
by abitkin (Monk) on Aug 29, 2003 at 14:52 UTC
    While I give you props for the simplicity of this solution, it is rather useless in this case. Once again it's the 64 bit integer limit of Perl that would keep me from doing this. (Actually 63, because of the sign, but anyways) My number is quite a bit larger than the standard Perl scalar. (no pun intended.)
    ==
    Kwyjibo. A big, dumb, balding North American ape. With no chin.