ICT Revision Flashcards
(45 cards)
What is a Boolean variable?
A variable that can hold one of two values: true or false.
True or False: The AND operator returns true if both operands are true.
True
Fill in the blank: The result of A AND B is true only if both A and ___ are true.
B
What is the result of the expression true OR false?
true
True or False: The NOT operator inverts the value of a Boolean expression.
True
What is the symbol used for the AND operator in Boolean logic?
&&
What is the symbol used for the OR operator in Boolean logic?
||
True or False: In Boolean logic, true AND true equals false.
False
Fill in the blank: The expression A OR B is false only if both A and ___ are false.
B
What does the expression NOT false evaluate to?
true
What is the truth table for A AND B?
true, true -> true; true, false -> false; false, true -> false; false, false -> false
What is the truth table for A OR B?
true, true -> true; true, false -> true; false, true -> true; false, false -> false
True or False: The expression (A AND B) OR (NOT A) is always true.
False
What is the outcome of the expression NOT (A AND B) when A is true and B is false?
true
Fill in the blank: The logical expression A OR (B AND C) follows the rule of ___ precedence.
operator
What is the definition of a truth table?
A table that shows all possible values of a Boolean expression and their corresponding results.
What is the result of the expression (true AND false) OR (false AND true)?
false
True or False: The expression A OR A is equivalent to A.
True
What does the term ‘short-circuit evaluation’ refer to in Boolean logic?
The process of stopping the evaluation of a logical expression as soon as the result is determined.
Fill in the blank: In Boolean logic, the expression A AND (B OR C) is an example of ___ distribution.
distributive
What is the result of true AND (false OR true)?
true
True or False: The expression NOT (A OR B) is equivalent to NOT A AND NOT B.
True
What is the result of the expression (NOT A) AND (NOT B) when A is false and B is true?
false
What is the result of false OR false?
false