我想说那是自学。
我们有两个整数。我想得到第三个元素,它等于两个整数之间的 XOR,但有约束。好的,让我举个例子更清楚。
int x is, let's say, is 10 `x = 10 //Binary 1010` and `int y = 9 //Binary 1001`
int t = x^y, where ^ is an operator that is defined as described below.
但是 in 的第一位x
应该与 的第二位进行异或y
并存储为第一位 in t
,第二位x
与 y 的第一位进行异或并存储在 t 的第二位中,依此类推。
结果应该是:
t = x^y = 1100
我希望你明白这个问题。如果没有,我会尽力澄清。