BaseForm

BaseForm[expr,n]

prints with the numbers in expr given in base n.

Details

  • The maximum allowed base is 36. For bases larger than 10, additional digits are chosen from the letters az. »
  • 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.

Examples

open allclose all

Basic Examples  (2)

A binary integer:

In[1]:=
Click for copyable input
Out[1]//BaseForm=

A binary real:

In[2]:=
Click for copyable input
Out[2]//BaseForm=

Represent single-digit hexadecimal numbers:

In[1]:=
Click for copyable input
Out[1]//BaseForm=

Scope  (5)

Properties & Relations  (5)

Possible Issues  (1)

Neat Examples  (1)

See Also

IntegerDigits  IntegerString  RealDigits  NumberForm  FromLetterNumber

Tutorials

Introduced in 1988
(1.0)