Skip to content
Michelle’s Computer
Terminal

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

BOOLEAN LOGIC AND TRUTH TABLES QUIZ
10 questions. Type a, b, or c, then Enter. Explanations follow each answer.
Type review for all worked answers; quiz to restart; topics to switch.
 
Question 1/10: If A = 1 and B = 0, what is A AND B?
a) 0
b) 1
c) It cannot be determined
Type answer a, answer b, or answer c. (A single letter works too.)
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?

  1. a) 0
  2. b) 1
  3. 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?

  1. a) 0
  2. b) 1
  3. 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?

  1. a) 0
  2. b) Undefined
  3. 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?

  1. a) A = 1, B = 1
  2. b) A = 0, B = 1
  3. 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?

  1. a) A = 1, B = 1
  2. b) A = 0, B = 0
  3. 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?

  1. a) 0
  2. b) Undefined
  3. 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?

  1. a) 2
  2. b) 4
  3. 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?

  1. a) 8
  2. b) 6
  3. 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)?

  1. a) 1
  2. b) It depends on evaluation order
  3. 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?

  1. a) A AND B
  2. b) A XOR B
  3. 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