# TITLE: Convert Number to Decimal # AUTHOR: Roy F.A. Maclean # EMAIL: rfamgm at gmail # WEB: http://www.spiderpixel.co.uk/caspro # DATE: 28Nov1997 # MAKE: CASIO # MODEL: fx6300 or greater # NOTES: # # Suppose you want to convert the binary number 1001 into decimal. # Then enter 2 for the base and 1001 for the number. # # Suppose you want to convert the ternary number 2102 into decimal. # Then enter 3 for the base and 2102 for the number # # You can also enter bases greater than 10 but the number # can only have digits form 0~9 since that's all the calculator # keyboard has. @@ Program 1 Lbl 0 "BASE"?->B "NUMBER"?->X 0->P:0->N:Lbl 1 10Frac (X/10)->Y N+Y(B^P)->N Int (X/10)->X Isz P:X<>0=>Goto 1 "DECIMAL" N_ Goto 0