Boolean Logic Flashcards
(26 cards)
What is Boolean logic?
A form of algebra that uses true or false values.
True or False: Boolean logic only uses two values.
True
What are the two basic values in Boolean logic?
True and False
Fill in the blank: The three basic operations of Boolean logic are AND, OR, and ____.
NOT
What does the AND operation do in Boolean logic?
It returns true only if both operands are true.
True or False: The OR operation returns true if at least one operand is true.
True
What is the result of A AND B if A is true and B is false?
False
What is the result of A OR B if A is false and B is true?
True
Fill in the blank: The NOT operation inverts the value of ____.
A boolean value
What is the result of NOT A if A is true?
False
In Boolean logic, what does the expression A AND B OR C mean?
It means A AND B must be true, or C can be true.
True or False: The expression A OR B AND C is evaluated the same as A AND B OR C.
False
What is the precedence order of operations in Boolean logic?
NOT, AND, OR
Multiple Choice: Which of the following expressions is equivalent to NOT (A AND B)? A) A OR B, B) NOT A OR NOT B, C) A AND NOT B
B) NOT A OR NOT B
Fill in the blank: A truth table shows all possible combinations of ____ for a set of variables.
True or false values
How many rows are in a truth table for two variables?
Four
True or False: In a truth table, each row represents a unique combination of input values.
True
What does the truth table for A AND B look like when both A and B are true?
True
What does the truth table for A OR B look like when both A and B are false?
False
Fill in the blank: The expression A AND (B OR C) is an example of ____.
Nested operations
What is a common application of Boolean logic in computer science?
Decision making in algorithms
True or False: Boolean logic is only applicable in programming.
False
What logical operation is represented by the symbol ‘&&’?
AND
What logical operation is represented by the symbol ‘||’?
OR