This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
 Documentation / Mathematica / Built-in Functions / Input and Output / Number Formatting  /

  • BaseForm[ expr , n ] prints with the numbers in expr given in base n.
  • The maximum allowed base is 36. For bases larger than 10, additional digits are chosen from the letters a-z.
  • You can enter a number in an arbitrary base using base ^^ digits.
  • When a number in an arbitrary base is given in scientific notation, the exponent is still given in base 10.
  • You can mix BaseForm with NumberForm and related functions.
  • BaseForm acts as a "wrapper", which affects printing, but not evaluation.
  • See the Mathematica book: Section 2.8.7Section 3.1.3.
  • See also: IntegerDigits, RealDigits.

    Further Examples

    The input here is the number 1024 in base 2.



    This input is the base 16 representation of a large number.



    Numbers other than integers can be represented in various bases.