The task is the following:
Program the shortest fully functional program that checks, if an 8-bit value contains a consecutive sequence of 2 or more ones in its binary form.
If it does contain such a sequence, the output shall be 0. If not: 1.
Examples:
Input: 1 Output: 1
Input: 3 Output: 0
Input: 72 Output: 1
Input: 75 Output: 0
The shortest solution wins!
x&2*xwhich almost all of the answers on the other challenge already use. All answers to this challenge would do is taken an answer from there and remove the loop. \$\endgroup\$