How to transfer number to the binary system of calculation

How to transfer number to the binary system of calculation

Thanks to limitation in use of symbols the binary system is the most convenient for use in computers and other digital devices. Symbols only two: 1 and 0 therefore this system is applied in work of registers.

Instruction

1. The binary numeral system is position, i.e. to a position of each figure in number there corresponds a certain category which is equal to two in the corresponding degree. Degree starts from scratch and increases in process of the movement from right to left. For example, number 101 is equal 1*2^0 + 0*2^1 + 1*2^2 = 5.

2. To translate number from any other numeral systems in binary, it is possible to use two methods: consecutive division on 2 or by the translation of each figure of number according to the table in the corresponding fours of binary numbers.

3. Among position systems also octal, hexadecimal and decimal numeral systems use wide circulation. And if for the first two the second method is more applicable, then for the translation from a decimal system both are applicable.

4. Let's consider transfer of decimal number to a binary system by method of consecutive division on 2. To transfer decimal number 25 to the binary code, it is necessary to divide it into 2 until there is 0. The remains received on each step of division register at line from right to left, after record of figure of the last rest it also will be total binary number. So: 25/2 = 12, 1 in the rest => 1;12/2 = 6, there is no rest => 0;6/2 = 3, there is no rest => 0;3/2 = 1, 1 in the rest => 1;? = 0, 1 in the rest => 1. Record of the translation looks as follows: 25_10 = 11001_2.

5. Octal and hexadecimal numbers are transferred to the binary code by replacement of each figure by the corresponding four of code symbols of a binary numeral system. The table of the translation looks as follows: 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.

Author: «MirrorInfo» Dream Team


Print