Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I have a set of numbers $\{a_{1}, a_{2}, a_{3} , a_{4},....a_{n} \}$ where $1\leq n \leq 10^{5}$.

Now the sum of the interval $[1,4]= a_{1}+a_{2}+a_{3}+a_{4} = S$,
then i do this operation $a_2$ XOR $B$ , $a_3$ XOR $B$ , here B is an integer between 0 to 10^9.
and XOR means Bitwise XOR

Now what will be the value of $S$ ?? Any mathematical formula ?

share|improve this question
What is $B$? do you mean $S$? presumably the XOR is bitwise. –  Ross Millikan Nov 11 '12 at 17:42
text is fixed now. –  Ahmad Faiyaz Nov 11 '12 at 17:46
The value of $S$ does not change. It is still $a_1+a_2+a_3+a_4$, even if you use the numbers $a_i$ to compute something. Anyhow, assuming that by XOR you mean writing the numbers in binary and xor-ing the bits, then converting the result back to numbers, there is no easy way to express that in ordinary arithmetic. But I don't know if that is what you mean. Your question is too ill posed to even criticise; I made several false starts, then gave up. Maybe someone else here can make sense of it. –  Harald Hanche-Olsen Nov 11 '12 at 17:46
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.