You are required to automate the control of the water tank in your home. There are two water contact sensors that turn to a TRUE state when in contact with water and a FALSE state when not. Sensor $1 (S_1)$ to detect water at the maximum level of the tank and sensor $2 (S_2)$ detects water level at the minimum level. The electronically controlled tap (T) must turn off (FALSE) when the water level reaches $S_1$ and the tap turn on (TRUE) when the water level drops to $S_2$. There is a State Register $(S_R)$ which changes state if and only if $S_1$, $S_2$ and $S_R$ are all the same state (i.e. $S_1$ TRUE, $S_2$ TRUE and $S_R$ TRUE then $S_R$ changes to FALSE or $S_1$ FALSE, $S_2$ FALSE and $S_R$ FALSE then $S_R$ changes to TRUE).
My problem is, Consider the output of this system as the state of T. Note down the possible states of this system in a truth table.
Here the table I did but I am not sure. please tell me If it is correct or not? if it is not please explain right way,
Any help would be greatly appreciate!
$$\boxed{\begin{array}{c|c|c} S1 & S2 &S_R & T(Result) \\[1ex]\hline T & T & F & F \\[1ex] F & T & F & T \\[1ex] F & T & T & T \end{array}}$$
As there are three inputs in your system, the truth table should have $2^3$ rows:
$$ \boxed{\begin{array}{c|c|c} S_1 & S_2 &S_R & T_\text{Result} & S'_R & \text{remark}\\[1ex]\hline F & F & F & T & T & \text{tank empty} \\[1ex] F & F & T & T & T & \text{tank empty} \\[1ex] F & T & F & F & F & \text{tank contains water} \\[1ex] F & T & T & F & T & \text{tank contains water} \\[1ex] T & F & F & F & F & \text{tank max reached, S2 sensor failure} \\[1ex] T & F & T & F & F & \text{tank max reached, S2 sensor failure} \\[1ex] T & T & F & F & F & \text{tank max reached} \\[1ex] T & T & T & F & F & \text{tank max reached}\\[1ex] \end{array}} $$
The tap state does not depend on the state register $S_R$. Therefore, a truth table with two inputs would suffice to describe the tap control. However, the subsequent state register $S'_R$ does depend on all three inputs.
The purpose of the state register $S_R$ is not clear from the question.
The outputs could be expressed as
$$T_\text{Result} = \neg S_1 \land \neg S_2$$
$$S'_R = \neg S_1 \land (\neg S_2 \lor S_R)$$