= Positional notation
{title2=$N=\sum_{j=0}^n d_jb^j$}
{wiki}
In positional notation, a <numeral digit> contributes its value multiplied by a weight determined by its position. Fix an <integer> <radix> $b\geq2$. A finite string of <numeral digits> $d_nd_{n-1}\cdots d_0$, with $0\leq d_j<b$, represents the <nonnegative integer>
$$
(d_nd_{n-1}\cdots d_0)_b=\sum_{j=0}^n d_jb^j.
$$
The rightmost position has weight $b^0=1$; each move left multiplies the weight by $b$. This weight is the <place value>. For a nonzero <integer>, the canonical string has $d_n\ne0$. Zero is written with the single <numeral digit> $0$. Leading zeros are permitted in a fixed-width display but omitted in the canonical form: $00205_{10}=205_{10}$. A negative <integer> is written with a separate minus sign and the <positional notation> for its <absolute value>; the minus sign is not a <numeral digit>.<A Computational Introduction to Number Theory and Algebra by Victor Shoup>[§3.3, pp. 55–56: base-B digit vectors, separate sign and nonzero highest digit]{ref}
For example,
$$
205_{10}=2\cdot10^2+0\cdot10^1+5\cdot10^0=200+0+5.
$$
The zero is essential inside this string: $25_{10}=25$, not $205$. It records that the tens position contributes nothing while keeping the hundreds and units in their proper positions. The same <integer> has <binary representation>
$$
11001101_2=2^7+2^6+2^3+2^2+2^0=128+64+8+4+1=205_{10}.
$$
\Image[/decimal-binary-place-value.png]
{title=One <integer>, two encodings: $205_{10}=11001101_2$}
{description=Each <numeral digit> is multiplied by its <place value>. Decimal uses the weights $100,10,1$; binary uses $128,64,32,16,8,4,2,1$. Zero digits preserve positions without contributing to the total. Both rows sum to $205$.}
\b[Repeated <Euclidean division> constructs the representation exactly.] Set $N_0=N$. At each step write
$$
N_j=bN_{j+1}+d_j,\qquad 0\leq d_j<b.
$$
Keep the <remainder> $d_j$ and continue with the integer <quotient> $N_{j+1}$. A positive <quotient> strictly decreases, so eventually it is zero. Substituting the successive <equations> back into the first gives $N=d_0+bd_1+b^2d_2+\cdots$: the <numeral digits> are obtained from right to left. The <remainder> modulo $b$ uniquely fixes $d_0$, and then the <quotient> uniquely fixes the remaining string by the same reasoning. This proves existence and uniqueness once leading zeros are excluded. The needed unique <quotient> and <remainder> are precisely the conclusion of the <Euclidean division> theorem.<A Computational Introduction to Number Theory and Algebra by Victor Shoup>[§1.1, p. 3, Theorem 1.4: division with remainder]{ref}
This finite expansion concerns <nonnegative integers>. Extending <positional notation> to fractional positions uses weights $b^{-1},b^{-2},\ldots$ to the right of a point; an arbitrary <real number> need not have a finite digit string. In particular, the <decimal representation> $0.1$ represents $1/10$, while the base-two string $0.1_2$ represents $1/2$. The <radix> is part of the interpretation.
The benefit is compact arithmetic: $k$ positions can encode every <nonnegative integer> below $b^k$. To see the upper endpoint, fill all positions with $b-1$; the <finite geometric series> gives $(b-1)(1+b+\cdots+b^{k-1})=b^k-1$. Carrying in <addition> exchanges $b$ units of one <place value> for one unit of the next. Thus a short string stores a large count and also supplies an <algorithm> for computing with it.
Back to article page