|
Posted by d on 09/30/68 11:41
<fritz-bayer@web.de> wrote in message
news:1141409437.320652.250950@t39g2000cwt.googlegroups.com...
> Are you serious about this? I mean you are right that it should be
> zero, but could it be, that I have to use a different expression? Or
> use a function instead of using the & ? Have you tried it yourself on
> your machine? Do you get the same result?
Those numbers are straight from a test I did on my machine. If you look at
those numbers expressed in binary, you can see that a bitwise and will
return 0, as there is only one bit set to 1 in the second number, and the
corresponding bit in the first number is a 0, hence the result of the
bitwise and is 0.
If perl gives you a different number, then perl either wasn't doing a
bitwise and (though the perl docs say otherwise), or you were using
different numbers...
cheers!
dave
Navigation:
[Reply to this message]
|