use bitarrays for all XOR operations