XOR logic for d-cubes added