Subject-auxiliary inversion to express a conditional works exactly the same way as subject-auxiliary inversion to express a question: you simply move the auxiliary in front of the subject and drop the if:
If he should come tomorrow, we will of course welcome him.
↓
Should he come tomorrow, we will of course welcome him.
If he were coming he would surely inform us.
↓
Were he coming he would surely inform us.
If I had known you were coming I would have rearranged my schedule.
↓
Had I known you were coming I would have rearranged my schedule.
In Present-day English, however, this sort of conditional construction is restricted to a handful of past-form auxiliaries—were (uninflected for person or number), had and should—and even these constructions have a very formal, old-fashioned ring today.
Note that these inverted constructions do not necessarily express "unreality":
Should and were conditionals may express unreality but more often express non-reaiity: a hypothetical condition or an 'open' condition, a contingency which has not yet been realized but may be in the future.
- Should conditionals are usually open, and the verb heading the following consequence clause will usually have future reference: either a will future, as in the example above or a modal in either non-past or past form understood in a non-past sense:
Should he come tomorrow we can let him use John's office.
Should he come tomorrow we could let him use John's office.
Would in the consequence clause is possible, but unlikely.
- The verb heading a consequence clause introduced by were conditionals may express counterfactuality but more often express an open condition regarded as possible but unlikely; in either case a past form is required in the consequence clause:
Were he to come tomorrow we would let him use John's office.
Had conditionals, however, usually do express counterfactuality. The perfect construction in the condition clause indicates a past contingency, and the "conditionality" of the construction implies that the contingency was not in fact realized, since if it were realized there would be no "if" involved.