User:Meni Rosenfeld/Numbers

This page was created because I had too often encountered confusion with regard to the matter of representations of numbers. If anything here seems incorrect, I'll appreciate it if you let me know.

Numbers and their representations
There is a difference between a number and a representation of a number. The distinction can be confusing because we can't talk about a number without somehow representing it, so any discussion of a number will invariably involve a representation of that number.

2 is a number. It is the number of apples I have if I have an apple and another apple. When I want to refer to this number, I write a certain symbol composed of a curved segment and an horizontal straight segment (which is also the 50th ASCII character). But this symbol is not the same as the number. When I want to refer to a number, I use the symbol that represents it; when I want to refer to the symbol, I put the symbol in quotation marks. Thus, 2 is a number while "2" is a representation of that number.

A number can have many different representations. The number 2 can be represented as "2", "II", "٢" or "ב". Note that "II" is composed of two consecutive symbols. It is the same number in all cases, but the representations are different. "2" ≠ "٢" (those are different symbols), but 2 = ٢ (it is the same number in both sides, I have only used different symbols to represent it).

Decimal and binary representations of integers
A numeral system called the decimal system can be used to represent any integer in a compact way, using a sequence of symbols chosen among "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" (those symbols are called decimal digits). The rule is that a sequence of $$n+1$$ digits, where the ith digit represents $$a_{n+1-i}$$, denotes the number $$\sum_{i=0}^{n}a_i10^i$$ (where 10 is the number of slashes in "//////////"). To clarify that the string of digits should be interpreted according to the decimal system, I can add the subscript "dec" to it. However, the usage of the decimal system is so overwhelmingly common that the subscript is often omitted. Thus both "24" and "24dec" are valid representations for 24, which is the number of hours in a day.

Another common system is the binary system. In this system, a sequence of $$n+1$$ bits (a bit is "0" or "1") where the ith bit represents $$a_{n+1-i}$$, denotes the number $$\sum_{i=0}^{n}a_i2^i$$. So "1101bin" is a representation for the number 13. As you recall, "13dec" is another representation for that number. Thus, while "1101bin" ≠ "13dec" (different strings of symbols), 1101bin = 13dec (same number, denoted differently).

More generally, we can write a number in base b, where b is an integer greater than 1 and usually no more than 16. A sequence of $$n+1$$ symbols where the ith symbol represents $$a_{n+1-i}$$ and $$a_{n+1-i}$$ is an integer between 0 and $$b-1$$, denotes the number $$\sum_{i=0}^{n}a_ib^i$$. To denote numbers greater than 9 with a single symbol, we normally use the letters "A", "B", "C", "D", "E" and "F". We use some representation of b in a subscript to clarify that we are using base b. The decimal system is the dominant system for denoting numbers, and this is no exception -- we will usually put the decimal representation of b in the subscript. Thus "3F16" represents 63.

Using a base which is not an integer is also possible, but there are some subtelties involved.

Using radix expansions to represent real numbers
Under construction

Independence of numbers and their representations
Numbers are distinct from their representations. The systems described in the previous sections are convenient, but the existence, identity and properties of numbers are unrelated to them. Nor are they the only way to represent numbers. For example, the ratio between the circumference and diameter of any circle is a real number denoted by the greek letter "π". I have not used the decimal system here - indeed, the decimal system is inadequate in practice for denoting π.