Blog on algorithms, puzzles, programming .... musings of a computer engineer.
bit pattern check
I want to see if all the ones in a number appear on the right side of the number and all zeros appear on the left, how can I do this most efficiently? (i.e. 00000111 is true but 100010 is false)
No comments:
Post a Comment