Modifications in function

I can't see how a bitwise and is useful.

in this particular case it should work as well as logical AND, but I agree it should &&