Exchanging the two clauses in an if sentence

Yes, this is possible. However, you should be careful that when restructuring these sentences they still make sense (especially when there are negatives involved). For example:

"If you study, you will ace the exam."

Is rearranged into:

"If you ace the exam, you studied."

Which may not be accurate as it is possible to ace an easy exam without studying.

-

For a negative example:

"If you do not study, you will fail your test."

If we were to exchange the main clause and the if clause, the sentence could look like:

"If you fail your test, you did not study."

-

This statement may not make sense in the situation, since it is possible to study and still fail an exam.

It is always best to think through a conditional sentence when rearranging the order to ensure that the answers are still accurate. For the examples above, I would suggest adding the adverb "maybe" per the following:

"If you failed your test, maybe you didn't study."

"If you aced the exam, maybe you studied hard."