How to translate numeral systems

How to translate numeral systems

In information technologies instead of a decimal numeral system habitual to us it is often used binary as on it operation of computers is constructed.

Instruction

1. Main operations only two: the transfer from a decimal numeral system to another (binary, octal, etc.) and back. The name of each numeral system comes from its basis - it is quantity of elements in it (binary - 2, decimal - 10). In numeral systems with the basis more than 10 it is accepted to use further as replacement of two-place numbers of a letter of the Latin alphabet (And - 10, B - 11, etc.).

2. We will consider operations on the example of a binary numeral system as the most widespread. For all other systems the same rules and methods to within replacement of the basis 2 on corresponding will be right. So, we have some number in a binary numeral system consisting of several figures. We write down it in the form of the sum of works of its figures increased by 2. Further at all 2 we place degrees from right to left, since 0. We summarize. The received number also is required. Example.1011=1 * (2^3)+0*(2^2)+1*(2^1)+1*(2^0)=8+0+2+1=11.

3. Now we will consider the return operation. Let the number in a decimal system be given. Let's divide it a column into the basis of a numeral system to which we want to transfer it (in our case it will be 2). We continue division till the end until private there is less basis. Further, starting with the last, we write down all remains in a line. It will also be required number. Example.11/2 = the 5th rest 1, 5/2 = 2, rest 1, 2/2 = 1 rest 0 => 1011. One more example is given on the picture. For other bases of operation are similar. Do not forget to replace numbers, since 10, in the corresponding numeral systems with Latin letters! Otherwise the turned-out number will be incorrectly read out, and ""1"" ""0"" are ""10"" absolutely different things! The basis of a numeral system in which the number is presented is specified in a type of the index below at extreme right figure of number.

Author: «MirrorInfo» Dream Team


Print