private bool BitArrayEquality(System.Collections.BitArray b1, System.Collections.BitArray b2)
{
if (b1.Length != b2.Length)
return false;
bool[] leftArray = new bool[b1.Length];
bool[] rightArray = new bool[b2.Length];
for (int i = 0; i < leftArray.Length; i++)
{
if (leftArray[i] != rightArray[i])
return false;
}
return true;
}