How to transfer to a binary system

How to transfer to a binary system

Components of electronic machines to which also computers belong have only two distinguishable states: there is current and there is no current. They are designated ""1"" and ""0"" respectively. As such states only two, many processes and operations in electronics can be described by means of binary numbers.

Instruction

1. In order that to translatewith fractional decimal number in a binary numeral system, act on the following algorithm. Let's consider action of an algorithm on the example of number 235.62. At first the whole part of number is translated.

2. We divide decimal number into two until we receive the rest, indivisible on two. On each step of division we will receive the rest 1 (if the divisible number was odd) or 0 (if the dividend is divided into two without the rest). All these remains have to be considered. The last private, received as a result of such step-by-step division, will always be unit. We write down the last unit in the senior category of required binary number, and we write down the remains received in process behind this unit upside-down. Here it is necessary to be attentive and not to miss zero. Thus, to number 235 in the binary code there will correspond number 11101011.

3. Now we will transfer a fractional part of decimal number to a binary numeral system. It is for this purpose consistently multiplied a fractional part of number by 2 and we fix the whole parts of the received numbers. We finish these whole parts to the number received in the previous step after a binary point in a direct order. Then corresponds to decimal fractional number 235.62 binary fractional 11101011.100111.

Author: «MirrorInfo» Dream Team


Print