title: sum of xor values of all pairs
body: <p>We have an array <code>A (say [1,2,3])</code> . We need to find the <strong><em>XOR(^)SUM</em></strong> of all pairs of integers in the array. 
  Though this can easily be done in <code>O(n^2)</code> but how can i improve the complexity of the solution ?
  E.g for the above array , A, the answer would be <code>(1^2)+(1^3)+(2^3) = 6</code>
  Thanks. </p>