How to transfer to a decimal numeral system

How to transfer to a decimal numeral system

In machine arithmetics various numeral systems are used. Generally the computer facilities are based on binary numbers. In daily life we got used to use a decimal numeral system. Let's understand how to present in the form decimal the numbers presented in other numeral systems.

Instruction

1. For the translation of number from binary in a decimal numeral system, it is necessary to present it in the form of a polynomial which members represent the work of figure of each category of binary number on 2 in n degree where n is number of the category, since zero. For example, we have binary number 1101001. To the figure standing on the right (1) there corresponds the zero category, the second (0) – the first category and so on. Let's present this number in the polynomial form: 1*2^0+0*2^1+0*2^2+1*2^3+0*2^4+1*2^5+1^2^6 = 1+0+0+8+0+32+64 = 105. The answer in a decimal numeral system turned out.

2. in n degree where n is number of the category, since zero. For example, octal number 125 is transferred to a decimal numeral system so: 5*8^0+2*8^1+1^8^2 = 5+16+64 = 85. The answer in a decimal numeral system turned out.

3. To completely similarly above cases a transfer of numbers from a numeral system with any basis in decimal is made. In hexadecimal the members of a polynomial represent the work of figure of each category of octal number on 16 in n degree. You without effort will manage to understand independently how to make a transfer from other numeral systems.

Author: «MirrorInfo» Dream Team


Print