Multiplying by a fraction
Newzed
Posts: 2,503
Here is a little program that will let you multiply a number by an integer,
like 35, or by a fractional number, like 24.73.
Integer:· 24 x 66
Stamp says enter number - you enter 24
Stamp says I(nteger) or F(ractional) -· you enter I or i
Stamp says enter multiplier - you enter 66
Result appears on debug screen
Fractional:· 127 x 24.73
Stamp says enter number - you enter 127
Stamp says I(nteger) or F(ractional) - you enter F or f
Stamp says integral of fraction - you enter 24
Stamp says decimal of fraction - you enter 73
Stamp says HEX multiplier is 18BB
Stamp says enter HEX multiplier - you enter 18BB or 18bb
Result appears on debug screen.
I have attached the program in case anyone wants to try it.· Program is a .bse but directive is for BS2.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
4 digit serial LED
http://hometown.aol.com/newzed/index.html
like 35, or by a fractional number, like 24.73.
Integer:· 24 x 66
Stamp says enter number - you enter 24
Stamp says I(nteger) or F(ractional) -· you enter I or i
Stamp says enter multiplier - you enter 66
Result appears on debug screen
Fractional:· 127 x 24.73
Stamp says enter number - you enter 127
Stamp says I(nteger) or F(ractional) - you enter F or f
Stamp says integral of fraction - you enter 24
Stamp says decimal of fraction - you enter 73
Stamp says HEX multiplier is 18BB
Stamp says enter HEX multiplier - you enter 18BB or 18bb
Result appears on debug screen.
I have attached the program in case anyone wants to try it.· Program is a .bse but directive is for BS2.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
4 digit serial LED
http://hometown.aol.com/newzed/index.html
bse
2K