Sum of Subset XOR Totals

Given an array, consider every possible subset (including the empty set). For each subset, compute the XOR of all its elements. Sum these XOR totals across all subsets and return the result.

Examples
Input: [1,3]
Output: 6
Hints

Sum of Subset XOR Totals

Given an array, consider every possible subset (including the empty set). For each subset, compute the XOR of all its elements. Sum these XOR totals across all subsets and return the result.