Well if it helps any, a quick explaination is that it's just diving each value by 8, shifting them to the left by the appropriate amount. 11 bits for red, 6 bits for green, and 1 bit for blue. Then these three values are OR'd together.
You can get rid of the & operations completely as all they...