View Full Version : Convert Base in Mathematica
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?
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.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.