def set_bit(value, bit):
    """
    returns an integer with the bit at offset >bit< set to 1.

    >>> set_bit(0x00, 2)
    4
    >>> set_bit(0x00, 7)
    128
    >>> '{0:08b}'.format(set_bit(int('00000000', 2), bit=5))
    '00100000'
    >>> '{0:08b}'.format(set_bit(int('10101010', 2), bit=0))
    '10101011'
    >>> '{0:08b}'.format(set_bit(int('1111000011110000', 2), bit=10))
    '1111010011110000'
    >>> '{0:08b}'.format(set_bit(int('11111111', 2), bit=3))
    '11111111'
    """
    return value | 1 << bit
