base - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


convert/base

convert between bases

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

convert(n, 'base', )

convert(L, 'base', , )

Parameters

n

-

integer; number to be converted

L

-

list(nonnegint); digits of the base- number to be converted to base-

-

posint; base of the input number, whose base- digits are given in L (least significant first)

-

posint; output base

Description

• 

convert/base converts the base-10 integer n to base- or converts the list of integers L from base- to base-, in which case we interpret L as the number .  It is assumed that .

• 

The result is a list of the base- digits of the converted input.

Examples

Convert numbers in base 10 to any other base. The answer will be given in reverse order (least significant digit first).

(1)

The decimal number 17 written in base 3 is 122.

(2)

Convert the number 122 in base 3 to base 10. The number to be converted must be entered as a list in reverse order unless it is in base 10. The answer will be given in reverse order.

(3)

Convert between different bases. The first number after base must be the base in which the number in brackets is given.

(4)

(5)

(6)

(7)

See Also

convert/binary

convert/decimal

convert/hex

convert/octal

 


Download Help Document