Prepare for the A Level Computer Science OCR Exam with engaging quiz questions and interactive flashcards. Get ready to excel in your exam with comprehensive study materials designed to bolster your knowledge and confidence.

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


In logical operations, what does OR return?

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

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

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

  4. TRUE (0) if both values are different

The correct answer is: TRUE (1) if at least one value is TRUE (1)

In logical operations, the OR operator is designed to return TRUE (or 1) if at least one of the operands is TRUE (or 1). This means that if either operand is TRUE, the result of the OR operation will be TRUE. The key aspect of the OR operation is its inclusivity; if both values are TRUE, the result is still TRUE, and if only one value is TRUE, the operation also yields TRUE. It is important to note that if both values are FALSE (or 0), only then does the OR operation return FALSE. This characteristic of the OR operation makes it a fundamental tool in logical reasoning and decision-making processes in computer science, as it allows for flexibility in conditions and is frequently employed in programming and algorithms to evaluate multiple possibilities.