Napier’s Bones and the Birth of Logarithms

Chronicles of Computation — The Early Mechanisms

Danilo Poccia
Chronicles of Computation
5 min readAug 8, 2023

--

In the heart of the 16th century, a Scottish scholar named John Napier was about to make a discovery that would revolutionize the world of mathematics. Born in 1550 in Edinburgh, Scotland, Napier was a polymath who made significant contributions to the field of mathematics. He was a man of many talents, with interests ranging from agriculture to theology, but it was his work in mathematics that would leave a lasting legacy.

Photo by Kate Bielinski on Unsplash

Napier’s most significant contribution to mathematics was his invention of logarithms, which he first published in 1614 under the title “Mirifici logarithmorum canonis descriptio”. The invention of logarithms was foreshadowed by the comparison of arithmetic and geometric sequences. Napier’s conception of a logarithm involved a clear apprehension of the nature and consequences of a certain functional relationship, at a time when the concept of a function was not yet fully developed.

Logarithms simplified complex calculations, making it easier to multiply, divide, and take roots of numbers, by transforming these operations into simpler ones — addition, subtraction, and multiplication, respectively.

Here’s how it works:

1. Multiplication: Logarithms convert multiplication into addition. If you have two numbers, say a and b, and you want to multiply them, you can instead add their logarithms. Mathematically, this is expressed as log(a * b) = log(a) + log(b). So, if you know the logarithms of a and b, you can just add those logarithms to get the logarithm of the product a * b. Then, by looking up this value in a table of antilogarithms (or using an inverse logarithm function), you can find the product a * b.

2. Division: Similarly, logarithms convert division into subtraction. The formula is log(a / b) = log(a) — log(b). So, to divide a by b, you subtract the logarithm of b from the logarithm of a, and then find the antilogarithm of the result.

3. Roots: Logarithms can also simplify the process of taking roots. The nth root of a number a can be found by dividing the logarithm of a by n, and then finding the antilogarithm of the result. This is because log(a^(1/n)) = (1/n) * log(a).

In the era before calculators and computers, these properties of logarithms were a huge time-saver. Logarithm tables were widely used in many fields, including astronomy, engineering, and navigation, to simplify complex calculations. Logarithms reduced the time and effort required for these calculations, making them one of the most important advances in the practical application of mathematics.

Around the same time, Napier developed a manual calculating device known as “Napier’s bones”. These were not actual bones, but rather a set of rods inscribed with numbers that could be used to perform multiplication and division. Each rod is a strip, usually made of bone or ivory, with a series of squares with numbers inscribed on it.

Let’s take a closer look at how Napier’s bones work. Imagine a set of ten rods, each marked with a different digit from “0” to “9”. Each rod is divided into nine squares, and in each square, there are two numbers. The number on the bottom-right is the first digit of the multiplication of the number of the rod and the number of the square. The number on the top-left is the second digit of the same multiplication. For example, on the rod marked “2”, the fifth square (2 * 5 = 10) would have `0` in the right-bottom and `1` in the top-left.

The device simplifies multiplication by reducing it to a process of addition. Here’s how it works:

1. Set up: To multiply a number by another number, you first arrange the appropriate rods side by side. For example, to multiply 234 by 7, you would arrange the rods for 2, 3, and 4 next to each other.

2. Multiplication: Then, you look at the squares corresponding to the digit you’re multiplying by (in this case, 7). You add up the numbers in each diagonal to get the digits of the result.

Here’s a simple Python code that generates a representation of Napier’s bones:

# Function to generate Napier's bones
def generate_bones():
bones = []
for i in range(10):
bone = []
for j in range(1, 10):
p = i*j
bone.append((p // 10, p % 10))
bones.append(bone)
return bones

# Generate and print Napier's bones
bones = generate_bones()

for i, bone in enumerate(bones):
print(f"{i}: {bone}")

This code creates a list of bones, where each bone is shown horizontally as a list of tuples. Each tuple represents a square on the bone, with the first element being the top-left digit of the bone and the second element being the bottom-right digit.

Save the previous file as napiers_bones.py and run it using Python. Here’s the output:

0: [(0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0)]
1: [(0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (0, 6), (0, 7), (0, 8), (0, 9)]
2: [(0, 2), (0, 4), (0, 6), (0, 8), (1, 0), (1, 2), (1, 4), (1, 6), (1, 8)]
3: [(0, 3), (0, 6), (0, 9), (1, 2), (1, 5), (1, 8), (2, 1), (2, 4), (2, 7)]
4: [(0, 4), (0, 8), (1, 2), (1, 6), (2, 0), (2, 4), (2, 8), (3, 2), (3, 6)]
5: [(0, 5), (1, 0), (1, 5), (2, 0), (2, 5), (3, 0), (3, 5), (4, 0), (4, 5)]
6: [(0, 6), (1, 2), (1, 8), (2, 4), (3, 0), (3, 6), (4, 2), (4, 8), (5, 4)]
7: [(0, 7), (1, 4), (2, 1), (2, 8), (3, 5), (4, 2), (4, 9), (5, 6), (6, 3)]
8: [(0, 8), (1, 6), (2, 4), (3, 2), (4, 0), (4, 8), (5, 6), (6, 4), (7, 2)]
9: [(0, 9), (1, 8), (2, 7), (3, 6), (4, 5), (5, 4), (6, 3), (7, 2), (8, 1)]

Let’s use Napier’s bones to multiply 234 by 7. Let’s take the bones for digits 2, 3, and 4:

2: [(0, 2), (0, 4), (0, 6), (0, 8), (1, 0), (1, 2), (1, 4), (1, 6), (1, 8)]
3: [(0, 3), (0, 6), (0, 9), (1, 2), (1, 5), (1, 8), (2, 1), (2, 4), (2, 7)]
4: [(0, 4), (0, 8), (1, 2), (1, 6), (2, 0), (2, 4), (2, 8), (3, 2), (3, 6)]

Because we are multipling by 7, we look at the seventh tuple for each bone:

2: (1, 4)
3: (2, 1)
4: (2, 8)

Now, we compute the result of the multiplication by adding the digits in the diagonals. The first and the last digits don’t have other numbers in a diagonal, so we take them as they are.

The last digit is 8. The one before is 2 + 1 = 3, preceded by 2 + 4 = 6 and, for the first digit, 1:

234 * 7 = 1638

Now, try doing some calculations using Napier’s bones! If the sum of a diagonal column is greater or equal to 10, the first digit (always a “1”) should be carried over and added along with the numbers for the previous digit.

Napier’s bones were a significant step forward. They were a simple yet effective tool that made complex calculations more accessible. Napier’s work laid the groundwork for the slide rule, which would become a fundamental tool for engineers and scientists for centuries to come.

This story is part of the Chronicles of Computation book. The next section is yet to be published.

--

--

Danilo Poccia
Chronicles of Computation

Passioned about IT, IoT, AI, ML, and other acronyms. Writing the Chronicles of Computation book. Chief Evangelist (EMEA) @ AWS. Opinions are my own.