How can I convert a string containing a hex number such as "6b"
to a hex digit that mathematica can use to do math with?
I have tried using ToExpression["6b"]
but that just give me another string.
Note: Java's BigInteger
class can construct hex integers from strings. Is there something like this in mathematica?
FullForm[ToExpression["6b"]]
you will see its true form. One thing that makes Mathematica unusual as far as programming languages go is that unassigned symbols (like b in this case) have their own values. They aren't strings and they aren't "variables". They're symbols and they can be passed around like any other value. In Java-speak you can think of them as sort of like enums. $\endgroup$