bitwise xor in python

49

a = 10 # = 1010 (Binary)
b = 4 # =  0100 (Binary)

a ^ b # = 1110
      # = 14 (Decimal)

Comments

Submit
0 Comments