📜  门| GATE-CS-2015(Set 3)|第65章

📅  最后修改于: 2021-07-02 16:19:25             🧑  作者: Mango

令#为定义为X#Y = X’+ Y’的二进制运算符,其中X和Y是布尔变量。考虑以下两个语句。

S1: (P # Q) # R = P # (Q # R)
S2: Q # R = R # Q 

对于布尔变量P,Q和R,以下哪一项是正确的?

(A)只有S1为真
(B)只有S2为真
(C) S1和S2均为True
(D) S1和S2都不为真答案: (B)
解释:

S2 is true, as X' + Y' = Y' + X'
S1 is false.
Let P = 1, Q = 1, R = 0, we get different results
(P # Q) # R = (P' + Q')' + R' = (0 + 0)' + 1 = 1 + 1 = 1
P # (Q # R) = P' + (Q' + R')' = 0 + (0 + 1)' = 0 + 0 = 0
Quiz of this Question