2
$\begingroup$

I would now like to know how to convert a value in base2 scientific notation (is that the correct terminology?), say 1.93 * 2 ^ 88, into the form of A * 10 ^ B.

I want to do this without expressing the first form as a complete number and converting it back to the 2nd form.

I can get by exponent by doing 88 * (ln2 / ln10) = 26.49...

So I have A * 10 ^ 26 now.

How can I solve for A?

Complete equation: 1.93 * 2 ^ 88 = A * 10 ^ 26.


This has been moved/duplicated from https://softwareengineering.stackexchange.com/questions/231692/converting-base2-scientific-notation-to-base10-scientific-notation.

$\endgroup$
3
$\begingroup$

I am not sure I properly understood your problem; so, forgive me if what I write is just stupid.

You want to convert $a 2^b$ to $c 10^d$. Obviously, you noticed that $d=\lfloor \log (a 2^b)\rfloor$. So, now you need $c$ which is given by $c=a 10^{-d} 2^{b}$ what you get easily using logarithms.

Please tell me if I understood or not the problem.

$\endgroup$
3
  • $\begingroup$ Yes, that works, thankyou. I'll need to take some time to understand why this works though. $\endgroup$ – Damien Mar 8 '14 at 16:25
  • $\begingroup$ You are welcome. You got the key part which is $d$. The remaining is just relevant from logarithms. $\endgroup$ – Claude Leibovici Mar 8 '14 at 16:26
  • $\begingroup$ @Damien - I had to re-lookup the definition of a Logarithm even after minoring in Math (7 years ago). The logarithm operation simply receives a numerical input and outputs the number of significant digits present in that number (Log base 10 of 100 is 2, of 1000 is 3, etc...). After remembering this Claude's equations are obvious and then you're just solving a system of 2 equations. en.wikipedia.org/wiki/Logarithm $\endgroup$ – Ian Oct 23 '17 at 18:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.