هاگرد ِ راژمان ِ عددی hâgard-e râžmân-e adadi
*Fr.: conversion de système de numération*
The conversion of a → *number system*
with a given → *base* to another system with a
different base; such as the conversion of a → *decimal number*
(base 10) to a → *binary number system*
(base 2).
In order to convert a number into its representation in a different
number base, we have to express the number in terms of powers of the other base.
For example, to convert the decimal number 100 to base 3, we must figure out how to
express 100 as the sum of powers of 3. We proceed as follows:
1: Divide the decimal number to be converted (100) by the value of the new base
(3).
2: Get the remainder from Step 1 (that is 1) as the rightmost digit (least
significant digit) of new base number.
3: Divide the quotient of the previous divide (33) by the new base.
4: Record the remainder from Step 3 (0) as the next digit (to the left) of the new base number.
Repeat Steps 3 and 4, getting remainders from right to left, until the
quotient becomes zero in Step 3 (2 and 0).
The last remainder thus obtained (1) will be the most significant digit of the new base number.
Therefore, 100_{10} = 10201_{3}.
Conversely, to convert from another base to decimal we must:
1: Determine the column (positional) value of each digit.
2: Multiply the obtained column values (in Step 1) by the digits in the corresponding columns.
3: Sum the products calculated in Step 2. The total is the equivalent value in decimal.
For example, the binary number 1100100 is determined by computing the place
value of each of the digits of the number:
(1 × 2^{6}) + (1 × 2^{5}) + (0 × 2^{4}) +
(0 × 2^{3}) + (1 × 2^{2}) + (0 × 2^{1}) +
(0 × 2^{0}) = 64 + 32 + 0 + 0 + 4 + 0 + 0 = 100. → *number*; → *system*;
→ *conversion*. |