In a 64 bit number How to XOR Higher order 32 bits with lower order 32 bits. Thank you
(v & 0xffffffff) ^ ((v >> 32) & 0xffffffff)
Just for kicks, here's another solution. The one given already is probably the way to go.
uint32_t* number32;
uint64_t number64 = 0xffff1111ffffffff;
uint32_t xorValue;
number32 = (uint32_t*)&number64;
xorValue = number32[0]^number32[1];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With