Keywords

1 Introduction

Although the German polymath Gottfried Wilhelm Leibniz (1646–1716) made original contributions to a wide range of disciplines, such as law, philosophy, politics, languages, and many areas of science, his fame and renown have always rested principally on his pioneering mathematical work, in particular his independent invention of the calculus in 1675. Another of his enduring mathematical contributions was his invention of the binary number system, the basis for today’s world of digital computing and communications. In this system, which uses only two digits – 0 and 1 – every position starting from the right represents a successive power of 2, such that the rightmost place is the 20 (or 1’s) column, the next-rightmost place the 21 (or 2’s column), and so on. While Leibniz had a particular fascination with binary, his work on nondecimal number systems covered all the bases, or at least bases 2–16. Particularly notable is his invention of base 16, or “hexadecimal” in modern parlance (Leibniz called it “sedecimal” and “sedenary”), another number system used in modern computing.

128’s

64’s

32’s

16’s

8’s

4’s

2’s

1’s

1

0

0

1

0

0

1

0

Despite the proliferation of nondecimal weights, measures, and currencies in the seventeenth century, the idea of exploring nondecimal number bases, as opposed to tallying systems, was not commonplace. While counting in fives, twelves, or twenties was well understood and widely practiced, the idea of counting in bases 5, 12, or 20 was not. The modern idea of a base as a positional numbering system was still coalescing. But it was glimpsed by a few. Indeed, the binary number system was independently invented at least three times in the seventeenth century: by Thomas Hariot (1560–1621) near the turn of the century (see Strickland 2023c), by Juan Caramuel y Lobkowitz (1606–1682) in 1670, and again by Leibniz c.1677–1678. Moreover, Erhard Weigel (1625–1699) proposed the quaternary or base-4 number system in 1673, and Joshua Jordaine vigorously defended the duodecimal or base 12 system in 1687 (see Weigel 1673 and Jordaine 1687). But if Leibniz’s willingness to explore nondecimal number systems was not entirely unprecedented in the seventeenth century, the depth of his explorations was. He wrote in excess of a hundred manuscripts on binary, and at least as many more in which binary is mentioned alongside other matters. There are manuscripts dealing with other nondecimal bases too. Of these riches, Leibniz chose to publish just a single paper in his lifetime: “Explanation of Binary Arithmetic,” which appeared in 1705. This was enough to bind his name to the binary system in the centuries that followed, such that it was often incorrectly stated that he was its sole inventor. But of the three mathematicians who had devised binary in the seventeenth century, only Leibniz would influence the future development of base 2 and its eventual adoption by early computer engineers (see Strickland and Lewis 2022, 16–21): Hariot’s manuscripts on binary arithmetic remained unknown until the 1920s (see Morley 1922) and have been published only in the last decade, while Caramuel y Lobkowitz’s book was widely overlooked, being cited more in catalogues of book collections than in the work of other mathematicians.

Leibniz’s decision not to publish more of his work on nondecimal number systems limited his impact; he is not, for example, generally given credit for the invention of base 16 (an honor usually given to the nineteenth-century Swedish-American engineer John Nystrom; see Knuth 1998, 202). Even today, more than 300 years after Leibniz’s death, the vast majority of his writings on binary and other nondecimal number systems remains unpublished. As a consequence, many of the texts cited in this chapter are unpublished manuscripts. Since these are not generally accessible, I have quoted from them liberally. Given that the full depth of Leibniz’s writings on binary and other nondecimal number systems remains to be explored, the account of them in this chapter will necessarily be incomplete but nevertheless should go some way toward showing the depth of Leibniz’s engagement with nondecimal number systems.

The plan of this chapter is as follows. Section 1 takes up the oft-debated question of who may have influenced Leibniz’s invention of binary. As none of the proposed candidates is plausible, I turn in Sect. 2 to the question of why Leibniz invented binary, considering both his own answer and a rather different one suggested by his earliest writings on the subject. Section 3 concerns Leibniz’s subsequent development of binary, in particular his methods for converting decimal to binary and for performing the four basic arithmetic operations in base 2, as well as his ideas for binary-calculating machines and his fascination with the periodic recurrence of digits of the numbers of different arithmetic and geometric sequences expressed in binary. Section 4 focuses on Leibniz’s little-known work on binary fractions and expansions, and his hope that these would throw light on irrationals and transcendental quantities. In Sect. 5, I outline the symbolic use of binary in Leibniz’s philosophy, where 1 and 0 are envisaged as analogues of God and nothingness, such that binary numeration is seen as a representation of the theologically orthodox doctrine of creation ex nihilo. Having learned of Leibniz’s binary system, a Jesuit missionary in China, Joachim Bouvet (1656–1730), suggested a correlation between binary numeration and the hexagrams of the ancient Chinese divinatory text, the Yijing. This correlation – and Leibniz’s enthusiastic reaction thereto – is the subject of Sect. 6. In Sect. 7, I turn to Leibniz’s invention and exploration of base 16, or sedecimal, while Sect. 8 concerns Leibniz’s work on other nondecimal number systems, in particular bases 4 and 12. The chapter concludes with an account of a hitherto unknown practical application of binary that Leibniz devised in the last year of his life. Let us begin, then, with Leibniz’s potential influences.

2 Who Influenced Leibniz?

The question of who influenced Leibniz’s invention of binary has been often asked and just as often has been answered inadequately. Four candidates have been proposed: John Napier (1550–1617), Francis Bacon (1561–1626), Erhard Weigel, and Juan Caramuel y Lobkowitz.Footnote 1 While none of these suggestions is tenable, examining them is worthwhile for the light it sheds on seventeenth-century exploration of different number bases and of ways to simplify calculation.

In 1617, Napier published his “location arithmetic” which employed a form of binary reckoning based on the powers of 2 geometric sequence – 1, 2, 4, 8, 16, 32, 64, etc. – carried out on a chessboard. The successive powers of 2, identified by letters from the classic Latin alphabet (so no j, u, or w) and then the Greek letters, are given in the margins. When multiplying two numbers, each had to be decomposed into its respective powers of 2, e.g., 37 into 32, 4, and 1, with these then converted into letters which determined where counters would be placed on the board. By moving the counters according to fixed rules, one could carry out the multiplication sum without effort, aside from having to reconstruct the product by adding up its various powers of 2, the form in which the answer was given (see Napier 1617, 115–154).

Napier’s binary reckoning was shortly followed by a form of binary information code. In 1623, Bacon published his De dignitate et augmentis scientiarum [On the Dignity and Advancement of the Sciences] which contained a description of a cipher employing a biliteral alphabet, where aaaaa = A, aaaab = B, aaaba = C, aaabb = D, etc. Bacon (1623, 279) believed these cipher-characters opened the way for people to express their thoughts “by objects which may be presented to sight or hearing, provided those objects are capable of a twofold difference only, as by bells, trumpets, torches, the report of muskets, and any other things whatsoever.” The suggestion was not pursued, but the principle survives in the binary code used in the Braille reading system and in the ASCII (American Standard Code for Information Interchange) character table.

The first publication of binary notation for numbers occurred almost fifty years after Bacon. In his Mathesis biceps of 1670, Caramuel y Lobkowitz included brief chapters on bases 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, and 60, in each case providing a table of numbers, details of who (if anyone) had used that system, and examples of how each number is embedded or reflected in the natural or supernatural world (Caramuel y Lobkowitz 1670, XLV–LXI). In the chapter entitled “On Binary Arithmetic,” he presents a table using 0 and the letter a to form the sequence of numbers up to 32 expressed in binary (for example, in his notation, 17 is a00a). Despite the chapter title, no attempt is made to show how arithmetic would work in base 2; as such, Caramuel y Lobkowitz did not venture beyond binary notation.

However, a fully developed nondecimal number system, complete with arithmetic algorithms, was not long in coming. In 1673, Weigel published Tetractys, a small book in which he advocated for the widespread adoption of the quaternary, or base-4 system, loosely inspired by the Pythagorean tetrad, a triangular figure with four rows of 1, 2, 3, and 4 points, respectively. In a relatively detailed treatment, Weigel (1673, 16–23) outlines methods of performing all four arithmetic operations in base 4, as well as methods for the extraction of square and cube roots.

It is easy to see why the ideas of many of these thinkers have been considered as a possible influence on Leibniz’s invention of binary, since all share structural features with the binary number system. But as superficially tempting as it might be to consider one or more of these thinkers as Leibniz’s influence, there is no evidence that any of them were, and good reason to think that two of them were not. Manuscript evidence indicates that Leibniz became aware of Weigel’s quaternary system only in 1683 (see A VI 4, 1162–1163), too late for it to have influenced his development of binary, while there is evidence that Leibniz never saw Caramuel y Lobkowitz’s Mathesis biceps at all.Footnote 2 As for Napier and Bacon, Leibniz knew of their work but did not mention it in connection with binary. It was unlikely he was influenced by either. The similarities between Bacon’s biliteral alphabet and the binary number system might be obvious to us, as we are in a position of being able to compare both, but to a seventeenth-century mind knowing only the former there would have been little reason to think of the latter, as the biliteral alphabet hardly suggests or implies a positional number system employing two digits. Indeed, Bacon’s biliteral alphabet is sufficiently different from a binary number system in both form and function that the passage from one to the other would have required an enormous leap of imagination, almost on a par with that required to arrive at binary from any of the routine examples of duality or twoness with which Leibniz would have been familiar, such as matter and spirit, good and evil, and light and dark. As for the specific powers of 2 geometric sequence used by Napier, this was a common feature of mathematical works: Adam Ries (1529, n.p., chapter “Progressio”) referred to it as the progression “in which one number exceeds another twofold”; Peter Ramus (1599, 177) called it the “subduple ratio,” while Marin Mersenne (1644, n.p., “preface”) dubbed it the “double progression” (Leibniz’s own term was “double geometric progression”). In many cases, the sequence was used in case studies of how to sum portions of progressions (see Schott 1658, 636), a staple part of the medieval and early modern mathematical curriculum. But some mathematicians went further. Michael Stifel (1544, 237, cf. 31), for example, treated the sequence as an object of study in its own right, observing that addition and subtraction in the arithmetic sequence of natural numbers correspond to multiplication and division in the powers of 2 geometric sequence:

Whatever the arithmetic progression does by addition and subtraction, such are the things the geometric progression does by multiplication and division...

0.

1.

2.

3.

4.

5.

6.

7.

8.

1.

2.

4.

8.

16.

32.

64.

128.

256.

Moreover, as we shall see in the next section, the powers of 2 geometric sequence was also the cornerstone of seventeenth-century investigations into both prime and perfect numbers, and some of Leibniz’s earliest writings involving binary are on those subjects. The sequence was also well known to assayers, who routinely used weights in the proportion 1:2:4:8..., in order to weigh money and metals with as few weights as possible, as Leibniz often noted (Strickland and Lewis 2022, 130, 139, 195, 202). Accordingly, as the powers of 2 geometric sequence was in sufficiently wide use by mathematicians and assayers, Leibniz is no more likely to have drawn it from Napier than anyone else.

Since no plausible case can be made for thinking that any of the aforementioned thinkers influenced Leibniz’s invention of binary, and there are no other likely candidates, we ought to be open to the idea that “who influenced Leibniz?” might be the wrong question to ask. A better question would be: Why did he invent it? There are two ways to answer this question: either by looking at Leibniz’s own answer to it, or by looking at his earliest manuscripts on binary and seeing how it was used. In the next section, we shall do both.

3 Early Writings on Binary

In his own ex post facto narrative, written decades after his invention of binary, Leibniz claimed that it was conscious reflection on other nondecimal number systems that led him to think of binary, as “the simplest and most natural” base (Strickland and Lewis 2022, 138). He sometimes identified the duodecimal and the quaternary as these other nondecimal bases. While there is no evidence that he paid any attention to the quaternary system prior to encountering Weigel’s defense of it in 1683 (see A VI 4, 1162–1163), there is one early writing in which Leibniz treats binary as an alternative to duodecimal: a manuscript entitled “Thesaurus mathematicus” [Mathematical Thesaurus], probably written in either 1678 or 1679. In this text, Leibniz works through various topics in arithmetic, geometry, and mechanics; near the end, he outlines how positional notation works in the decimal and duodecimal number systems before identifying binary as an alternative:

From this outline it is clear that only these ten digits are needed: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. Those in the first position signify the equivalent number of 1s, namely no 1s, one 1, two 1s, three, four, five, six, seven, eight, nine 1s. Those in the second position signify the equivalent number of 10s, that is, 1s taken ten times; in the third position, the equivalent number of 100s, that is, 10s taken ten times, or the squares of 10; in the fourth position, the equivalent number of 1000s, that is, 100s taken ten times, or the cubes of 10, and so on. And in place of 10 one would be able to put any other number, for example, 12. For just as when the base a is 10, the square a2 signifies 100 and the cube a3 signifies 1000, so when a is 12, a2 will be 12 times 12, that is, 144, and a3 will be 12 times 144. But on this method, instead of the digits mentioned above—0, 1 etc. 9—two new digits would be needed in addition, one which would represent ten, the other which would represent eleven; but [the digits] 10 would signify twelve, and 100 would signify one hundred and forty four. And there are some who prefer to use this method of calculating over the common method, because 12 can be divided by 2, 3, 4, and 6; in addition, a calculation is completed with fewer digits. But the difference is not so great as to be worth abandoning the decimal progression. If anyone should want to use the binary progression, he would not need any digits except 0 and 1... But the calculation would be longer, albeit easier. (LH 35, 1, 25 Bl. 3v)

This is the only writing from the 1670s in which Leibniz mentions both binary and duodecimal. And his remarks in it do not support his later narrative that he devised binary after reflecting upon duodecimal; rather, binary is simply presented as an alternative to bases 10 and 12. Moreover, at the time of writing this manuscript, Leibniz must have developed a good understanding of binary already, given his remarks about the length and ease of calculations in base 2. Quite how good his understanding was at the time is unclear: in a marginal comment, Leibniz added, “We shall say more things about the binary progression below,” though this promise is not fulfilled and the manuscript contains nothing further on the subject.

The lack of supporting evidence is one good reason to be cautious about Leibniz’s ex post facto narrative. A second reason is that the narrative presents his invention of binary as detached from and independent of the other mathematical problems with which he was dealing at the time, as though binary emerged sine contextu, in what can only be described as a eureka moment. As little more can be said about Leibniz’s narrative, let us consider an alternative hypothesis, that Leibniz’s invention of binary – or at least binary notation – occurred in response to his work on three problems that exercised him in the mid-to-late 1670s, namely, devising methods and formulae to determine the divisibility of composite numbers, primality, and perfect numbers.Footnote 3 This hypothesis not only has the virtue of showing that binary developed in response to and as an aid for mathematical work with which he was already engaged, but also is supported by manuscript evidence. To illustrate, we shall consider three manuscripts, all written c.1677–1678, featuring some of Leibniz’s earliest uses of binary notation. At the heart of all three manuscripts is the powers of 2 geometric sequence, which was at the forefront of Leibniz’s mind at the time because of his investigations into the problems of number composition and primality. In the late 1670s, these would lead him to formulate and prove the primality test known as Fermat’s little theorem: 2n–1 – 1 ≡ 0 (mod n).Footnote 4 On his way to that, Leibniz investigated numbers of the form 2n – 1 (these would later be dubbed “Mersenne numbers”), as in the first of our three early manuscripts, a series of remarks about the divisibility of numbers written on the back of an envelope probably in 1678. Leibniz begins by stating the formulae 2n – 1, 3n – 2, 4n – 3, etc.:

  • Every number exactly divides any number of the double geometric progression diminished by one.

  • Every number exactly divides any number of the triple geometric progression diminished by one or two.

  • Every number exactly divides any number of the quadruple geometric progression diminished by one or two or three.

  • And so on ad infinitum.

(To the first statement, Leibniz later added: “false, except about a prime [number].”) The manuscript continues:

  • The numbers of any geometric progression can be expressed generally thus: 1, 10, 100, 1000, 10000 etc. Putting 10 means either 2 for the double [geometric progression] or 3 for the triple [geometric progression] etc. Therefore the numbers of the double geometric progression diminished by one can be expressed thus: 1 or 11 or 111 or 1111 etc.

  • And of the triple [geometric progression] thus: 2 or 22 or 222 etc.

  • And of the quadruple [geometric progression] thus: 3 or 33 or 333 etc.

  • And of the decuple [geometric progression] thus: 9 or 99 or 999 etc. (LH 35, 12, 2 Bl. 4r)

Here, Leibniz uses binary numeration as an alternative way of expressing the numbers of a base (or “geometric progression”), noting that the numbers 1, 10, 100, 1000, 10000, etc. have different values depending on which base one is using.Footnote 5 His use of binary here is purely illustrative, and binary plays no further role in his analysis (in the rest of the manuscript, Leibniz concerns himself with devising a method to determine which decimal number ending …991 to …999 is divisible by 17).

The second manuscript deals with a related matter: perfect numbers, that is, positive integers that are equal to the sum of their divisors (including 1 but excluding the number itself), such as 6 (= 3 + 2 + 1) and 28 (= 14 + 7 + 4 + 2 + 1). From the time of Euclid, investigations in this area of number theory have concentrated upon the powers of 2 geometric sequence, since Euclid’s theorem of generating perfect numbers (or rather, even perfect numbers) is this: “if any number of numbers are set out successively in a double proportion [starting] from one, until the whole sum becomes prime, and this sum multiplied into the last [number] makes some number, then the [number] made will be perfect.”Footnote 6 That is, if 2n − 1 is prime, then 2n−1(2n − 1) is perfect. Leibniz was reminded of this theorem when reading a 1678 dissertation on perfect numbers by Johann Wilhelm Pauli (1658–1723), who had used Roman letters to stand for the numbers of the powers of 2 geometric sequence in order to investigate the parts of perfect numbers via a sort of rudimentary algebraic calculus. Upon reading Pauli’s book, Leibniz copied out Euclid’s theorem then illustrated it in binary notation: “If 111 is prime, 11100 (that is, 111 by 100) is perfect (assuming 10, 100, 1000 are 2, 4, 8), production of the same thing by a different route” (LH 35 3 B 17, Bl. 2r). There is no indication here of Leibniz using binary notation to compute unknown perfect numbers, nor would that have been a realistic prospect in any case: the first five perfect numbers are 6, 28, 496, 8128, and 33550336, so using binary notation to represent any except the first two would obviously require unmanageably long strings of digits.Footnote 7

Given the central role of powers of 2 in Leibniz’s work on number composition, primes, and perfect numbers in the mid-to-late 1670s, it is easy to see why binary notation would have appealed to him. Take, for example, the number 7 expressed in binary: 111. A striking feature of this notation is that it displays the component powers of 2, as there is a 1 in the 4’s position, a 1 in the 2’s position, and a 1 in the 1’s position. Thus, the binary value 111 is not just an alternative way of writing the decimal number 7, it is one that shows the three calculation steps – (1 × 22) + (1 × 21) + (1 × 20), that is, 4 + 2 + 1 – required to produce the number through powers of 2. In this vein, in 1686 Leibniz claimed that binary numeration is more perfect than decimal because in decimal there is no way to demonstrate from the digits 3 and 9 that 3 × 3 = 9, whereas in binary it is apparent (with a little working out) that 11 × 11 = 1001 (A VI 4, 800). And in the 1690s, when Leibniz started to provide detailed accounts of binary to some of his mathematician correspondents, he often made the point that a unique feature of binary notation is that it shows how any number can be represented as the sum of distinct powers of 2 (see A II 3, 452; Strickland and Lewis 2022, 111; 195).

Moreover, binary notation is convenient for expressing the numbers of the powers of 2 geometric sequence because these always consist in a 1 followed by 0s, e.g., 2 = 10, 4 = 100, 8 = 1000, etc. And as Leibniz acknowledged in the first of our three early manuscripts above, binary notation is just as convenient for expressing the values of the Mersenne numbers, 2n – 1, because these always consist in 1s with no 0s, e.g., 21 – 1 = 1; 22 – 1 = 11; 23 – 1 = 111; etc.Footnote 8 (In contemporary terminology, every Mersenne number is a binary repunit.) Therefore, binary numeration serves as a very convenient and very informative shorthand if one is working with various powers of 2, or the values of 2n – 1, especially for the lower values thereof, the very ones Leibniz tended to favor when illustrating his formulae.

And indeed, in our third manuscript, entitled “Calculus” [Calculation], written sometime after 1676 (but probably before 1680), Leibniz uses binary notation as one of the various ways of expressing the powers of 2. In this manuscript, Leibniz outlines elementary arithmetic terms and operations, and when he comes to “powers” he offers this:

Powers. bb is b2, bbb is b3, etc. brbz is br+z; thus, b2b3 is b2+3, that is, b5.

1

2

4

8

16

32

64

128

256

b0

b1

b2

b3

b4

b5

b6

b7

b8

1

b

bb

bbb

b3b

b3-2

b4+3

b2b

b2b2

b3b2

b3b3

b4b2

1

10

100

1000

10000

100000

1000000

10000000

100000000

  1. (LH 35, 4 11 Bl. 8r)Footnote

    A similar table is found in other manuscripts, such as LH 35, 4, 11 Bl. 10r, though this was likely written in 1681.

The three manuscripts surveyed share a number of notable features. First, while binary notation may be present in all three, binary arithmetic is not; instead, Leibniz performs all his arithmetic in decimal or algebra. Second, binary notation is used for illustration rather than for calculation. These common features suggest that at the time of writing these three manuscripts, Leibniz was not thinking beyond the notation, and this in turn would support the hypothesis that he developed this notation as a tool to assist his investigations in mathematical problems that were exercising him at the time.Footnote 10 Of course, given the difficulty in dating Leibniz’s earliest writings on binary with great accuracy,Footnote 11 the hypothesis just sketched about binary’s origins must remain speculative. But the three manuscripts are probably among his earliest writings on binary, predating the developed treatment in his earliest dated writing on the subject, “On the Binary Progression,” written 15 March 1679 (on the Julian calendar, 25 March 1679 on the Gregorian).

As for when Leibniz invented binary, a precise date is difficult to fix, but the three early manuscripts outlined above were probably written in 1677 or 1678. He was certainly in possession of the idea of a binary progression, i.e., base 2, no later than February 1678, the date he wrote on a manuscript in which he floated the idea of working with various nondecimal number systems, including binary. The manuscript begins with Leibniz giving himself instructions: “Attend to other progressions, such as nines, eights, etc., starting from the lowest—twos, threes, and so on going upwards—for thus only then will a progression be apparent and even the method of confirmation, which otherwise will be difficult to procure from decimal alone” (LH 35, 3 A 24 Bl. 6r).Footnote 12 (He subsequently struck this passage out, and the rest of the manuscript concerns the reduction of fractions to decimal numbers.) An earlier date for the invention of binary is possible, since another manuscript containing a table of the numbers 0–8 in binary along with a few simple binary sums has been dated to October 1674 (see Strickland and Lewis 2022, 30). However, the material in binary – written in a different ink from the rest of the contents – was probably added later, though how much later is not known. Hence on the question of dating the invention of binary, two hypotheses may be formed: first, that Leibniz invented binary in 1674 or thereabouts, but did no further work on it or with it for another 3 or 4 years, or second, that he invented it in 1677 or early 1678.

4 The Development of Binary

Although Leibniz probably invented binary notation in response to, and as an illustrative aid for his work on divisibility, primes, and perfect numbers, it did not take him long to develop a full-blown base-2 number system. The evidence suggests this occurred in stages rather than all at once. There are many manuscripts containing rudimentary explorations of binary, such as tables of numbers and simple sums, sometimes scrawled in the margins of manuscripts on nonmathematical topics (for an example of which, see Strickland and Lewis 2022, 4). In his earliest dated writing on binary, “On the Binary Progression,” written 15/25 March 1679, Leibniz outlined algorithms for conversion between decimal and binary notation and for addition, subtraction, multiplication, and division in binary numerals. He also devised a binary algebra in order to work out the square of a 6-digit number and to extract square roots (Strickland and Lewis 2022, 48–59). Similar ground is covered in later systematic treatments, such as “Essay on a New Science of Numbers” from 1701, and “On Binary” from 1705 (see Strickland and Lewis 2022, 138–144, 206–212). Rather than attempt to plot the steps of Leibniz’s increasing facility with binary, I shall focus on his methods for converting decimal to binary along with the algorithms for the four arithmetic operations, his attempts to mechanize binary calculation, and his investigations into the periodicity of arithmetic progressions expressed in binary.

Leibniz’s original method for converting decimal numbers to binary was to start with a given number, for example, 47, then successively halve it, at each step noting whether 0 or 1 remains (see Strickland and Lewis 2022, 50). When the process is finished, the digits can be written in a row, where the bottommost digit is the leftmost, and the topmost digit the rightmost, i.e., in the 1s position: 101111.

47

 

23

1

11

1

5

1

2

1

1

0

 

1

Leibniz later devised a variation of this method, whereby one arranges the successive halves of the given decimal number in columns and then simply writes a 1 underneath an odd number and a 0 underneath an even number to get the binary equivalent:

1\vskip4pt

2\vskip4pt

5\vskip4pt

10\vskip4pt

21\vskip4pt

42\vskip4pt

85\vskip4pt

171\vskip4pt

343

 

1

0

1

0

1

0

1

1

1

343

  1. (LBr 705, 69r)

The algorithms Leibniz developed for the four basic arithmetic operations are straightforward. He claimed that to perform these operations, one need know only the following:

  • For addition, 0 plus 0 is 0. And 0 plus 1 is 1, and 1 plus 1 is 10.

  • For subtraction, 0 minus 0 is 0, 1 minus 0 is 1, and 1 minus 1 is 0.

  • For multiplication, only this: 0 times 0 is 0, 0 times 1 is 0, and 1 times 0 is 0, and 1 times 1 is 1.

  • For division, I have 1 in 1 once, and I have 0 in 0 once. (Strickland and Lewis 2022, 92)

Typical examples given were:

(Strickland and Lewis 2022, 96–97)

Note here that the dots in the examples of multiplication and addition indicate a carry of 1. Note also that the example of division follows the so-called “galley” method, popular in Europe in the seventeenth and eighteenth centuries.

Leibniz later devised a shortcut when adding multiple numbers, such as:

           (example simplified from Strickland and Lewis 2022, 140)

The first column on the right has four 1s, but instead of making two carries to the second column as per the standard algorithm, Leibniz realized that one could instead make a single carry to the third column (see Strickland and Lewis 2022, 140, 146, 208–209). When dealing with subtraction, Leibniz also anticipated the two’s complement operation, where x – y is computed by determining the two’s complement of y, i.e., the number that when added to y gives 0:

It should also be noted that for the subtrahend number, its complement [up] to 100000 etc. can be placed, and then subtraction is not needed but only addition... As, for example:

The subtrahend is

11 0101

Supposing it should be subtracted from

100 0000

It is evident that this gives

00 1011

For if you add this:

11 0101

It gives us

100 0000

  1. (Strickland and Lewis 2022, 51)

During his early explorations of binary, Leibniz envisaged the mechanization of the four basic arithmetic operations, jotting down ideas for binary-calculating machines of two different designs. The first was based on his decimal-calculating machine that he had had built in 1673 (though it never worked properly). Instead of being driven by a series of cylinders with nine teeth, as per his decimal machine, the binary version was envisaged as having cylinders with four teeth, each alternately designated as 0 or 1, so that “one revolution will cause two carries” (Strickland and Lewis 2022, 45). Leibniz acknowledged that, with this machine, “the greatest difficulty is to convert a binary number into an ordinary one or vice versa” (Strickland and Lewis 2022, 45), but from his description it is clear that he envisaged conversion going only one way, for while the machine’s user would enter the sum in decimal, the result would be given in binary (for more details on this machine’s design, see von Mackensen 1974). The second proposed binary machine, conceived as carrying out only the operation of multiplication, is described in “On the Binary Progression.” This design is of a sliding box or carriage with shutters on the underside that can be set open or closed, the whole contraption sitting atop various fixed channels representing the columns of a binary number. If a shutter is set open, then a ball is released into the channel below it, and the box is then moved by an unspecified mechanism from one channel to the next, dropping a ball into the channel below if the shutter is open and nothing if not. The process is repeated for each bit of the multiplier, and if a channel accumulates two balls, another unspecified mechanism passes one of these to the next channel on the left while the other is removed (Strickland and Lewis 2022, 52). Although Leibniz’s description of this machine lacks detail, and it is doubtful he would have been able to have had it constructed, from his sketchy outline a functional replica was built in 2003/2004 (see Stein et al. 2006).

While Leibniz certainly enjoyed a flirtation with mechanization during his exploration of binary, his true infatuation was with arithmetic and geometric progressions, on account of the recurring periods of the individual digits being significantly shorter in binary than in decimal. Take, for example, the sequence of square numbers: 1, 4, 9, 16, 25, 36, etc. In decimal numeration, the last digit of the successive square numbers recurs periodically: 1, 4, 9, 6, 5, 6, 9, 4, 1, 0; switch to binary numeration and the period of the last digit of successive square numbers is drastically reduced to just two terms: 0, 1 (see below). The other columns are periodic too: Leaving aside the second column, which consists only of 0s, the third column has the period 0010, the fourth 0001 0100, etc. Leibniz’s hope was that working with the shorter periods in binary notation would make it easier to determine formation laws for the periods, making it possible to calculate any term of a periodic sequence.

0

0000000

1

0000001

4

0000100

9

0001001

16

0010000

25

0011001

36

0100100

49

0110001

From the late 1670s onward, Leibniz intermittently investigated column periodicity in binary, filling many dozens of manuscript pages, often using algebraic terms to stand for period-sequences or even entire columns. To assist his efforts further, he occasionally devised new notation, though it was often abandoned immediately afterward after it failed to produce the desired breakthrough. In 1699, he introduced the parenthetical term (b) to signify logical complement, calling it “anti-b,” “so that if b is 1 then (b) is 0; and if b is 0 then (b) is 1” (LH 35, 3 B 6 Bl. 1r). Two years later, he devised the notation a \( \overset{\sim }{+} \) b, which

signifies the digit which is produced from the digits a + b added into one in the same column. For example, if a is 0 and b is 0, a \( \overset{\sim }{+} \) b will be 0. If a is 0 and b is 1, or the other way around, a \( \overset{\sim }{+} \) b will be 1; if a is 1 and b is 1, a \( \overset{\sim }{+} \) b will be 0, for a + b is 10, where the 1 is carried into the next column (LH 35, 3 B 5 Bl. 87).

So stated, Leibniz’s a \( \overset{\sim }{+} \) b clearly anticipates the boolean exclusive-or operator ⊕.

Despite his efforts, the anticipated number-theoretic rewards of investigating column periodicity eluded Leibniz. He did, however, have some successes. In 1698, he observed that in the natural and triangular numbers, the first half of any period is always the complement of the second half, such that if the first half is 0000, then the second half will be 1111 (LH 35, 3 B 5, Bl. 10). And in 1701, he established that if two or more periodic sequences are added together, the resulting sequence will itself be periodic, its period determined by the periods of the two or more generating sequences (Strickland and Lewis 2022, 158–160). When Leibniz began to provide details of the binary system to mathematicians from the late 1690s onward, much of the information he provided was about column periodicity (see A II 3, 450–452; Strickland and Lewis 2002, 111, 122–124, 128–130). His hope was that others would assist in the investigations for which he had little time himself, but there were few takers. The exceptions were Theobald Overbeck (1672–1719), who corresponded with Leibniz about column periodicity from 1709 onward (see LBr 705 Bl. 23–26, 71–73; LH 35, 15, 5 Bl. 10–11), and Pierre Dangicourt (1664–1727), who at Leibniz’s behest published an essay entitled “On the Periods of Columns in a Binary-Expressed Sequence of Numbers of an Arithmetic Progression” in 1710 (see Dangicourt 1710).

5 Binary Fractions and Expansions

While the majority of Leibniz’s writings on binary focused on integers, he also explored binary fractions and their expansions, especially but not exclusively in the late 1670s and early 1680s. Leibniz quickly discovered that just like decimal fractions, binary fractions are either terminating, i.e., expanding to a finite number of digits, or repeating or recurrent, i.e., expanding to infinity, with a finite set of digits (the repetend, or period) repeating forever. For example:

Decimal fraction

Binary equivalent

Binary expansion

\( \frac{1}{2} \)

\( \frac{1}{10} \)

0.1

\( \frac{1}{3} \)

\( \frac{1}{111} \)

0.\( \overline{01} \)

\( \frac{1}{4} \)

\( \frac{1}{100} \)

0.01

\( \frac{1}{5} \)

\( \frac{1}{101} \)

\( 0.\overline{0011} \)

Leibniz’s preferred method for working out binary expansions was the galley method (mentioned above in relation to division in integers), but this often proved challenging. In one manuscript (LH 35, 13 2 B Bl. 155), Leibniz focuses on the binary expansions of the decimal fractions \( \frac{1}{13} \)    and    \( \frac{1}{17} \). While he gets the correct result – 0.\( \overline{000100111011} \) – for the former, for the latter he first gets the incorrect result 0.0000111 (which is in fact the binary expansion for \( \frac{7}{128} \)) before arriving at the correct 0.\( \overline{00001111} \) on the second attempt. In another manuscript, two out of seven attempted binary expansions arrive at the wrong result: for the expansion of \( \frac{1}{6} \), Leibniz gets 0.001 (which is the expansion for \( \frac{1}{8} \)), while for \( \frac{1}{9} \) he gets 0.00101, which is the expansion for \( \frac{5}{32} \) (see Strickland and Lewis 2022, 62). Such mistakes are common in Leibniz’s use of the galley method to determine binary expansions, and perhaps for this reason he developed various other methods, of which I shall mention two.Footnote 13

The first is found in a manuscript from c.1679, where Leibniz describes an algorithm for finding the repetend in the binary expansion of those reciprocals whose denominator is odd, and this with “no need for actual division”:

  • Take, for example, the fraction \( \frac{1}{7} \), expressed in binary as \( \frac{1}{111} \).

  • Add 1 to the numerator = 1001.

  • Take half of this = 100; this number serves as the “constant multiplier.”

  • The last digit of the period is always 1, so write 1.

  • Multiply this by the constant multiplier: 100 × 1 = 100. Write 0 as the penultimate digit of the period, and carry the remaining 10.

  • Multiply the last digit obtained – 0 – by the constant multiplier: 100 × 0 = 0. To this, add the carry of 10: 0 + 10 = 10. Write 0 as the antepenultimate digit of the period, and carry the remaining 1.

  • Multiply the last digit obtained – 0 – by the constant multiplier: 100 × 0 = 0. To this, add the carry of 1: 0 + 1 = 1. So write 1. Since the remainder is now 0, the digit just obtained is the last one of the next iteration of the repetend (see LH 35, 3 B 3 Bl. 12r).

As the algorithm reveals that the period is 001, the binary expansion of \( \frac{1}{111} \) is 0.\( \overline{001} \). After obtaining this result, Leibniz seeks to confirm it using the galley method of division, but as if trying to demonstrate the need for the alternative method just sketched, his calculation goes awry and he comes up with 0.\( \overline{100} \) instead.

A second method for working out binary expansions comes from a manuscript written in 1680 (LH 35, 3 B, 5 Bl. 89). Here, Leibniz seeks to multiply known binary expansions to determine a new one. Beginning by multiplying the binary expansions of \( \frac{1}{3} \) and \( \frac{1}{5} \) to determine the binary expansion of \( \frac{1}{15} \), Leibniz multiplies 0.\( \overline{0011} \) by 0.\( \overline{01} \) and ends up with 0.\( \overline{00001111} \), triumphantly proclaiming “Therefore, two periodic sequences have been added into one,” before realizing the calculation has gone astray (as \( \frac{1}{15} \) in fact expands to 0.\( \overline{0001} \)). In a second attempt, Leibniz first computes the binary expansion of \( \frac{1}{9} \), namely, 0.\( \overline{000111} \), then tries to reach the same result by multiplying the binary expansion of \( \frac{1}{3} \) by itself. This time, he gets the correct result, stopping at 0.000111000111.

Some of Leibniz’s earliest explorations with binary fractions and expansions concern irrationals. In “On the Binary Progression,” he computes the first digits of \( \sqrt{2_{10}} \), getting the result 1.011010100...2. In order to confirm his result, Leibniz then multiplies that number by itself, obtaining the value 01.111111111110100, noting that as the infinite numeral [0].1111111... represents 1, so 1.1111111 represents 2 (Strickland and Lewis 2022, 58). In another manuscript, probably from 1680, he repeats the process, this time obtaining several more digits of \( \sqrt{2_{10}} \): 1.0110111101 (LH 35, 8, 30 Bl. 125v). The aim of such exercises was not to find a periodic sequence of digits – Leibniz was well aware that irrationals did not have suchFootnote 14 – but to show that irrationals could be “determined as far as possible” through binary (Strickland and Lewis 2022, 54). His hope was to find “laws of sequences which not only seem not to have a period but also really do not have one. Such are those which correspond to irrationals. For not all laws of sequences are periods” (LH 35, 13 3 Bl. 33r).

In a similar vein, Leibniz hoped that binary could offer insight into transcendental quantities, most notably the alternating converging series that now bears his name: \( \frac{1}{1} \)\( \frac{1}{3} \) + \( \frac{1}{5} \)\( \frac{1}{7} \) + \( \frac{1}{9} \)\( \frac{1}{11} \) + \( \frac{1}{13} \)\( \frac{1}{15} \) + \( \frac{1}{17} \)\( \frac{1}{19} \), etc. The series, discovered in 1674, was the key result of his investigation into the classic problem of squaring the circle, that is, determining the area of a circle enclosed by a 1×1 square. After discovering the series in 1674, Leibniz for a time entertained hopes that it might prove to have a finite sum (as some infinite series of reciprocals do, for example, that of triangular numbers \( \frac{1}{1} \) + \( \frac{1}{3} \) + \( \frac{1}{6} \) + \( \frac{1}{10} \) + \( \frac{1}{15}, \) etc. sums to 2), but these had dissipated by the time he had invented binary. Nevertheless, he believed that investigating the periodicity of these fractions in binary could yield a rule that would enable one to continue the expansion of the digits of π: “Having obtained the period from a given number, one will also obtain the method of expressing by a certain rule the sequence of digits expressing the size of a circle, that is,\( \frac{1}{1} \)\( \frac{1}{3} \) + \( \frac{1}{5} \)\( \frac{1}{7} \) + \( \frac{1}{9} \) etc.” (Strickland and Lewis 2002, 59). As such a rule eluded him, in August 1680 Leibniz tried out a different approach in a manuscript entitled “Attempted Expression of the Circle in Binary Progression” (Strickland and Lewis 2022, 61–62). Here, Leibniz considers the powers of 2−1 geometric sequence, namely, 1, \( \frac{1}{2} \), \( \frac{1}{4} \), \( \frac{1}{8} \), \( \frac{1}{16} \), \( \frac{1}{32} \), \( \frac{1}{64} \), etc. (unhelpfully also called “binary progression”), comparing various terms of this sequence with sequences of terms from his circle formula. However, a calculation error early in the process led him to incorrectly conclude that \( \frac{1}{2} \) + \( \frac{1}{4} \) is greater than the area of the circle (which, if true, would make π less than 3). Failing to spot the mistake, which subsequently gets compounded, Leibniz eventually gave up.Footnote 15

In the last twenty years of his life, Leibniz outlined binary notation and arithmetic to many of his mathematician correspondents, but he was not similarly forthcoming about his work on binary fractions and expansions, electing to keep this to himself. However, he did suggest to a few correspondents the idea of exploring π using binary. In 1704, Leibniz informed Jakob Hermann (1678–1733) of his hope that a rule would be found to enable the digits of π to be computed, describing this as something “we will obtain more easily through binary” (GM IV 266), though he did not elaborate on this remark. The following year, he made the same suggestion to Jacob Bernoulli (1655–1705), who took the bait and presented Leibniz with a 118-digit binary representation of the first 36 decimal digits of π:

1111001000000100111111011001100011011011011001100001001111001001011001010110110110101000110111001010100000001111010000\( \genfrac{}{}{0pt}{}{1}{0} \)

There are a number of problems with this result. First, Bernoulli, apparently not realizing the significance of the radix point, simply converted the integer 314159265358979323846264338327950288 into binary, rather than the fraction \( \frac{314159265358979323846264338327950288}{100000000000000000000000000000000000} \), so he did not express π in binary at all. Second, his 118-digit binary number is actually equal to the integer 314159265358979323846264338327929808, which is short by 20480, indicating that he dropped some bits in his calculation (for more details, see Knuth 1983, 238). Bernoulli did at least get one thing right, noting of his binary number that “no period of digits is apparent here, nor any law of the progression” (GM III/1, 97). In his response, which made no mention of Bernoulli’s errors, Leibniz clung to the view that the law of progression of π was simply hidden and probably more easy to detect in binary than in decimal (GM III/1, 101).

6 Binary and Philosophy

Leibniz’s faith in the illuminatory power of binary is nowhere more evident than in his use of it in philosophical theology. In 1694/1695, when sketching notes on one of Weigel’s books, Leibniz devised an analogy between the representation of all numbers by 1 and 0 and the theologically orthodox idea of creation ex nihilo, that is, the creation of all things out of nothing by God. Treating God as the analogue of 1 and nothingness as the analogue of 0, Leibniz took the origination of all numbers from 1 and 0 in binary as a reflection of the doctrine that all created things originate from God and nothingness. This analogy would play a pivotal role in Leibniz’s willingness to inform correspondents about binary from 1696 onward (and as we shall see in Sect. 6, this in turn played a pivotal role in his decision to publish an essay on binary in 1705).

To understand Leibniz’s binary-creation analogy, note that in his metaphysics, all created beings contain the same perfections as God (namely, power, wisdom, and goodness), albeit not to the same degree, because, as created beings, they have limitations or privations. In this sense, all created beings originate both from God, the source or principle of their perfections, and from nothingness, the source or principle of their privations or imperfections. Hence:

According to the binary [progression], all numbers are expressed by the digits 0 and 1 alone, by unity and nothing, a remarkable analogy of the origin of created things from God and nothing, with creatures having their own perfections from pure, positive actuality, or God, and their imperfections or limits from the negative, or nothing. (Strickland and Lewis 2022, 85)

Such remarks can easily be read as saying that created things are literally composed of two distinct but seemingly mutually exclusive elements, such that it is difficult to see how they could coexist in one and the same being. Leibniz clarifies:

there are in him [God] three primacies: power, knowledge and will; the result of these is the operation or creature, which is varied according to the different combinations of unity and zero; or rather of the positive with the privative, for the privative is nothing other than limits, and there are limits everywhere in a creature, just as there are points everywhere in the line. However, a creature is something more than limits, because it has received some perfection or power from God, just as the line is more than points. For ultimately the point (the end of the line) is nothing more than the negation of the progress beyond which it ends. (Leibniz 2006, 39)Footnote 16

Leibniz thus envisaged the creation of something from nothing as involving God divesting a finite portion of his essence to the creature and then stopping, the stopping point marking the limit of the creature. As such, Leibniz should not be understood as claiming that nothingness is an element of the creation process; rather, the reference to nothingness is a poetic way of referring to a limit, the idea that a creature contains some of God’s essence but not all. A created thing should not be construed as literally a mixture of God’s essence and nothingness, but rather as a finite instantiation (or dilution) of the former.Footnote 17

Clarifying the analogy in this way does not prevent it from being inapt, however. In binary numeration, all numbers are composed from two elements (0 and 1) by compounding them in ever longer strings, whereas Leibniz envisaged all created things arising from God through an entirely different process, in which God divests some of his own essence to a creature, so that in terms of essence, or perfection, each creature is greater than nothingness but less than God, i.e., it has the same qualities as God but not to the same degree as God. Because of this, it would make more sense to say that all created things are analogues of binary fractions, each having a unique expression of their perfection and limitations in the same way that all fractional numbers between 0 and 1 are uniquely expressed in binary. Leibniz did not frame his analogy in this way, however.

Once the binary-creation analogy had been devised, Leibniz quickly recognized its philosophical value. It next appeared in December 1695, in the middle of a brief sketch of a planned book entitled Theodicy, envisaged as a defense of God’s justice in response to the world’s evil. The sketch reveals Leibniz’s belief that the binary-creation analogy could help explain why created beings are liable to sin, i.e., because, by virtue of being limited, they fall short in the perfections of power, wisdom, and goodness:

New studies: concerning the original imperfection of creatures before sin, from which the cause of sin is to be sought. All things are good but nothing is absolutely perfect. Concerning the composition of things from perfection and limitation, i.e. from action and privation, and concerning the origin of things from God and nothing, in which concerns the origin of numbers from 1 and 0, i.e. from unity and nothing. (LH 1, 6, 2 Bl. 20r/http://www.leibniz-translations.com/theodicaea.htm)Footnote 18

With the binary-creation analogy now envisaged as a key part of his philosophical theology, Leibniz sought to promulgate both it and the number system on which it was based. In early May 1696, he discussed it with Rudolph August, Duke of Brunswick and Lüneburg (1627–1704). The duke’s warm reception of the analogy prompted Leibniz to pitch the idea of commemorating it on a medal, to be struck at the duke’s command. Various designs were sketched (for which see Strickland and Lewis 2022, 103), but the duke decided to commemorate the binary-creation analogy in a different way: by commissioning three wax seals (for which see Strickland and Lewis 2022, 106).

Believing that the binary-creation analogy had the potential to make the Christian doctrine of creation ex nihilo intelligible and even plausible to non-Christians, Leibniz communicated it – with attendant details of the mathematics of binary – to two Jesuit missionaries in China, Claudio Filippo Grimaldi (1638–1712) in 1697 and Joachim Bouvet in 1701 (see Strickland and Lewis 2022, 108–115, 126–134). While the former did not respond, the latter famously suggested a correlation between Leibniz’s binary numeration and the sixty-four hexagrams of the ancient Chinese divinatory text, the Yijing (or Book of Changes), a suggestion that would prompt Leibniz to go public with his invention.

7 Binary and The Yijing

The Yijing consists of sixty-four individually named hexagrams, each accompanied by a short, enigmatic essay. The hexagrams themselves consist of six stacked horizontal lines, each line being either unbroken (representing yang) or broken (representing yin). From these two elements, arranged in all possible groupings of six, emerge the sixty-four hexagrams. Bouvet had been a student of the Yijing for many years before he learned of Leibniz’s binary arithmetic, and had already suspected that it somehow encapsulated “a numerary metaphysics” that, when properly deciphered, would reveal the perfected science of the ancient Chinese (A I 20, 573). Upon learning of Leibniz’s binary arithmetic, Bouvet hypothesized that the hexagrams had been intended as a binary number system.

To see what Bouvet saw, and thus to understand his hypothesis, we need to consider the hexagram-sequence he sent to Leibniz. This is the so-called “Fuxi sequence,” named after the mythical Chinese philosopher-emperor traditionally believed to be the author of the Yijing. The first sixteen hexagrams of the Fuxi sequence are:

figure q

Let us start with the component lines of each hexagram. Bouvet equated – albeit without justification – the broken line with 0 and the unbroken line with 1. If we replace the lines with binary digits in the way Bouvet suggested, the hexagrams are converted thus:

Rotating the digits 90° clockwise gives us the decimal numbers 0–15 in binary notation. From this, it is clear that Bouvet read each hexagram from the bottom line upward, such that he took the bottom line to represent the leftmost digit (32’s place) of a six-digit number in binary, the next line up to represent the leftmost-but-one digit (16’s place) and so on, such that the hexagram would be equivalent to 000110 in binary (6 in decimal).

Various problems have been noted both with Bouvet’s approach to reading the hexagrams and with his hypothesis more broadly (see Zacher 1973, 112; Zhonglian 2000; Swetz 2003, 288–289; Sypniewski 2005). Here it will be sufficient to mention just one, namely, that the sequence of hexagrams upon which Bouvet based his hypothesis – the so-called “Fuxi sequence” – is a relatively modern rearrangement (by the eleventh century philosopher Shao Yong) of a much older and more traditional sequence, namely the King Wen sequence. Bouvet neglected to mention this to Leibniz, though as a long-time student of the Yijing, he would at least have been aware of the King Wen sequence. Bouvet’s omission is problematic because while the arrangement of hexagrams in the Fuxi sequence may support the idea that the hexagrams were intended as a binary number system, that of the King Wen sequence does not. The first sixteen hexagrams of the King Wen sequence are:

figure s

Here, there is no prospect of seeing an orderly sequence of numbers expressed in binary. If we again take an unbroken line to be 1 and an unbroken line to be 0, and thus treat each hexagram as representing a number expressed in binary, the order of numbers in the King Wen sequence would be 63, 0, 34, 17, 58, 23, 16, 2, 59, 55, 56, 7, 47, 61, 8, and 4. Little wonder that Leibniz, seduced by Bouvet’s hypothesis of a correlation with binary arithmetic, concluded that the King Wen sequence – which he had seen in a Latin book about Confucius (namely, Intorcetta et al 1689, xliv) – was a scrambling of the true order (Strickland and Lewis 2022, 187).Footnote 19

Leibniz was so intoxicated by the idea of his binary system being the key to deciphering an ancient Chinese enigma that he related Bouvet’s hypothesis to many of his correspondents, even informing Pope Clement XI (see A I 23, 353). Bouvet’s hypothesis also prompted Leibniz to go public with the binary system at long last. Days after receiving Bouvet’s letter, Leibniz wrote a short paper, “Explanation of Binary Arithmetic,” in which he outlined binary numeration and arithmetic as well as Bouvet’s hypothesis (Strickland and Lewis 2022, 195–197).Footnote 20 The paper was read at the Académie Royale des Sciences in Paris, and published in its annual periodical for 1703 (though the volume did not appear until 1705). This paper was the only one of Leibniz’s hundreds of writings on binary to be published in his lifetime.

8 Sedecimal

Leibniz’s “Explanation of binary arithmetic” is also notable for containing the first published reference to base 16, though this is often overlooked. Leibniz’s experiments with base 16 in fact began in 1679, giving him clear priority over the English schoolmaster Thomas Wright Hill (1763–1851) and the Swedish-American engineer John Nystrom (1825–1885), both of whom independently reinvented it in the nineteenth century (see Hill 1850, Nystrom 1862, 1863).Footnote 21 Initially, Leibniz’s term for base 16 was “sedecimal,” though on occasion he called it “sedenary” (the former means “sixteen,” the latter “sixteen-fold,” or “in sixteens”). He devised no fewer than six different forms of notation for sedecimal. In his first writing on the subject (Strickland and Lewis 2022, 64–68), he used the Roman letters m, n, p, q, r, and s for the six extra digits, before abandoning them in favor of the six Aretinian syllables ut, re, mi, fa, sol, and la, abbreviated to u, r, m, f, s, and ℓ. By combining these syllables with the German words for numbers, he created an entirely new set of terms for values expressed in sedecimal. For example, “utzwanzig,” a combination of the syllable “ut,” standing for 10, and the German word “zwanzig,” which traditionally meant 20 but was repurposed by Leibniz to stand for 32, was Leibniz’s term for the decimal number 42 expressed sedecimally.

Leibniz’s later experiments with sedecimal notation were more elaborate. In one manuscript, he stacked dots and dashes, using a dot for each 0 bit and a dash for each 1 bit, with the most significant bit at the top and the least significant bit at the bottom:

0

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

– •

  1. (Strickland and Lewis 2022, 70)

A further set of novel sedecimal digits were scrawled on the back of an envelope c.1682. This time, he starts with a concave-up semicircle to denote 0, a concave-down semicircle to denote 1, and then modifies these characters to create the remaining digits:

(Strickland and Lewis 2022, 78)

The accompanying descriptions (or instructions) indicate that Leibniz based each digit on Roman letters, either single or joined-up, with some of them being “bicaudate,” that is, extended by a tail on either side, and others “antecaudate,” that is, extended by a tail on the left-hand side alone.

Almost twenty years later, Leibniz devised yet another form of sedecimal notation, with the characters loosely based on the Roman letters i, u, and w, some extended with one or two right-hand tails:

(Strickland and Lewis 2022, 130)

Leibniz’s sixth and final form of notation for sedecimal appears in a manuscript featuring a table of decimal numbers 0–40 represented in every base from 2 to 16 (LH 35, 3 B 11 Bl. 11v). Here, Leibniz uses the Arabic numerals 0–9 and lower-case Roman letters a, b, c, d, e, and f for the six extra digits, anticipating the modern convention, which employs the same six letters, usually in upper-case.

Shortly after having invented base 16, Leibniz arrived at the view that while binary is for theory, sedecimal is for practice (Strickland and Lewis 2022, 70). Thereafter, he occasionally suggested that sedecimal would be the ideal choice if practice were to be changed. To justify this, he used what may be termed an argument from economy, namely, that as values expressed in sedecimal are shorter than those expressed in decimal, sedecimal is more convenient. The argument is illustrated only in his very first writing on sedecimal, where he converts the decimal number 1679 (representing the date of writing) into the sedecimal number 68ℓ (equivalent to 68F in modern notation), leading him to conclude: “From this it is apparent that sedecimal expressions are much shorter” (Strickland and Lewis 2022, 64). Subsequent conversions, such as 10000 to 271016 and 100000 to 186u016, secure the point that sedecimal expressions tend to be shorter than decimal, though Leibniz’s conclusion that they are “much shorter” is difficult to draw from the examples he gave, each of which compact the expression by a single digit.Footnote 22 Nevertheless, he continued to use the argument from economy to support the practical advantage of sedecimal, most notably in his published essay “Explanation of Binary Arithmetic,” where he noted in passing that decimal has an advantage over binary because its numbers are not as long, but “if we were accustomed to proceed by twelves or sixteens, there would be even more benefit” (Strickland and Lewis 2022, 196). Hill and Nystrom, later advocates of base 16, also used the argument from economy, but both believed the chief advantage of base 16 lay in the fact that 16 allowed for more convenient bisections of the sort that were routinely required in shops and trade, an argument Leibniz himself did not articulate (though he could not have been unaware of it, since in the passage from “Thesaurus mathematicus” quoted in Sect. 2 above, he noted that an advantage of duodecimal is that it allows for divisions by 2, 3, 4, and 6). Moreover, while these later advocates of base 16 envisaged and argued for a wholesale switch away from decimal, with weights, measures, coinage, and (in the case of Nystrom) even the day and the year being divided into 16 units, Leibniz’s own preference for sedecimal did not extend beyond wistful thinking about reforming “practice” without indicating how far this should go. Consequently, his advocacy of base 16 was neither forthright nor vociferous, as Hill and Nystrom’s would be, and Leibniz conceded that since decimal was so widely accepted, we should be satisfied with it (Strickland and Lewis 2022, 85).

9 Other Nondecimal Number Systems

Leibniz’s flirtation with sedecimal shows that his engagement with nondecimal number systems was not exhausted by binary, even if that was his predominant focus. But in contrast to his writings on binary, Leibniz’s writings on other nondecimal systems are occasional, scattered, and unsystematic. I have already mentioned Leibniz’s 1703 sketch of table of decimal numbers 0–40 represented in every base from 2 to 16 (LH 35, 3 B 11 Bl. 11v). The table may have been intended as a ready reckoner of sorts, and no doubt came in useful as such when in the same year he sought to apply his formulation of Fermat’s little theorem, 2n–1 – 1, in various other number bases, such as the septenary, octonary, and nonary (LH 35, 3 B 11 Bl. 9–10). However, such ventures outside of decimal and binary were rare, and aside from binary (and to a lesser extent, sedecimal), most of Leibniz’s other references to nondecimal number systems were to bases 4 and 12.

References to base 4 start to appear in Leibniz’s writings from 1683 when he read Weigel’s Tetractyn. Leibniz made brief reading notes on Weigel’s book; these consist mostly of verbatim reproductions of Weigel’s reasons for thinking four the most natural base but conclude with a cryptic assessment that refers to bases 2, 3, and 8: “I think the binary is best absolutely, the ternary in planes, and the octonary in solids” (A VI 4, 1163). In critical reading notes on another of Weigel’s books in which the quaternary system is outlined, Leibniz offers this assessment:

As far as quaternary arithmetic is concerned, I think that if anything were to be changed in practice, it would be to use the duodecimal or sedecimal instead of the decimal, for the larger the numbers used by a progression, the more convenient the calculation... As for theory and the discovery of extraordinary truths in arithmetic, which may likewise be very useful for practice, I think that not only should the quaternary be preferred to the decimal, but also that preferable to the quaternary in turn is the binary, which is the most perfect of all, nor does it suppose anything but instead completely resolves numbers. (Strickland and Lewis 2022, 85)

This is as close as Leibniz came to a comparison of the relative merits of the binary and quaternary systems. Thereafter, he often mentioned Weigel’s advocacy of base 4, but invariably in passing when writing about binary (see Zacher 1973, 353; Strickland and Lewis 2022, 110). It would be fair to say that he had little interest in the quaternary system itself, opting to mention it only as a pretext for discussing and extolling the merits of binary.

To some extent, the same is true of the duodecimal system which, like Weigel’s quaternary, is often mentioned in passing in the preamble when Leibniz outlines binary to a correspondent for the first time (see Zacher 1973, 353; Strickland and Lewis 2022, 110). However, Leibniz’s engagement with duodecimal goes back further and is occasionally deeper. The earliest mention of duodecimal in Leibniz’s writings is in a preface he wrote in 1670 to an edition of the writings of the Italian humanist Marius Nizolius (1498–1576). There he considers the view of those who would have it that truth depends upon the definitions of terms, and definitions of terms in turn upon the human mind (in other words, that truth is arbitrary). To this, Leibniz (1969, 128) responds: “In arithmetic, and in other disciplines as well, truths remain the same even if notations are changed, and it does not matter whether a decimal or a duodecimal number system is used.” Unfortunately, Leibniz does not reveal where he had learned about duodecimal, though his use of it suggests he thought it was sufficiently well known that educated readers would be able to understand his argument.

Other early writings hint at explorations of duodecimal. In a manuscript written around 1678, Leibniz noted that if the duodecimal system were used, the arithmetic checking method known as casting out nines “could become the proof by casting out elevens” (LH 35, 4, 13 Bl. 21). In the spring of 1680, Leibniz met the Dutch mathematician Johann Jakob Ferguson (1630–1706) and must have mentioned both binary and duodecimal to him, as in the scratch paper upon which both recorded their ideas, Leibniz wrote out a table showing the values of the decimal numbers 0–8 in binary, and a set of duodecimal digits, with the two extra digits given as ~ and (A III 3, 137). (In passing, it should be noted that on the same scratch paper Leibniz also worked out \( \frac{1}{2} \) in base 11: “\( \frac{1}{2} \) = \( \frac{555\ 555\ \mathrm{etc}.}{1\ 000\ 000} \)”; A III 3, 138). And in August of 1680, Leibniz noted: “It is well known that all fractions can be expressed by an infinite sequence of integers of a certain progression, for example, the decimal, or even the duodecimal, or the one I prefer overall, the binary” (LH 35, 13, 3 Bl. 33). The remainder of this manuscript is concerned with binary fractions, but given the confidence of his remark here, it is likely that he had already undertaken some investigation of duodecimal fractions. If he had, his work on that remains to be discovered.

Leibniz often claimed that some people had preferred duodecimal to decimal, but it is not certain who he had in mind. In a manuscript from 1712, he claimed that a proponent of duodecimal had been identified by the German mathematician Daniel Schwenter (1585–1636): “In the German Deliciae mathematicae, someone is reported to have given preference to the duodecimal progression, in which eleven digits will be needed, namely 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, δ, ε, where δ is 10 and ε is 11” (LBr 705 Bl. 93r).Footnote 23 Having identified an unnamed proponent of duodecimal, Leibniz proceeds to describe algorithms for converting decimal numbers into duodecimal:

Lay out the twelvefolds: 1, 12, 144, 1728, 20736 etc. Now, the aforementioned number, 1712,Footnote 24 is to be expressed duodecimally. The largest of the twelvefolds lower than 1712 itself, namely 144, is subtracted as many times as possible, that is, it [i.e. the number 1712] is divided by 144; the quotient will be 11, or ε. The remainder is 128, and that is divided by the next lowest twelvefold, 12, and the quotient will be 11 with a remainder of 6. And 1712 will be εε6 = 6 + ε ×12 + ε. However, if anyone wants to accomplish this without the list of twelvefolds, divide the number 1712 by 12, then divide the quotient, 142, by 12; the quotient, 11, cannot likewise be divided by 12, therefore the largest twelvefold is 12 × 12 or 144, by which 1712 is divided to produce 11 with a remainder of 128. Divide this [remainder] in turn by 12 to produce 11 with a remainder of 6. This [remainder] cannot be divided by 12, therefore 1712 = 6 + 11 × 12 + 11 × 144 = εε6 (LBr 705 Bl. 93r).Footnote 25

This passage represents Leibniz’s deepest engagement with duodecimal aside from a single manuscript exclusively devoted to it, probably written in 1695 (LH 35, 12 1 Bl. 40r/Strickland 2022). That manuscript begins with the observation that, in the decimal system, the digital root (that is, the digit sum) of multiples of nine is always nine, e.g., 9 × 3 = 27, and 2 + 7 = 9. Leibniz then generalizes this to any number base, or “progression,” supposing that for any base n, the digital root of multiples of n – 1 is always n – 1. He illustrates this in duodecimal, showing that the digital root of any multiple of 11 is always 11, or rather, since he here uses the Greek letters χ and φ for 10 and 11 respectively, any multiple of φ is always φ. To secure the point, Leibniz draws a large table of duodecimal numbers in which his “new notation” for duodecimal is shown alongside the “old meaning” (i.e., the decimal equivalents).

10 Conclusion

The depth as well as the breadth of Leibniz’s explorations of nondecimal number systems is quite remarkable in itself, and even more so against the backdrop of a widespread lack of interest in – and awareness of – such systems among the mathematicians of his time. This backdrop no doubt contributed to Leibniz’s unwillingness to go public with many of the ideas discussed in this chapter, most of which were groundbreaking at the time. However, it is worth noting that he saw fit to publish only a tiny fraction of what he wrote in any field; his writings on nondecimal number systems were no exception in that regard.

Leibniz never gave up his hope that binary would help unlock the innermost secrets of numbers. Success eluded his efforts. Yet while he cleaved fast to the belief that binary would eventually prove to be an invaluable tool for number-theoretic investigations, he did not dismiss the possibility of practical applications altogether. Indeed, in 1716, the last year of his life, he hit upon an innovative application of binary that has remained unknown till now. In a single-page manuscript (LBr 916 Bl. 44r), Leibniz sketched out a plan for a tactile clock based on binary reckoning that would enable one to tell the time at night. His illustration shows a single hour hand that moves around the clock face. Between each numeral and the center is a row of four points, each of which is either hollow (represented by an empty circle) or bumpy (represented by a filled circle). Hollow points denote 0, and bumpy points denote 1 if they occur in the first position, 2 in the second, 4 in the third, and 8 in the fourth, with positions being counted from the center outward to the edge. The idea is that you feel for where the hand points, then trace your finger from the tip of the hour hand down toward the center and then further down along the same line until you encounter a row of four points, which are then read by touch. Hence in the diagram, a is 0, b is 0, c is 1, and d is 1, and since c and d are in the third and fourth positions, they denote 4 and 8, respectively. Add them together, and one knows that the time is 12 o’ clock.

figure w

A casual glance at the clock face will reveal a mismatch between numerals and binary representations, as the row of holes and bumps leading from each numeral to the center contains the binary representation not of that numeral, but of the one on the opposite side of the clock (e.g., the row between the numeral 7 and the center is ooo•, which is the binary representation for 1, and vice versa). The reason for this, of course, is that the clock face is not meant to be seen, only touched – the row of dots one reads is the one directly opposite where the hour hand happens to be pointing, not the one that would be underneath the hand (which would not be accessible to touch anyway, because the hour hand would be over it).

Leibniz’s tactile clock is as simple as it is ingenious, and the idea is all the more remarkable because it precedes the cognate inventions of night writing and Braille by more than a century.Footnote 26 In the manuscript, Leibniz says nothing about the clock’s mechanism, but this would have been easy enough for a horologer of the day to construct.Footnote 27 Yet Leibniz appears not to have commissioned the clock, despite its potential to benefit not only those in ill-lit rooms at night but also the blind and visually impaired. Accordingly, his tactile binary clock is much like the majority of his other ideas about binary and other nondecimal number systems, in that it was destined only for the admiration of future generations rather than the benefit of his own.