That is, it is 1 if the number is odd, and 0 if it is even. This method is based on two observations.įirst observation: the last digit in the binary representation is always the remainder of the number when divided by two. The binary representation of 85 is given by the coefficients in this representation listed one after another, starting with the highest power of 2: 1010101. Continue as before: the largest power of two which is not more then 5 is 4 = 2 2. Now we need to represent 5 as the sum of powers of 2. Continue as before: the biggest power of two which is not more then 21 is 16 = 2 4. Now we need to represent 21 as the sum of powers of 2. The result will always be less than the power of two that was subtracted (can you figure out why?). Find the largest power of 2 which is not more than 85. We are trying to represent the number 85 as the sum of powers of two starting from the largest. Here we present both methods using the number 85 as an example.įirst method. There are two methods of converting decimals to binary. Math Alive Crypto 1 Previous | ToC | Next
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |