0

I am trying to reduce the amount of time taken to implement a fucntion

def findAns(a, b, c):

    return (a&b)*(b&c)

What interpretation can I make based on the nature of bitwise AND other than the normal gate based interpretation? What does it actually do?

Chandra Shekhar
  • 598
  • 1
  • 7
  • 25
Tanishq Vyas
  • 1,422
  • 1
  • 12
  • 25
  • Does this answer your question? [Bitwise operation and usage](https://stackoverflow.com/questions/1746613/bitwise-operation-and-usage) – wjandrea May 01 '20 at 23:15
  • 2
    (1) No, it is not distributive. (2) Just that: a bitwise AND - unless your objects are not numbers but classes with redefined `__and__`. (3) If bitwise performance becomes an issue, it may be time to say goodbye to Python and switch to C++/C. – DYZ May 01 '20 at 23:17

0 Answers0