32 Bit Math
Does any one have any examples of how to do 32 bit math on a BS2SX...
We need the following functions:
+, -, >>, <<, ^, &
I am assuming that you would perform high order and low order
functions but the BS2 has no access to a "carry" register that I am
aware of. I greatly appreciate any suggestions that you might have.
If it helps the formula i need to implement (in C) is as follows.
n, z, y, sum, k all being 32 bit words.
while(n-->0)
{
z -= (y << 4 ^ y >> 5) + y ^ sum + k[noparse][[/noparse]sum>>11 & 3];
sum -= delta;
y -= (z << 4 ^ z >> 5) + z ^ sum + k[noparse][[/noparse]sum&3];
}
Thank you again
MH
We need the following functions:
+, -, >>, <<, ^, &
I am assuming that you would perform high order and low order
functions but the BS2 has no access to a "carry" register that I am
aware of. I greatly appreciate any suggestions that you might have.
If it helps the formula i need to implement (in C) is as follows.
n, z, y, sum, k all being 32 bit words.
while(n-->0)
{
z -= (y << 4 ^ y >> 5) + y ^ sum + k[noparse][[/noparse]sum>>11 & 3];
sum -= delta;
y -= (z << 4 ^ z >> 5) + z ^ sum + k[noparse][[/noparse]sum&3];
}
Thank you again
MH
Comments
MH
Original Message
From: "Tracy Allen" <emesys@c...>
To: <basicstamps@egroups.com>
Sent: Thursday, September 21, 2000 12:30 PM
Subject: [noparse][[/noparse]basicstamps] 32 Bit Math
> Maybe this will help:
>
> http://www.emesystems.com/bs2math6.htm
>
> -- Tracy Allen
> Electronically Monitored Ecosystems
> http://www.emesystems.com
>
>
>
> >Does any one have any examples of how to do 32 bit math on a BS2SX...
> >We need the following functions:
> >
> >+, -, >>, <<, ^, &
> >
> >I am assuming that you would perform high order and low order
> >functions but the BS2 has no access to a "carry" register that I am
> >aware of. I greatly appreciate any suggestions that you might have.
> >If it helps the formula i need to implement (in C) is as follows.
> >
> >n, z, y, sum, k all being 32 bit words.
> >
> >while(n-->0)
> > {
> > z -= (y << 4 ^ y >> 5) + y ^ sum + k[noparse][[/noparse]sum>>11 & 3];
> > sum -= delta;
> > y -= (z << 4 ^ z >> 5) + z ^ sum + k[noparse][[/noparse]sum&3];
> > }
> >
> >Thank you again
> >
> >MH
>
>
>
http://www.emesystems.com/bs2math6.htm
-- Tracy Allen
Electronically Monitored Ecosystems
http://www.emesystems.com
>Does any one have any examples of how to do 32 bit math on a BS2SX...
>We need the following functions:
>
>+, -, >>, <<, ^, &
>
>I am assuming that you would perform high order and low order
>functions but the BS2 has no access to a "carry" register that I am
>aware of. I greatly appreciate any suggestions that you might have.
>If it helps the formula i need to implement (in C) is as follows.
>
>n, z, y, sum, k all being 32 bit words.
>
>while(n-->0)
> {
> z -= (y << 4 ^ y >> 5) + y ^ sum + k[noparse][[/noparse]sum>>11 & 3];
> sum -= delta;
> y -= (z << 4 ^ z >> 5) + z ^ sum + k[noparse][[/noparse]sum&3];
> }
>
>Thank you again
>
>MH