get the hamming dist

get the hamming dist a sequence and its shifted copy