Question 1 Report
Fig. 1 shows a program decision for an aquarium monitoring system. A probe stores the water pH in pH. The system should send a message when the pH is outside the safe range 6.8 to 7.4 inclusive. The diagram shows the first test currently used.
(a) Explain the result of the displayed test when pH is 6.8. [1]
(b) When pH is 6.7, state the command selected by Fig. 1. [1]
(c) When the second test checks for water above the safe range, write that condition. [1]
(d) Explain why the two tests need to be joined with OR, rather than AND, to make one alarm condition. [1]
(a) When pH is 6.8, pH < 6.8 is false because 6.8 is not less than itself. The lower safe boundary is included. [1]
(b) When pH is 6.7, the test is true, so the selected command is Send message. [1]
(c) The condition for water above the safe range is pH > 7.4. [1]
(d) The alarm is needed if the pH is too low or too high. A value cannot normally be below 6.8 and above 7.4 at the same time, so using AND would prevent either single unsafe condition from raising the alarm. [1]
Everything you need to excel in your exams