Boolean logic & truth tables
OCR GCSE Computer Science revision on Boolean logic & truth tables. Aligned to the OCR GCSE Computer Science J277 specification. This bank has 46 practice questions on this topic.
Sample questions (3 of 46)
-
Question 1
In Boolean logic, what does A AND B equal when A = 1 and B = 0?
Show answer
Answer: 0
AND truth table: 0 AND 0 = 0, 0 AND 1 = 0, 1 AND 0 = 0, 1 AND 1 = 1. ONLY when both inputs are 1 does the output go to 1. Think 'must satisfy both conditions'.
-
Question 2
What is the result of NOT(0 OR 1)?
Show answer
Answer: 0
Work the brackets first: 0 OR 1 = 1 (OR is 1 if at least one input is 1). Then NOT inverts: NOT 1 = 0. Result: 0. Brackets always come first in Boolean expressions, like BIDMAS for arithmetic.
-
Question 3
OR is 1 (true) when...
- A) Both inputs are 1
- B) Both inputs are 0
- C) At least one input is 1
- D) Inputs are different
Show answer
Answer: At least one input is 1
OR truth table: 0 OR 0 = 0, 0 OR 1 = 1, 1 OR 0 = 1, 1 OR 1 = 1. Three out of four cases give 1. Real-world: 'do I take an umbrella if it's raining OR cloudy?' — yes if either condition true.
Want to test yourself on the remaining cards for this topic?
43 more questions on Boolean logic & truth tables — plus mistakes tracking and spaced repetition across the whole Computer Science spec.