Microsoft Store
 

Numeral system


 

:Occasionally the term "number system" is used for this concept, but that is also the name of an altogether different concept; see number system.

Generalized variable-length integers

More general is using a notation (here written little-endian) like a0a1a2 for a0 + a1b1 + a2b1b2, etc.

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

This is used in punycode, one aspect of which is the representation of a sequence of non-negative integers of arbitrary size in the form of a sequence without delimiters, of "digits" from a collection of 36: a-z and 0-9, representing 0-25 and 26-35 respectively. A digit lower than a threshold value marks that it is the most-significant digit, hence the end of the number. The threshold value depends on the position in the number. For example, if the threshold value for the first digit is b (1) then a (0) marks the end of the number (it has just one digit), so in numbers of more than one digit the range is only b-9 (1-35), therefore the weight b1 is 35 instead of 36. Suppose the threshold values for the second and third digit are c (2), then the third digit has a weight 34 × 35 = 1190 and we have the following sequence:

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

a (0), ba (1), ca (2), .., 9a (35), bb (36), cb (37), .., 9b (70), bca (71), .., 99a (1260), bcb (1261), etc.

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

Note that unlike a regular base-35 numeral system, we have numbers like 9b where 9 and b each represent 35; yet the representation is unique because ac and aca are not allowed.

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

The flexibility in choosing threshold values allows optimization depending on the frequency of occurrence of numbers of various sizes.

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

The case with all threshold values equal to 1 corresponds to bijective numeration, where the zeros correspond to separators of numbers with digits which are nonzero.

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

~ Table of Content ~

Introduction
Types of numeral systems
History
Bases used
Positional systems in detail
Change of radix
Generalized variable-length integers
See also
References
External links

 

 

~ What's Hot ~


~ Community ~

History Forum
Come and discuss about History, Civilizations, Historical Events and Figures
History Web-Ring
A community of sites, blogs and forums dedicated to History. Do not hesitate to submit your site.