HOME

TheInfoList



OR:

In
mathematical notation Mathematical notation consists of using glossary of mathematical symbols, symbols for representing operation (mathematics), operations, unspecified numbers, relation (mathematics), relations, and any other mathematical objects and assembling ...
for
number A number is a mathematical object used to count, measure, and label. The most basic examples are the natural numbers 1, 2, 3, 4, and so forth. Numbers can be represented in language with number words. More universally, individual numbers can ...
s, a signed-digit representation is a
positional numeral system Positional notation, also known as place-value notation, positional numeral system, or simply place value, usually denotes the extension to any base of the Hindu–Arabic numeral system (or decimal system). More generally, a positional system ...
with a set of signed digits used to encode the
integers An integer is the number zero (0), a positive natural number (1, 2, 3, ...), or the negation of a positive natural number (−1, −2, −3, ...). The negations or additive inverses of the positive natural numbers are referred to as negative in ...
. Signed-digit representation can be used to accomplish fast addition of integers because it can eliminate chains of dependent carries. In the
binary numeral system A binary number is a number expressed in the base-2 numeral system or binary numeral system, a method for representing numbers that uses only two symbols for the natural numbers: typically "0" ( zero) and "1" ( one). A ''binary number'' may als ...
, a special case signed-digit representation is the '' non-adjacent form'', which can offer speed benefits with minimal space overhead.


History

Challenges in
calculation A calculation is a deliberate mathematical process that transforms a plurality of inputs into a singular or plurality of outputs, known also as a result or results. The term is used in a variety of senses, from the very definite arithmetical ...
stimulated early authors Colson (1726) and Cauchy (1840) to use signed-digit representation. The further step of replacing negated digits with new ones was suggested by Selling (1887) and Cajori (1928). In 1928, Florian Cajori noted the recurring theme of signed digits, starting with Colson (1726) and Cauchy (1840). In his book ''History of Mathematical Notations'', Cajori titled the section "Negative numerals". For completeness, Colson uses examples and describes
addition Addition (usually signified by the Plus and minus signs#Plus sign, plus symbol, +) is one of the four basic Operation (mathematics), operations of arithmetic, the other three being subtraction, multiplication, and Division (mathematics), divis ...
(pp. 163–4),
multiplication Multiplication is one of the four elementary mathematical operations of arithmetic, with the other ones being addition, subtraction, and division (mathematics), division. The result of a multiplication operation is called a ''Product (mathem ...
(pp. 165–6) and division (pp. 170–1) using a table of multiples of the divisor. He explains the convenience of approximation by truncation in multiplication. Colson also devised an instrument (Counting Table) that calculated using signed digits. Eduard Selling advocated inverting the digits 1, 2, 3, 4, and 5 to indicate the negative sign. He also suggested ''snie'', ''jes'', ''jerd'', ''reff'', and ''niff'' as names to use vocally. Most of the other early sources used a bar over a digit to indicate a negative sign for it. Another German usage of signed-digits was described in 1902 in Klein's encyclopedia.


Definition and properties


Digit set

Let \mathcal be a
finite set In mathematics, particularly set theory, a finite set is a set that has a finite number of elements. Informally, a finite set is a set which one could in principle count and finish counting. For example, is a finite set with five elements. Th ...
of numerical digits with
cardinality The thumb is the first digit of the hand, next to the index finger. When a person is standing in the medical anatomical position (where the palm is facing to the front), the thumb is the outermost digit. The Medical Latin English noun for thum ...
b > 1 (If b \leq 1, then the positional number system is trivial and only represents the trivial ring), with each digit denoted as d_i for 0 \leq i < b. b is known as the
radix In a positional numeral system, the radix (radices) or base is the number of unique digits, including the digit zero, used to represent numbers. For example, for the decimal system (the most common system in use today) the radix is ten, becaus ...
or number base. \mathcal can be used for a signed-digit representation if it's associated with a unique function f_\mathcal:\mathcal\rightarrow\mathbb such that f_\mathcal(d_i) \equiv i \bmod b for all 0 \leq i < b. This function, f_, is what rigorously and formally establishes how integer values are assigned to the symbols/glyphs in \mathcal. One benefit of this formalism is that the definition of "the integers" (however they may be defined) is not conflated with any particular system for writing/representing them; in this way, these two distinct (albeit closely related) concepts are kept separate. \mathcal can be partitioned into three distinct sets \mathcal_, \mathcal_, and \mathcal_, representing the positive, zero, and negative digits respectively, such that all digits d_\in\mathcal_ satisfy f_\mathcal(d_) > 0, all digits d_\in\mathcal_ satisfy f_\mathcal(d_) = 0 and all digits d_\in\mathcal_ satisfy f_\mathcal(d_) < 0. The cardinality of \mathcal_ is b_, the cardinality of \mathcal_ is b_, and the cardinality of \mathcal_ is b_, giving the number of positive and negative digits respectively, such that b = b_ + b_ + b_.


Balanced form representations

Balanced form representations are representations where for every positive digit d_, there exist a corresponding negative digit d_ such that f_\mathcal(d_) = -f_\mathcal(d_). It follows that b_ = b_. Only odd bases can have balanced form representations, as otherwise d_ has to be the opposite of itself and hence 0, but 0\ne \frac b2. In balanced form, the negative digits d_\in\mathcal_ are usually denoted as positive digits with a bar over the digit, as d_ = \bar_ for d_\in\mathcal_. For example, the digit set of balanced ternary would be \mathcal_ = \lbrace\bar,0,1\rbrace with f_(\bar) = -1, f_(0) = 0, and f_(1) = 1. This convention is adopted in
finite field In mathematics, a finite field or Galois field (so-named in honor of Évariste Galois) is a field (mathematics), field that contains a finite number of Element (mathematics), elements. As with any field, a finite field is a Set (mathematics), s ...
s of odd prime order q: :\mathbb_ = \lbrace0, 1, \bar = -1,... d = \frac,\ \bar = \frac\ , \ q = 0\rbrace.


Dual signed-digit representation

Every digit set \mathcal has a dual digit set \mathcal^\operatorname given by the inverse order of the digits with an
isomorphism In mathematics, an isomorphism is a structure-preserving mapping or morphism between two structures of the same type that can be reversed by an inverse mapping. Two mathematical structures are isomorphic if an isomorphism exists between the ...
g:\mathcal\rightarrow\mathcal^\operatorname defined by -f_\mathcal = g\circ f_. As a result, for any signed-digit representations \mathcal of a number system ring N constructed from \mathcal with valuation v_\mathcal:\mathcal\rightarrow N, there exists a dual signed-digit representations of N, \mathcal^\operatorname, constructed from \mathcal^\operatorname with valuation v_:\mathcal^\operatorname\rightarrow N, and an isomorphism h:\mathcal\rightarrow\mathcal^\operatorname defined by -v_\mathcal = h\circ v_, where - is the additive inverse operator of N. The digit set for balanced form representations is self-dual.


For integers

Given the digit set \mathcal and function f:\mathcal\rightarrow\mathbb as defined above, let us define an
integer An integer is the number zero (0), a positive natural number (1, 2, 3, ...), or the negation of a positive natural number (−1, −2, −3, ...). The negations or additive inverses of the positive natural numbers are referred to as negative in ...
endofunction T:\mathbb\rightarrow\mathbb as the following: :T(n) = \begin \frac &\text n \equiv i \bmod b, 0 \leq i < b \end If the only periodic point of T is the fixed point 0, then the set of all signed-digit representations of the
integers An integer is the number zero (0), a positive natural number (1, 2, 3, ...), or the negation of a positive natural number (−1, −2, −3, ...). The negations or additive inverses of the positive natural numbers are referred to as negative in ...
\mathbb using \mathcal is given by the Kleene plus \mathcal^+, the set of all finite concatenated strings of digits d_n \ldots d_0 with at least one digit, with n\in\mathbb. Each signed-digit representation m \in \mathcal^+ has a valuation v_\mathcal:\mathcal^+\rightarrow\mathbb :v_\mathcal(m) = \sum_^f_\mathcal(d_)b^. Examples include balanced ternary with digits \mathcal = \lbrace \bar, 0, 1\rbrace. Otherwise, if there exist a non-zero periodic point of T, then there exist integers that are represented by an infinite number of non-zero digits in \mathcal. Examples include the standard decimal numeral system with the digit set \operatorname = \lbrace 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 \rbrace, which requires an infinite number of the digit 9 to represent the
additive inverse In mathematics, the additive inverse of an element , denoted , is the element that when added to , yields the additive identity, 0 (zero). In the most familiar cases, this is the number 0, but it can also refer to a more generalized zero el ...
-1, as T_\operatorname(-1) = \frac = -1, and the positional numeral system with the digit set \mathcal = \lbrace \text, 0, 1\rbrace with f(\text) = -4, which requires an infinite number of the digit \text to represent the number 2, as T_\mathcal(2) = \frac = 2.


For decimal fractions

If the integers can be represented by the Kleene plus \mathcal^+, then the set of all signed-digit representations of the
decimal fraction The decimal numeral system (also called the base-ten positional numeral system and denary or decanary) is the standard system for denoting integer and non-integer numbers. It is the extension to non-integer numbers (''decimal fractions'') of the ...
s, or b-adic rationals \mathbb \backslash b/math>, is given by \mathcal = \mathcal^+\times\mathcal\times\mathcal^*, the
Cartesian product In mathematics, specifically set theory, the Cartesian product of two sets and , denoted , is the set of all ordered pairs where is an element of and is an element of . In terms of set-builder notation, that is A\times B = \. A table c ...
of the Kleene plus \mathcal^+, the set of all finite concatenated strings of digits d_n \ldots d_0 with at least one digit, the singleton \mathcal consisting of the radix point (. or ,), and the
Kleene star In mathematical logic and theoretical computer science, the Kleene star (or Kleene operator or Kleene closure) is a unary operation on a Set (mathematics), set to generate a set of all finite-length strings that are composed of zero or more repe ...
\mathcal^*, the set of all finite concatenated strings of digits d_ \ldots d_, with m,n\in\mathbb. Each signed-digit representation q \in \mathcal has a valuation v_\mathcal:\mathcal\rightarrow\mathbb \backslash b/math> :v_\mathcal(q) = \sum_^f_\mathcal(d_)b^


For real numbers

If the integers can be represented by the Kleene plus \mathcal^+, then the set of all signed-digit representations of the
real numbers In mathematics, a real number is a number that can be used to measurement, measure a continuous variable, continuous one-dimensional quantity such as a time, duration or temperature. Here, ''continuous'' means that pairs of values can have arbi ...
\mathbb is given by \mathcal = \mathcal^+ \times \mathcal \times \mathcal^\mathbb, the
Cartesian product In mathematics, specifically set theory, the Cartesian product of two sets and , denoted , is the set of all ordered pairs where is an element of and is an element of . In terms of set-builder notation, that is A\times B = \. A table c ...
of the Kleene plus \mathcal^+, the set of all finite concatenated strings of digits d_n \ldots d_0 with at least one digit, the singleton \mathcal consisting of the radix point (. or ,), and the Cantor space \mathcal^\mathbb, the set of all infinite concatenated strings of digits d_ d_ \ldots, with n\in\mathbb. Each signed-digit representation r \in \mathcal has a valuation v_\mathcal:\mathcal\rightarrow\mathbb :v_\mathcal(r) = \sum_^f_\mathcal(d_)b^. The infinite series always converges to a finite real number.


For other number systems

All base-b numerals can be represented as a subset of \mathcal^\mathbb, the set of all doubly infinite sequences of digits in \mathcal, where \mathbb is the set of
integers An integer is the number zero (0), a positive natural number (1, 2, 3, ...), or the negation of a positive natural number (−1, −2, −3, ...). The negations or additive inverses of the positive natural numbers are referred to as negative in ...
, and the ring of base-b numerals is represented by the formal power series ring \mathbb b,b^, the doubly infinite series :\sum_^a_i b^i where a_i\in\mathbb for i\in\mathbb.


Integers modulo powers of

The set of all signed-digit representations of the integers modulo b^n, \mathbb\backslash b^n\mathbb is given by the set \mathcal^n, the set of all finite concatenated strings of digits d_ \ldots d_0 of length n, with n\in\mathbb. Each signed-digit representation m \in \mathcal^n has a valuation v_\mathcal:\mathcal^n\rightarrow\mathbb/b^n\mathbb :v_\mathcal(m) \equiv \sum_^f_\mathcal(d_)b^ \bmod b^n


Prüfer groups

A Prüfer group is the
quotient group A quotient group or factor group is a mathematical group obtained by aggregating similar elements of a larger group using an equivalence relation that preserves some of the group structure (the rest of the structure is "factored out"). For ex ...
\mathbb(b^\infty) = \mathbb \backslash b\mathbb of the integers and the b-adic rationals. The set of all signed-digit representations of the Prüfer group is given by the
Kleene star In mathematical logic and theoretical computer science, the Kleene star (or Kleene operator or Kleene closure) is a unary operation on a Set (mathematics), set to generate a set of all finite-length strings that are composed of zero or more repe ...
\mathcal^*, the set of all finite concatenated strings of digits d_ \ldots d_, with n\in\mathbb. Each signed-digit representation p \in \mathcal^* has a valuation v_\mathcal:\mathcal^*\rightarrow\mathbb(b^\infty) :v_\mathcal(m) \equiv \sum_^f_\mathcal(d_)b^ \bmod 1


Circle group

The circle group is the quotient group \mathbb = \mathbb/\mathbb of the integers and the real numbers. The set of all signed-digit representations of the circle group is given by the Cantor space \mathcal^\mathbb, the set of all right-infinite concatenated strings of digits d_ d_ \ldots. Each signed-digit representation m \in \mathcal^n has a valuation v_\mathcal:\mathcal^\mathbb\rightarrow\mathbb :v_\mathcal(m) \equiv \sum_^f_\mathcal(d_)b^ \bmod 1 The infinite series always converges.


-adic integers

The set of all signed-digit representations of the b-adic integers, \mathbb_b is given by the Cantor space \mathcal^\mathbb, the set of all left-infinite concatenated strings of digits \ldots d_ d_. Each signed-digit representation m \in \mathcal^n has a valuation v_\mathcal:\mathcal^\mathbb\rightarrow\mathbb_ :v_\mathcal(m) = \sum_^f_\mathcal(d_)b^


-adic solenoids

The set of all signed-digit representations of the b-adic solenoids, \mathbb_b is given by the Cantor space \mathcal^\mathbb, the set of all doubly infinite concatenated strings of digits \ldots d_ d_ d_ \ldots. Each signed-digit representation m \in \mathcal^n has a valuation v_\mathcal:\mathcal^\mathbb\rightarrow\mathbb_ :v_\mathcal(m) = \sum_^f_\mathcal(d_)b^


In written and spoken language


Indo-Aryan languages

The oral and written forms of numbers in the
Indo-Aryan languages The Indo-Aryan languages, or sometimes Indic languages, are a branch of the Indo-Iranian languages in the Indo-European languages, Indo-European language family. As of 2024, there are more than 1.5 billion speakers, primarily concentrated east ...
use a negative numeral (e.g., "un" in
Hindi Modern Standard Hindi (, ), commonly referred to as Hindi, is the Standard language, standardised variety of the Hindustani language written in the Devanagari script. It is an official language of India, official language of the Government ...
and Bengali, "un" or "unna" in Punjabi, "ekon" in Marathi) for the numbers between 11 and 90 that end with a nine. The numbers followed by their names are shown for Punjabi below (the prefix "ik" means "one"): * 19 unni, 20 vih, 21 ikki * 29 unatti, 30 tih, 31 ikatti * 39 untali, 40 chali, 41 iktali * 49 unanja, 50 panjah, 51 ikvanja * 59 unahat, 60 sath, 61 ikahat * 69 unattar, 70 sattar, 71 ikhattar * 79 unasi, 80 assi, 81 ikiasi * 89 unanve, 90 nabbe, 91 ikinnaven. Similarly, the Sesotho language utilizes negative numerals to form 8's and 9's. * 8 robeli (/Ro-bay-dee/) meaning "break two" i.e. two fingers down * 9 robong (/Ro-bong/) meaning "break one" i.e. one finger down


Classical Latin

In
Classical Latin Classical Latin is the form of Literary Latin recognized as a Literary language, literary standard language, standard by writers of the late Roman Republic and early Roman Empire. It formed parallel to Vulgar Latin around 75 BC out of Old Latin ...
, integers 18 and 19 did not even have a spoken, nor written form including corresponding parts for "eight" or "nine" in practice - despite them being in existence. Instead, in Classic Latin, *18 = duodēvīgintī ("two taken from twenty"), (IIXX or XIIX), *19 = ūndēvīgintī ("one taken from twenty"), (IXX or XIX) *20 = vīgintī ("twenty"), (XX). For upcoming integer numerals 8, 29, 38, 39, ..., 88, 89the additive form in the language had been much more common, however, for the listed numbers, the above form was still preferred. Hence, approaching thirty, numerals were expressed as: *28 = duodētrīgintā ("two taken from thirty"), less frequently also yet vīgintī octō / octō et vīgintī ("twenty eight / eight and twenty"), (IIXXX or XXIIX versus XXVIII, latter having been fully outcompeted.) *29 = ūndētrīgintā ("one taken from thirty") despite the less preferred form was also at their disposal. This is one of the main foundations of contemporary historians' reasoning, explaining why the subtractive I- and II- was so common in this range of cardinals compared to other ranges. Numerals 98 and 99 could also be expressed in both forms, yet "two to hundred" might have sounded a bit odd - clear evidence is the scarce occurrence of these numbers written down in a subtractive fashion in authentic sources.


Finnish Language

There is yet another language having this feature (by now, only in traces), however, still in active use today. This is the
Finnish Language Finnish (endonym: or ) is a Finnic languages, Finnic language of the Uralic languages, Uralic language family, spoken by the majority of the population in Finland and by ethnic Finns outside of Finland. Finnish is one of the two official langu ...
, where the (spelled out) numerals are used this way should a digit of 8 or 9 occur. The scheme is like this: *1 = "yksi" (Note: yhd- or yht- mostly when about to be declined; e.g. "yhdessä" = "together, as one ntity) *2 = "kaksi" (Also note: kahde-, kahte- when declined) *3 = "kolme" *4 = "neljä" ... *7 = "seitsemän" *8 = "kah(d)eksan" (two left or it to reach it *9 = "yh(d)eksän" (one left or it to reach it *10 = "kymmenen" (ten) Above list is no special case, it consequently appears in larger cardinals as well, e.g.: *399 = "kolmesataayhdeksänkymmentäyhdeksän" Emphasizing of these attributes stay present even in the shortest colloquial forms of numerals: *1 = "yy" *2 = "kaa" *3 = "koo" ... *7 = "seiska" *8 = "kasi" *9 = "ysi" *10 = "kymppi" However, this phenomenon has no influence on written numerals, the Finnish use the standard Western-Arabic decimal notation.


Time keeping

In the
English language English is a West Germanic language that developed in early medieval England and has since become a English as a lingua franca, global lingua franca. The namesake of the language is the Angles (tribe), Angles, one of the Germanic peoples th ...
it is common to refer to times as, for example, 'seven to three', 'to' performing the negation.


Other systems

There exist other signed-digit bases such that the base b \neq b_ + b_ + 1. A notable examples of this is Booth encoding, which has a digit set \mathcal = \lbrace\bar,0,1\rbrace with b_ = 1 and b_ = 1, but which uses a base b = 2 < 3 = b_ + b_ + 1. The standard
binary numeral system A binary number is a number expressed in the base-2 numeral system or binary numeral system, a method for representing numbers that uses only two symbols for the natural numbers: typically "0" ( zero) and "1" ( one). A ''binary number'' may als ...
would only use digits of value \lbrace0,1\rbrace. Note that non-standard signed-digit representations are not unique. For instance: : 0111_ = 4 + 2 + 1 = 7 : 10\bar1_ = 8 - 2 + 1 = 7 : 1\bar11_ = 8 - 4 + 2 + 1 = 7 : 100\bar_ = 8 - 1 = 7 The non-adjacent form (NAF) of Booth encoding does guarantee a unique representation for every integer value. However, this only applies for integer values. For example, consider the following repeating binary numbers in NAF, : \frac = 0.\overline_ = 1.\overline_


See also

* Balanced ternary * Negative base * Redundant binary representation


Notes and references

* J. P. Balantine (1925) "A Digit for Negative One",
American Mathematical Monthly ''The American Mathematical Monthly'' is a peer-reviewed scientific journal of mathematics. It was established by Benjamin Finkel in 1894 and is published by Taylor & Francis on behalf of the Mathematical Association of America. It is an exposi ...
32:302. * Lui Han, Dongdong Chen, Seok-Bum Ko, Khan A. Wahi
"Non-speculative Decimal Signed Digit Adder"
from Department of Electrical and Computer Engineering, University of Saskatchewan. {{DEFAULTSORT:Signed-Digit Representation Non-standard positional numeral systems Number theory Ring theory Arithmetic dynamics Coding theory Formal languages Sign (mathematics)