| ??? 07/23/02 05:58 Read: times |
#26145 - RE: Conversion from ASCII to floating point |
Lance, I've found the 1 u've sent to this forum b4. It looks like this:
f = factor Adding... A = 4.25 + 1.5 A = 425(f100) + 150(f100) A = 675(f100) A = 6.75 Multiplying... X = 4.25 * 1.5 X = 425(f100) * 15(f10) X = 425*15 (f100)*(f10) X = 6375 (f1000) X = 6.375 Dividing... Y = 4.05 / 1.5 Y = 405(f100) / 15(f10) Y = 405/15 (f100)/(f10) Y = 17 (f10) Y = 1.7 My question is how do you force the 8051 to do arithmetic in decimal? Do I need to convert these numbers into hex first? If so, does it affect my dot or floating point location? Is it possible to 'force' the 8051 to do decimal calculations? Any suggestions? |



