I need to convert binary float to decimal float in Mathematica, ideally between any two bases.
FromDigits["1.111111", 2] does not work.
|
I need to convert binary float to decimal float in Mathematica, ideally between any two bases.
|
||||
|
|
|
You need to get the
This gives (after If you want to work between any two bases, say you wanted to know how to write the number 18 in hex:
Alternatively, if you just want to "know" what the number is, without needing to compute with it, you can use
|
||||
|
|
|
If I understand correctly what you are looking for this may help:
The format given as input to |
|||
|
|
|
To convert a real number in base less than 10 to base 10, you can use Eli's method. However, suppose you want to convert the number
|
|||
|
|
|
Complementing the other good answers. If you aren't looking for anything programatic, the following may help. As to inputting a number in any base, you can type So, for example, If you want to see a number's representation in another base you can use, e.g, |
|||
|
|