def mask_list(mask):
    """Return the list of set bits in a mask as integers."""
    set_bits = []
    for position, bit in enumerate(reversed(bin(mask)[2:])):
        if bit == '1':
            set_bits.append(int('1{}'.format('0' * position), base=2))
    return set_bits
