Location arithmetic (Latin arithmetica localis) is the additive (non-positional) binary numeral systems, which John Napier explored as a computation technique in his treatise Rabdology (1617), both symbolically and on a chessboard-like grid.
During Napier's time, most of the computations were made on boards with tally-marks or jetons.
He was so pleased by his discovery that he said in his preface: it might be well described as more of a lark than a labor, for it carries out addition, subtraction, multiplication, division and the extraction of square roots purely by moving counters from place to place.
Napier also showed how to add, subtract, multiply, divide, and extract square roots.
Thus, repeatedly applying the rules of replacement aa → b, bb → c, cc → d, etc.
Each number can be represented by a unique abbreviated form, not considering the order of its digits (e.g., abc, bca, cba, etc.
In case the digit to be removed does not appear in the minuend, then borrow it by expanding the unit just larger.
A few examples show it is simpler than it sounds : Napier proceeded to the rest of arithmetic, that is multiplication, division and square root, on an abacus, as it was common in his times.
With these basic operations (doubling and halving), all the binary algorithms can be adapted starting by, but not limited to, the Bisection method and Dichotomic search.
Napier performed multiplication and division on an abacus, as was common in his times.
Because all letters represent a power of 2, multiplying digits is the same as adding their exponents.
For example, multiply 4 = c by 16 = e c * e = 2^2 * 2^4 = 2^6 = g or... AlphabetIndex(c) = 2, so... e => f => g To find the product of two multiple digit numbers, make a two column table.
Noticing that the right column contains successive doubles of the second number, shows why the peasant multiplication is exact.
For instance, the square in this example grid represents 32, as it is the product of 4 on the right column and 8 from the bottom row.
This property can be used to perform binary addition using just a single row of the grid.
For example, 29 (= 11101 in binary) would be placed on the board like this: The number 29 is clearly the sum of the values of the squares on which there are counters.
Subtracting is not much more complicated than addition: instead of adding counters on the board we remove them.
Unlike addition and subtraction, the entire grid is used to multiply, divide, and extract square roots.
In conjunction with that diagonal property, there is a quick way to divide the numbers on the bottom and right edges of the grid.
Locate the dividend 32 along the right side and the divisor 8 on the bottom edge of the grid.
Extend a diagonal from the dividend and locate the square where it intersects a vertical line from the divisor.
Napier extends this idea to divide two arbitrary numbers, as shown below.
Now place counters at every "intersection" of vertical and horizontal rows of the 1s in each number.
So we can directly read off an 11 digit binary number from the L-shaped set of 11 squares that lie along the left and bottom sides of the grid.
Martin Gardner presented a slightly easier to understand version [2] of Napier's division method, which is what is shown here.
So the result is 100101 (= 37) and the remainder is the binary value of any counters still left along the bottom edge.