I have no clue as to what's going wrong and you only gave us a tiny code fragment so it's difficult to guess, however I wonder if this would help, or at least shed some light on what is happening.
my $bit = ($addr & $mask) ? 1 : 0;In reply to Re: Bit fiddling madness
by RichardK
in thread Bit fiddling madness
by mbethke
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |