convert between bases
convert(n, 'base', β)
convert(L, 'base', α, β)
integer; number to be converted
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
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 ∑k=1nops⁡L⁡Lk⁢αk−1. It is assumed that 0≤Lk<α.
The result is a list of the base-β digits of the converted input.
Convert numbers in base 10 to any other base. The answer will be given in reverse order (least significant digit first).
The decimal number 17 written in base 3 is 122.
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.
Convert between different bases. The first number after base must be the base in which the number in brackets is given.
Download Help Document