Please visit my new campsite listing site ukcampingmap.co.uk


logic 2.1

I have, as promised, found a better form for XOR:

  • XOR(x,y) = x + y -2xy

As I sit here chomping on a chicken wing, I can’t help but feel a touch of disappointment alongside the inevitable satisfaction at completing my mission. The previous solution – XOR(x.y) = (1-xy)(x + y) – was, I feel, more elegabt; the fact we were dealing with x/y symmetry, and that x and y could take only the values 1 and 0, seemed to almost leap out.

Talking of symmetry – I’ve just realised that I didn’t cover x => y, the only asymmetric elemental* logical operator.

So here, deduced by trial and error is the formula:

  • =>(x,y) = xy + 1 – x

I lied though. Because, of course, => is not as elemental as one would hope, so:

x => y <–> NOT (x AND NOT(y)) = NOT(x AND (1-y)) = NOT(x(1-y)) = 1-(x-xy) = xy +1 -x

Thus demonstrating the usefulness of being able to represent logical operators analytically.

No related posts.

Tags: , , ,

One Response to “logic 2.1”

  1. matthew says:

    I drew some of the graphs, and they all look like weird saddles.

    I like your X=>Y version. The case x=1, y=0 gives 0 as expected, but if you make x more true, with x=2, then x=>y gets more false, which is nice. And if you make y more false (y=-1), then x=>y gets more false too. I wonder if this works for the other ones.

Leave a Reply

Security Code: