Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
p xor q === [something very long]

Hell's teeth! You weren't kidding.

I remember xor as (p and not q) or (q and not p) and it's been something like 30 years since I played with nand and nor expansions, so I expanded that:

xor === (p and not q) or (q and not p) expand the 'not's === (p and (q nor q)) or (q and (p nor p)) expand the 'and's === ((p nor p) nor ((q nor q) nor (q nor q))) or ((q nor q) nor ((p nor p) nor (p nor p))) expand the 'or's === (((p nor p) nor ((q nor q) nor (q nor q))) nor ((q nor q) nor ((p nor p) nor (p nor p)))) nor (((q nor q) nor ((p nor p) nor (p nor p))) nor ((p nor p) nor ((q nor q) nor (q nor q))))

Then it struck me that ((x nor x) nor (x nor x)) is x, which reduces it to

=== (((p nor p) nor q) nor ((q nor q) nor p)) nor (((q nor q) nor p) nor ((p nor p) nor q))

It's certainly more digestable (just :), but are there any other reductions in there?

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.

In reply to Re^3: Bit operations for beginners by BrowserUk
in thread Bit operations for beginners by Cine

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others studying the Monastery: (4)
    As of 2017-10-17 04:48 GMT
    Find Nodes?
      Voting Booth?
      My fridge is mostly full of:

      Results (218 votes). Check out past polls.