Boolean logic and truth tables quiz
Test AND, OR, NOT, XOR, NAND, NOR, and combined Boolean expressions using clearly defined inputs.
syllabus — topic scope & references
- Evaluate common logic gates
- Calculate the size of a truth table
- Trace Boolean expressions with parentheses
Cambridge IGCSE 0478 (2026–2028): 10 Boolean logic.
IB Computer Science (first assessment 2027): A.1 Computer fundamentals.
Original practice on shared foundations. Topic-area links do not imply complete syllabus or SL/HL coverage. Not affiliated with or endorsed by Cambridge or the IB.
Related: Binary and hexadecimal · Programming fundamentals
review — read all questions & worked answers
Boolean logic and truth tables: questions, answers & explanations
This is the readable reference for the same 10 MCQs. Close this file to continue your quiz, or type quiz to start again.
1. If A = 1 and B = 0, what is A AND B?
- a) 0
- b) 1
- c) It cannot be determined
Answer: a) 0
AND returns 1 only when both inputs are 1. Here B is 0, so the result is 0.
2. If A = 1 and B = 0, what is A OR B?
- a) 0
- b) 1
- c) 10
Answer: b) 1
Inclusive OR returns 1 when at least one input is 1. A is 1, so the result is 1.
3. What is NOT 0?
- a) 0
- b) Undefined
- c) 1
Answer: c) 1
NOT reverses a Boolean input. It turns 0 into 1 and 1 into 0.
4. Which input pair makes a two-input XOR gate return 1?
- a) A = 1, B = 1
- b) A = 0, B = 1
- c) A = 0, B = 0
Answer: b) A = 0, B = 1
XOR returns 1 when the inputs differ. It returns 0 when they are the same.
5. For which inputs does a two-input NAND gate return 0?
- a) A = 1, B = 1
- b) A = 0, B = 0
- c) A = 1, B = 0
Answer: a) A = 1, B = 1
NAND means NOT AND. AND is 1 only for two 1 inputs; negating that produces NAND's only 0 result.
6. If A = 0 and B = 0, what is A NOR B?
- a) 0
- b) Undefined
- c) 1
Answer: c) 1
OR returns 0 for two 0 inputs. NOR negates that result, producing 1.
7. How many rows are needed to list every combination of two Boolean inputs?
- a) 2
- b) 4
- c) 8
Answer: b) 4
Each input has two possibilities. There are 2 × 2 = 4 combinations: 00, 01, 10, 11.
8. How many input combinations are there for three Boolean inputs?
- a) 8
- b) 6
- c) 3
Answer: a) 8
There are 2³ = 8 combinations. Each extra Boolean input doubles the number of rows.
9. A = 0, B = 1, C = 1. What is (A OR B) AND (NOT C)?
- a) 1
- b) It depends on evaluation order
- c) 0
Answer: c) 0
A OR B is 1. NOT C is 0. The final operation is 1 AND 0, which gives 0.
10. Which expression is true whenever A and B differ?
- a) A AND B
- b) A XOR B
- c) A NOR B
Answer: b) A XOR B
Exclusive OR detects unequal Boolean inputs: 01 and 10 both produce 1.
↑ ↓ recall commands · Tab autocomplete · Enter run
