Multiply High?
I have been looking and looking, but I can't find much info on the Multiply High command, **.· I need to take the number 0.351 (or at least 0.35) and multiply it by a variable, ENCODE.· I believe the ** operater is the only way to de this.· Could someone demonstrait using it, or point me somewhere that has a good explanation.
Thanks
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NerdMaster
For
Life
Thanks
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NerdMaster
For
Life
Comments
Like Mike says, first convert 0.351 to a binary fraction, 351/1000 = factor/65536.
factor = 65536* 351/1000 = 23003 ' solved on a calculator
then in pbasic...
result = 23003 ** encode ' same as 0.351 * encode
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Thanks Again
crgwbr
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NerdMaster
For
Life
You may find this to be an exceptionally good source of information for advanced math application in the PBASIC Stamp including the ** and */ operators:
http://www.emesystems.com/BS2index.htm#math
Thanks go to Dr. Tracy Allen, the author of that web site, and Stamp Math Guru!
Regards,
Bruce Bates