input: Write a python function to calculate the sum of XOR for all pairs in a given list.
  assert find_xor_sum([5,9,7,6], 4) == 47
  assert find_xor_sum([7,3,5], 3) == 12
  assert find_xor_sum([7,3], 2) == 4
output: def find_xor_sum(arr, n):
      xor_sum = 0
      for i in range(n):
          for j in range(i + 1, n):
              xor_sum += arr[i] ^ arr[j]
      return xor_sum