Problem: For a positive integer $n$, let $C(n)$ equal the number of pairs of consecutive 1's in the binary representation of $n$. For example, $C(183)=C\left(10110111_2\right)=3$. Compute $C(1)+C(2)+C(3)+\cdots+C(256)$. Solution: First, notice that $C(256) = 0$ and so it suffices to count $C(0)+C(1) + C(2) + \dots + C(255) = 0$ (I added $C(0)$ to for reasons I will explain later). We can control this problem in an insane way. First, consider the $8$-digit binary string (that can have leading zeros) of each number in $\{ 1, \dots, 256 \}$. Notice that in the sum $C(0) + C(1)+C(2)+C(3)+\cdots+C(255)$, we can realize this as counting the number of pairs $11$ that show up in all binary strings of length $8$. Take a second to internalize that. As we sum from $1$ to $255$, we are going through each binary string and adding, to our sum, the number of times '$11 shows up. Thus, it suffices to simply count the number of times '$11 can show up in any arbitrary binary string of length $8$. So, if we treat '$11 as an object, there are $7$ spots to put it within the string (to make it a binary string of length $8$). Then, there are $2^6$ ways of choosing the other $6$ bits. The point is, we do not care what is going on with the other bits; we will "double-count" the same binary string up to $7$ times, the point is that each time we are counting it, we are counting a different '$11 that shows up in its binary representation. Hence. the solution is $2^6 \cdot 7 = 448$.