Monday 15 June 2015

Logarithm in computer science

The logarithm of a number is the exponent to which another fixed value,the base, must be raised to produce that number.


 y=b^x\Leftrightarrow x=\log_b(y) 



The binary logarithm (log2 n) is the logarithm to the base 2. In Computer Science or information theory, logarithm is very useful because it is closely connected to the binary numeral system. Binary numbers are actually base-2 numeral system.

1001012 = [ ( 1 ) × 25 ] + [ ( 0 ) × 24 ] + [ ( 0 ) × 23 ] + [ ( 1 ) × 22 ] + [ ( 0 ) × 21 ] + [ ( 1 ) × 20 ]
1001012 = [ 1 × 32 ] + [ 0 × 16 ] + [ 0 × 8 ] + [ 1 × 4 ] + [ 0 × 2 ] + [ 1 × 1 ]
1001012 = 3710
Logarithms were invented way back, in the 1500s or 1600s. At that time, calculators didn't exist. To do multiplications, divisions, and root extraction with numbers having five or more digits required a lot of time and work. Logarithms reduced the needed amount of work by a large amount. Now that calculators and computers are common, logarithms are still very, very useful, but in a totally different way. They are very closely related to exponential functions. The exponential function y=a^x is one of the most important functions in mathematics, physics, and engineering. Radioactive decay, bacterial growth, population growth, continuous interest,..., all involve exponential functions. Because of the relation that y = a^x is equivalent to log_a(y) = x, logs are equally important.
 

No comments:

Post a Comment