Converting a Base 2 LogDate: 01/31/2002 at 23:46:20 From: Sue Subject: Powers I think the right equation is 2147483647 = 2^(x) - 1, but I don't know how to figure it out. Please help if you can. Thank you very much. Date: 02/01/2002 at 01:20:53 From: Doctor Jeremiah Subject: Re: Powers Hi Sue, Your equation 2147483647 = 2^(x) - 1 is exactly right. 2147483647 = 2^(x) - 1 2147483647 + 1 = 2^(x) - 1 + 1 2147483648 = 2^(x) To figure it ouw you have to either do it by trial and error or use logarithms. A logarithm gives you the exponent. For 10^x you would use a base 10 log ( which you can write as log() ) and for e^x you would use the natural log ( which you can write as ln() ). And for 2^x you need to use the base 2 log which I will write as lg2() : 2147483647 = 2^(x) - 1 2147483647 + 1 = 2^(x) - 1 + 1 2147483648 = 2^(x) lg2( 2147483648 ) = lg2( 2^(x) ) Now, log( 10^x ) = x and ln( e^x) = x so lg2( 2^x ) = x 2147483647 = 2^(x) - 1 2147483647 + 1 = 2^(x) - 1 + 1 2147483648 = 2^(x) lg2( 2147483648 ) = x How do you calculate a base 2 log? Well, most calculators have a natural log and a base 10 log, but a base 2 log is not there. But you can convert a base 2 log into some other log that you do have the ability to calculate. log base a ( x ) / log base a ( b ) = log base b ( x ) So let's convert our base 2 log to a base 10 log 2147483647 = 2^(x) - 1 2147483647 + 1 = 2^(x) - 1 + 1 2147483648 = 2^(x) lg2( 2147483648 ) = x log( 2147483648 ) / log( 2 ) = x We can calculate base 10 logs, so now we can figure out what x is. Please write back if you want to talk about this more. - Doctor Jeremiah, The Math Forum http://mathforum.org/dr.math/ |
Search the Dr. Math Library: |
[Privacy Policy] [Terms of Use]
Ask Dr. Math^{TM}
© 1994- The Math Forum at NCTM. All rights reserved.
http://mathforum.org/dr.math/