The most commonly used system of numerals is
decimal.
Indian mathematicians are credited with developing the integer version, the
Hindu–Arabic numeral system.
Aryabhata of
Kusumapura developed the
place-value notation in the 5th century and a century later
Brahmagupta introduced the symbol for zero. The system slowly spread to other surrounding regions like Arabia due to their commercial and military activities with India. Middle-Eastern mathematicians extended the system to include negative powers of 10, or fractions, as recorded in a treatise by Syrian mathematician
Abu'l-Hasan al-Uqlidisi in 952–953, and the decimal point notation was introduced by
Sind ibn Ali, who also wrote the earliest treatise on Arabic numerals. The Hindu–Arabic numeral system then spread to Europe due to merchants trading, and the digits used in Europe are called
Arabic numerals, as they learned them from the Arabs. The simplest numeral system is the
unary numeral system, in which every
natural number is represented by a corresponding number of symbols. If the symbol is chosen, for example, then the number seven would be represented by .
Tally marks represent one such system still in common use. The unary system is typically reserved for small numbers, although it plays an important role in
theoretical computer science.
Elias gamma coding, which is commonly used in
data compression, expresses arbitrarily sized numbers by using unary to indicate the length of a binary numeral. The unary notation can be abbreviated by introducing different symbols for certain new values. Very commonly, these values are powers of 10; so for instance, if / stands for one, − for ten and + for 100, then the number 304 can be compactly represented as and the number 123 as without using a zero. This is called
sign-value notation. The ancient
Egyptian numeral system was of this type, and the
Roman numeral system was a modification of this idea. Other systems employ special abbreviations for repetitions of symbols; for example, using the first nine letters of the alphabet for these abbreviations, with A standing for "one occurrence", B "two occurrences", and so on, one could then write C+ D/ for the number 304; the number of these abbreviations is sometimes called the base of the system. This system is used when writing
Chinese numerals and other East Asian numerals based on Chinese. The number system of the English language is of this type, such as "three hundred [and] four", as are those of other spoken languages, regardless of what written systems they have adopted. Many languages use mixtures of bases, and other features, for instance 79 in French is () and in Welsh is () or the somewhat archaic (). In English, "four score less one", as in the famous
Gettysburg Address representing "87 years ago" as "four score and seven years ago". A
positional system, also known as place-value notation, is classified by its base or
radix, which is the number of symbols called
digits used by the system. In base 10, ten different digits 0, ..., 9 are used and the position of a digit is used to signify the power of ten that the digit is to be multiplied with, as in or more precisely . Zero, which is not used in the other systems, is used in this system, in order to be able to "skip" a power. The Hindu–Arabic numeral system, which originated in India and is now used throughout the world, is a positional base 10 system. Arithmetic is much easier in positional systems than in the earlier additive ones; furthermore, additive systems need a large number of different symbols for the different powers of 10; a positional system needs ten different symbols, if it uses base 10. The positional decimal system is universally used in human writing. The base 1000 is also used in many systems by grouping the digits and considering a sequence of three decimal digits as a single digit. This is the meaning of the common notation 1,000,234,567 used for very large numbers. In computers, the main numeral systems are based on the positional system in a
binary numeral system, or base 2, with two
binary digits, 0 and 1. Positional systems obtained by grouping binary digits by three (
octal numeral system) or four (
hexadecimal numeral system) are commonly used. For very large integers, for example, the
GNU Multiple Precision Arithmetic Library (GMP) uses bases 232 or 264—grouping binary digits by 32 or 64, the length of the
machine word—are used. In certain biological systems, the
unary coding system is employed. Unary numerals used in the
neural circuits responsible for
birdsong production. The nucleus in the brain of the songbirds that plays a part in both the learning and the production of bird song is the
high vocal center (HVC). The command signals for different notes in the birdsong emanate from different points in the HVC. This coding works as space coding which is a strategy for biological circuits due to its inherent simplicity and robustness. The numerals used when writing numbers with digits or symbols can be divided into two types that might be called the
arithmetic numerals (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) and the
geometric numerals (1, 10, 100, 1000, 10000 ...), respectively. The sign-value systems use only the geometric numerals and the positional systems use only the arithmetic numerals. A sign-value system does not use arithmetic numerals because they are made by repetition—except for the
Ionic system—and a positional system does not use geometric numerals because they are made by position. The spoken language uses both arithmetic and geometric numerals. In some areas of computer science, a modified base
k positional system is used, called
bijective numeration, with digits 1, 2, ...,
k (), and zero being represented by an empty string. This establishes a
bijection between the set of all such digit-strings and the set of non-negative integers, avoiding the non-uniqueness caused by leading zeros. Bijective base-
k numeration is also called
k-adic notation, not to be confused with
p-adic numbers. Bijective base 1 is the same as unary. ==Positional systems in detail== In a positional base
b numeral system (with
b a
natural number greater than 1 known as the
radix or
base of the system),
b basic symbols (or digits) corresponding to the first
b natural numbers including zero are used. To generate the rest of the numerals, the position of the symbol in the figure is used. The symbol in the last position has its own value, and as it moves to the left its value is multiplied by
b. For example, in the
decimal system (base 10), the numeral 4327 means , noting that . In general, if
b is the base, one writes a number in the numeral system of base
b by expressing it in the form and writing the enumerated digits in descending order. The digits are natural numbers between 0 and , inclusive. If a text (such as this one) discusses multiple bases, and if ambiguity exists, the base (itself represented in base 10) is added in subscript to the right of the number, like this: numberbase. Unless specified by context, numbers without subscript are considered to be decimal. By using a dot to divide the digits into two groups, one can also write fractions in the positional system. For example, the base 2 numeral 10.11 denotes . In general, numbers in the base
b system are of the form: : (a_na_{n-1}\cdots a_1a_0.c_1 c_2 c_3\cdots)_b = \sum_{k=0}^n a_kb^k + \sum_{k=1}^\infty c_kb^{-k}. The numbers
bk and
b−
k are the
weights of the corresponding digits. The position
k is the
logarithm of the corresponding weight
w, that is k = \log_b w = \log_b b^k. The highest used position is close to the
order of magnitude of the number. The number of
tally marks required in the
unary numeral system for
describing the weight would have been
w. In the positional system, the number of digits required to describe it is only k + 1 = \log_{b} w + 1, for
k ≥ 0. For example, to describe the weight 1000 then four digits are needed because \log_{10} 1000 + 1 = 3 + 1. The number of digits required to
describe the position is \log_b k + 1 = \log_b \log_b w + 1 (in positions 1, 10, 100,... only for simplicity in the decimal example). :\begin{array}{l|rrrrrrr} \text{Position} & 3 & 2 & 1 & 0 & -1 & -2 & \cdots \\ \hline \text{Weight} & b^3 & b^2 & b^1 & b^0 & b^{-1} & b^{-2} & \cdots \\ \text{Digit} & a_3 & a_2 & a_1 & a_0 & c_1 & c_2 & \cdots \\ \hline \text{Decimal example weight} & 1000 & 100 & 10 & 1 & 0.1 & 0.01 & \cdots \\ \text{Decimal example digit} & 4 & 3 & 2 & 7 & 0 & 0 & \cdots \end{array} A number has a terminating or repeating expansion
if and only if it is
rational; this does not depend on the base. A number that terminates in one base may repeat in another (thus ). An irrational number stays aperiodic (with an infinite number of non-repeating digits) in all integral bases. Thus, for example in base 2, can be written as the aperiodic 11.001001000011111...2. Putting
overscores, , or dots,
ṅ, above the common digits is a convention used to represent repeating rational expansions. Thus: :14/11 = 1.272727272727... = 1. or 321.3217878787878... = 321.321. If
b =
p is a
prime number, one can define base-
p numerals whose expansion to the left never stops; these are called the
p-adic numbers. It is also possible to define a variation of base
b in which digits may be positive or negative; this is called a
signed-digit representation. ==Generalized variable-length integers==