@classmethod
def clear(cls, val, flags):
    """
        Clear all bits in flags inside val, return new val
        :param val: int
        :type val: int
        :param flags: int
        :type flags: int
        :return int
        :rtype int
        """
    return val & ~flags
