<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - answers and comments on Question, computation of boolean operations</title>
    <link>http://www.mapleprimes.com/questions/96140-Computation-Of-Boolean-Operations</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Wed, 10 Jun 2026 20:49:51 GMT</lastBuildDate>
    <pubDate>Wed, 10 Jun 2026 20:49:51 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest answers and comments added to the Question, computation of boolean operations</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - answers and comments on Question, computation of boolean operations</title>
      <link>http://www.mapleprimes.com/questions/96140-Computation-Of-Boolean-Operations</link>
    </image>
    <item>
      <title>It is doubtful</title>
      <link>http://www.mapleprimes.com/questions/96140-Computation-Of-Boolean-Operations?ref=Feed:MaplePrimes:computation of boolean operations:Comments#answer96143</link>
      <itunes:summary>&lt;p&gt;I have doubts of this. Here are three arguments:&lt;/p&gt;
&lt;p&gt;&amp;gt; with(Bits): Xor(a, b) assuming a::integer, b::integer;&lt;br&gt;Error, (in assuming) when calling 'Bits:-Xor'. Received: 'argument 1, the first number, &lt;br&gt;must be an integer'&lt;br&gt;&amp;gt; MmaTranslator:-Mma:-Xor[x, y];&lt;br&gt;Error, Xor is not a command in the MmaTranslator:-Mma package&lt;/p&gt;
&lt;p&gt;&amp;gt; MmaTranslator:-Mma:-BitXor(x, y);&lt;br&gt;Error, (in MmaTranslator:-Mma:-BitXor) Maple cannot handle the function BitXor with arguments (x, y)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Appendix. Having read the answer by John May, I&amp;nbsp; suggest the following procedure:&lt;/p&gt;
&lt;p&gt;&amp;gt; XOR := proc (a0, b0, a1, b1) with(Bits): Xor(a0*b1, a1*b0) end proc;&lt;br&gt;XOR:=proc(a0, b0, a1, b1)&amp;nbsp;with(Bits); Xor(a0*b1, a1*b0)&amp;nbsp;&amp;nbsp; end proc;&lt;br&gt;&amp;gt; XOR(1, 2, 32, 43);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 107&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;I have doubts of this. Here are three arguments:&lt;/p&gt;
&lt;p&gt;&amp;gt; with(Bits): Xor(a, b) assuming a::integer, b::integer;&lt;br&gt;Error, (in assuming) when calling 'Bits:-Xor'. Received: 'argument 1, the first number, &lt;br&gt;must be an integer'&lt;br&gt;&amp;gt; MmaTranslator:-Mma:-Xor[x, y];&lt;br&gt;Error, Xor is not a command in the MmaTranslator:-Mma package&lt;/p&gt;
&lt;p&gt;&amp;gt; MmaTranslator:-Mma:-BitXor(x, y);&lt;br&gt;Error, (in MmaTranslator:-Mma:-BitXor) Maple cannot handle the function BitXor with arguments (x, y)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Appendix. Having read the answer by John May, I&amp;nbsp; suggest the following procedure:&lt;/p&gt;
&lt;p&gt;&amp;gt; XOR := proc (a0, b0, a1, b1) with(Bits): Xor(a0*b1, a1*b0) end proc;&lt;br&gt;XOR:=proc(a0, b0, a1, b1)&amp;nbsp;with(Bits); Xor(a0*b1, a1*b0)&amp;nbsp;&amp;nbsp; end proc;&lt;br&gt;&amp;gt; XOR(1, 2, 32, 43);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 107&lt;/p&gt;</description>
      <guid>96143</guid>
      <pubDate>Fri, 20 Aug 2010 22:28:48 Z</pubDate>
      <itunes:author>hirnyk</itunes:author>
      <author>hirnyk</author>
    </item>
    <item>
      <title>The bitwise Xor in the ?Bits package will</title>
      <link>http://www.mapleprimes.com/questions/96140-Computation-Of-Boolean-Operations?ref=Feed:MaplePrimes:computation of boolean operations:Comments#answer96145</link>
      <itunes:summary>&lt;p&gt;The bitwise Xor in the &lt;a href='http://www.maplesoft.com/support/help/search.aspx?term=Bits' target='_new'&gt;?Bits&lt;/a&gt; package will complain if you don't give it integers.&amp;nbsp; One solution would be to use the neutral operator &amp;amp;xor and then do a substitution when you are ready to evaluate:&lt;/p&gt;
&lt;!--break--&gt;
&lt;pre&gt;(**) expr := (a1*b0) &amp;amp;xor (a0*b1);
#                           expr := a1 b0 &amp;amp;xor a0 b1

(**) expr2 := eval(expr, {a0=1,a1=32,b0=2,b1=43});
#                              expr2 := 64 &amp;amp;xor 43

(**) eval(expr2, `&amp;amp;xor` = Bits:-Xor);             
#                                      107
&lt;/pre&gt;
&lt;p&gt;This form has the advantage that it can be manipulated by the &lt;a href='http://www.maplesoft.com/support/help/search.aspx?term=Logic' target='_new'&gt;?Logic&lt;/a&gt; package as well (if that even makes sense for your application.&lt;/p&gt;
&lt;pre&gt;(**) Logic:-Normalize(expr);
#             (a0 b1 &amp;and; &amp;not;(a1 b0)) &amp;or; (a1 b0 &amp;and; &amp;not;(a0 b1))

&lt;/pre&gt;</itunes:summary>
      <description>&lt;p&gt;The bitwise Xor in the &lt;a href='http://www.maplesoft.com/support/help/search.aspx?term=Bits' target='_new'&gt;?Bits&lt;/a&gt; package will complain if you don't give it integers.&amp;nbsp; One solution would be to use the neutral operator &amp;amp;xor and then do a substitution when you are ready to evaluate:&lt;/p&gt;
&lt;!--break--&gt;
&lt;pre&gt;(**) expr := (a1*b0) &amp;amp;xor (a0*b1);
#                           expr := a1 b0 &amp;amp;xor a0 b1

(**) expr2 := eval(expr, {a0=1,a1=32,b0=2,b1=43});
#                              expr2 := 64 &amp;amp;xor 43

(**) eval(expr2, `&amp;amp;xor` = Bits:-Xor);             
#                                      107
&lt;/pre&gt;
&lt;p&gt;This form has the advantage that it can be manipulated by the &lt;a href='http://www.maplesoft.com/support/help/search.aspx?term=Logic' target='_new'&gt;?Logic&lt;/a&gt; package as well (if that even makes sense for your application.&lt;/p&gt;
&lt;pre&gt;(**) Logic:-Normalize(expr);
#             (a0 b1 &amp;and; &amp;not;(a1 b0)) &amp;or; (a1 b0 &amp;and; &amp;not;(a0 b1))

&lt;/pre&gt;</description>
      <guid>96145</guid>
      <pubDate>Fri, 20 Aug 2010 22:48:24 Z</pubDate>
      <itunes:author>John May</itunes:author>
      <author>John May</author>
    </item>
  </channel>
</rss>