Quote Originally Posted by circuitpro View Post
Z= (X XOR Y)
The ports are different, but this returns all 1's.
XOR is a "Logical operator", same as (^^).

To find the "bitwise" difference, you'll need the "bitwise" operator (^).
Just like in your previous statements ...

X=X^%11111111

Y=Y^%11111111