Safeguard
Supply Chain Security•

Lattice Multiplication, Napier's Bones and the Slide Rule Explained

How the lattice, Napier's bones and the slide rule turned multiplication into addition, worked step by step on seven problems, with their precision limits.

Safeguard Security Team
54 min read

Lattice multiplication, Napier's bones and the slide rule are three tools that turn multiplication into addition. The lattice (gelosia) writes every single-digit product in its own cell and adds along diagonals. Napier's bones (1617) print those cells on rods so you never recall a times table. The slide rule adds logarithms as lengths, fast but only to about three significant figures.

That is the short answer. This post works the same seven problems used across our mathematics traditions series on all three tools, in each tool's own layout: lattices and bones as text grids, and the slide rule as lengths in millimetres on a standard 25 cm scale. The problems are 98 x 97, 47 x 53, 386 x 524, 85², √7,744, 7,429 ÷ 37 and 1/19 as a decimal. Where a tool cannot do a problem, we say so and explain why, because that is part of the comparison.

Every product, diagonal sum, carry, bone reading, logarithm and slide rule position below was computed with Python first; the script is in the walkthrough. Dates come from the MacTutor History of Mathematics archive, Royal Museums Greenwich, the IEEE milestone record for the HP-35 and the other sources at the end. Where sources disagree, we say so.

Key takeaways

  • One idea, three machines. The lattice and the bones replace multiplication with exact additions along diagonals. The slide rule replaces it with adding two lengths.
  • The lattice is not from Fibonacci. The earliest recorded descriptions are by Ibn al-Bannāʾ al-Marrākushī (1256 to 1321) in the Maghreb and by an anonymous Latin treatise written in England around 1300. Fibonacci's Liber Abaci (1202) has a related "chessboard" layout, but no lattice has been found in it. Italian printers spread it as the gelosia, a window grille.
  • Napier's bones are a lattice you do not have to fill in. John Napier described the rods in Rabdologiae, published in Edinburgh in 1617, the year he died. For 386 x 524 they remove all nine times-table lookups.
  • Logarithms made the slide rule. Napier published logarithms in 1614. Gunter's scale (early 1620s) and Oughtred's two sliding scales (in print 1632) followed. The HP-35 calculator of 1972 ended the slide rule's working life.
  • Exact versus approximate. The lattice and the bones always give the exact answer. A 25 cm slide rule gives three significant figures: 9,510 for 98 x 97 (true 9,506) and 202,000 for 386 x 524 (true 202,264). It gives no remainders and no decimal point.
  • Limits. The lattice only multiplies. The bones also divide and take roots. The slide rule does all of it, approximately.

Three tools, one idea: turn multiplication into addition

Long multiplication is hard for two reasons. First, you need every single-digit product from 0 x 0 to 9 x 9 on demand. Second, you need to keep the carries straight while you combine partial products that sit in different columns. Each tool in this post attacks one or both of those problems.

ToolWhat it removesWhat is left for you to doExact or approximate
Lattice (gelosia)Carrying while you multiplySingle-digit products, then diagonal additionsExact
Napier's bonesSingle-digit products and carrying while you multiplyDiagonal additions along one row, then adding rowsExact
Logarithm tablesMultiplication itselfTwo lookups, one addition, one reverse lookupApproximate (to the table's precision)
Slide ruleMultiplication, division, squares and rootsSetting the slide, reading a scale, placing the decimal pointApproximate (about 3 significant figures)

The lattice is a paper layout. Napier's bones are the same layout printed on rods, so the paper work shrinks to reading. The slide rule is a different idea entirely. It uses the rule log(a x b) = log(a) + log(b), and it stores the logarithm of each number as a distance along a ruler. Adding two distances is something your hands can do in a second.

A short, sourced history

The gelosia: from the Maghreb and England to Venice

Its origins are not settled. Jean-Luc Chabert's A History of Algorithms (Springer, 1999), places the earliest recorded Arabic description in the Talkhīṣ aʿmāl al-ḥisāb (Summary of arithmetical operations) of Ibn al-Bannāʾ al-Marrākushī, a Moroccan mathematician whom MacTutor dates from 29 December 1256 to 13 July 1321. The earliest recorded European description is in a Latin treatise written in England around 1300, the Tractatus de minutis philosophicis et vulgaribus, whose author is unknown. Chabert also lists al-Kāshī's base 60 grid (Samarqand, 1427) and Wu Jing's Chinese compendium of 1450.

It is sometimes said that al-Khwārizmī or Fibonacci described the lattice. No such passage has been found. Fibonacci's Liber Abaci (1202, revised 1228) brought Hindu-Arabic numerals into Latin Europe, according to MacTutor, and describes a related layout, quadrilatero in forma scacherii (in the form of a chessboard). There each cell holds only the lowest digit and carries go elsewhere, so the lattice's key feature, a fixed place in each cell for the carry digit, is missing.

The method's Italian name, gelosia, means a window grille or lattice screen. The historian David Eugene Smith pointed out that the Arabic name for the method, shabaka, means the same thing, and argued that the method reached Italy from the Middle East. That is plausible but not proven. A very similar method called kapāṭa-sandhi appears in commentary on Bhāskara II's Līlāvatī, including Gaṇeśa's sixteenth-century commentary, which our Indian and Vedic mathematics post covers in its own context. Where the grid first appeared is still researched.

In print, the lattice appears in the Arte dell'Abbaco of 1478, usually called the Treviso Arithmetic and often described as the first printed mathematics book in Europe, and in Luca Pacioli's Summa de arithmetica (Venice, 1494). Pacioli's Summa lists eight ways to multiply, and per gelosia is one of them. MacTutor notes that the Summa summarised existing mathematics, so Pacioli recorded the gelosia rather than invented it.

Napier's bones and the Rabdologiae (1617)

John Napier was born in 1550 at Merchiston Castle in Edinburgh and died in Edinburgh on 4 April 1617, according to MacTutor. He is best known for logarithms, but his last book was about a simpler device. Rabdologiae, seu numerationis per virgulas (Rabdology, or reckoning with rods) was printed in Edinburgh in 1617. Royal Museums Greenwich summarises his stated motive: he thought the "tedium and difficulty of calculation" put people off mathematics.

The book describes three devices:

  1. The rods, soon called Napier's bones because the good sets were made of ivory. Each rod carries the multiplication table of one digit, written as a column of nine squares, each split by a diagonal into tens and units. Laying rods side by side spells out a number, and each row of the assembled rods is then a ready-made row of a lattice. MacTutor notes that the rods were used for multiplying, dividing and finding square and cube roots.
  2. The promptuary (promptuarium, a storehouse), a large set of strips for multiplying multi-digit numbers in one setting. It was never widely used, probably because laying out the strips took about as long as working on paper.
  3. Location arithmetic (arithmetica localis), a method of computing in binary with counters on a chessboard. We come back to it near the end, because it is the most modern idea in the book.

MacTutor says Napier published because friends found the rods useful. Royal Museums Greenwich holds a boxwood set from about 1679 in which the rods have become cylinders turned inside a box; its lid carries a tide table, which suggests use at sea.

Wilhelm Schickard described a calculating machine to Kepler in letters of 1623 and 1624, according to MacTutor. It is often described as mechanised Napier's rods because reconstructions show multiplication tables on cylinders; MacTutor does not use that phrase, so treat it as an interpretation.

Logarithms: Napier (1614), Bürgi (1620) and Briggs

In 1614 Napier published Mirifici logarithmorum canonis descriptio (A description of the wonderful canon of logarithms); Edward Wright's English translation followed in 1616.

Napier's original logarithms were not base 10. Henry Briggs of Gresham College in London visited Napier in 1615 and 1616, according to MacTutor. They agreed on tables in base 10 with the logarithm of 1 equal to 0. Briggs published the first thousand of them, Logarithmorum chilias prima, in 1617. His Arithmetica logarithmica of 1624 gave the logarithms of 1 to 20,000 and 90,000 to 100,000 to 14 decimal places, and Adriaan Vlacq filled in 20,000 to 90,000 in an edition printed at Gouda in 1628.

Napier was not alone. The Swiss instrument maker Jost Bürgi computed his own tables of progressions, the Arithmetische und Geometrische Progress Tabulen, printed in Prague in 1620. MacTutor says his method differs from Napier's and was clearly developed independently, and that historians believe he devised it around 1588. Napier published first, which is why the name stuck.

Gunter, Oughtred and the slide rule

The step from a table to an instrument was taken by Edmund Gunter, an English mathematician and astronomer. Gunter plotted a logarithmic scale on a single two-foot ruler. With dividers you added the length for one number to the length for another, which multiplies them. The sources differ on the date. MacTutor's biography of Oughtred places Gunter's scale in 1620. MacTutor's biography of Gunter says he described it in Description and Use of the Sector in 1623. We say "the early 1620s."

William Oughtred, a clergyman and mathematics teacher, removed the dividers by sliding two Gunter scales against each other. MacTutor records that he invented a circular slide rule in 1630 and described the two-ruler form in The Circles of Proportion, published in 1632. His former student Richard Delamain published a circular slide rule in Grammelogia in 1630, and a bitter priority dispute followed. MacTutor notes that the two may have invented it independently. Oughtred also introduced the "x" sign for multiplication in his Clavis mathematicae of 1631, so the symbol in this post's problem list is his.

The slide rule later gained more scales and a cursor, a window with a hairline for reading one scale against another. A layout credited to Amédée Mannheim (1859), with a cursor, became the common pattern.

The end was quick. Hewlett-Packard introduced the HP-35 in 1972 at US$395. The IEEE milestone dedicated to it in 2009 calls it the first handheld calculator to perform transcendental functions (trigonometric, logarithmic and exponential), and its citation says that the HP-35 and later models "replaced the slide rule, used by generations of engineers and scientists." HP's history page says more than 300,000 sold in three years.

Timeline

YearEvent
1202, 1228Fibonacci's Liber Abaci brings Hindu-Arabic numerals to Latin Europe; chessboard multiplication, no lattice
Late 1200sIbn al-Bannāʾ's Talkhīṣ: earliest recorded Arabic lattice
About 1300Anonymous Latin treatise in England: earliest recorded European lattice
1478Treviso Arithmetic prints the lattice
1494Pacioli's Summa lists per gelosia among eight methods
About 1588Bürgi devises his progression tables (printed 1620)
1614Napier's Mirifici logarithmorum canonis descriptio
1617Napier's Rabdologiae; Napier dies on 4 April; Briggs's Chilias prima
1620 to 1623Gunter's logarithmic scale (dates differ by source)
1624, 1628Briggs's Arithmetica logarithmica; Vlacq completes the tables
1630 to 1632Oughtred and Delamain: circular and straight slide rules
1972HP-35, first handheld scientific calculator

How we count steps, memory and precision

"Fast" has to be shown, not asserted. For every problem we count three things.

  • Lookups or products. How many single-digit products you must recall (lattice) or read (bones).
  • Additions. Every time you add two digits, including adding a carry, counts as one addition. A diagonal with three digits needs two additions; a carry into it adds one more.
  • Memory load. The most you must hold in your head at once. On a lattice it is one running diagonal sum and one carry. On the bones it is the same, within one row. On a slide rule it is the rough size of the answer, so you can place the decimal point.

For the slide rule we also give the error.

We found no measured speed records for any of these tools from a recognised competition body, so we cite no times. Fewer steps and less to remember usually means faster and fewer slips, but that is an inference, not a measurement.

How the lattice works

Here is the general layout for a two-digit by two-digit lattice. Write the first number across the top, one digit per column. Write the second number down the right side, one digit per row. Split each cell with a diagonal running from its top right corner to its bottom left corner. In each cell write the product of its column digit and its row digit as two digits: tens in the upper left triangle, units in the lower right.

          col 1    col 2
        +--------+--------+
        | t  /   | t  /   |
        |   /  u |   /  u |   row 1
        +--------+--------+
        | t  /   | t  /   |
        |   /  u |   /  u |   row 2
        +--------+--------+

The diagonals form bands that run from upper right to lower left. Each band collects all the digits that belong to one place value: the band in the bottom right corner is the units, the next band is the tens, and so on. Add each band, starting from the bottom right, write the units digit of the sum at the end of the band, and carry any tens into the next band. Then read the answer down the left side and along the bottom.

Why does it work? Each cell's units digit belongs to one place value and its tens digit to the next. The diagonal lines both up with the right bands, so the grid does the place-value bookkeeping that long multiplication does with indentation and trailing zeros.

Cells can be filled in any order, and all carries wait for the diagonal additions. In long multiplication you hold a carry while recalling the next times-table fact; on the lattice those two jobs never overlap.

How Napier's bones work

A set of Napier's bones is a lattice cut into vertical strips. Each bone carries one digit at the top and, below it, the nine multiples of that digit in split cells. An index rod lists the row numbers 1 to 9.

Here are the bones for the digits used in this post, written as tens/units for each row. A real bone draws the diagonal; we write the slash.

row  | index | bone 1 | bone 3 | bone 4 | bone 5 | bone 6 | bone 7 | bone 8 | bone 9
-----+-------+--------+--------+--------+--------+--------+--------+--------+-------
  1  |   1   |  0/1   |  0/3   |  0/4   |  0/5   |  0/6   |  0/7   |  0/8   |  0/9
  2  |   2   |  0/2   |  0/6   |  0/8   |  1/0   |  1/2   |  1/4   |  1/6   |  1/8
  3  |   3   |  0/3   |  0/9   |  1/2   |  1/5   |  1/8   |  2/1   |  2/4   |  2/7
  4  |   4   |  0/4   |  1/2   |  1/6   |  2/0   |  2/4   |  2/8   |  3/2   |  3/6
  5  |   5   |  0/5   |  1/5   |  2/0   |  2/5   |  3/0   |  3/5   |  4/0   |  4/5
  6  |   6   |  0/6   |  1/8   |  2/4   |  3/0   |  3/6   |  4/2   |  4/8   |  5/4
  7  |   7   |  0/7   |  2/1   |  2/8   |  3/5   |  4/2   |  4/9   |  5/6   |  6/3
  8  |   8   |  0/8   |  2/4   |  3/2   |  4/0   |  4/8   |  5/6   |  6/4   |  7/2
  9  |   9   |  0/9   |  2/7   |  3/6   |  4/5   |  5/4   |  6/3   |  7/2   |  8/1

To multiply 386 by a single digit, say 5, lay bones 3, 8 and 6 side by side and look along row 5:

row 5:   bone 3   bone 8   bone 6
          1/5      4/0      3/0

Read it from right to left, adding each units digit to the tens digit of the cell to its right, because those two digits share a diagonal band:

  • Rightmost units: 0.
  • Next band: 0 (units of bone 8) + 3 (tens of bone 6) = 3.
  • Next band: 5 (units of bone 3) + 4 (tens of bone 8) = 9.
  • Last band: 1 (tens of bone 3).

So 386 x 5 = 1,930, with no times-table fact recalled and two one-digit additions.

For a multi-digit multiplier you read one row per digit and add the shifted rows, as in long multiplication. That final addition is the one step the bones do not remove, and the lattice folds it into the diagonals instead.

Napier also designed a square root rod holding the squares 1 to 81; we use it in Problem 5.

How the slide rule works

A slide rule's main scales, called C (on the slide) and D (on the body), are logarithmic. On a rule whose scale is 250 mm long, the number v sits at a distance of 250 x log10(v) millimetres from the left index (the "1" at the left end). So:

Number on the scaleDistance from the left index
10 mm
275.3 mm
3.86146.6 mm
5.24179.8 mm
9.8247.8 mm
10250 mm (the right index)

To multiply, you add distances. Slide the C scale until its left index sits over the first factor on D. Move the cursor to the second factor on C. Read the product under the hairline on D.

If the sum of the two distances is more than 250 mm, the answer runs off the right end. Then you use the right index instead: put the "10" of C over the first factor on D. That divides by 10, so only the decimal point moves, and the rule never tells you where it goes. You estimate it: 98 x 97 is about 10,000, so the reading 9.51 means 9,510.

Division runs the same moves backwards: put the divisor on C over the dividend on D, and read the quotient on D under the C index. A and B scales (two decades each) give squares and roots; the CI scale, C reversed, gives reciprocals.

Why three significant figures

Precision is a property of length. If you can place or read the hairline to within dx millimetres on a scale of length L, the relative error in the number is about ln(10) x dx / L. In Python:

Scale lengthReading error 0.1 mmReading error 0.2 mmReading error 0.25 mm
125 mm (pocket)0.18%0.37%0.46%
250 mm (standard "10 inch")0.09%0.18%0.23%
500 mm (desk)0.05%0.09%0.12%

A multiplication involves three placements (index, cursor, reading), so the errors add up. On a 250 mm rule the typical result is right to about 0.1% to 0.3%, which is three significant figures. Near 9.5 on a 250 mm D scale, the step from 9.50 to 9.51 is 0.114 mm wide. Near 2.02 the step from 2.02 to 2.03 is 0.536 mm. Near the left index the step from 1.00 to 1.01 is 1.08 mm. A good eye can split half a millimetre, not a tenth of one, so the third digit is read near the left end and only estimated near the right end. A fourth digit is a guess.

Three figures suited engineering, where measured inputs were rarely more precise. It does not suit bookkeeping, exact integers or remainders.

Problem 1: 98 x 97 = 9,506

On the lattice

Write 98 across the top and 97 down the right. Fill each cell with the product of its column digit and row digit.

             9          8
        +----------+----------+
        |  8  /    |  7  /    |
        |    /  1  |    /  2  |   9
        +----------+----------+
        |  6  /    |  5  /    |
        |    /  3  |    /  6  |   7
        +----------+----------+

The four cells are 9 x 9 = 81, 8 x 9 = 72, 9 x 7 = 63 and 8 x 7 = 56. Now add along the diagonal bands, starting at the bottom right.

Band (place value)Digits in the bandPlus carrySumWriteCarry out
Units60660
Tens2, 3, 501001
Hundreds1, 7, 611551
Thousands81990

Read the written digits from the top left down and along: 9, 5, 0, 6. The answer is 9,506.

Count: 4 single-digit products, 6 additions (4 inside bands and 2 carries), never more than one band sum and one carry in your head.

On Napier's bones

Lay bones 9 and 8 side by side. Read row 9 and row 7.

           bone 9   bone 8
row 9:      8/1      7/2      ->  8 | 1+7=8 | 2   ->  882
row 7:      6/3      5/6      ->  6 | 3+5=8 | 6   ->  686

Row 9 gives 98 x 9 = 882. Because the 9 in 97 is in the tens place, shift it one place: 8,820. Row 7 gives 98 x 7 = 686. Add: 8,820 + 686 = 9,506.

Count: no products recalled, 2 one-digit additions inside the rows, then one three-digit addition of two partial products. Memory load is the same as on the lattice.

On the slide rule

The product of 9.8 and 9.7 is more than 10, so use the right index. Put the 10 of C over 9.8 on D, which is 247.8 mm along. Move the cursor to 9.7 on C. The hairline lands on D at 244.5 mm, which is 9.506. You will read it as 9.50 or 9.51, because the whole gap between 9.50 and 9.51 is about a tenth of a millimetre. Estimate the size: about 100 x 100 = 10,000, so the answer is about 9,510.

MethodAnswerExact?Error
Lattice9,506Yes0
Bones9,506Yes0
Slide rule (250 mm)about 9,510No0.04%

For comparison, the Vedic Nikhilam method from our traditions comparison does this problem in 4 operations with no carries, because both numbers are close to 100. The mechanical tools ignore that closeness: generality is their strength and their weakness.

Problem 2: 47 x 53 = 2,491

On the lattice

             4          7
        +----------+----------+
        |  2  /    |  3  /    |
        |    /  0  |    /  5  |   5
        +----------+----------+
        |  1  /    |  2  /    |
        |    /  2  |    /  1  |   3
        +----------+----------+

The cells are 4 x 5 = 20, 7 x 5 = 35, 4 x 3 = 12 and 7 x 3 = 21.

BandDigitsPlus carrySumWriteCarry out
Units10110
Tens5, 2, 20990
Hundreds0, 3, 10440
Thousands20220

The answer is 2,491. Count: 4 products, 4 additions, no carries at all. This is the lattice at its best: every band stays under 10.

On Napier's bones

Lay bones 4 and 7. Read rows 5 and 3.

           bone 4   bone 7
row 5:      2/0      3/5      ->  2 | 0+3=3 | 5   ->  235
row 3:      1/2      2/1      ->  1 | 2+2=4 | 1   ->  141

Row 5 gives 47 x 5 = 235, shifted one place: 2,350. Row 3 gives 47 x 3 = 141. Add: 2,350 + 141 = 2,491.

On the slide rule

4.7 sits at 168.0 mm and 5.3 at 181.1 mm. The total, 349.1 mm, is past the end, so use the right index: the hairline lands at 99.1 mm on D, which is 2.491. The gap between 2.49 and 2.50 is about 0.44 mm, so you read 2.49. With 50 x 50 = 2,500 as the size, the answer is about 2,490, 0.04% low.

A reader who knows the difference of squares sees that 47 x 53 = 50² minus 3² = 2,500 minus 9 = 2,491 in two steps. The mechanical tools do not see it.

Problem 3: 386 x 524 = 202,264

This is the problem where the tools earn their keep, because nothing about the numbers is special.

On the lattice

Write 386 across the top and 524 down the right. There are nine cells.

              3          8          6
        +----------+----------+----------+
        |  1  /    |  4  /    |  3  /    |
        |    /  5  |    /  0  |    /  0  |   5
        +----------+----------+----------+
        |  0  /    |  1  /    |  1  /    |
        |    /  6  |    /  6  |    /  2  |   2
        +----------+----------+----------+
        |  1  /    |  3  /    |  2  /    |
        |    /  2  |    /  2  |    /  4  |   4
        +----------+----------+----------+

The cells, row by row: 3 x 5 = 15, 8 x 5 = 40, 6 x 5 = 30; 3 x 2 = 06, 8 x 2 = 16, 6 x 2 = 12; 3 x 4 = 12, 8 x 4 = 32, 6 x 4 = 24. Note the leading zero in 06: every cell gets two digits, so that the diagonals stay aligned.

Now the six bands, from the bottom right:

BandDigits in the bandPlus carrySumWriteCarry out
Units40440
Tens2, 2, 20660
Hundreds0, 6, 1, 2, 301221
Thousands0, 3, 6, 1, 111221
Ten thousands5, 4, 011001
Hundred thousands11220

Read the answer: 202,264.

Count: 9 single-digit products, 18 digits written, 15 additions (12 inside bands and 3 carries), and the largest number you hold is a band sum of 12. Our traditions comparison counted 17 additions for the school method and 8 for Vedic crosswise multiplication, which does the band sums mentally.

On Napier's bones

Lay bones 3, 8 and 6 side by side. Read rows 5, 2 and 4.

           bone 3   bone 8   bone 6
row 5:      1/5      4/0      3/0     ->  1 | 5+4=9 | 0+3=3 | 0  ->  1,930
row 2:      0/6      1/6      1/2     ->  0 | 6+1=7 | 6+1=7 | 2  ->    772
row 4:      1/2      3/2      2/4     ->  1 | 2+3=5 | 2+2=4 | 4  ->  1,544

Now shift and add, as in long multiplication:

  386 x 500  =  193,000
  386 x  20  =    7,720
  386 x   4  =    1,544
               ---------
                202,264

Count: no products recalled, 6 one-digit additions inside rows with no carries, then a three-line addition. The bones turn a nine-cell lattice into three one-line readings.

With a table of logarithms

With a four-figure table:

  1. Look up log 3.86 = 0.5866 and log 5.24 = 0.7193.
  2. Add them: 0.5866 + 0.7193 = 1.3059.
  3. Add the characteristics (2 for each factor in the hundreds) and the overflow: the logarithm of the product is 5.3059.
  4. Look up the antilogarithm of 0.3059: 2.0226, which a four-figure table rounds to 2.023.
  5. The answer is about 202,300.

The exact answer is 202,264, so four-figure tables are about 0.018% off.

On the slide rule

log 3.86 puts 3.86 at 146.6 mm on a 250 mm scale; 5.24 is at 179.8 mm. The sum is 326.5 mm, more than 250, so use the right index: the hairline lands at 76.5 mm on D, which is 2.0226. On the rule, the gap between 2.02 and 2.03 is just over half a millimetre, so you read 2.02 and perhaps estimate 2.023. The rough size is 400 x 500 = 200,000, so the answer is about 202,000.

MethodAnswerErrorSteps
Lattice202,26409 products, 15 additions
Bones202,26403 row readings, 6 additions, 1 column sum
Four-figure log tableabout 202,3000.018%3 lookups, 1 addition
Slide rule (250 mm)about 202,0000.13%2 settings, 1 reading, 1 estimate

Problem 4: 85² = 7,225

On the lattice

A square is just a product of a number with itself.

             8          5
        +----------+----------+
        |  6  /    |  4  /    |
        |    /  4  |    /  0  |   8
        +----------+----------+
        |  4  /    |  2  /    |
        |    /  0  |    /  5  |   5
        +----------+----------+
BandDigitsPlus carrySumWriteCarry out
Units50550
Tens0, 0, 20220
Hundreds4, 4, 401221
Thousands61770

The answer is 7,225. Notice the symmetry: the two off-diagonal cells (8 x 5 and 5 x 8) are identical, which is true for any square on a lattice. A careful worker can fill one and copy it.

On Napier's bones

Lay bones 8 and 5. Read rows 8 and 5.

           bone 8   bone 5
row 8:      6/4      4/0      ->  6 | 4+4=8 | 0   ->  680
row 5:      4/0      2/5      ->  4 | 0+2=2 | 5   ->  425

680 shifted is 6,800; plus 425 is 7,225.

On the slide rule

Multiply 8.5 by 8.5 with the right index: the reading is at 214.7 mm on D, which is 7.225. The marks near 7.2 are 0.05 apart and 7.225 sits halfway between 7.20 and 7.25, so you say 7.22 or 7.23. Reading the square on the A scale is quicker but half as precise.

Either way the slide rule cannot tell you that the answer ends in exactly 25. The Vedic rule for squares ending in 5 (8 x 9 = 72, then append 25) gets 7,225 in 2 operations.

Problem 5: √7,744 = 88

On the lattice: not possible

The lattice has no procedure for roots. It can check a guess (88 x 88 gives 7,744) but cannot find 88.

On Napier's bones, with the square root rod

Napier's square root rod holds the squares of 1 to 9 in split cells:

row | square root rod
----+----------------
 1  |      0/1
 2  |      0/4
 3  |      0/9
 4  |      1/6
 5  |      2/5
 6  |      3/6
 7  |      4/9
 8  |      6/4
 9  |      8/1

Step 1. Split 7,744 into pairs of digits from the right: 77 | 44. There are two pairs, so the root has two digits.

Step 2. Look down the square root rod for the largest square that does not exceed the first pair, 77. Row 8 holds 64; row 9 holds 81, which is too big. The first digit of the root is 8.

Step 3. Subtract: 77 minus 64 = 13. Bring down the next pair: 1,344.

Step 4. Double the root found so far: 2 x 8 = 16. Lay bones 1 and 6 to the left of the square root rod. Each row n of this three-rod setup now reads (160 + n) x n, the quantity the long square root method tests:

Row n(160 + n) x n
1161
2324
3489
4656
5825
6996
71,169
81,344
91,521

Step 5. Find the largest row not exceeding 1,344. Row 8 reads 1,344 exactly. Here is how that row reads on the rods:

           bone 1   bone 6   sq rod
row 8:      0/8      4/8      6/4
from the right: 4 | 8+6=14, write 4 carry 1 | 8+4+1=13, write 3 carry 1 | 0+1=1   ->  1,344

Step 6. The second digit of the root is 8. Subtract: 1,344 minus 1,344 = 0. No remainder, so 7,744 is a perfect square and √7,744 = 88.

Count: two row lookups, one doubling and two subtractions. This is the digit-by-digit square root that our Chinese mathematics post shows on a counting board. The rods replace its trial multiplications with a table.

On the slide rule

Set the cursor on 77.44 on the A scale. A has two decades per scale length; a number with an even count of digits before the decimal point, such as 7,744, goes on the right half. The cursor sits at 236.1 mm, and the D scale below reads 8.80. The size of the root is near √10,000 = 100, so the answer is 88.0. Here the slide rule happens to be exactly right, because 88 has only two significant figures. It cannot tell you 7,744 is a perfect square: √7,745 also reads 88.0.

Problem 6: 7,429 ÷ 37 = 200 remainder 29

On the lattice: not possible

The lattice has no division procedure. The galley or scratch method of the reckoning books is a different layout.

On Napier's bones

Lay bones 3 and 7. Every row is now a multiple of 37, ready to read:

           bone 3   bone 7
row 1:      0/3      0/7      ->   37
row 2:      0/6      1/4      ->   74
row 3:      0/9      2/1      ->  111   (9+2=11, carry 1)
row 4:      1/2      2/8      ->  148
row 5:      1/5      3/5      ->  185
row 6:      1/8      4/2      ->  222   (8+4=12, carry 1)
row 7:      2/1      4/9      ->  259
row 8:      2/4      5/6      ->  296
row 9:      2/7      6/3      ->  333   (7+6=13, carry 1)

Now divide by long division, using the board as your times table:

  1. The first two digits of 7,429 are 74. The largest row not exceeding 74 is row 2, which reads 74. Quotient digit 2. Remainder 74 minus 74 = 0.
  2. Bring down the 2. The partial dividend is 2. No row is that small; quotient digit 0.
  3. Bring down the 9. The partial dividend is 29. Still smaller than row 1 (37); quotient digit 0. Remainder 29.

So 7,429 ÷ 37 = 200 remainder 29. Check: 200 x 37 + 29 = 7,400 + 29 = 7,429.

This is where the bones shine. Long division's hardest step is guessing the next quotient digit; with all nine multiples visible, there is no guessing, for any divisor.

On the slide rule

Put 3.7 on the C scale over 7.43 on the D scale (you cannot set 7.429 more finely than that on a 250 mm rule). Read D under the C index: the hairline sits at 75.7 mm, which is 2.0078, and you read 2.01. The rough size is 7,000 ÷ 40, about 200, so the quotient is about 201. The exact quotient is 200.784, so the reading is 0.11% high.

A slide rule only knows ratios, so it cannot give the remainder 29.

Problem 7: 1/19 = 0.052631578947368421, repeating

On the lattice: not possible

A reciprocal is a division, so the lattice cannot do it.

On Napier's bones

Lay bones 1 and 9 to make the multiples of 19:

           bone 1   bone 9
row 1:      0/1      0/9      ->   19
row 2:      0/2      1/8      ->   38
row 3:      0/3      2/7      ->   57
row 4:      0/4      3/6      ->   76
row 5:      0/5      4/5      ->   95
row 6:      0/6      5/4      ->  114   (6+5=11, carry 1)
row 7:      0/7      6/3      ->  133   (7+6=13, carry 1)
row 8:      0/8      7/2      ->  152   (8+7=15, carry 1)
row 9:      0/9      8/1      ->  171   (9+8=17, carry 1)

Now divide 1.000... by 19 digit by digit. At each step, multiply the remainder by 10, find the largest row that fits, write that row number as the next decimal digit, and subtract.

StepPartial dividendRow usedRow valueNew remainderDigit
110none0100
210059555
350238122
4120611466
56035733
630119111
7110595155
81507133177
91708152188
10180917199
1190476144
12140713377
1370357133
141306114166
15160815288
168047644
174023822
182011911

After step 18 the remainder is 1 again, which is where we started, so the digits repeat from here. 1/19 = 0.052631578947368421 052631578947368421 and so on, with a period of 18 digits.

Two checks are built into the table. Every remainder from 1 to 18 appears exactly once, which is what happens when the period is the longest possible for a divisor of 19. And after step 9 the remainder is 18, which is 19 minus 1. From there on, each digit is 9 minus the digit nine places earlier (0 and 9, 5 and 4, 2 and 7, and so on), because each later remainder is 19 minus the matching earlier one. The comparison post uses that complement trick to get the second half for free, and Tirtha's Ekādhikena Pūrvena rule builds the same digits from the right by doubling.

On the slide rule

Put the cursor on 1.9 on the CI scale (the reversed C scale). Because CI is reversed, the hairline sits over 1.9 on CI and over 1 ÷ 1.9 on C, which reads 5.26. The size of 1/19 is about 1/20 = 0.05, so the answer is 0.0526. That is three digits and nothing about the period of 18.

The metrics table: every problem, every tool

Slide rule errors compare a careful three-figure reading on a 250 mm rule with the exact value.

ProblemLatticeNapier's bonesSlide rule (250 mm)
98 x 979,506 exact; 4 products, 6 additions9,506 exact; 2 rows, 2 additions, 1 sumabout 9,510; 0.04%
47 x 532,491 exact; 4 products, 4 additions, no carries2,491 exact; 2 rows, 2 additions, 1 sumabout 2,490; 0.04%
386 x 524202,264 exact; 9 products, 15 additions202,264 exact; 3 rows, 6 additions, 1 column sumabout 202,000; 0.13%
85²7,225 exact; 4 products, 5 additions7,225 exact; 2 rows, 2 additions, 1 sum7,220 or 7,230; about 0.07%
√7,744Cannot find roots (can only check 88 x 88)88 exact; square root rod, 2 lookups88.0; exact here only because the root has 2 digits
7,429 ÷ 37Cannot divide200 remainder 29 exact; 1 lookup, 3 stepsabout 201; 0.11%; no remainder
1/19Cannot divide0.052631578947368421 repeating; 18 steps0.0526; 0.06%; no period

And the tools themselves:

MeasureLatticeNapier's bonesSlide rule
Tools neededPen and paperA set of rods (10 digit rods plus a square root rod) and a boardThe rule itself
Times table neededYes, all 81 productsNoNo
Carries while multiplyingNone (all postponed to diagonals)None inside a rowNone
Working memoryOne band sum and one carryOne sum and one carry per row, then a column sumRough size of the answer
Operations coveredMultiplication onlyMultiplication, division, square and cube rootsMultiplication, division, squares, roots, reciprocals, logarithms, trigonometry (with extra scales)
PrecisionExact, any sizeExact, any sizeAbout 3 significant figures
Decimal pointAutomaticAutomaticYou place it by estimation
Error checkRe-add bands; casting out ninesCasting out nines; check by multiplying backEstimate the size first; no digit-level check
Where it breaks downNo division or roots; grid grows as m x nFinal addition of rows; many rods for long numbersPrecision; remainders; exact integers

Error checks: casting out nines works on all of them

Casting out nines replaces each number with its remainder when divided by 9 (the same as repeatedly adding its digits). If the multiplication is right, the remainders must multiply correctly too. Here are the checks for this post's products:

ProductFactor remaindersProduct of remainders, mod 9Answer's remainderAgree?
98 x 97 = 9,5068 and 756 → 22Yes
47 x 53 = 2,4912 and 816 → 77Yes
386 x 524 = 202,2648 and 216 → 77Yes
85 x 85 = 7,2254 and 416 → 77Yes
7,429 = 37 x 200 + 291 x 2 + 244Yes

The check catches most slips on the lattice and the bones, such as a wrong band sum or a misread row. It cannot catch two digits swapped in the answer, because swapping digits does not change the digit sum. It is useless for rounded slide rule answers, where the only check is a rough estimate of the size.

Napier's third device: location arithmetic, binary on a chessboard

The least known part of Rabdologiae is the most modern. In arithmetica localis, Napier wrote numbers as sums of powers of two, using letters: a = 1, b = 2, c = 4, d = 8, e = 16, f = 32, g = 64, and so on. So 98 = 2 + 32 + 64 is written bfg, and 97 = 1 + 32 + 64 is afg.

To multiply, you pair every letter of one number with every letter of the other and add their positions in the alphabet, because multiplying powers of two adds their exponents. Counting a as position 0, b as 1, f as 5 and g as 6:

bfg x afga (0)f (5)g (6)
b (1)b (1)g (6)h (7)
f (5)f (5)k (10)l (11)
g (6)g (6)l (11)m (12)

That gives the letters b, g, h, f, k, l, g, l, m. Now simplify: two of the same letter make one of the next letter, because two copies of a power of two make the next power.

  1. Two g's make an h. Letters: b, f, h, h, k, l, l, m.
  2. Two h's make an i. Letters: b, f, i, k, l, l, m.
  3. Two l's make an m. Letters: b, f, i, k, m, m.
  4. Two m's make an n. Letters: b, f, i, k, n.

The result, bfikn, is 2 + 32 + 256 + 1,024 + 8,192 = 9,506. Napier did this by moving counters on a chessboard, where the simplification step is just "replace two counters on a square with one counter on the next square." No times table is needed. Binary computers multiply the same way, by shifting and adding. It stayed a curiosity because converting numbers into and out of binary cost more effort than it saved. A companion post in this series on Egyptian and Russian peasant multiplication follows the same binary idea from the Rhind papyrus to modern processors.

Which is fastest? An honest verdict

There is no single answer. Here is what the counts show.

  • For exact multiplication of ordinary numbers on paper, the bones need the fewest mental operations: no times-table recall, a handful of one-digit additions per row, and one column addition. For 386 x 524 that is 6 additions plus the final sum, against 15 additions and 9 recalled products on the lattice. The catch is that you need the rods.
  • Without any device, the lattice is a safe, slow, checkable method. It is not faster than school long multiplication by any count we made, but it postpones every carry and leaves an audit trail.
  • For division by an awkward divisor, the bones win clearly, because they show all nine multiples at once and remove the guessing from long division.
  • For speed with three significant figures, the slide rule wins by a wide margin: three moves for any multiplication, division or square root, regardless of how many digits the numbers have. If you need more than three figures, or an exact integer, or a remainder, it is the wrong tool.
  • For special numbers, none of them. Numbers near 100, squares ending in 5 and differences of squares are faster by the mental rules in our Vedic post, and trained soroban and anzan users (see the Japanese mathematics post) do general arithmetic with no written record at all.

The most useful thing these tools teach is not speed. It is separation of concerns. Each one splits a hard job into a fixed part (a table, a scale) and a small variable part (a few additions, one setting), so most of the work is done once, in advance, by whoever made the tool. If you want a speed claim you can trust, make a set of paper bones, work this post's problems and time yourself.

Walkthrough: reproduce every number in Python

Every figure above came from a short script like this one. It builds the lattice band by band, reads bones rows, runs the long division for 1/19 and computes slide rule positions on a 250 mm scale. Run it with python3 lattice.py.

import math

def lattice(a, b):
    A, B = [int(c) for c in str(a)], [int(c) for c in str(b)]
    m, n = len(A), len(B)
    bands = {}
    for i, rd in enumerate(B):
        for j, cd in enumerate(A):
            p = cd * rd
            base = (m - 1 - j) + (n - 1 - i)
            bands.setdefault(base, []).append(p % 10)      # units
            bands.setdefault(base + 1, []).append(p // 10) # tens
    carry, digits = 0, []
    for k in range(m + n):
        s = sum(bands.get(k, [])) + carry
        print(f"band {k}: {bands.get(k, [])} + {carry} = {s}")
        digits.append(s % 10)
        carry = s // 10
    return int("".join(map(str, digits[::-1])))

def bones_row(a, r):
    return a * r  # a row of bones is a ready-made row of the lattice

def reciprocal_digits(d, count):
    r, out = 1, []
    for _ in range(count):
        r *= 10
        out.append(r // d)
        r %= d
    return "".join(map(str, out))

def rule_mm(v, length=250):
    return length * math.log10(v)

for a, b in [(98, 97), (47, 53), (386, 524), (85, 85)]:
    assert lattice(a, b) == a * b
print([bones_row(37, r) for r in range(1, 10)])
print(divmod(7429, 37), math.isqrt(7744))
print("1/19 = 0." + reciprocal_digits(19, 18))
s = rule_mm(3.86) + rule_mm(5.24)
print(round(s, 1), round(10 ** ((s % 250) / 250), 4))
for L in (125, 250, 500):
    print(L, round(math.log(10) * 0.2 / L * 100, 2), "%")

The assert line is the important one. It multiplies each pair the ordinary way and stops the script if the lattice disagrees, so a mistake in the band logic cannot slip through silently.

Common mistakes

  • Dropping a leading zero on the lattice. 3 x 2 is written 0/6, not 6. Without the zero, the 6 lands in the wrong band and every digit to its left shifts.
  • Reading a bones row as separate products. Row 5 of bones 3, 8 and 6 is 1/5, 4/0, 3/0. It is not 15, 40, 30 side by side. Add each units digit to the tens digit on its right before you write anything.
  • Forgetting to shift rows on the bones. Row 2 of 386 is 772, but in 386 x 524 the 2 is in the tens place, so it counts as 7,720.
  • Trusting the fourth digit on a slide rule. The scale cannot show it. A reading of 2.0226 on a 250 mm rule is an estimate; write 2.02.
  • Placing the decimal point last. Estimate the size of the answer before you set the rule, not after. A slide rule reading of 2.02 could mean 0.202, 202 or 202,000.
  • Using the wrong half of the A scale for roots. Count the digits: an even number of digits before the decimal point (7,744) goes on the right half, an odd number on the left. The wrong half gives √774.4, about 27.8, instead of 88.
  • Calling the lattice "Fibonacci's method." No lattice has been found in Liber Abaci. The origin is still debated.

FAQ

What is lattice multiplication?

It is a written method that puts the two numbers on the edges of a grid, writes each single-digit product as tens and units in a cell split by a diagonal, and then adds along the diagonal bands to get the answer. It is also called the gelosia or grating method.

Who invented lattice multiplication?

No one person. The earliest recorded descriptions are by Ibn al-Bannāʾ al-Marrākushī in the Maghreb in the late thirteenth century and in an anonymous Latin treatise written in England around 1300. Italian printed arithmetics, the Treviso Arithmetic (1478) and Pacioli's Summa (1494), spread it in Europe. Where it first appeared is still researched.

How do Napier's bones work?

Each rod carries the nine multiples of one digit, written as tens and units split by a diagonal. Lay the rods for your number side by side and every row becomes that number times the row index, read by adding neighbouring digits along the diagonals. Multi-digit multipliers take one row per digit plus a final addition.

Can Napier's bones divide and take square roots?

Yes. For division, the rods for the divisor show all nine multiples at once, which removes the guessing from long division. For square roots, Napier added a special rod holding the squares 1 to 81, used together with the rods for twice the root found so far. Napier also described cube roots in Rabdologiae.

How accurate is a slide rule?

A standard rule with a 250 mm scale gives about three significant figures. A reading error of 0.2 mm on that scale is an error of about 0.18% in the number. Longer rules are more precise in proportion to their length.

Who invented the slide rule?

Edmund Gunter put a logarithmic scale on a single ruler in the early 1620s and used dividers to add lengths. William Oughtred slid two such scales against each other, described in print in 1632. Richard Delamain published a circular slide rule in 1630, and the two argued over priority.

Is the lattice method faster than long multiplication?

Not by our counts. It needs the same single-digit products and about the same number of additions. Its advantage is that it separates multiplying from carrying and leaves a record of every partial product, which makes errors easier to find.

Why did people stop using slide rules?

Handheld scientific calculators, starting with the HP-35 in 1972, gave ten digits instead of three and handled logarithms and trigonometry directly. Within a few years they were cheap enough to replace the slide rule for students and engineers.

Deep dives in this series

Tables you trust, checks you can rerun: an honest bridge

Safeguard does not do mathematics, and nothing in this post was computed by a Safeguard model. The parallel to our work is in the habits these tools teach: a set of bones is only as good as the table printed on it, and a slide rule user estimated the answer before trusting the reading. Software works the same way. Most of an application is code someone else wrote, pulled in as open source dependencies, and it is safer when every component is known, every version is checked against published vulnerabilities, and the result can be verified again later. If you build anything around this material, from a lattice practice app to a classroom notebook like the script above, those dependencies need the same checking and timely fixes as the code in a production service.

More in this series

Other posts in our fast calculation methods series:

Fix it without waiting for upstream

Whatever the vulnerability, most of the risk sits in two gaps. The first is the time between a fix being published and that fix actually running in your production builds. The second, and worse, is the time before any fix exists at all, while a maintainer works out a patch and a release schedule. Waiting through both gaps is a habit, not a requirement. Safeguard gives teams three ways to close them.

1. Autonomous remediation: pull requests, not tickets

When a fixed version exists, Safeguard's Griffin models open a tested, policy gated pull request that moves the affected dependency to the safe version. You can run it on one repository or in bulk across every project that carries the vulnerable version. Remediation covers eight categories, including dependencies, licenses, security posture and findings. Reachability analysis ranks the vulnerable code paths your application actually calls first, so the first pull requests you merge are the ones that matter most. Autonomous remediation ships switched off, with every category set to Manual, so your team decides how much runs on its own and what still needs a human approval.

2. Gold Open Source: the safe version in seconds, free

gold.safeguard.sh is free and needs no login. Search any CVE or package to see affected and fixed versions, CVSS, EPSS, CISA KEV status and a recommended safe version, or use the "Am I affected?" checker. The same data is available through a free read API, README status badges and RSS threat feeds. The safeguard-sh/gold-scan-action GitHub Action can fail a build on a known exploited vulnerability, on any known vulnerability, or never, so a version you have just removed cannot quietly come back in next week's merge.

3. Gold Registry: start from components that are already fixed

registry.safeguard.sh provides hardened, drop in replacements for upstream packages and container images. Every Gold artifact is held continuously to zero exploitable critical or high CVEs, zero malware and a completed license check, with SLSA L3 or higher provenance, a Sigstore signature and a public evidence page you can hand to an auditor. An artifact loses its Gold badge if it regresses. Teams can point their own package directory at the registry so hardened equivalents resolve without changing how developers install anything.

When upstream has no fix yet, or will not ship one, Safeguard first works to get the fix accepted upstream. If the issue is severe or upstream will not move, Safeguard builds a fork, fixes the vulnerability there and publishes a hardened Gold build, so you are not stuck on a maintainer's release schedule. You can also request a hardened, compatibility tested build of a specific package. This fork and patch flow is in early access today, so ask which packages it covers before you plan around it.

Your situationWhat to use
A fixed version existsAutonomous remediation opens the upgrade pull request; Gold Open Source confirms the safe version
You need to know today whether you are affectedGold Open Source lookup and "Am I affected?" checker, free and without login
You want vulnerable versions to stop shippingThe Gold scan GitHub Action in CI, plus Safeguard policies and gates
Upstream has no fix yet, or will not ship oneA custom Gold request; fork and patch (early access)
You want to start clean on new projectsPull hardened components and images from Gold Registry

One honest limit: when the vulnerable code lives in a vendor appliance, a hosted service or an operating system runtime you do not build yourself, the fix still has to come from that vendor or distribution. The steps above apply to the open source dependencies and container images you build and ship, which is where most teams carry the largest and least tracked share of their exposure.

See how Safeguard would help

None of these demos involve any arithmetic; they show the software side described in the bridge above.

The first demo is a real Safeguard CLI session. It installs the CLI, opens the interactive terminal and asks it to fix a lodash CVE in a repository. It reads the finding and the advisory, asks before any command that changes something, edits package.json to lodash 4.17.21, runs npm install and npm test with approval, prints a summary and pushes nothing. The same flow applies to a web app for lattice or slide rule practice: scan the repository, then let the assistant propose the dependency upgrade under your approval.

Click through it at your own pace, or open it full screen.

The second demo sets up the Safeguard runner on your own machine, approves it with its device code and then scans from the terminal. That suits teachers and hobbyists who keep scripts like the walkthrough above on their own laptops and want the scan to run where the code lives.

Click through it at your own pace, or open it full screen.

The third demo connects Claude to the Safeguard MCP server with OAuth and lets you choose which tools Claude can use. If you already work with Claude while building an education app, it brings dependency findings into the same conversation, limited to the tools you allow.

Click through it at your own pace, or open it full screen.

To try it on your own repositories, download Safeguard and follow the CLI documentation.

Quick check

On a lattice for 47 x 53, what are the four cells and the band sums?

The cells are 20, 35, 12 and 21. From the bottom right the bands sum to 1, 9 (5 + 2 + 2), 4 (0 + 3 + 1) and 2, with no carries, so the answer is 2,491.

Row 6 of bones 3 and 7 shows 1/8 and 4/2. What number does it read?

From the right: 2; then 8 + 4 = 12, write 2 and carry 1; then 1 + 1 = 2. The row reads 222, which is 37 x 6.

A 250 mm slide rule shows 2.02 for 386 x 524. What is the answer, and how far off is it?

The rough size is 400 x 500 = 200,000, so the reading means about 202,000. The exact product is 202,264, so the slide rule answer is about 0.13% low, which is normal for three significant figures.

Sources

Further reading, cited in the text but not fetched for this post: Jean-Luc Chabert (ed.), A History of Algorithms: From the Pebble to the Microchip (Springer, 1999); David Eugene Smith, History of Mathematics, volume 2 (Dover); Frank J. Swetz, Capitalism and Arithmetic: The New Math of the 15th Century (Open Court, 1987); Laurence E. Sigler, Fibonacci's Liber Abaci (Springer, 2002); John Napier, Rabdology, translated by William Frank Richardson with an introduction by Robin E. Rider (MIT Press, 1990).

Last reviewed: 25 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.