Boolean logic, named after mathematician George Boole, is a fundamental system of algebraic reasoning that deals with binary values: true (1) or false (0). It forms the basis for digital electronics, computer programming, and logical decision-making.
Key Concepts
– Basic Operators:
– AND (∧ or &&): Returns true only if both inputs are true. Example: A AND B is true if A is true and B is true.
– OR (∨ or ||): Returns true if at least one input is true. Example: A OR B is true if A is true, B is true, or both.
– NOT (¬ or !): Inverts the input. Example: NOT A is true if A is false.
– Other Common Operators: XOR (exclusive OR), which is true if exactly one input is true, and NAND/NOR for negated versions.
– Truth Tables: These are simple grids that show all possible input combinations and their outputs for a given operation. For AND:
| A | B | A AND B |
|——|——|———|
| True | True | True |
| True | False| False |
| False| True | False |
| False| False| False |
– Expressions and Simplification: Boolean expressions can be combined, such as (A AND B) OR C. Laws like De Morgan’s (NOT (A AND B) equals (NOT A) OR (NOT B)) help simplify complex logic.
Applications
Boolean logic is essential in:
– Computing: It underpins binary code, CPU operations, and algorithms.
– Digital Circuits: Used in logic gates for devices like microprocessors.
– Search Engines: Enables queries like “cats AND dogs” to filter results.
– Programming: Languages use it for conditional statements, e.g., if (x > 5 AND y < 10).
In summary, Boolean logic provides a structured way to evaluate and manipulate binary decisions, making it indispensable for modern technology.
Table of Contents
- Part 1: OnlineExamMaker AI Quiz Generator – Save Time and Efforts
- Part 2: 20 Boolean Logic Quiz Questions & Answers
- Part 3: OnlineExamMaker AI Question Generator: Generate Questions for Any Topic

Part 1: OnlineExamMaker AI Quiz Generator – Save Time and Efforts
Still spend a lot of time in editing questions for your next Boolean Logic assessment? OnlineExamMaker is an AI quiz maker that leverages artificial intelligence to help users create quizzes, tests, and assessments quickly and efficiently. You can start by inputting a topic or specific details into the OnlineExamMaker AI Question Generator, and the AI will generate a set of questions almost instantly. It also offers the option to include answer explanations, which can be short or detailed, helping learners understand their mistakes.
What you may like:
● Automatic grading and insightful reports. Real-time results and interactive feedback for quiz-takers.
● The exams are automatically graded with the results instantly, so that teachers can save time and effort in grading.
● LockDown Browser to restrict browser activity during quizzes to prevent students searching answers on search engines or other software.
● OnlineExamMaker API offers private access for developers to extract your exam data back into your system automatically.
Automatically generate questions using AI
Part 2: 20 Boolean Logic Quiz Questions & Answers
or
1. What is the output of the Boolean expression A AND B if A is true and B is false?
A) True
B) False
C) Undefined
D) True only if A is false
Answer: B) False
Explanation: The AND operator requires both inputs to be true for the output to be true. Here, A is true and B is false, so the result is false.
2. For the Boolean expression A OR B, what is the output if A is false and B is true?
A) True
B) False
C) Undefined
D) Depends on A
Answer: A) True
Explanation: The OR operator outputs true if at least one input is true. Since B is true, the result is true.
3. What is the result of NOT (A AND B) if A is true and B is true?
A) True
B) False
C) Undefined
D) True only if A is false
Answer: B) False
Explanation: A AND B is true (both are true), so NOT of true is false.
4. In Boolean logic, which of the following is equivalent to A XOR B?
A) (A AND B) OR (NOT A AND NOT B)
B) (A AND NOT B) OR (NOT A AND B)
C) A AND B
D) A OR B
Answer: B) (A AND NOT B) OR (NOT A AND B)
Explanation: XOR outputs true when exactly one input is true, which matches the expression (A AND NOT B) OR (NOT A AND B).
5. For the expression A NAND B, what is the output if A is false and B is false?
A) True
B) False
C) Undefined
D) True only if A is true
Answer: A) True
Explanation: NAND is the opposite of AND, so if A AND B is false, NAND outputs true.
6. What is the truth value of (A OR B) AND (NOT A) if A is true and B is false?
A) True
B) False
C) Undefined
D) True if B is true
Answer: B) False
Explanation: A OR B is true (A is true), but NOT A is false, so true AND false is false.
7. According to De Morgan’s law, what is the equivalent of NOT (A AND B)?
A) NOT A AND NOT B
B) NOT A OR NOT B
C) A OR B
D) A AND B
Answer: B) NOT A OR NOT B
Explanation: De Morgan’s law states that NOT (A AND B) is equivalent to (NOT A) OR (NOT B).
8. In a truth table for A NOR B, when is the output true?
A) When both A and B are true
B) When at least one is true
C) When both are false
D) When A is true and B is false
Answer: C) When both are false
Explanation: NOR outputs true only if both inputs are false, as it is the opposite of OR.
9. Simplify the Boolean expression A OR (A AND B).
A) A
B) B
C) A AND B
D) True
Answer: A) A
Explanation: By the absorption law, A OR (A AND B) simplifies to A.
10. What is the output of A XNOR B if A is true and B is true?
A) True
B) False
C) Undefined
D) Depends on A
Answer: A) True
Explanation: XNOR outputs true when both inputs are the same, so true XNOR true is true.
11. For the expression (A AND B) OR (A AND C), what law is applied if we factor it as A AND (B OR C)?
A) Distributive law
B) Commutative law
C) Associative law
D) Idempotent law
Answer: A) Distributive law
Explanation: The distributive law allows (A AND B) OR (A AND C) to be rewritten as A AND (B OR C).
12. If A is false, what is the value of A OR (NOT A)?
A) True
B) False
C) Undefined
D) True only if A is true
Answer: A) True
Explanation: This is the law of excluded middle; A OR (NOT A) is always true.
13. What is the result of NOT (A OR B) if A is false and B is false?
A) True
B) False
C) Undefined
D) True if A is true
Answer: A) True
Explanation: A OR B is false (both are false), so NOT false is true.
14. In Boolean algebra, which law states that A AND (B AND C) = (A AND B) AND C?
A) Associative law
B) Commutative law
C) Distributive law
D) Idempotent law
Answer: A) Associative law
Explanation: The associative law allows grouping of AND operations without changing the result.
15. For A = true and B = false, evaluate (NOT A) NAND B.
A) True
B) False
C) Undefined
D) True if B is true
Answer: B) False
Explanation: NOT A is false, so false NAND false is false (NAND of two falses is false).
16. What is the simplified form of A AND (A OR B)?
A) A
B) B
C) A OR B
D) True
Answer: A) A
Explanation: By the absorption law, A AND (A OR B) simplifies to A.
17. According to the commutative law, what is A OR B equivalent to?
A) B OR A
B) A AND B
C) NOT (A OR B)
D) A XOR B
Answer: A) B OR A
Explanation: The commutative law states that the order of operands in OR does not matter.
18. If A is true, what is the output of A XOR (NOT A)?
A) True
B) False
C) Undefined
D) True only if A is false
Answer: A) True
Explanation: NOT A is false, and true XOR false is true.
19. What is the Boolean expression for the NOR gate?
A) NOT (A OR B)
B) NOT (A AND B)
C) A AND B
D) A OR B
Answer: A) NOT (A OR B)
Explanation: A NOR gate outputs the negation of the OR operation.
20. Simplify (A AND NOT B) OR (NOT A AND B).
A) A XOR B
B) A XNOR B
C) A AND B
D) A OR B
Answer: A) A XOR B
Explanation: The expression (A AND NOT B) OR (NOT A AND B) is the definition of XOR.
or
Part 3: OnlineExamMaker AI Question Generator: Generate Questions for Any Topic
Automatically generate questions using AI