def hamming_distance(left_bytes, right_bytes):
    """Get the binary Hamming distance between two sequences of bytes."""
    if len(left_bytes) != len(right_bytes):
        raise ValueError('Length of both sequences must match')
    result = 0
    for left, right in zip(left_bytes, right_bytes):
        diff = left ^ right
        for j in range(8):
            result += diff >> j & 1
    return result
