# Converting Between Number Bases - HP 48gII Advanced User's Reference Manual

Graphing calculator.

Program:
'm*(n-i)+i' EVAL
ROLLD
NEXT
n LIST
"
END 1 CF
"
"
`OAPLY K
Checksum: # 11132d
Bytes:
314
Example: Apply the function, f(x) = Ax
!Ô3†2W†4`
‚å 3 QA *7 -
`J %APLY%
H#DISP ˜˜
(select small stack display to see
all vector elements.)

## Converting Between Number Bases

nBASE converts a positive decimal number (x) into a tagged string representation of the equivalent value in a
different number base (b). Both x and b must be real numbers. nBASE automatically rounds both arguments to
the nearest integer.
Level 2
Techniques used in nBASE
String Concatenation and Character Manipulation. nBASE makes use of several string and character
!
manipulation techniques to build up the result string.
Tagged Output. nBASE labels ("tags") the output string with its original arguments so that the output is a
!
complete record of the command.
Indefinite Loops. nBASE accomplishes most of its work using indefinite loops — both DO...UNTIL...END
!
and WHILE...REPEAT...END loops.
2-22 RPL Programming Examples
Computes the number of elements to roll so that the
next row can be collected.
Repeat loop for the next row. Gather rows into a list,
forming a list of lists (symbolic pseudo-array).
Close the local variable structure and end the
IFERR...THEN...END structure. Clear flag 1 before
exiting the program.
Stores the program in APLY.
3
-7 to each element x of the vector [ 3 -2 4 ].
Level 1
x
b
"
Level 1
x baseb: "string"
"