Tuesday, January 30, 2018

How to calculate log base 2 ?

The calculator we use, we can find the logarithmic operations like log base e and log base 10. So, the question arises what shall we do if we want to calculate log base 2 or log to the base any number other than log base e and log base 10. The answer is within your calculator. You just need to recall a logarithmic formula read in mathematics. The formula is :
                                       
                                       logd(a) / logd(b) = logb(a)

So, if you want to calculate log(x) with base 2 then use the formula in your calculator as:

                  log10(x) / log10(2) = log2(x)

or, you can use

                   ln(x) / ln(2)= log2(x)


Similarly, you can calculate log to the base any number using above formula.

For example: 
                  log2(4)= ln(4) / ln(2)=2
                          log2(8)= ln(8) / ln(2)=3
                          log2(3)= ln(3) / ln(2)=1.584962501






0 comments:

Post a Comment