Instruction
1
The binary number system is positional, i.e. the position of each digit in the number corresponds to a specific discharge, which is equal to two in the appropriate degree. The degree starts from zero and increases as you move from right to left. For example, the number 101 is equal to 1*2^0 + 0*2^1 + 1*2^2 = 5.
2
To translate the number from any other number system to binary, you can use two methods: successive division by 2 or by translating each digit of the number in the table to the appropriate four binary digits.
3
Widespread among positional systems also use octal, hexadecimal and decimal number system. And if the first two are more applicable to the second method, the translation from the decimal system applies to both.
4
Consider the translation of decimal numbers into the binary system the method of successive division by 2.To convert the decimal number 25 to binary, you need to divide it by 2 until until 0. Residues obtained at each step of the division is written to the string right to left, after the record figures of the last remnant this will be the final binary number. So, 25/2 = 12, remainder 1 => 1;12/2 = 6, remainder => 0;6/2 = 3, remainder => 0;3/2 = 1, remainder 1 => 1;? = 0, 1 in balance => 1.The entry of the transfer as follows: 25_10 = 11001_2.
5
Octal and hexadecimal numbers are converted to binary by replacing each digit by the corresponding four code symbols of the binary number system. The translation table looks like the following: 0=0000, 1=0001, 2=0010, 3=0011, 4=0100, 5=0101, 6=0110, 7=0111, 8=1000, 9=1001, A=1010, B=1011, C=1100, D=1101,E=1110, F=1111.For example:61_8 => [6=0110][1=0001] => 01100001_2;9EF_16 => [9=1001][E=1110][F=1111] => 100111101111_2.