Original Post
This is actually a homework question, but I am having trouble converting decimal number to its binary representation. Most examples and articles on the web use easy numbers like 7.5 or 8.875 that the decimals (the numbers after the point) are a fraction with a 2n denominator. (1) 7.5 = 7 1/2 = 111.1 (2) 8.875 = 8 7/8 = 1000.111 This is how I read it: For (1), the fraction can be read as 1 divided by 21, where 1 is the amount of binary digits to the right of the decimal point. For (2), the fraction can be read as 7 divided by 23. There are 3 digits to the right of the decimal point. Now, my teacher gave me 2.2. 2.2 is 2 1/5. So, using that rule, the binary representation should be...er I don't know. 5 can't be represented as 2n format. I know its 101. I mean it can't be represented by one single 2n number. If I put 10.10, that is 2.5, not 2.2. So...help?