Instruction
1
Conversion of numbers from different number systems in binary boils down to their view of different combinations of two numeric characters of the system – 0 and 1. To convert the number from decimal system in binary most commonly used method of successive division by 2 where 2 is the category of a binary code similar to 10 in decimal notation.
2
However, this method is suitable when translating integers to fractions use the same, opposite, multiplication. Namely, multiply the fractional part by 2 successively until, until the whole part. With good multiplication that result in a number greater than 1, brings the total number of the binary digit 1. And failed, after which the number is still less than 1, gives a figure of 0. In this figure the fraction in binary form is written after the decimal point as in the original decimal.
3
Consider this simple method on a concrete example. To start, take a simple decimal fraction of 0.2. Multiply consistently to 2:0,2*2 = 0,4 => 0,0_2;0,4*2 = 0,8 => 0,00_2;0,8*2 = 1,6 => 0,001_2;
4
Discard the integer part and continue the same steps:0,6*2 = 1,2 => 0,0011_2;Again throw away the integer part, and you will return to the number of 0.2. Binary fraction turned out to be cyclic, i.e. repeated, abbreviated record:0,2_10 = 0,(0011)_2, where the brackets indicate a repeatability of the same group of numbers.
5
For the transfer to binary system fraction with the whole part first, translated it, and then the number after the decimal point. For example, set the number of 9.25.To translate the whole part, use the method of successive division:9/2 = 4 remainder 1;4/2 = 2 and 0 in the remainder;2/2 = 1 and 0 in the remainder;½ = 0 and 1 remainder.Note the resulting balances from right to left: 9_10 = 1001_2.
6
Now turn the fractional part:0,25*2 = 0,5 => 0;0,5*2 = 1 => 1.This time you are lucky, the shot was not cyclical. Record the result:9,25_10 = 1001,01_2.