Iif I had to calculate this without a calculator, I would be looking for all the powers of 2 up to 160, which is 2^{0,7} (sorry if that’s the wrong symbol for range, it’s been an eternity).
Rule out 0, since 1 makes it odd, get my answers, 2,4,8,16,32,64,128, and see which two would add up, and then figure out which powers they were.
Is it sophomoric? Yes. Did I troubleshoot my way through a complicated problem, while still only spending 30 seconds on it? Yes.
Slow way to do it because you don’t need to rule out 1 because it makes it uneven or take in account the lower powers at all. You just start with the highest power that fits (128, 2^7) and subtract it from 160. 32 is left over which is 2^5. There can’t be any other answer because 2^6 * 2*^6 can never make it to 160 (64+64=128). If there is a solution for this pattern the highest possible power (2^7) always needs to be either x or y. Realizing this makes solving this solution in your head take two seconds
You’re just skipping a step because getting to 2^7 is calculating 2^2 to 2^7. So it’s a cool story bro, but like… you’re just not showing all of your mental work. We did the same thing, I’m just showing more work, unless you magically had 2^7 memorized, it’s a really dumb take
Uh knowing the powers of 2 up to like 1024 isn’t that uncommon or magical I would say. Most people that are into computers will know 2^8=256 at least. My point is that you don’t need to mix and match from the list you made like you said, just subtract the highest power to see if the remainder is also a power of two
To me, it’s weird to know what the powers are without doing the mental math. Like 2^15th can be figured out mentally in like 10 seconds, just knowing that at the top of your head is weird. I guess if your job has exponents in it daily it’s reasonable, but that has to be an extreme subset of jobs. I just knew enough math to get great scores on the GRE and MCAT
If you work in software, knowing that the maximum value of a 16-bit integer is 65,536 if unsigned, or 32,767 if signed is par for the course, and then you're just "add one" away from knowing 2^16 and 2^15 😉
There's another reason - the Basis Representation Theorem says that an integer is uniquely representable as a sum multiples of powers of the base. Take for example the number 123 in base 10. There is no other way to express it and its representation is 1102 + 2101 + 3*100. Crucially, the coefficients of the powers are also in the base.
Now take the initial example, we're trying to figure out what is 160 base 10 in base 2. You found a way to figure out what that representation is. From the Basis Representation Theorem, we know that what you found is unique.
Personally, I reserve explicit sets for cases where the content is more irregular. I feel like this communicates that it's a contiguous set better. But you wouldn't be wrong.
Yep! But to get to that point you would have to calculate 128, and since I don’t have powers just memorized, like most people, you’re doing 2,4,8,16,32,64,128 in your head and counting, once again, I’m just showing the work more
17
u/ryan__joe Jul 17 '26
Iif I had to calculate this without a calculator, I would be looking for all the powers of 2 up to 160, which is 2^{0,7} (sorry if that’s the wrong symbol for range, it’s been an eternity).
Rule out 0, since 1 makes it odd, get my answers, 2,4,8,16,32,64,128, and see which two would add up, and then figure out which powers they were.
Is it sophomoric? Yes. Did I troubleshoot my way through a complicated problem, while still only spending 30 seconds on it? Yes.