Kap*_*pil 5 language-agnostic bit-manipulation bitwise-operators
我计算
c = a 'OR' b // bitwise OR operation here
现在仅给出值c以及b如何计算原始值a?
c
b
a
Cam*_*ium 22
这是不可能的.
一个简单的例子来证明我的观点(假设a,b和c都是1位):
如果'b'为1,'c'将始终为1,则无法确定'a'的值.
joe*_*ice 5
你无法可靠地回去。例如,a = 0010 且 b = 0011。a OR b = 0011。如果 a 不同(例如 0001 或 0011),则结果相同。
归档时间:
16 年,5 月 前
查看次数:
4565 次
最近记录:
15 年,8 月 前