bitwise And modified to handle signed bits

and tested!