The question asks to identify the logical operator that evaluates to TRUE only when both conditions are TRUE. The options are OR, NOT, AND, and XOR.
2025/4/4
1. Problem Description
The question asks to identify the logical operator that evaluates to TRUE only when both conditions are TRUE. The options are OR, NOT, AND, and XOR.
2. Solution Steps
Let's analyze each logical operator:
- OR: The OR operator returns TRUE if at least one of the conditions is TRUE. It returns TRUE if both are true.
- NOT: The NOT operator returns the inverse of the condition. It returns TRUE if the condition is FALSE, and FALSE if the condition is TRUE. It operates on a single condition, not two.
- AND: The AND operator returns TRUE only when both conditions are TRUE. Otherwise, it returns FALSE.
- XOR: The XOR (exclusive OR) operator returns TRUE if the conditions are different (one is TRUE and the other is FALSE). It returns FALSE if both conditions are TRUE or both are FALSE.
Based on these definitions, the AND operator is the correct answer.
3. Final Answer
AND