My Math Forum (http://mymathforum.com/math-forums.php)
-   Applied Math (http://mymathforum.com/applied-math/)
-   -   binary numbers between two points of a 9 number line (http://mymathforum.com/applied-math/24748-binary-numbers-between-two-points-9-number-line.html)

 Tylerman February 12th, 2012 03:11 PM

binary numbers between two points of a 9 number line

Say that you have a large number consisting of only 1's and/or 0's. 1011110001101010 or anything of that type. Now say we subtract a number consisting entirely of 9's that is half the digit length of the number consisting of only 1's and/or 0's. So since the number in the example is 16 digits long, an 8 digit number, 99999999. Is there a way to know without subtracting if there will be another instance of only 1's and or 0's before the larger of the two numbers reaches 15 digits? I thought it might be a long shot but I figured I should ask. I have figured a few things out. If I mod the binary number by the 9 number I receive in this case 11212110. I can change some of the 1's and 0's and get very close to this number. Say instead of 1011110001101010 we try 1011101001101010 which is a smaller number. We get 11212020. Taking this in account we can run 1011101001101000 and receive 11212110. Is there a better method of finding out just how many times this occurs before we reach a 15 digit number?

 CRGreathouse February 12th, 2012 03:42 PM

Re: binary numbers between two points of a 9 number line

You hve a number which can be written as the sum of a collection of distinct powers of ten, and you want to subtract a power of ten and add 1 to it. So all you need to check are two decimal places and see if they have the appropriate values (one must be 0, the other 1 -- which is which?).

 Tylerman February 12th, 2012 04:31 PM

Re: binary numbers between two points of a 9 number line

I got the math wrong in the last post for the last few mods I did. The mod solution was off by a number. Anyways I am not sure if I know what you mean. Could you please give me an example?

 Tylerman February 13th, 2012 12:14 AM

Re: binary numbers between two points of a 9 number line

I got it now thanks for the help.

 All times are GMT -8. The time now is 10:02 AM.