I have a 5 bit integer that I'm working with. Is there a native function in Objective-C that will let me know which bit is the leftmost?
i.e. I have 01001, it would return 8 or the position.
Thanks
You can build a lookup table, with 32 elements: 0, 1, 2, 2, 3, etc.
1.4m articles
1.4m replys
5 comments
57.0k users