Oh you copied a bug that's in BigInt it should be log2(base) * k:
x=int2bigInt(0,8*k,0);