I wonder how I can find an example when ~n1 + ~n2==~(n1+n2) is true on signed integers. Normally the value of this expression is 0 but is it always? Is there a simple way to find a solution without running a code with loop that tests on range of numbers?
lets define u2 as casted unsigned number of n2, same with u1 of n1
is this (int) (u1-u2) always equal to expression -(n2-n1)? Int before (u1-u2) means that substraction is done and the result is casted to a signed integer.
and what this means?
(n>>24) | ((n<<8) & 0x00FF0000)?
Thanks for any input!