Mathematica Converting Numbers to Base 10 in Mathematica: A Beginner's Guide

AI Thread Summary
To convert a number like 23a94b13 to base 10 in Mathematica, use the syntax base^^digits, where "base" is the numerical base and "digits" is the number in that base. For instance, to enter the hexadecimal number 1AD, you would write 16^^1AD. To display a number in a different base, utilize the BaseForm function, such as BaseForm[16^^1AD, 2] to print it in binary. Mathematica's help files are comprehensive and searchable, making them a valuable resource for users seeking assistance.
Zurtex
Science Advisor
Homework Helper
Messages
1,118
Reaction score
1
I've never really used Mathematica before so I'm rather confused by it, how would I say convert a number, 23a94b13 to base 10?
 
Physics news on Phys.org
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
 
Uber thanks, couldn't make sense of the help files.
 

Similar threads

Replies
4
Views
3K
Replies
1
Views
3K
Replies
23
Views
3K
Replies
3
Views
2K
Replies
13
Views
2K
Replies
1
Views
2K
Back
Top