The following steps are a useful formal approach to combinational problems:
Consider the truth table that defines the OR gate. Using the lines in this table that yield a true result gives.
Since Q is a two-state variable all other input state combinations must yield a false. If the truth table had more than a single output result, each such result would require a separate equation. An alternative is to write an expression for the false condition.
Narippawaj Ngernvijit