Re: Binary math operations (and, or, etc.)
Re: Binary math operations (and, or, etc.)
- Subject: Re: Binary math operations (and, or, etc.)
- From: deivy petrescu <email@hidden>
- Date: Wed, 8 Jun 2005 15:12:53 -0400
On Jun 8, 2005, at 11:01, Stephen Jonke wrote:
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.
deivy petrescu
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden