Hacker News new | ask | show | jobs
by sidlls 3146 days ago
You're not talking about an engineering problem, first of all (assuming it's a software implementation being talked about, of course). Secondly, it's difficult for me to see how this particular problem is a good motivation for discussion about the use of bitwise operations in general. I've written code in low level game engines, real time computational systems, physics and for drivers. The first and last items are the only ones where bitwise operations of this sort were even necessary to consider.

Unless this problem is for a job working on calculations on hardware that only supplies bitwise ops, it's a math trivia problem disguised as a coding interview question.