@staticmethod
def construct_operator_flag(data):
    """construct operator flag from dict to binary
        """
    opt_dict = {'EOL': 128, 'AND': 64, 'LEN': {(1): 0, (2): 16, (4): 32, (6
        ): 48}, 'RES': 0, 'LT': 4, 'GT': 2, 'EQ': 1}
    b_data = 0
    for opt in opt_dict:
        if opt in data and opt != 'LEN':
            if data[opt] == 1:
                b_data += opt_dict[opt]
        elif opt == 'LEN' and data[opt]:
            b_data += opt_dict['LEN'][data['LEN']]
    return b_data
