One use of strings is to represent integers in a positional number system. In this context, symbols are called digits, a string of digits is called a numeral, and the size of the alphabet — the number of available digits — is the system’s base. Every nonnegative integer is represented by a unique numeral in which a digit’s contribution depends on its position in the numeral. Specifically, where positions in a numeral are assigned right-to-left starting with 0, the digit in position contributes in a base system whose digits are ordered . A numeral’s value is the sum of its digits’ contributions. Some examples:1
We augment some of the previous models to represent each string’s numeric value. The ‘keyboard lengthened’ model represents each digit’s contribution by block length (in the x dimension), whereas the various ‘lofted’ models do this by means of each object’s height in the vertical y dimension.
- Subscripts on the left side of these equations indicate the base, and expressions on the right side are expressed in decimal (base 10). ↩