result = new int[val.magnitude.length];
return this;
    public BigInteger xor(BigInteger val)     {        int[] result;                if (magnitude.length > val.magnitude.length)        {            result = new int[magnitude.length];        }        else        {            result = new int[val.magnitude.length];        }                for (int i = 0; i < result.length; i++)        {            int index = result.length - i - 1;                        if (magnitude.length > i)            {                result[index] = magnitude[magnitude.length - i - 1];            }            if (val.magnitude.length > i)            {                result[index] ^= val.magnitude[val.magnitude.length - i - 1];            }            else            {                result[index] ^= 0;            }        }         int resSign = 1;                if (sign < 0 || val.sign < 0)        {            resSign = -1;        }                return new BigInteger(resSign, result);    }