def data_reverse(data):
    """
    Each segment is 8 bits long, meaning the order of these segments needs to be reversed.
    :param data: an array of ones and zeros.
    :return: the reversed of the 8 bit sequences inside the array.
    """
    final = []
    while data:
        for i in data[-8:]:
            final.append(i)
        data = data[:-8]
    return final