We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
It's asking to print out the largest number of consecutive 1's in a binary number. 101 has at most, 1 consecutive 1's. 1101 has at most 2 consecutive 1's. The binary number 111 will have an output of 3, because there are 3 consecutive 1's. The binary number 111011, will also have an output of 3, because there are AT MOST 3 consecutive 1's.
Day 10: Binary Numbers
You are viewing a single comment's thread. Return to all comments →
It's asking to print out the largest number of consecutive 1's in a binary number. 101 has at most, 1 consecutive 1's. 1101 has at most 2 consecutive 1's. The binary number 111 will have an output of 3, because there are 3 consecutive 1's. The binary number 111011, will also have an output of 3, because there are AT MOST 3 consecutive 1's.