How do I convert a hexadecimal number to base 10 in Mathematica?
- Context: Mathematica
- Thread starter Zurtex
- Start date
-
- Tags
- Base Convert Mathematica
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 22K views
Discussion
Physics news on Phys.org
Staff Emeritus
Science Advisor
Gold Member
- 10,270
- 45
To enter a number of an arbitrary base, use the syntax:
base^^digits
For example, to enter the hexadecimal number 1AD, use the notation 16^^1AD.
To print a number out in an arbitrary base (Mathematica normally uses decimal), use the BaseForm[number, base] function.
For example, to print that same number in binary, use BaseForm[16^^1AD, 2].
NB: Mathematica has very good built-in searchable help. Always start by checking the help files.
- Warren
base^^digits
For example, to enter the hexadecimal number 1AD, use the notation 16^^1AD.
To print a number out in an arbitrary base (Mathematica normally uses decimal), use the BaseForm[number, base] function.
For example, to print that same number in binary, use BaseForm[16^^1AD, 2].
NB: Mathematica has very good built-in searchable help. Always start by checking the help files.
- Warren
Similar threads
Mathematica Which CAS should I choose for my math courses: Maple 10 or Mathematica 5.2?
- steelphantom
- · Replies 9 ·
- MATLAB, Maple, Mathematica, LaTeX
- Replies
- 9
How do I convert from this mod number to a regular number?
- SigmaS
- · Replies 4 ·
- Set Theory, Logic, Probability, Statistics
- Replies
- 4
What Is the Probability of Choosing a Hexadecimal Number with Distinct Digits?
- PolyFX
- · Replies 1 ·
- Precalculus Mathematics Homework Help
- Replies
- 1
C/C++ How to Parse Two Characters into a Single Hexadecimal Number in C++?
- Labyrinth
- · Replies 7 ·
- Programming and Computer Science
- Replies
- 7
How do I convert a repeating decimal from one base to another?
- srfriggen
- · Replies 12 ·
- Precalculus Mathematics Homework Help
- Replies
- 12
How do I convert meters cubed to cubic centimeters?
- Wanting to Learn
- · Replies 4 ·
- Introductory Physics Homework Help
- Replies
- 4
How do I convert specific gravity of salt water to density and concentrations?
- wildonion
- · Replies 10 ·
- Chemistry
- Replies
- 10
Undergrad How do I convert the number of efolds to conformal time during inflation?
- Xepto
- · Replies 3 ·
- Astronomy, Astrophysics, Cosmology
- Replies
- 3
How do I convert a number with a decimal point to binary?
- xod_s
- · Replies 3 ·
- Precalculus Mathematics Homework Help
- Replies
- 3
How do I convert decimal to hex in MIPS assembly?
- trouty323
- · Replies 3 ·
- Programming and Computer Science
- Replies
- 3