So the number that gets returned is going to be the largest power of 2 that is less than or equal to the number that is passed by argument. My thinking is bitshift right until you have only 0001, then bitshift back left the same number of times and you have the answer. You could have a while loop that repeated bitshifts right and increments a tracking variable by one, and the loop terminates when the number is == 1. Then you run through a for loop bitshifting left that number of times. What's getting me is the rules of this task. No loops, no variables, no conditionals. I can't do any of that. It seems like the only thing that is within the rules is writing a single return statement that processes the whole thing at once? This seems extraordinarily difficult. Solve this with one statement? Seems impossible. Unless there's something obvious I'm missing. Which I must be since others have completed this. Any hints? I'm completely stumped.
Having a hard time figuring out where to start