This is documentation for Mathematica 7, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

FromDigits

FromDigits[list]
constructs an integer from the list of its decimal digits.
FromDigits[list, b]
takes the digits to be given in base b.
FromDigits["string"]
constructs an integer from a string of digits.
FromDigits["string", "Roman"]
constructs an integer from Roman numerals.
  • The digits in list and the base b need not be positive integers, and can be any expression.  »
  • If Indeterminate appears in list, it is assumed to signify unknown digits beyond the precision of an approximate real number.  »
  • FromDigits["string", b] takes the digits in "string" to be given in base b.
  • In FromDigits["string", b], digits above 9 can be represented by letters a-z or A-Z.
Construct a number from its base-10 digits:
Base-2 digits:
Construct a number from its base-10 digits:
In[1]:=
Click for copyable input
Out[1]=
 
Base-2 digits:
In[1]:=
Click for copyable input
Out[1]=
Use symbolic digits and base:
Digits larger than the base are "carried":
Reconstruct a rational number from recurring digits:
Construct a number with limited precision:
Find the number with recurring digits 123:
Find numbers with successive recurring binary digit sequences:
IntegerDigits drops the sign:
New in 3 | Last modified in 6