Digital Sum In Base B
   HOME

TheInfoList



OR:

The digital sum in base ''b'' of a set of natural numbers is calculated as follows: express each of the numbers in base ''b'', then take the sum of corresponding digits and discard all carry overs. That is, the digital sum is the same as the normal sum except that no carrying is used. For example, in
decimal 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 of the Hindu–Arabic numeral ...
(base 10) arithmetic, the digital sum of 123 and 789 is 802: *3 + 9 = 12, discard the 10 leaving 2. *2 + 8 = 10, discard the 10 leaving 0. *1 + 7 = 8, there is no carry to discard. 123 789 --- 802 More usually the digital sum is calculated in binary (base 2) where the result only depends upon whether there are an even or odd number of 1s in each column. This is the same function as
parity Parity may refer to: * Parity (computing) ** Parity bit in computing, sets the parity of data for the purpose of error detection ** Parity flag in computing, indicates if the number of set bits is odd or even in the binary representation of the r ...
or multiple exclusive ors. For example: 011 (3) 100 (4) 101 (5) --- 010 (2) is the binary digital sum of 3, 4 and 5. The binary digital sum is crucial for the theory of the game of
Nim Nim is a mathematical two player game. Nim or NIM may also refer to: * Nim (programming language) * Nim Chimpsky, a signing chimpanzee Acronyms * Network Installation Manager, an IBM framework * Nuclear Instrumentation Module * Negative index met ...
. The digital sum in base ''b'' is an
associative In mathematics, the associative property is a property of some binary operations, which means that rearranging the parentheses in an expression will not change the result. In propositional logic, associativity is a valid rule of replacement f ...
and commutative
operation Operation or Operations may refer to: Arts, entertainment and media * ''Operation'' (game), a battery-operated board game that challenges dexterity * Operation (music), a term used in musical set theory * ''Operations'' (magazine), Multi-Ma ...
on the natural numbers; it has 0 as neutral element and every natural number has an inverse element under this operation. The natural numbers together with the base-''b'' digital sum thus form an abelian group; this group is
isomorphic In mathematics, an isomorphism is a structure-preserving mapping 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 them. The word is ...
to the
direct sum The direct sum is an operation between structures in abstract algebra, a branch of mathematics. It is defined differently, but analogously, for different kinds of structures. To see how the direct sum is used in abstract algebra, consider a more ...
of a countable number of copies of Z/''b''Z.


References

* https://math.stackexchange.com/questions/4246954/sum-of-digits-of-a-number-in-base-b {{DEFAULTSORT:Digital Sum In Base B Integers