def bit_set(offset, int_tp=0):
    """sets bit of int_tp at offset to 1

    :param int offset: position offset
    :param int int_tp: original integer or long (defaults to 0)
    :returns: a new int or long

    :Example:
        >>> bit_set(2)
        4
        >>> bit_set(2,4)
        4                            # because bit already set
        >>> bin(bit_set(16))
        '0b10000000000000000'
    """
    return int_tp & 1 << offset
