radix

We usually write numbers using a place-value system. For example, in decimal 1101 means

1.103 + 1.102 + 0.10 + 1

and in binary 1101 would mean

1.23 + 1.22 + 0.2 + 1 (= 13 in decimal).

In general, a position numbering system encodes the numbers as

anbn + an-1bn-1 + . . . + a2b2+ a1b+ a0 (0 ≤ ai < b, i=0,1,2,...,n)

where the integer b > 1 is the radix or base. So decimal is "radix 10" and binary is "radix 2." Other common systems include octal (radix 8) and hexadecimal (radix 16, here we need to add some more digits: 'a'=10, 'b'=11, 'c'=12, 'd'=13, 'e'=14 and 'f'=15). If it is not clear for the context which radix we are using, we usually add it as a subscript. For example, (23)4 = (21)5 = (11)10 = (b)16.

We can extend this to cover all reals if we allow the inclusion of a negative sign and a radix-point (decimal point):

(anan-1. . . a2a1a0. a-1a-2a-3 . . . )b = anbn + an-1bn-1 + . . . + a2b2 + a1b + a0 + a-1b- 1 + a-2b-2 + a-3b-3 + . . .

Printed from the PrimePages <t5k.org> © Reginald McLean.