About Number Systems
One number, written in a dozen ways. Type in any box (decimal, binary, octal, hex, a base of your choice, Roman, Babylonian, Maya, Chinese or Japanese) and every other one follows as you type. Click a lamp to switch that bit on or off. Click any exhibit, or a box on the catalogue card, to see its place values: how the symbols add up to the number. ↑ and ↓ in any box add or take away one (with Shift, ten).
It works with whole numbers from 0 up to 40 digits long. No negatives and no fractions: most of these systems had neither (though Babylonian scribes wrote fractions in base 60, and Chinese counting rods came in red and black for positive and negative). Some systems stop sooner: Roman numerals at 3,999,999, Egyptian at 9,999,999, Chinese and Japanese at 9,999 trillion.
THE EXHIBITS
Binary, octal, hex. Gottfried Leibniz published his account of binary arithmetic in 1703. Computers store everything in bits, and programmers write them in groups: three bits make one octal digit, four make one hex digit, which is why those two bases are so common.
Roman numerals add letters up: I 1, V 5, X 10, L 50, C 100, D 500, M 1000. A smaller letter before a bigger one is taken away (IV is 4), though the Romans themselves often wrote IIII, as many clock faces still do. For big numbers a bar over the letters multiplies them by 1,000 (the vinculum): V with a bar is 5,000. The Romans had no zero; medieval writers such as Bede used the word nulla, or N. Type a bar as _ before a letter: _V is 5,000.
Babylonian cuneiform counts in sixties, pressed into wet clay with a reed: a corner wedge for ten, an upright wedge for one, so each base-60 digit is up to five tens and nine ones. The system goes back to the Sumerians, and we still use it for 60 minutes and 360 degrees. For a long time there was no zero, just a gap; a placeholder sign (two slanting wedges) appears in later texts, by about 300 BC, but never at the end of a number, so a scribe read the size from context. Here internal zeros get the placeholder and trailing zeros a faint empty slot. Type the digits with commas: 33, 46 is 33 × 60 + 46. Leave a slot empty for a gap, as the scribes did: 1,,2 is 1 × 3,600 + 2.
Maya numerals are base 20, written top to bottom: a dot is one, a bar is five, and a shell is zero. Classic Maya inscriptions (about AD 250 to 900) use a zero sign, one of the earliest anywhere. Their Long Count calendar bent the rule (its third place is 18 × 20 = 360, not 400); this shows the plain base-20 count.
Egyptian hieroglyphs repeat a sign for each power of ten: a stroke (1), a hobble for cattle (10), a coil of rope (100), a lotus (1,000), a finger (10,000), a tadpole (100,000) and the god Heh with raised arms (1,000,000). They used them from about 3000 BC. There's no zero and no place value: the order doesn't matter, so here they're written biggest first, left to right.
Chinese counting rods were laid out on a board in squares. Ones, hundreds and ten thousands use upright rods; tens and thousands lie flat, so neighbouring digits can't run together. An empty square is zero; a round zero appears in Chinese books in the 13th century.
Chinese and Japanese numerals name the digits and the places: 二千零二十六 is two thousand, (zero), two tens, six. They group by ten thousands (万), not thousands. Chinese writes 零 for a gap and 一十 inside a number; Japanese leaves both out (二千二十六). Big groups: 万 10⁴, 亿/億 10⁸, and 万亿 (Chinese) or 兆 (Japanese) for 10¹². You can also type a year digit by digit: 二〇二六.
HOW IT WORKS
Every box is read into one exact whole number (a JavaScript BigInt, so 40 digits stay exact), and every other box is written from it. A box you're typing in is never rewritten under you; if what you typed can't be read, it says why and the others keep the last good number (the one you settled on, not a half-typed step such as the 6 on the way to an impossible 60). Roman numerals are checked against the rules (biggest to smallest, with IV, IX, XL, XC, CD and CM), so made-up forms like IIX or VX are refused; the old additive fours like IIII are accepted, with the usual form shown. The Egyptian, Babylonian, Maya and rod signs are drawn as shapes, so they don't depend on any font; the Roman letters and the Chinese and Japanese characters use your device's fonts.
FURTHER WATCHING AND READING