[H-GEN] Mysql & bitwise xor
Raymond Smith
raymond at humbug.org.au
Mon Nov 17 21:06:21 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-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.
I see.
> Somehow, I thought I had conveyed all of the above in my one
> line response :-)
I missed it: I was left with the incredible notion that you did
not understand Boolean Algebra. I therefore fell back on the
credible notion that I had gone mad and could no longer understood
Boolean Algebra :-)
> And, by intent, I have still not stated just what is the answer
> to the original question.
I'm not a great fan of this style of teaching. With it, one walks
a fine line between being an enigmatic master, and being a means of
transporting an enigmatic master :-)
To the original poster: if you have 'and', 'or', and 'not' you
can usually do everything you need. A quick search on Google for
'intro boolean logic' should bring up useful starting resources.
When starting out, Truth Tables are your friend.
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