[Math] Logarithmic Number System Addition

arithmeticlogarithms

Can somebody explain in simple terms how addition works in a logarithmic number system.
Say I have the numbers A and B. These are logarithms (base e, say) of the actual quantities they represent. They both represent positive quantities, there is no sign bit. Without any of the extra terminology I don't need now and can figure out myself later, how do I add A and B?

Thanks in advance!

Edit:
Here are some links to other sites which explain the common method of adding numbers in a Logarithmic Number System. Maybe you could just explain what is here:
http://semipublic.comp-arch.net/wiki/Logarithmic_number_system_%28LNS%29

http://en.wikipedia.org/wiki/Logarithmic_number_system

Best Answer

If $A=\log r$ and $B=\log s$, and if what you want is the number representing $r+s$, then you go $r=e^A$, $s=e^B$, $r+s=e^A+e^B$, $\log(r+s)=\log(e^A+e^B)$, and there's your answer: $\log(e^A+e^B)$.

EDIT: At the Wikipedia link, it says $$\log(X+Y)=\log X+\log(1+b^{\log Y-\log X})$$ where $b$ is the base of the logarithms. Switching to the letters I used above, this says the number representing $r+s$ is $$A+\log(1+b^{B-A})$$ Now that's mathematically equivalent to the answer I gave (as Robert indicates): $$\log(b^A+b^B)=\log(b^A(1+b^{B-A}))=\log b^A+\log(1+b^{B-A})=A+\log(1+b^{B-A})$$ I suppose it's cheaper because my answer requires two exponentiations and a logarithm while this answer needs only one exponentiation and a logarithm (although it needs more additions/subtractions than the earlier answer).

Related Question