By performing XOR between 2 valid codeword will give another valid codeword,the no of 1's in the valid codeword will indicate hamming distance(d).
0xAA=1010 1010
and 0x55=0101 0101
performing XOR between them we get Hamming distance(d)=no of 1's in (1111 1111)=8