Prepare for the A Level Computer Science OCR Exam with engaging quizzes, detailed explanations, and effective study tips. Maximize your readiness and boost your confidence for exam day!

Practice this question and more.


What does the logical operator AND return?

  1. TRUE (1) if both values are FALSE (0)

  2. TRUE (1) if at least one value is TRUE (1)

  3. TRUE (1) only if both values are TRUE (1)

  4. TRUE (1) if values are different

The correct answer is: TRUE (1) only if both values are TRUE (1)

The logical operator AND is fundamentally defined to return TRUE (1) only when both operands or values being evaluated are TRUE (1). This means that for any expression connected by an AND operator, if either or both of the values are FALSE (0), the entire expression evaluates to FALSE (0). This property makes AND particularly useful in situations where a certain condition needs to be met simultaneously by more than one criterion. For example, consider a scenario where two conditions must be true for a specific operation to proceed or to yield a positive result. If both conditions are met, the AND operator will yield TRUE (1). If either one or both conditions are FALSE, the result will be FALSE (0), adhering to the strict requirement that both conditions need to be satisfied. The other options demonstrate misunderstandings regarding the behavior of the AND operator, as they suggest that it returns TRUE under incorrect logical circumstances. This strengthens the understanding that AND is a strict operator requiring both inputs to be TRUE.