Computing Library › Number Systems & Information
Number Systems & Information

Positional Notation

Positional notation encodes a number as a sum of digits weighted by powers of a fixed base.

The idea

In positional notation each digit's contribution depends on its place. A number in base b with digits dₙ…d₁d₀ equals the sum of each digit times b raised to its position. The rightmost digit has weight b⁰, the next b¹, and so on.

Worked example

Kronos motion — number counters

The decimal string 4072 means 4×10³ + 0×10² + 7×10¹ + 2×10⁰. The same rule applies in any base: only the base and the digit alphabet change.

Fractions

Digits after a radix point carry negative exponents. In base b the first fractional digit has weight b⁻¹, the second b⁻², and so on, so 0.5 in decimal is 5×10⁻¹.

Why it matters

Positional systems make arithmetic algorithmic: carries and borrows propagate one place at a time. This regularity is what lets both people and hardware add, multiply, and convert numbers with simple repeated rules rather than lookup tables.

Choosing a base

A base needs exactly b distinct digit symbols, from 0 to b−1. Computers use base 2 because a wire is naturally on or off; humans use base 10 by convention. Bases 8 and 16 are convenient shorthands for binary.

python
def value(digits, base):
    v = 0
    for d in digits:  # most significant first
        v = v * base + d
    return v
print(value([4,0,7,2], 10))  # 4072