Implement bitwiseand function.