for(int i = 0; i < reversedBinaryValue.size(); i++)
{
boolean addToSplitOne = true;
// since arrays are already filled with zeroes, it skips an additional step of
// filling with zeros
if(reversedBinaryValue.get(i) == 1)
{
// now working with the flag that the bit has been added to splitOne or not
if(addToSplitOne)
{
binarySplitOne[i] = reversedBinaryValue.get(i);
// now set the split to true so the flag is interchanged, and we can add value in split two
addToSplitOne = false;
} // end of if
else
{
binarySplitTwo[i] = reversedBinaryValue.get(i);
// now set the split to false so that we can add value to split one
addedToSplitOne = true;
} // end of else
} // end of main if
} // end of for
for(int i = 0; i < reversedBinaryValue.size(); i++)
{
boolean addToSplitOne = true;
// since arrays are already filled with zeroes, it skips an additional step of
// filling with zeros
if(reversedBinaryValue.get(i) == 1)
{
// now working with the flag that the bit has been added to splitOne or not
if(addToSplitOne)
{
binarySplitOne[i] = reversedBinaryValue.get(i);
// now set the split to true so the flag is interchanged, and we can add value in split two
addToSplitOne = false;
} // end of if
else
{
binarySplitTwo[i] = reversedBinaryValue.get(i);
// now set the split to false so that we can add value to split one
addedToSplitOne = true;
} // end of else
} // end of main if
} // end of for