User blog comment:Hseiken/Saving massive amounts of data in petitcom/@comment-5106053-20140106152632

Hseiken wrote: Let's combine two variables, Color 1 and Color 2 into a single number. First, we convert color 1 and color 2 into binary. We'll use the values 12 for color1 and 7 for color 2.

In binary form they'd look like this:

COLOR1 COLOR2

0111   1100 You switched the colors around, 0111 is 7(Color 2), 1100 is 12(Color 1).