176k views
1 vote
Consider the following Boolean expressions.

A && B
!A && !B
Which of the following best describes the relationship between values produced by expression I and expression II?
(A) Expression I and expression II evaluate to different values for all values of A and B.
(B) Expression and expression II evaluate to the same value for all values of A and B.
(C) Expression and expression II evaluate to the same value only when A and B are the same.
(D) Expression and expression Il evaluate to the same value only when A and B differ.
(E) Expression I and expression Il evaluate to the same value whenever A is true.

1 Answer

3 votes

Answer:

(D) Expression I and expression Il evaluate to the same value only when A and B differ.

Step-by-step explanation:

Given


A\ \&\&\ B


!A\ \&\&\ !B

Required

Select the true statement

To do this, I will create the following case scenarios.

(a):
A = true and
B = true


A\ \&\&\ B


true\ \&\&\ true \to true i.e. true and true is true


!A\ \&\&\ !B


!true\ \&\&\ !true

------------------------------------------------------


!true = false

------------------------------------------------------

So, we have:


false\ \&\&\ false \to false

So:


A =true and
B = true


A\ \&\&\ B = true


!A\ \&\&\ !B = false

Hence, options (B) and (E) are incorrect

(b):
A = true and
B = false


A\ \&\&\ B


true\ \&\&\ false \to false


!A\ \&\&\ !B


!true\ \&\&\ !false

Solve each negation


false\ \&\&\ true \to false

So:


A =true and
B = false


A\ \&\&\ B = false


!A\ \&\&\ !B = false

Hence, option (c) is incorrect

(c):
A = false and
B = true


A\ \&\&\ B


false\ \&\&\ true \to false


!A\ \&\&\ !B


!false\ \&\&\ !true


truee\ \&\&\ false \to false

So:


A =false and
B = true


A\ \&\&\ B = false


!A\ \&\&\ !B = false

Case scenarios b and c implies that option (d) is correct because different values of A and B gives the same value of both expression which is false

This also implies that (a) is incorrect.

User Sumit Kumar Gupta
by
4.2k points