<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Is there a function for a NAND logical operator? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Is-there-a-function-for-a-NAND-logical-operator/m-p/279341#M54147</link>
    <description>&lt;P&gt;I just realized this a dumb question, and put a not() around my and statement.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Jul 2020 23:06:11 GMT</pubDate>
    <dc:creator>dguan</dc:creator>
    <dc:date>2020-07-15T23:06:11Z</dc:date>
    <item>
      <title>Is there a function for a NAND logical operator?</title>
      <link>https://community.jmp.com/t5/Discussions/Is-there-a-function-for-a-NAND-logical-operator/m-p/279338#M54146</link>
      <description>&lt;P&gt;I'm trying to make a simple formula with a NAND operator in a script. Is there a quick way to do it or do I need to chain together a bunch of NOT and AND operators to combine into one?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 23:32:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Is-there-a-function-for-a-NAND-logical-operator/m-p/279338#M54146</guid>
      <dc:creator>dguan</dc:creator>
      <dc:date>2023-06-09T23:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a function for a NAND logical operator?</title>
      <link>https://community.jmp.com/t5/Discussions/Is-there-a-function-for-a-NAND-logical-operator/m-p/279341#M54147</link>
      <description>&lt;P&gt;I just realized this a dumb question, and put a not() around my and statement.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 23:06:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Is-there-a-function-for-a-NAND-logical-operator/m-p/279341#M54147</guid>
      <dc:creator>dguan</dc:creator>
      <dc:date>2020-07-15T23:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a function for a NAND logical operator?</title>
      <link>https://community.jmp.com/t5/Discussions/Is-there-a-function-for-a-NAND-logical-operator/m-p/279423#M54164</link>
      <description>&lt;P&gt;JMP has &lt;STRONG&gt;and&lt;/STRONG&gt;() and &lt;STRONG&gt;all&lt;/STRONG&gt;() functions that are roughly equivalent, and &lt;STRONG&gt;or&lt;/STRONG&gt;() and &lt;STRONG&gt;any&lt;/STRONG&gt;() functions that are roughly equivalent. writing &lt;EM&gt;and(a,b,c)&lt;/EM&gt; is the same as &lt;EM&gt;a &amp;amp; b &amp;amp; c&lt;/EM&gt; . There is also a &lt;STRONG&gt;not()&lt;/STRONG&gt; function that is the same as ! .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// definitions from wikipedia...

// NAND: a Boolean operator which gives the value zero if and only if 
// all the operands have a value of one, and otherwise has a value of 
// one (equivalent to NOT AND).

Show( !And( 1, 1, 1, 1, 0, 1, 1, 1 ) ); // 1
Show( Not( And( 1, 1, 1, 1, 1, 1, 1, 1 ) ) ); // 0
Show( !(1 &amp;amp; 1 &amp;amp; 1) ); // 0

// ALL() and AND() are similar, as are ANY() and OR()
Show( All( [1 1 1] ) ); // 1
Show( All( [1 0 1] ) ); // 0

Show( Any( [0 1 0] ) ); // 1
Show( Any( [0 0 0] ) ); // 0


// XOR: XOR gate (sometimes EOR, or EXOR and pronounced as 
// Exclusive OR) is a digital logic gate that gives a true 
// (1 or HIGH) output when the number of true inputs is odd.
//
// this one needs to promise only 1s and 0s for inputs
// because it is adding up the 1s to count them.

Show( Mod( Sum( 0, 0, 0, 0, 0, 0 ), 2 ) ); // 0
Show( Mod( Sum( 1, 1, 1, 1, 1, 1 ), 2 ) ); // 0
Show( Mod( Sum( 1, 1, 1, 0, 1, 1 ), 2 ) ); // 1
Show( Mod( Sum( 1, 1, 1, 1, 1, 1, 1 ), 2 ) ); // 1
Show( Mod( Sum( 1, 1, 1 ), 2 ) ); // 1
Show( Mod( Sum( 1, 0, 1 ), 2 ) ); // 0
Show( Mod( Sum( 0, 0 ), 2 ) ); // 0
Show( Mod( Sum( 0, 1 ), 2 ) ); // 1
Show( Mod( Sum( 1, 0 ), 2 ) ); // 1
Show( Mod( Sum( 1, 1 ), 2 ) ); // 0&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 11:55:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Is-there-a-function-for-a-NAND-logical-operator/m-p/279423#M54164</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2020-07-16T11:55:43Z</dc:date>
    </item>
  </channel>
</rss>

