When I try either of these scripts, the following inputs produce
the "No can do!" dialog:
andorxorit(3670288, 1048576) -> toand should be 1048576
andorxorit(3010440, 1048576) -> toand should be 0
What I'm trying to do is see if a certain bit or bits is set.
Steve
Steve, you have to convert 3670288 to binary base before performing
binary operations.
Look for my matematica libraries here <http://www.dicas.com/MacOs/
script_download.html>
The modulus you want is 1. It converts numbers from bases 2 through
16 to 10 and vice versa.
So you will need three scripts.
And by what I see you are doing, use Nigel's version, it will work
for you, whereas mine will not.