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

📅  最后修改于: 2021-06-28 20:55:05             🧑  作者: Mango

令X表示异或(XOR)运算。令“ 1”和“ 0”表示二进制常量。考虑以下针对两个变量P和Q的F的布尔表达式:

F(P, Q) = ( ( 1 X P) X (P X Q) ) X ( (P X Q) X (Q X 0) ) 

F的等效表达式为
(A) P + Q
(B) (P + Q)’
(C) PXQ
(D) (PXQ)’答案: (D)
解释:
我们需要简化上面的表达式。由于给定的运算是XOR,因此我们将看到XOR的属性。

令A和B为布尔变量。

在A XOR B中,如果两个位/输入都不同,则结果为1,否则为0。

现在,

( ( 1 X P) X (P X Q) ) X ( (P X Q) X (Q X 0) )

( P' X P X Q ) X ( P X Q X Q ) ( as 1 X P = P' and Q X 0 = Q )

(1 X Q) X ( P X 0) ( as P' X P = 1 , and Q X Q = 0 )

Q' X P ( as 1 X Q = Q' and P X 0 = P )

PQ + P'Q' ( XOR Expansion, A X B = AB' + A'B )

This is the final simplified expression.

Now we need to check for the options.

If we simplify option D expression.

( P X Q )' = ( PQ' + P'Q )' ( XOR Expansion, A X B = AB' + A'B )

((PQ')'.(P'Q)') ( De Morgan's law )

( P'+ Q).(P + Q') ( De Morgan's law )

P'P + PQ + P'Q' + QQ'

PQ + P'Q' ( as PP' = 0 and QQ' = 0 ) 

Hence both the equations are same. Therefore Option D. 

这个问题的测验