Expecting the bit arithmetic would be for some positions. But asking a programmer to design and implement an extremely basic algorithm doesn't seem unreasonable to me.
You're right, though, the original question itself is not so much of a problem, I suppose. What bothered me is the subtext that, unless you get down to the bit level with the minimum possible number of CPU instructions in the result and do the compiler's job yourself, you're not a "real programmer" or something.