decimal to binary conversion

Decimal to Binary Conversion

Decimal to binary conversion is about division, subtraction, and moving upward. Confused? Get started with this by practicing some easy problems and understand this concept in a few simple steps.

Before understanding decimal to binary conversion, you need to understand these two types of number systems. The binary number system is also known as the base-2 number system, as it represents numeric values using only two symbols; 1 and 0. Example, the number 1010, which can be written as 10102. The decimal number system, or base-10 number system, as it is known, is the most commonly-used number system. It has ten possible values starting from 0 - 9, for each place value. For example, the number 10 can be written as 1010 and read as 'ten, base ten'. Conversion Process The rule is to divide a given decimal number by 2 and make a note of the remainder. Continue dividing, until you cannot divide by 2 anymore. When you note down the remainders starting from the bottom, you get the binary number. The rule is simple and you will get a hold of it by the help of the following examples. Examples 10 10 ÷ 2 = 5, remainder is 0 5 ÷ 2 = 2, remainder is 1 2 ÷ 2 = 1, remainder is 0 1 ÷ 2 = 0, remainder is 1 Now the division stops here, as there is nothing to divide further by 2. So, starting from the bottom, write down the remainders and work your way up the list. In this case, it will be 1010 (starting from the bottom remainder). Thus, 1010 = 10102. This example must have helped you to grasp the idea. The following examples include some miscellaneous numbers with greater values, to help you understand the concept better. 100 100 ÷ 2 = 50, remainder is 0 50 ÷ 2 = 25, remainder is 0 25 ÷ 2 = 12, remainder is 1 12 ÷ 2 = 6, remainder is 0 6 ÷ 2 = 3, remainder is 0 3 ÷ 2 = 1, remainder is 1 1 ÷ 2 = 0, remainder is 1 So, you have the answer as 1100100 (starting from the bottom). Thus, 10010 = 11001002. 190 190 ÷ 2 = 95, remainder is 0 95 ÷ 2 = 47, remainder is 1 47 ÷ 2 = 23, remainder is 1 23 ÷ 2 = 11, remainder is 1 11 ÷ 2 = 5, remainder is 1 5 ÷ 2 = 2, remainder is 1 2 ÷ 2 = 1, remainder is 0 1 ÷ 2 = 0, remainder is 1 So, 19010 = 101111102. 356 356 ÷ 2 = 178, remainder is 0 178 ÷ 2 = 89, remainder is 0 89 ÷ 2 = 44, remainder is 1 44 ÷ 2 = 22, remainder is 0 22 ÷ 2 = 11, remainder is 0 11 ÷ 2 = 5, remainder is 1 5 ÷ 2 = 2, remainder is 1 2 ÷ 2 = 1, remainder is 0 1 ÷ 2 = 0, remainder is 1 So, 35610 = 1011001002. 499 499 ÷ 2 = 249, remainder is 1 249 ÷ 2 = 124, remainder is 1 124 ÷ 2 = 62, remainder is 0 62 ÷ 2 = 31, remainder is 0 31 ÷ 2 = 15, remainder is 1 15 ÷ 2 = 7, remainder is 1 7 ÷ 2 = 3, remainder is 1 3 ÷ 2 = 1, remainder is 1 1 ÷ 2 = 0, remainder is 1 Therefore, 49910 = 1111100112. 550 550 ÷ 2 = 275, remainder is 0 275 ÷ 2 = 137, remainder is 1 137 ÷ 2 = 68, remainder is 1 68 ÷ 2 = 34, remainder is 0 34 ÷ 2 = 17, remainder is 0 17 ÷ 2 = 8, remainder is 1 8 ÷ 2 = 4, remainder is 0 4 ÷ 2 = 2, remainder is 0 2 ÷ 2 = 1, remainder is 0 1 ÷ 2 = 0, remainder is 1 Hence, 55010 = 10001001102. 1256 1256 ÷ 2 = 628, remainder is 0 628 ÷ 2 = 314, remainder is 0 314 ÷ 2 = 157, remainder is 0 157 ÷ 2 = 78, remainder is 1 78 ÷ 2 = 39, remainder is 0 39 ÷ 2 = 19, remainder is 1 19 ÷ 2 = 9, remainder is 1 9 ÷ 2 = 4, remainder is 1 4 ÷ 2 = 2, remainder is 0 2 ÷ 2 = 1, remainder is 0 1 ÷ 2 = 0, remainder is 1 So, 125610 = 100111010002. 1789 1789 ÷ 2 = 894, remainder is 1 894 ÷ 2 = 447, remainder is 0 447 ÷ 2 = 223, remainder is 1 223 ÷ 2 = 111, remainder is 1 111 ÷ 2 = 55, remainder is 1 55 ÷ 2 = 27, remainder is 1 27 ÷ 2 = 13, remainder is 1 13 ÷ 2 = 6, remainder is 1 6 ÷ 2 = 3, remainder is 0 3 ÷ 2 = 1, remainder is 1 1 ÷ 2 = 1, remainder is 1 So, 178910 = 110111111012. 1599 1599 ÷ 2 = 799, remainder is 1 799 ÷ 2 = 339, remainder is 1 399 ÷ 2 = 199, remainder is 1 199 ÷ 2 = 99, remainder is 1 99 ÷ 2 = 49, remainder is 1 49 ÷ 2 = 24, remainder is 1 24 ÷ 2 = 12, remainder is 0 12 ÷ 2 = 6, remainder is 0 6 ÷ 2 = 3, remainder is 0 3 ÷ 2 = 1, remainder is 1 1 ÷ 2 = 1, remainder is 1 Hence, 159910 = 110001111112. 1999 1999 ÷ 2 = 999, remainder is 1 999 ÷ 2 = 499, remainder is 1 499 ÷ 2 = 249, remainder is 1 249 ÷ 2 = 124, remainder is 1 124 ÷ 2 = 62, remainder is 0 62 ÷ 2 = 31, remainder is 0 31 ÷ 2 = 15, remainder is 1 15 ÷ 2 = 7, remainder is 1 7 ÷ 2 = 3, remainder is 1 3 ÷ 2 = 1, remainder is 1 1 ÷ 2 = 0, remainder is 1 Thus, 199910 = 111110011112. Conversion for Fractions The numbers above were all whole numbers. If you encounter a fraction, you need to know how to convert it to the resultant form. The process is very simple, you need not panic. If you come across a number, like, say, 14.625, all you have to do is consider the part after and before the decimal point as two separate entities. This means, that you must convert 14 and 0.625 in a different manner. So, first, convert 14 in the same manner as described above. 14 ÷ 2 = 7, remainder is 0 7 ÷ 2 = 3, remainder is 1 3 ÷ 2 = 1, remainder is 1 1 ÷ 2 = 0, remainder is 1 Thus, 1410 = 11102. Now, we have to get the binary equivalent of 0.625. For this, what you need to do is multiply it by 2. If the resultant answer has 1 before the point, note down 1. Or else note down 0. And form the number in this manner. Continue until the part after the point is 0. And remember, while multiplying the answers with 2 again, you do not have consider the part before the point, only the part after the point will be considered. 0.625 * 2 = 1.25, note down 1 0.25 * 2 = 0.5, note down 0 0.5 * 2 = 1.0, note down 1 Now that the part after the point is zero, you need to stop here. Thus, 0.62510 = 0.1012. Therefore, 14.62510 = 1110.1012. After reading the above examples, I am certain that you will be able to get yourself acquainted with the method of converting decimal to binary. And, once you are good with the technique, you will be able to work with any given numbers. Cheers!

Похожие статьи