Question 1
1 marka and b are Boolean variables. a is True and b is False.
Which one of the following expressions evaluates to True?
Choose your answer.
- a AND b
- NOT a
- NOT (a OR b)
- a AND (NOT b)
Model answer
a AND (NOT b)
Explanation
NOT b is True because b is False, and a is True, so a AND (NOT b) is True AND True, which is True. a AND b is False because b is False, NOT a is False, and a OR b is True, so NOT (a OR b) is False.
Mark scheme
-
1 mark
a AND (NOT b)
If more than one option is given, 0 marks. Mark is for AO2 (apply).