View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Looking for BOOLEAN ALGEBRA functions (specifically XOR)

I wasn't saying to not use Harlan's formula... just noting his is returning
a number whereas the other posted formula returned TRUE/FALSE. If you used
in an expression, that difference wouldn't matter; but since all submissions
were shown as stand-alone formulas, I just figured I would note the
difference in what each returned. Besides, I wanted to give an opening to
Harlan to post back...

=MOD(A1+B1,2)=1

I think he likes being able to do that, so I thought I would be nice to him
and leave the door open for him to do that.<g Of course, now that I took
that opportunity away from him in my response to you, I'll have to give him
a different opening for a response to this thread. Let me see... I know... I
do wonder which is the more efficient construction... Harlan's formula which
uses a MOD function call, mine which uses two NOT function calls or Mike's
which uses two logical comparisons.

--
Rick (MVP - Excel)


"Herbert Seidenberg" wrote in message
...
An XOR could operate on any number of binary bits.
An odd parity checker would XOR all given bits,
thus checking for an odd number of bits in a word:
=MOD(1+MOD(HEX2BIN("AE")-1,9),2)
I vote for Harlan's formulas, having lifted them from
his post dated Jun 16, 2003.