## Wednesday, January 23, 2008

### The Legend of the Binary Wine Merchants

Did English Wine Merchants develop and use a binary number system in the 13th century?

Knuth [1] states the first known appearance of pure binary notation was about 1605 with Thomas Harriot [2], but he suggests another intriguing idea. He lists the common units of liquid measure used by English Wine Merchants as late as the 13th century. Specifically,

2 gills = 1 chopin
2 chopins = 1 pint
2 pints = 1 quart
2 quarts = 1 pottle
2 pottles = 1 gallon
2 gallons = 1 peck
2 pecks = 1 demibushel
2 demibushels = 1 bushel (or firkin)
2 firkins = 1 kilderkin
2 kilderkins = 1 barrel
2 pipes = 1 tun

This is effectively a binary counting system using a 14 bit word. Each measure, twice as large as the last, has its own name. If you represent each named unit as a single bit and combine them all, you get a binary number. For instance, if I had 1 hogshead, a firkin, a gallon, and a pint of wine, I could write the measured amount of wine as 0b00100100100100 gills, where "gills" is the LSB (least significant bit) and "tuns" is the MSB (most significant bit). ("0b" at the front is a common programmer way to say "the following are digits in binary")

Compare this with our system where we might write 1 litre and 13 millilitres of volume in base 10 as 1013 millilitres. The wine merchants had names for each power of 2 of liquid measure, whereas in the metric system we have prefixes for each power of 10, allowing us to extend their use to all units of measure.

If this is true, I am impressed. The English wine merchants would have been cogently representing measures in the 2nd most optimal integer base as well as competent in "everyday" binary calculations. I may have found a new respect for the imperial system of measure which I always thought was somewhat arbitrary.

Is this only legendary? I don't know where Knuth [1] got his conversion factors. All the modern references I find now generally don't agree with his conversions. Standards change, but I could find no record of it. According to google, here's some the current conversion factors

2 firkin = 1 kilderkin
1.4340494 kilderkin = 1 barrel

As you can see, they're not quite factors of 2. Were they never factors of 2 (and Knuth was misinformed or fudging) or did the standards drift? I don't know for sure, but when examining the conversion of two units that are supposed to be equal (firkin and bushels)

1 firkin = 1.16106426 US bushels

it seems that there is a disparity between UK and US designations, which suggests drift. It is believable that Knuth was reporting historically and the online references are modern standards that drifted from the original measures. Unfortunately Knuth doesn't state any sources for his unit equivalences. If anybody has better information, please leave a comment, preferably with a link. Until there is a solid verifiable reference, this idea unfortunately can only be legendary. I hope it's not; the idea of 13th century wine merchants conducting business in binary is just too cool.

Burton MacKenZie www.burtonmackenzie.com

[1] Donald E. Knuth, "The Art of Computer Programming, Volume 2: "Seminumerical Algorithms", Second Edition, Addison-Wesley, 1981, p. 183

[2] and the first published discussion was in 1670 by the bishop Juan Caramuel Lobkowitz.