Harvard-MIT Math tournament contest problem 
Let $a,b,c,d,e,f $ be  integers  selected  from  the  set $\{1,2,\dotsc,100\}$,  uniformly  and  at  random  with replacement.  Set $M=a+ 2b+ 4c+ 8d+ 16e+ 32f$.
  What is the expected value of the remainder when $M$ is divided by $64$?

Can someone explain to me the answer, it seems like it is very cryptic.  I solved the problem in a different way and I am wondering if there are other ways to solve this problem?  The original solution is posted in this link.
 A: The key principle at work here is that the summing can be seen as a process; then it turns out that each stage of the process is fixed by the stages that come after it, and agnostic to the stages that come before it.
To understand why the stages are fixed, let's look at the lowest order bit of the result (i.e., look at the result $\bmod 2$).  Then it's clear that only the value of $a$ can contribute to this bit - all of $b\ldots f$ are multiplied by even numbers, and so they make no contribution here.  Since half of the values of $a$ are odd and half the values are even, it's clear that the 'expected value' of this bit is $\frac12$.
To understand why the stages are agnostic to previous work, let's look at the second bit of the result - you can think of this as $\lfloor (M\bmod 4)/2\rfloor$.  Now, $a$ 'contributes to' this bit, and so the value $\lfloor (a\bmod 4)/2\rfloor$ has some distribution; it's zero with probability $p$ and one with probability $1-p$.  (It turns out that this distribution is uniform, that is $p=\frac12$, but that's actually moot here).  The other number that contributes to this bit is $b$; if $b$ is even then the result of $a+2b$ will have the same "2's bit" as $a$, whereas if $b$ is odd then it will have the opposite 2's bit.  But since $b$ is odd with probability $\frac12$, then whatever $p$ is, the probability that the resulting bit will be zero is $\frac12\cdot p$ (the probability that the bit started zero and stays that way) $+\frac12\cdot(1-p)$ (the probability that the bit started as one and gets flipped) $=\frac12$!  In other words, the 'process' of adding ($\bmod 2$) a uniformly distributed bit to a bit with any distribution always yields a uniform bit.
This same argument can then be repeated for every other bit of the result, and shows that each bit is $1$ with (independent) probability $\frac12$, and so the final result is $\frac12\cdot 111111_2 =\frac{63}2$.
