bitwise XOR calc

L

Luke

I need to calculate the XOR of three values in excel.

Say...

A1 = A0
A2 = F4

The conversion to bin =
A1 = 10100000
A2 = 11110100

I have found on the web that...
=SUMPRODUCT(MOD(MOD(INT(A1/Bits),2)+MOD(INT
(A2/Bits),2),2),Bits) - along with putting...
=2^(8-ROW(INDIRECT("1:8"))) in the define name
Insert/Name/Define - should give me the result...

A3 = 1010100

but it doesn't.

Any advise would be helpful (I'm not much in to VBA, so if
that's the soulition, then the whole code would be
appreciated.)

Thanks in advance.

Luke
 
F

Frank Kabel

Hi
IIRC this formula slution was posted by Harlan Grove. It
expects the values as decimals. So you may first convert
your hex values to decimlas (e.g. use HEX2DEC from the
Analysis Toolpak ddin for this). After this conversion try
the formula again
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top