Report this content
We want the Dreams coMmunity to be a safe, diverse and tolerant place for everyone, no matter their age, gender, race, sexual orientation or otherwise. If you believe this content to contradict these principles, you can file a report for our coMmunity teams to investigate.
Note that misuse of the reporting tool will not be tolerated.Item being reported:
It's a little hard to follow the logic in the screenshot, so forgive me if I've misunderstood. I think what you're trying to do is start at some given number, and get a single digit from it--is that right? The binary stuff would get a whole lot more complex, but if you're okay with just storing a 1 or 0 at each position of a normal value, that's okay by me. If so, here's how I would do it:
First thing to do is use the n^x mode of the calculator. Set the top to 10, and the bottom to some integer. Just so we're on the same page, 10^2 = 100. 10^1 = 10. 10^0 = 1. 10^-1 = 0.1.
Now we can use such numbers in our calculations. We need two things: to get the value from the position we want down, and also to get the value from the position just below the one we want down--to remove it from the number afterwards. We can do this in either order just so you know. But I'll explain it in a particular order just so I can keep track.
So say we have the number 1.234, and we want the number at the second decimal place--the 3. We first need to get rid of the stuff "above" it. So we can use the remainder mode of a calculator. We need to find the remainder for dividing by a value at the position just above the 2nd decimal. To do this, use another calculator to take the decimal position (-2) add 1 to it (-1), then plug that into a power calculator (10^-1) to get 0.1. Now find the remainder of the original value by that 0.1. The value 1.234 can divide evenly into 0.1 some number of times, with 0.034 left over.
Now we find what's "below" the position we want. Take the position (-2) and plug it into a power calculator (10^-2) to get 0.01. Find the original value's remainder after dividing by 0.01 to find the value below the position we want. 0.034 divides evenly into 0.01 with the remainder 0.004.
Next subtract that from 0.034 and you get... 0.03. Then you can move that value up by the right number of spaces using another power calculator. Multiply the decimal position by -1, to flip it into positive (or if it was positive, flip it into negative), then plug that into a power calculator (10^2) to get 100. Multiply your value by that (0.03 x 100) to get the result: 3.
This method should work for any position in the decimal or integer side of a value. And you could probably tweak it so you can use it for binary--though I've not worked with binary calculations by hand, so I'll leave that to you to figure out.
Something to be aware of is that you will likely get floating point errors that may mess with your values at smaller decimals. So it could be worth instead multiplying it all up so that the position you want is an integer (so instead of 1.234, raising it up to 123.4). This would make some calculations easier also, maybe.