[H-GEN] Mysql & bitwise xor

Raymond Smith raymond at humbug.org.au
Mon Nov 17 18:35:08 EST 2003


[ Humbug *General* list - semi-serious discussions about Humbug and     ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]

Greg Black said:
> On 2003-11-17, Paul Clarke wrote:
>> So, the next question is what is the logic needed to do an xor using
>> only &, |, and ~ (and, or, and not)?
>
> Have you tried substituting X | ~Y for X ^ Y?

Should that not be '(X & ~Y) | (~X & Y)' or '~((X&Y) | (~X&~Y))'?
Or is this some sort of limitation with these SQL operators?

Cheers,

Raymond
-- 
raymond at humbug.org.au



--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.  See http://www.humbug.org.au/



More information about the General mailing list