Skip to main content
3 of 5
added 148 characters in body
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.

If inconsistent values are allowed:

#Pyth, 3 bytes

.&E

Try it here.

Mr. Xcoder
  • 42.5k
  • 9
  • 81
  • 214