Douglas Crockford

Blog

Books

Videos

2021 Appearances

JavaScript

JSLint

JSON

Github

How JavaScript Works

Layer8

About

Octal

I sometimes think about the first standards committee that was tasked with the selection of the basis of the Mesopotamian accounting system. You recall that they struggled to chose between base ten and base twelve. They tried to determine which was better, but since both bases are equally good, they were unable to agree on a winner. If I could time travel and alter history, I would get on that committee.

Time Travel

I would remind the committee that their task is not to determine which radix is best. Their task is to pick either one to establish the first standard. That admonishment of course would fall on deaf ears.

Just flip a coin, I helpfully suggest.

Coins haven't been invented yet.

Right. Ok, play rock paper scissors.

Paper and scissors haven't been invented yet. But we can play rock rock rock. The champions for ten and twelve will take turns throwing rocks at you. Whoever throws the fatal rock wins.

I decline that offer, so the committee breaks into workgroups to develop a mutually disagreeable compromise. Most of the members go into the Base Sixty workgroup. The remaining cranks go into Base Ten, Base Eleven, and Base Twelve. Meanwhile, I prepare a proposal for Base Eight.

Octal

I propose a positional representation with a first class zero, using these cuneiform glyphs:

0zero 1one 2two 3three 4four 5five 6six 7seven

The digits are composed of 4 lines having the values 0, 1, 2, and 4. The value of a digit is the sum of the values of its lines. All digits contain the 0 line. That makes it easy to distinguish digits from other characters. Rotation does not alias numbers. In our modern decimal system, 109 can be flipped to read 601. That can not happen in this octal system because of the 0 line.

Many numbers can be written with fewer strokes than with the Base 60 proposal.

decimal octal sexagesimal
number strokes number strokes
8 10 3 h 8
42 52 5 sb 6
59 73 7 ti 14
61 75 7 aa 2
666 1232 9 paf 8
2021 3745 12 rcr 9

When clay tablets are replaced with pen and paper, we allow the use of curves so that every digit can be written with a single stroke.

0zero 1one 2two 3three 4four 5five 6six 7seven

The similarity of 6 and 6 is intentional.

When mechanical and electronic displays are developed, those forms can be streamlined.

0zero 1one 2two 3three 4four 5five 6six 7seven