Kuro5hin.org: technology and culture, from the trenches
create account | help/FAQ | contact | links | search | IRC | site news
[ Everything | Diaries | Technology | Science | Culture | Politics | Media | News | Internet | Op-Ed | Fiction | Meta | MLP ]
We need your support: buy an ad | premium membership

[P]
Napier's Chessboard Calculator

By kbs in Technology
Mon Dec 13, 2004 at 06:39:30 PM EST
Tags: Technology (all tags)
Technology

Isn't Napier the logarithm guy? Yes indeed. A man of varied talents, he popularized the modern decimal point notation and argued that the Pope of 1593 was the Antichrist.

And created one of the first devices to automate binary arithmetic. Using nothing more than a chessboard and some counters, he developed ways to multiply, divide and even find the square roots of binary numbers.


The early seventeenth century was a time of much gnashing of teeth in matters of arithmetic. Methods to do long division and multiplication were not widely known and prone to errors. Moreover, in the years following Nicolaus "we're not in the middle anymore" Copernicus (1543) and culminating in Isaac "the force binds the universe inversely as the square of the distance" Newton (1687) science had transformed itself from a metaphysical discussion between philosophers to a quantitative, experimental and mathematical discipline. And in doing so, generated an increasing demand for quick and efficient ways to do arithmetic.

Enter John Napier, the Laird of Merchiston. Basically, your average eccentric Scottish lord with a castle in a large estate located in what is now Edinburgh. Today there's even a Napier's University centered around where he lived (scroll down for pictures of Merchiston Tower.)

He obsessed about religion and wrote a book called A Plaine Discovery of the Revelation of St John where he discovered patterns in the numbers in the Book of Revelations. What did the patterns say? That the Pope was the Antichrist (Johnny himself was a fervent Protestant and Calvinist.) Oh, and that the world would end sometime between 1688 and 1700, so his theological talents seem more modest than his mathematical ones.

For all his obsessions, he sounds like a canny laddie. A story relates that he told his servants his black cockerel was going to discover which of them had been stealing from him. They were told to go one by one into a dim room and stroke the bird, and it would crow when the guilty one touched it. The bird remained silent, but he identified the thief anyway. He'd secretly put soot on the bird, and the guilty one was the only one who emerged with clean hands, being too afraid to touch the bird.

Napier toiled away at another hobby, mathematics, primarily working to find better ways to do computations. Training in arithmetic being about as spotty as it is today, he'd come up with a cute trick using rods inscribed with numbers to reduce multiplication and division to addition and subtraction. It became very popular for a while, and kept making encore appearances through the nineteenth century.

He wrote a best-seller on it in 1617 calling it the art of Rabdology, a word he made up from the Greek for rod (ραβδoς) and reckoning (λoγoς.) Everyone simply called it Napier's bones because of the way the rods often made of ivory looked.

All of which is interesting, but it gets even better. For, tucked away as a throwaway section at the end of Rabdology, he described nothing less than a primitive mechanical binary calculator.

Take a chessboard or a similar checkered grid and some counters, and you've got yourself a binary adder, multiplier, divider, square root finder.

Here's how you add binary numbers. Place the numbers you want to add, one on each row. The counters are going to stand for the 1's in the binary number. For example, 18 which is 10010 in binary, has a counter on the second and fifth squares from the right.

+---+---+---+---+---+---+---+---+
|...|...|...|...|...|...|...|...|
|...|...|...|.X.|...|...|.X.|...| 18
|...|...|...|...|...|...|...|...|
+---+---+---+---+---+---+---+---+
|...|...|...|...|...|...|...|...|
|...|...|...|.X.|.X.|...|.X.|.X.| 27
|...|...|...|...|...|...|...|...|
+---+---+---+---+---+---+---+---+
|...|...|...|...|...|...|...|...|
|...|...|...|...|.X.|.X.|...|.X.| 13
|...|...|...|...|...|...|...|...|
+---+---+---+---+---+---+---+---+
|...|...|...|...|...|...|...|...|
|...|...|...|...|...|...|...|...|
|...|...|...|...|...|...|...|...|
+---+---+---+---+---+---+---+---+
Move the counters vertically down to the bottom row like you would move a rook in chess.
+---+---+---+---+---+---+---+---+
|...|...|...|...|...|...|...|...|
|...|...|...|...|...|...|...|...| 18
|...|...|...|...|...|...|...|...|
+---+---+---+---+---+---+---+---+
|...|...|...|...|...|...|...|...|
|...|...|...|...|...|...|...|...| 27
|...|...|...|...|...|...|...|...|
+---+---+---+---+---+---+---+---+
|...|...|...|...|...|...|...|...|
|...|...|...|...|...|...|...|...| 13
|...|...|...|...|...|...|...|...|
+---+---+---+---+---+---+---+---+
|...|...|...|.X.|.X.|...|.X.|.X.|
|...|...|...|.X.|.X.|.X.|.X.|.X.|
|...|...|...|...|...|...|...|...|
+---+---+---+---+---+---+---+---+
Okay. Now if you've got two (or more) counters on a square, remove two counters and place one counter to its left. For example, remove two counters from the rightmost square
+---+---+---+---+---+---+---+---+
|...|...|...|.X.|.X.|...|.X.|.X.|
|...|...|...|.X.|.X.|.X.|.X.|.X.|
|...|...|...|...|...|...|..<--..|
+---+---+---+---+---+---+---+---+
and put one counter to its left giving
+---+---+---+---+---+---+---+---+
|...|...|...|.X.|.X.|...|.X.|...|
|...|...|...|.X.|.X.|.X.|.X.|...|
|...|...|...|...|...|...|.X.|...|
+---+---+---+---+---+---+---+---+
That's easy enough. Let's take two from the last but one square on the left and put one to its left.
+---+---+---+---+---+---+---+---+
|...|...|...|.X.|.X.|.X.|...|...|
|...|...|...|.X.|.X.|.X.|.X.|...|
|...|...|...|...|...|...|...|...|
+---+---+---+---+---+---+---+---+
You get the idea. What you want to do is end up with no more than one counter on each square. I won't bother showing all the intermediate moves, and here's what happens when you finish up.
+---+---+---+---+---+---+---+---+
|...|...|...|...|...|...|...|...|
|...|...|.X.|.X.|.X.|...|.X.|...|
|...|...|...|...|...|...|...|...|
+---+---+---+---+---+---+---+---+
And there's your answer -- 111010, or binary speak for 58 = 18 + 27 + 13.

Okay, that was nice. How about multiplication? Mark one number along the right edge of the board, and the other number along the bottom. Let's try 18 times 13 or 10010*1101

+---+---+---+---+---+---+---+---+
|...|...|...|...|...|...|...|...|
|...|...|...|.X.|...|...|.X.|...| 1
|...|...|...|...|...|...|...|...|
+---+---+---+---+---+---+---+---+
|...|...|...|...|...|...|...|...|
|...|...|...|.X.|...|...|.X.|...| 1
|...|...|...|...|...|...|...|...|
+---+---+---+---+---+---+---+---+
|...|...|...|...|...|...|...|...|
|...|...|...|...|...|...|...|...| 0
|...|...|...|...|...|...|...|...|
+---+---+---+---+---+---+---+---+
|...|...|...|...|...|...|...|...|
|...|...|...|.X.|...|...|.X.|...| 1
|...|...|...|...|...|...|...|...|
+---+---+---+---+---+---+---+---+
..............1...0...0...1...0
Also place counters along every "intersection" of the columns and rows that have a 1; you can see how they should be placed above.

Now move the counters "diagonally" to the bottom row like you would move a bishop.

+---+---+---+---+---+---+---+---+
|...|...|...|...|...|...|...|...|
|...|...|...|./.|...|...|./.|...|
|...|...|...|/..|...|...|/..|...|
+---+---+---+---+---+---+---+---+
|...|...|../|...|...|../|...|...|
|...|...|./.|./.|...|./.|./.|...|
|...|...|/..|/..|...|/..|/..|...|
+---+---+---+---+---+---+---+---+
|...|../|../|...|../|../|...|...|
|...|./.|./.|...|./.|./.|...|...|
|...|/..|/..|...|/..|/..|...|...|
+---+---+---+---+---+---+---+---+
|...|...|...|.X.|...|...|...|...|
|.X.|.X.|...|.X.|.X.|...|.X.|...|
|...|...|...|...|...|...|...|...|
+---+---+---+---+---+---+---+---+
And now do the same thing as in addition. Replace two counters on a square with one to its left. There's only one square to fix up, so we end up with
+---+---+---+---+---+---+---+---+
|...|...|...|...|...|...|...|...|
|.X.|.X.|.X.|...|.X.|...|.X.|...|
|...|...|...|...|...|...|...|...|
+---+---+---+---+---+---+---+---+
and also the answer, 11101010 which is 234 = 18*13.

Pretty nifty.

Why does this work? And how do you do division and square roots? The best technical information I've read is in a book by Martin Gardner called "Knotted doughnuts and other mathematical entertainments" (ISBN 0716717948.) Not only does he explain the chessboard calculator, but he shows other neat ideas like using it to multiply negabinary numbers and so on. Napier's algorithms themselves are related to an old multiplication and division technique often called Russian Peasant arithmetic. There's also an English translation of Rabdology which includes an interesting introduction to the historical context of Napier's work.

However I found surprisingly few good technical resources about this on the web. You can play with an online chessboard calculator, and I've slowly been adding to a Wikipedia article on location arithmetic, the term Napier used for his invention. There is also a very large (117Mb) PDF scan of Rabdology in the original Latin.

All said and done, Napier's chessboard calculator never really took off. Maybe everyone figured that the fuss of converting stuff in and out of binary wasn't really worth it, I don't know. In fact his own work on logarithms quickly led to the extensive use of log tables for arithmetic and the development of the slide rule, all of which sidelined even the popular Napier's bones. The chessboard calculator and binary arithmetic seem to have been about three centuries ahead of their time.

Still, there's something appealing about messing about with counters on a chessboard. When I punch buttons on my calculator, tiny electric fields twist in impossibly complex geometric arrangements and compute the result even as I lift my finger off the buttons. It is cheap, practical and useful, and I don't have a clue how it works. With Napier's ingenious creation, I can do some simple arithmetic and say to myself "Ah, I get it."

Sponsors

Voxel dot net
o Managed Hosting
o VoxCAST Content Delivery
o Raw Infrastructure

Login

Related Links
o "we're not in the middle anymore"
o "the force binds the universe inversely as the square of the distance"
o John Napier
o Napier's University
o pictures of Merchiston Tower
o the world would end
o rods inscribed with numbers
o Rabdology
o "Knotted doughnuts and other mathematical entertainments"
o 0716717948
o negabinary numbers
o Russian Peasant arithmetic
o English translation of Rabdology
o online chessboard calculator
o location arithmetic
o very large (117Mb) PDF scan of Rabdology
o Also by kbs


Display: Sort:
Napier's Chessboard Calculator | 45 comments (33 topical, 12 editorial, 0 hidden)
-1 MAKES NO MENTION OF WHEN JOHN NAPIER SAID (1.21 / 38) (#1)
by Tex Bigballs on Sun Dec 12, 2004 at 04:52:08 PM EST

"DID YOU EVER DANCE WITH THE DEVIL IN THE PALE MOONLIGHT" (RIGHT BEFORE BATMAN BEAT UP HIS JUNK LIBERALLY)

WAS THAT BEFORE OR AFTER (1.38 / 18) (#3)
by The Black Ness Monster on Sun Dec 12, 2004 at 06:23:58 PM EST

HE RUBBED ANOTHER MAN'S RHUBARB?

[ Parent ]
OK FIRST OF ALL (1.25 / 8) (#12)
by A Bore on Mon Dec 13, 2004 at 06:52:25 AM EST

When he says that Batman isn't even Batman, he's just Bruce Wayne.

And second he doesn't beat him up then as he's just a kid, he jumps him when he's older, so you are WRONG WRONG WORNG.

[ Parent ]
The part after that... (1.25 / 8) (#14)
by Empedocles on Mon Dec 13, 2004 at 07:01:56 AM EST

Where he shot Batman RIGHT IN THE EYE (it's the part right after Batman beat his junk) was my favorite part of the movie.

---
And I think it's gonna be a long long time
'Till touch down brings me 'round again to find
I'm not the man they think I am at home

[ Parent ]
Porn Star (1.68 / 16) (#4)
by Xptic on Sun Dec 12, 2004 at 06:25:34 PM EST

In addition to his mathematical genius, he seems to have a very lucrative side career.

ah, chess (1.37 / 16) (#5)
by Dr Funkenstein on Sun Dec 12, 2004 at 06:32:39 PM EST

the favourite pastime for soulless people.

-1, frivolous. (1.82 / 47) (#6)
by the ghost of rmg on Sun Dec 12, 2004 at 07:05:30 PM EST

judging by the tone, you took far too much joy in writing this. as a bitter kuro5hin reader, i feel compelled to crush your spirit and remind you that you are here to be judged (and harshly), not to show this sort of open contempt for your audience.

the first thing to do is remove all of those "jokes" of yours. none of this sort of thing belongs in articles.

the second is to rewrite this in a tone of neutrality. we don't care that you're excited about the subject matter. in fact, it annoys us to no end that you care about anything at all, but coming here and announcing it to us makes it all the worse.

third, remove anything that shows an admiration for napier or anyone else. at kuro5hin, we exhalt only ourselves. if anything, you should emphasize that napier was a crank, cast doubts on his sanity, and remind us of how bad slide rules suck.

this and a personal, abject apology will be enough to win my, and i believe everyone else's, +1.


rmg: comments better than yours.

Whaa.. (1.42 / 7) (#10)
by AMBorgeson on Mon Dec 13, 2004 at 06:02:45 AM EST

What the hell is your issue buddy? If that was supposed to be a joke of your own, the negative rating you attached to it makes it not a good joke. If it wasn;t a joke, go back to your world where you can hate the world with out making the rest of us deal with you.

Now, about the original post. Hmm, well, I can't think any editorial suggestions really. Interesting and slightly off beat topic, so I think it definetly belongs on Kuro5hin. I like the cheerful and upbeat attitude. Oh, and ignore everything the guy above me said.

"It takes a Long time to count to '2' in Binary." ~Fourlegged

There are 4 boxes to use in the defense of liberty: soap, ballot, jury, ammo. Use in that order. Starting now.
[ Parent ]

Uh, right (2.66 / 6) (#11)
by Vaughn on Mon Dec 13, 2004 at 06:50:58 AM EST

Allow me to point out that
(a) This was fairly clever sarcasm, and obviously a comment on the rest of Kuro5hin, not on the article, and
(b) It isn't possible to vote yet anyway.

[ Parent ]
er, um.. heh.. (2.50 / 2) (#29)
by AMBorgeson on Mon Dec 13, 2004 at 11:35:36 PM EST

I guess I was a bit tired when I saw his post, and mis read his title as actually being what he voted... heh, my bad. sorry about that, guess I over reacted.

"It takes a Long time to count to '2' in Binary." ~Fourlegged

There are 4 boxes to use in the defense of liberty: soap, ballot, jury, ammo. Use in that order. Starting now.
[ Parent ]

You fail it. [nt] (2.00 / 4) (#13)
by Empedocles on Mon Dec 13, 2004 at 06:59:18 AM EST



---
And I think it's gonna be a long long time
'Till touch down brings me 'round again to find
I'm not the man they think I am at home

[ Parent ]
my issue? (1.50 / 2) (#16)
by the ghost of rmg on Mon Dec 13, 2004 at 09:49:36 AM EST

i'm a kuro5hin user! that's my issue!


rmg: comments better than yours.
[ Parent ]
Welcome to Kuro5hin (3.00 / 4) (#22)
by Pxtl on Mon Dec 13, 2004 at 02:44:20 PM EST

enjoy your stay.

[ Parent ]
I am so happy I am not you (2.00 / 4) (#27)
by Harvey Anderson on Mon Dec 13, 2004 at 06:51:02 PM EST

.

[ Parent ]
I cannot believe (2.57 / 7) (#28)
by GenerationY on Mon Dec 13, 2004 at 06:59:35 PM EST

you got bites for this.

[ Parent ]
For some inane reason, (2.66 / 3) (#8)
by taste on Mon Dec 13, 2004 at 03:27:39 AM EST

my mind keeps registering the word Rabid-dogology instead. But nonetheless +1FS. this is quite an interesting uh.. thing, to note. Thanks

Actually, the world ended in 1693. (2.60 / 10) (#23)
by IHCOYC on Mon Dec 13, 2004 at 02:50:40 PM EST

There was a big coverup.
--
Ecce torpet probitas, virtus sepelitur;
Fit iam parca largitas, parcitas largitur;
Verum dicit falsitas; veritas mentitur.

So what is this existence we're experiencing now? (1.50 / 2) (#31)
by Lady Griffin on Tue Dec 14, 2004 at 04:45:52 AM EST

In 2004... A dream?



[ Parent ]
How we live now (3.00 / 2) (#33)
by IHCOYC on Tue Dec 14, 2004 at 07:34:21 AM EST

It's all a metaphysical Potemkin village. But then, in you inmost heart of hearts, you already know this.
--
Ecce torpet probitas, virtus sepelitur;
Fit iam parca largitas, parcitas largitur;
Verum dicit falsitas; veritas mentitur.

[ Parent ]
According to Philip K. Dick (2.75 / 4) (#32)
by Highlander on Tue Dec 14, 2004 at 05:41:07 AM EST

THE (roman) EMPIRE NEVER ENDED

.. and our times are an illusion.

Not a very practical point of view, but there it is.

Moderation in moderation is a good thing.
[ Parent ]

Newton.. (2.50 / 4) (#30)
by the womble on Tue Dec 14, 2004 at 12:17:19 AM EST

...was also had some weird theological and numeralogical obsessions.

Perhaps with maths proving so useful for scientific problems it seemed sensible to apply it to everything possible.

Checkmate! (2.60 / 10) (#34)
by Onion Blastar on Tue Dec 14, 2004 at 12:06:19 PM EST

I was trying to use Napier's chessboard method to balance my checkbook, and I ended up in Checkmate. What does that mean? ;)


[ Support your local anonymous online communities ]
[ Ignore User ]
I know what it means (2.33 / 3) (#35)
by p3d0 on Tue Dec 14, 2004 at 02:55:44 PM EST

It means you don't know the difference between checkers and chess.
--
Patrick Doyle
My comments do not reflect the opinions of my employer.
[ Parent ]
Yes I do (2.00 / 2) (#36)
by Onion Blastar on Tue Dec 14, 2004 at 04:11:00 PM EST

checkers has those disc thingies, while chess has those nobby thingies. See, I know the difference between checkers and chess. :)


[ Support your local anonymous online communities ]
[ Ignore User ]
[ Parent ]
Duh (2.00 / 2) (#38)
by p3d0 on Thu Dec 16, 2004 at 10:38:42 PM EST

Looks like I'm the one who doesn't know the difference. I could have sworn this article referred to checkerboards.
--
Patrick Doyle
My comments do not reflect the opinions of my employer.
[ Parent ]
It does, yet it does not. (none / 1) (#40)
by Onion Blastar on Fri Dec 24, 2004 at 01:04:31 AM EST

"Napier's Chessboard Calculator"

Those of us who are enlightened happen to know that chessboards and checkerboards are very much the same thing. The thing that makes them different, is the type of things placed on them.

Place those disc thingies, and you have a checkerboard.

Place those knobbie thingies and you have a chessboard.

It is two, two, two, two boards in one! To complete the transformation, you just replace the thingies you put on it, and it changes from one to the other!


[ Support your local anonymous online communities ]
[ Ignore User ]
[ Parent ]

Nope (3.00 / 2) (#41)
by kerinsky on Tue Dec 28, 2004 at 12:06:31 AM EST

Chessboards are black and white.

Checkerboards are red and black.

Check around the house, if you find this is not the case please return the item in question to the manufacturer for a replacement or full refund under their defective unit policy.

Thank you and have a very uncrapulent New Year!

-=-
Aconclusionissimplytheplacewhereyougottiredofthinking.
[ Parent ]

Checkers and Chess boards (none / 0) (#42)
by Onion Blastar on Fri Dec 31, 2004 at 05:09:27 PM EST

I have a checker set with white and black checkers and a white and black checkerboard. I also have red and black chess pieces on a red and black chessboard. I also have the traditional ones of white and black chess and red and black checkers.

My official US Chess Chessboard; however, is a rollable mat that has tan and green colors with black and white peices. Tan being what the white would be, and green being what black would be.

So colors can be substituted, apparently. Each Chessboard and Checkerboard has 64 squares on it, I strongly suggest you count them to make sure. ;)


[ Support your local anonymous online communities ]
[ Ignore User ]
[ Parent ]

god i love k5 (2.50 / 2) (#37)
by the77x42 on Tue Dec 14, 2004 at 11:09:18 PM EST

IF title LIKE [calculator|chess] { +1FP }


"We're not here to educate. We're here to point and laugh." - creature
"You have some pretty stupid ideas." - indubitable ‮

Just another reason (none / 0) (#39)
by Boronx on Sun Dec 19, 2004 at 12:19:18 AM EST

Yet another reason that go is better than chess. 19 bit arithmetic and enough counters to fill the whole board.
Subspace
chess pieces allow richer data expression (none / 0) (#43)
by lahosken on Wed Jan 12, 2005 at 11:45:23 PM EST

While the go board does allow for more bits, a user with access to a chess set can use some of the pieces to keep track of useful data.  

The pawns, of course, represent number bits, in the same way that go stones would.  But why stop there?

It makes sense to use a black king to keep track of the decimal point.  Similarly, one can use the white king to keep track of the "cursor" as one moves along, keeping track of carry-bits.  Extending this metaphor, we see that we can use rooks to mark rows in which we keep track of subtotals; bishops can mark overflow conditions; knights mark irrational numbers.  I'm not sure what purpose to put the queens to, but no doubt the solution will be obvious after I eat some more candy.

[ Parent ]

good (none / 0) (#44)
by polins on Fri Mar 18, 2005 at 12:45:21 AM EST

And second he doesn't beat him up then as he's just a kid, he jumps him when he's older, so you are WRONG WRONG WORNG.

Sorry (1.00 / 4) (#45)
by jenniferwillsz on Mon May 02, 2005 at 04:14:26 PM EST

im sorry arkanoids astralworlds boulderdash commandment crazyhunt deerhunt defencer digitalmedia dinodesign exolon fashondiary fillforms flyingshark galaxywars handset homelab letmein locator madchase manicminer cdrfaq crazylinks doombaby festivalsingers freshbreath ipods linuxblog lovelysoft mobiheaven perfectgift redbandana sarl thestar watersoul wolfprint ninjaturtles oldtown orangecup orchestra outtalove overhills playpause proniche purpleking rallyrace redhand saboteur secretland shadowbane steelrats theoutlaws throtle ultrahits updown xraysim sorry basketmaster begood bombjack brucelee captainamerica catapult chasehq doomdark greenberet guidance headmaster iceguards jetpac jumpover knockedout landmark lasersquad lightforce matchday misleading cdrfaq pascal enjoy danny windsurfing moonlights mountains paradiseisland quazatron redheat respectme robotswar saigon scenarios secretfiles sequels sixhours southwest spacetrolls spitfire starquake stinkbomb threecups wilddance windsurfing

Napier's Chessboard Calculator | 45 comments (33 topical, 12 editorial, 0 hidden)
Display: Sort:

kuro5hin.org

[XML]
All trademarks and copyrights on this page are owned by their respective companies. The Rest 2000 - Present Kuro5hin.org Inc.
See our legalese page for copyright policies. Please also read our Privacy Policy.
Kuro5hin.org is powered by Free Software, including Apache, Perl, and Linux, The Scoop Engine that runs this site is freely available, under the terms of the GPL.
Need some help? Email help@kuro5hin.org.
My heart's the long stairs.

Powered by Scoop create account | help/FAQ | mission | links | search | IRC | YOU choose the stories!