KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
What is the most efficient way to de-interleave bits from a 32 bit int? For this particular case, I'm only concerned about the odd bits, although I'm sure it's simple to generalize any solution to both sets. For example, I want to convert 0b01000101 into 0b1011 . What's the quickest way? EDIT: In this application, I can guarantee that the even bits are all zeros. Can I take advantage of that fact to improve speed or reduce space?
Tags (comma-separated)
Save Edits
Cancel