How to transfer number to the binary code

How to transfer number to the binary code

The binary numeral system is used in programming languages. The binary code is a position system where any number including fractional, it can be written down by means of figures 0 and 1.


1. decimal numberin binarynumeral systemIt is possible to translate usual for us by means of standard software of the Microsoft Windows operating system. For this purpose open the Start-up menu on your computer, in the appeared menu click "All programs", choose the Standard folder and find in it the Calculator application. In the top menu of the calculator select the Look item, and then "Programmer". The form of the calculator will be transformed.

2. Now enter number for the translation. In a special window under the entry field you will see result of the transfer of number to the binary code. So, for example, after input of number 216 you receive result of 1101 1000.

3. There are special applications for smartphones, such as, for example, RealCalc for the Android operating system. This free program from Android Market is also able to transfer decimal numbers to binary.

4. If you near at hand have neither computer, nor the smartphone, you can independently try to transfer the number which is written down by the Arab figures to the binary code. For this purpose it is necessary to divide constantly the number on 2 until, yet will not remain the last rest or the result will not reach zero. It looks so (on the example of number 19): 19: 2 = 9 – rest 19: 2 = 4 – rest 14: 2 = 2 – rest 02: 2 = 1 – rest 01: 2 = 0 – will reach 1 (a dividend less divider) Write out the rest in the opposite direction – from the latest to very first. You receive result 10011 - it is and there is number 19 in a binary numeral system.

5. For transfer of fractional decimal number to a binary system it is necessary to transfer the whole part of fractional number to a binary numeral system in the beginning as it was shown in an example above. Then it is necessary to increase a fractional part of habitual number by the basis of a binary numeral system. As a result of the work it is necessary to allocate the whole part – it accepts value of the first category of number in a binary system after a comma. The final of an algorithm comes when a fractional part of the work addresses in zero or if the required accuracy of calculations is reached.

Author: «MirrorInfo» Dream Team