For example 100 is even and 100/2= 50 is also even
But 30 is also even but 30/2=15 is odd
Now let's say I have a number as large as 10^10000000000...
I want to know how many steps are involved in cutting this number in half. When the number is even, I divide it by 2. When it's odd, I subtract 1. I continue this process until I hit 0.
However, when the number is too high, I can't actually manipulate it directly (elaboration: too big to write out, and too big to fit into memory on a computer), so I am curious if there's a way for me to do this by just knowing the even/odd attributes along the chain.
I hope this makes sense!
Example: If n=100, I have the following chain
100, 50, 25, 24, 12, 6, 3, 2, 1, 0
Which is a total of 9 "splitting steps" (10 if you count the original number) And the following parities
Even, Even, Odd, Even, Even, Even, Odd, Even, Odd, Even
I am asking if, given n=10, there is a way to get this parity chain