Skip to main content
2 of 5
added explanation
Mr. Xcoder
  • 42.5k
  • 9
  • 81
  • 214

#Pyth, 5 bytes

._.&E

Try it here.

Notice the cute face ._.


#How?

._.&EQ  -  Q means input and is implicit.

  .&    - Bitwise AND between:
    E     - The second input and
     Q    - The first input.
._      - Sign. 0 if it equals 0, 1 otherwise.
Mr. Xcoder
  • 42.5k
  • 9
  • 81
  • 214