[H-GEN] Mysql & bitwise xor

Anthony Towns aj at azure.humbug.org.au
Tue Nov 18 01:05:27 EST 2003


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

On Tue, Nov 18, 2003 at 10:57:16AM +1000, Greg Black wrote:
> On 2003-11-18, Raymond Smith wrote:
> > 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))'?
> It was a pedagogical answer, not a solution on a plate.

FWIW, my reaction was the same as Ray's.

The phrase "Have you tried ..." in response to a computer question
traditionally profers a solution that is believed to be correct, but
(usually) hasn't been proven to be correct.

Cheers,
aj

-- 
Anthony Towns <aj at humbug.org.au> <http://azure.humbug.org.au/~aj/>
I don't speak for anyone save myself. GPG signed mail preferred.

Australian DMCA (the Digital Agenda Amendments) Under Review!
	-- http://azure.humbug.org.au/~aj/blog/copyright/digitalagenda


--
* 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