boolean logic Flashcards
(25 cards)
What is Boolean logic?
A form of algebra that uses truth values (true and false) to perform logical operations.
True or False: Boolean logic only deals with binary values.
True
Fill in the blank: In Boolean logic, the operator ‘AND’ is represented by the symbol ____.
&&
What is the result of the expression true AND false?
false
Which of the following is a valid Boolean expression? A) true + false B) true AND false C) true && false
C) true && false
True or False: The OR operator returns true if at least one operand is true.
True
Fill in the blank: The operator ‘OR’ is commonly represented by the symbol ____.
||
What is the result of the expression false OR true?
true
What is the output of NOT true?
false
True or False: The expression (true AND false) OR (false AND true) evaluates to true.
False
What is the result of the expression true AND (false OR true)?
true
Identify the logical operation: A || B.
Logical OR
What is De Morgan’s theorem in Boolean logic?
It states that the negation of a conjunction is the disjunction of the negations, and vice versa.
True or False: (NOT A) AND (NOT B) is equivalent to NOT (A OR B).
True
What is the precedence order of operations in Boolean logic?
NOT has the highest precedence, followed by AND, then OR.
Fill in the blank: The logical operation that returns true only when both operands are false is called ____.
NAND
What is the complementary operation of AND?
NAND
Which of the following is a tautology? A) A AND NOT A B) A OR NOT A C) A AND B
B) A OR NOT A
True or False: A XOR B evaluates to true when both A and B are the same.
False
What does the XOR operator represent?
Exclusive OR, true if exactly one operand is true.
Fill in the blank: The truth table for A AND B has ____ rows.
4
What is the truth value of the expression A OR B when A is false and B is true?
true
True or False: The expression A AND (B OR C) is equivalent to (A AND B) OR (A AND C).
True
What is the term for a logical statement that is always true?
Tautology