Base change

Returns a number in a different base. The representation of a number n in base b is [a0,a1,...,ak] if

n=a0b0+a1b1+a2b2++akbk

with ai<b.

Syntax

base_change(Integer, Integer)
base_change(Vector, Integer)

Description

Given an integer nLaTeXn in decimal base and a base bLaTeXb, returns a vector in the desired base in the order specified above.

arithmetic.base_change1.calc.png

Given a vector v and a base bLaTeXb, where vLaTeXv is the representation in base bLaTeXb in the order specified above, returns the number in decimal base.

arithmetic.base_change2.calc.png