def apply_new_mask(binary: str, mask: str) -> str:
    """Apply the parm mask to the parm binary number, according to rules in Part 2.
        If the bitmask bit is 0, the corresponding memory address bit is unchanged.
        If the bitmask bit is 1, the corresponding memory address bit is overwritten with 1.
        If the bitmask bit is X, the corresponding memory address bit is floating."""
    result = ''

    for place in range(36):
        if mask[place] == '0':
            result += binary[place]
        else:
            result += mask[place]
    return result