baserepresentation
Base representation, or base representation of numbers, is the expression of numbers in terms of powers of a fixed base b. In a base-b system, any nonnegative integer n can be written uniquely as n = d_k b^k + d_{k-1} b^{k-1} + ... + d_0, where 0 ≤ d_i < b and d_k ≠ 0. The sequence of digits (d_k ... d_0) is the base-b representation of n. For example, decimal (base 10) representation of 255 is 255, binary (base 2) representation is 11111111, and hexadecimal (base 16) representation is FF.
To obtain the base-b representation, one performs repeated division of n by b, recording the remainders. The
Base representations extend to fractions, where the base-b expansion of a rational number is finite if and
Common bases include binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). In