boolean logic Flashcards
(39 cards)
What is Boolean logic?
A form of algebra where all values are either true or false.
True or False: Boolean logic is used in computer programming.
True
What are the basic operations in Boolean logic?
AND, OR, NOT
Fill in the blank: The result of an AND operation is true if ______.
both operands are true
What does the OR operation do in Boolean logic?
It returns true if at least one operand is true.
True or False: In Boolean logic, NOT is a unary operator.
True
What is the output of A AND B if A is true and B is false?
false
What is the output of A OR B if A is false and B is false?
false
True or False: The NOT operator inverts the value of its operand.
True
What is the result of NOT true?
false
How many possible outcomes are there for a two-input AND operation?
Four
Fill in the blank: The expression A AND (B OR C) is an example of ______.
distributive law
What does the truth table for the AND operation look like?
true, true = true; true, false = false; false, true = false; false, false = false
Which operation is represented by the symbol ‘∧’?
AND
Which operation is represented by the symbol ‘∨’?
OR
What is De Morgan’s Theorem?
It states that NOT (A AND B) is equivalent to (NOT A) OR (NOT B) and NOT (A OR B) is equivalent to (NOT A) AND (NOT B).
True or False: A NAND operation is the opposite of an AND operation.
True
What is the output of A NAND B if both A and B are true?
false
What does the XOR operation do?
It returns true if exactly one operand is true.
True or False: The XOR operation is commutative.
True
What is the output of A XOR B if A is true and B is false?
true
Fill in the blank: The operation A NOR B is equivalent to NOT (A OR B) and is ______.
a logic gate
What is the output of A NOR B if both A and B are false?
true
What is an example of a real-world application of Boolean logic?
Search engines use Boolean logic to filter search results.