def bits2str(bits):
    """
    Convert binary array to string.
    :param bits: bit array.
    :return: character string.
    """
    chars = []
    for b in range(int(len(bits) / 8)):
        byte = bits[b * 8:(b + 1) * 8]
        chars.append(chr(int(''.join([str(bit) for bit in byte]), 2)))
    return ''.join(chars)