Math Quiz: Math for - Conditional Statements

  1. Let $A = \text{True}$, $B = \text{False}$, and $C = \text{True}$. Evaluate the logical expression: $A \text{ OR } (B \text{ AND } C)$ Assume that AND is evaluated before OR if not specified by parentheses, though here parentheses clarify the order.

  2. If we represent True as 1 and False as 0, evaluate the expression: $(1 + 0) \times (1 \times 1)$ In this context, let '$+$' represent the logical OR operation and '$\times$' represent the logical AND operation.

  3. An automated security door for a restricted area will only unlock if two conditions are met simultaneously: an employee scans a valid ID badge (Condition $V$) AND they enter the correct PIN (Condition $P$). If an employee scans a valid ID badge (Condition $V$ is True) but enters an incorrect PIN (Condition $P$ is False), will the door unlock? Explain your answer using logical operations.

  4. A smart thermostat has the following rule for activating the air conditioning (AC): The AC turns on if (the current temperature is above $25^\circ\text{C}$ AND the time is between 9 AM and 5 PM) OR (the current temperature is above $28^\circ\text{C}$ regardless of the time). Let $T_1$ be the statement "current temperature $> 25^\circ\text{C}$". Let $T_2$ be the statement "current temperature $> 28^\circ\text{C}$". Let $H$ be the statement "time is between 9 AM and 5 PM". If the current temperature is $26^\circ\text{C}$ and the time is 6 PM, will the AC turn on? (For this scenario: $T_1$ is True, $T_2$ is False, $H$ is False).

  5. Consider a simple automated system that controls a warning light. The warning light turns ON if a pressure sensor $P$ reads above 100 units OR a temperature sensor $T$ reads above $50^\circ\text{C}$. Otherwise, the light remains OFF.

    1. If $P = 105$ units and $T = 45^\circ\text{C}$, is the warning light ON or OFF?

    2. If $P = 90$ units and $T = 55^\circ\text{C}$, is the warning light ON or OFF?

    3. If $P = 95$ units and $T = 48^\circ\text{C}$, is the warning light ON or OFF?

    4. What if the rule changes: The light turns ON if $P > 100$ units AND $T > 50^\circ\text{C}$. For $P = 105$ units and $T = 45^\circ\text{C}$, is the light ON or OFF now?