Getting the Leftmost Bit

Posted by James on Stack Overflow See other posts from Stack Overflow or by James
Published on 2010-05-23T21:28:06Z Indexed on 2010/05/23 21:30 UTC
Read the original article Hit count: 285

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

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about binary