home

Number bases

number base of a numeral system defines the symbols and notations used to represent a value.

For example, base 2 provides two distinct symbols that are then combined to represent larger quantities.

Convert to decimal

Given some numeric representation with digits an an1 an2a0 in base b, the decimal conversion can be found via an×bn+an1×bn1++a0×b0

This may also be extended to cover non-integers with a negative exponent for the fractional digits. (an an1a0 . a1 a2am)b=i=mnai×bi

For example, 16.416 is equivalently expressed as 1×161+6×160+4×161 or 22.2510.

Convert from decimal

To convert a decimal value to an alternate base, b, repeatedly divide by b and build the value right-to-left with the remainder until the quotient is 0.

For example, to express 52 in base 2: 52÷2=26R00226÷2=13R000213÷2=6R110026÷2=3R0010023÷2=1R11010021÷2=0R11101002

Repeated division by base for integer component. Repeated multiply by base for fractional component.

Conversion from binary to 2n

Segment into groupings of size n.

111112×11211111+11111010111012

Historic notation

Additive systems - Bakairi - Attic numerals

vs positional