سؤال

I have the following expression to calculate a parity bit:

AB0E XOR 73C9 XOR D46A XOR 06E3

How would this be evaluated? Is it:

(((AB0E XOR 73C9) XOR D46A) XOR 06E3)

or is it:

(AB0E XOR (73C9 XOR (D46A XOR 06E3)))

هل كانت مفيدة؟

المحلول

There is no difference; XOR is associative.

نصائح أخرى

Since expressions have the same level or priority, so precedence will be left to right

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top