10

Operations through Logarithms

10.1 MULTIPLICATION AND ADDITION IN LOGARITHMIC SYSTEMS

Given an X value, from a read only memory (ROM) one can read the value of log2X where X is used as the address and log2X is the data located at that address. Also, given log2X one can find the antilogarithm by reading from ROM the X value. Here log2X is used as the address line and X is the data at that address. Note that two separate ROMs are needed for the logarithm and antilogarithm functions, while in the pencil and paper case one table can be shared.

In a logarithmic system multiplication can be completed through addition. First consider unsigned numbers only. Because log2(X × Y) = log2X + log2Y, to calculate X × Y, we first find log2X and log2Y. After adding them to get a sum, we find the antilogarithm of the sum. That is knowing log2(X × Y), we look for the product of X × Y. Also, in the logarithmic system division can be carried on through subtraction. Because log2(X/Y) = log2Xlog2Y, to calculate X/Y we first find log2X and log2Y. After subtracting log2Y from log2X we find the antilogarithm of the difference.

Take into consideration the signed numbers. If P = X × Y, P can be represented by image where SP is the sign of product P, and 2log2|P| = |P|. Given log2|P|, 2log2|P| denotes the antilogarithm function to find |P| from log2|P|. Note that sign

SP = SXSY,

and

Similar to the floating ...

Get Arithmetic and Logic in Computer Systems now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.