Home www.play-hookey.com Thu, 03-23-2017
| Direct Current | Alternating Current | Semiconductors | Digital | Logic Families | Digital Experiments | Computers |
| Analog | Analog Experiments | Oscillators | Optics | HTML Test |
| The Fundamentals | Resistance and Reactance | Filter Concepts | Power Supplies |
| Filter Basics | Radians | Logarithms | Decibels | Low-Pass Filters | High-Pass Filters | Band-Pass Filters |

Logarithms

What is a Logarithm?

Consider following basic equation:

10² = 100

You probably read this as, "Ten squared equals one hundred." However, suppose we rearrange the equation a bit, as follows:

log10(100) = 2

This expression actually means exactly the same thing, but is read as, "The logarithm of one hundred to the base ten is two." In the same manner, the logarithm of 1000 to the base 10 is 3. Thus, the logarithm is the exponent, or power to which the base number is raised.

We often just call them "logs" instead of "logarithms," simply because that's faster and easier to say, but the meaning is still the same. So, if you see a reference to logs on a Web page or in a textbook or magazine article somewhere, you'll know they're talking about logarithms and you'll know what they mean.



The Parts of a Logarithm

A logarithm does not have to be an integer by any means. We noted above that the log of 100 is 2, while the log of 1000 is 3. Therefore it is logical to assume that all numbers between 100 and 1000 will have logarithms between 2 and 3. This is in fact the case. For example, the log of 200 is 2.30103.

Since 10¹ = 10 (any number to the first power equals itself), the log of 10 is 1. Therefore, logs of numbers between 10 and 100 will have values between 1 and 2. In a similar fashion, the log of 1 is 0 (any number raised to the zero power gives 1 as a result). Therefore, numbers between 1 and 10 have logarithms between 0 and 1.

An interesting fact appears when we determine the logs of 2 and 20. Mathematically,

log10(2) = 0.30103
log10(20) = 1.30103

This similarity between the logs of 2, 20, and 200 is no accident. All base 10 logarithms of all numbers bear the same relationship: the significant digits of the number are defined by the fractional part of the logarithm, and the order of magnitude (or placement of the decimal point) is determined by the integer part. We'll see why very shortly. Meanwhile, however, standard nomenclature has been devised that identifies two parts of a logarithm, as follows:

Characteristic   Mantissa
 
1 . 30103

In this nomenclature, the mantissa is the fractional part of the logarithm and defines the significant digits of the original number. It will have a value in the range 0 through .9999999..., and always corresponds to a number, N, in the range 1 <= N < 10. Only the mantissa is listed in standard tables of logarithms to the base 10. The characteristic is the integer portion, and indicates the power of 10 by which N must be multiplied to obtain the real number. This actually corresponds quite well to general scientific notation.



Adding Logarithms to Multiply Numbers

Because logarithms are in fact exponents, we can find the log of a mathematical product by adding the logs of the original numbers. We can also find the log of a quotient by subtracting the log of the divisor from the log of the dividend. That is,

log(X * Y) = log(X) + log(Y)
log(X / Y) = log(X) - log(Y)

We already know that the log of 2 is 0.30103. Therefore, the log of 4 should be 0.30103 + 0.30103 = 0.60206. This is in fact the case. Similarly,

log(8)  =  log(2 * 4)
 
   =  log(2) + log(4)
 
   =  0.30103 + 0.60206
 
   =  0.90309

In exactly the same way, we can find the log of 5 by subtraction, since we know that 5 = 10/2:

log(5)  =  log(10/2)
 
   =  log(10) - log(2)
 
   =  1 - 0.30103
 
   =  0.69897

If you compare these numbers with a standard table of common logarithms, you'll find that they are quite accurate. A calculator will also produce the same results, rounded to 5 significant digits. As you get into the field of electronics, you'll find yourself needing to deal with logarithms in many different ways, for a number of practical reasons. Therefore it is a good idea to become fully familiar with them.



Why Use Logarithms?

In electronics, it is necessary to deal with wide ranges of values of many types. Even without going into esoteric and abstruse applications, you can find yourself dealing with:

Consider just the normal range of human hearing, which extends from 20 Hz to 20,000 Hz. If you tried to graph the everyday sounds of the audio spectrum on a linear scale, you'd have an absolutely enormous graph. Furthermore, the entire scale would allow precision to the nearest 1 Hz or even less. Such precision is needful at very low frequencies because they form a significant part of the frequency itself. However, we don't really need to deal with a 10,482.64 Hz signal in practical situations; we can call it 10.48 kHz and be perfectly happy with it.

If we create our graph using a logarithmic scale for frequency, however, we can compress the higher frequencies — the higher the frequency, the greater the compression. By the same token, extremely low frequencies are actually expanded, to allow us to increase the level of precision applied to those values. As a consequence, our graph can be made in a reasonable size while retaining all the precision we need for ordinary work.

There are many ways in which the use of logarithms can simplify or compress a dataset, to permit easier manipulations and display. These pages will make use of logs in a number of appropriate places. It will always be clear, or clearly stated, when and where logarithms are used here.



Natural Logs and Common Logs

Thus far we have limited our discussion to logarithms to the base 10. These are known as common logs, because we as humans are used to dealing with numbers to the base 10. However, logarithms don't have to use base 10; they can actually use any base at all, so long as the base is clearly specified.

In practice, we don't use just any base — that would not be practical. However, there is one very practical base for logarithms that is used in calculators and most computer systems. This base has a value of approximately 2.7182818, although it is actually a transcendental number and can never be fully resolved. It is designated by the Greek letter epsilon (ε), but is often represented by the letter 'e' instead, since Greek letters aren't always available in every medium. It is calculated according to the equation:

ε  =  1  +  1  +  1  +  1  +  1  + ...




1! 2! 3! 4!

In this equation, the '!' symbol designates a factorial, which means a product of all integers from 1 to the number indicated. For example, 3! = 3×2×1 = 6, and 4! = 4×3×2×1 = 24. By definition, 0! = 1. Negative numbers are not used in factorials.

The beauty of using this number as the base for logarithms is that we can skip the standard tables and calculate the logarithm of a number directly from the number itself. This would be tedious in the extreme to do manually, but is easy to program as a built-in function for a computer or calculator.

Because logarithms to the base ε can be calculated naturally, they are specifically known as natural logs. You might also see them designated as Napierian logs after John Napier (1550-1617), a Scottish mathemetician who invented the first system of logarithms (although he didn't use the same base). Natural logs are commonly specified in the form as ln X or ln(X), so that log X or log(X) is assumed to refer to the common log in printed pages, even when the base is not specified. Of course, if the base is specified, that specification overrides this convention.

You may remember ε from calculating time constants for RC and RL circuits. This is the same number; the exponential function is exactly the inverse of the natural log.


Prev: Radians Next: Decibels

All pages on www.play-hookey.com copyright © 1996, 2000-2015 by Ken Bigelow
Please address queries and suggestions to: webmaster@play-hookey.com