Yes, you'd need 6 arrays of 2147483648 longs (max int), plus one array of 536870912 longs, so a total of 7 arrays. Not that bad really.
Yes, I have code like that and its annoying and bug prone. Even if its a write one exercise :( Would be nice if could just avoid that exercise in bit shifting and anding.