Multiple relevant

can anyone help with this code, i need to be able to meet both conditions to follow up a question. selected(${q1},'!=1' ) and selected(${q2},'1')

It would be:
not(selected(${q1},'1')) and selected(${q2},'1')

thank you so much, it worked