how to generate all permutations for bitarray of n size?
I mean for example if array of 1 and 0 has integer type I can do like this
for (int i = 0; i <= ~(-1 << n); i++)
string s = Convert.ToString(i, 2).PadLeft(n, '0');
and s will contain some permutation for example 101010 or 100000 and etc. So I can get all permutations. For example for n=3
000
001
010
011
100
101
110
111
But how to do the same for bitarray?(because I need XOR operations and etc.)