How do you embed $Z_5 \times Z_7$ into $Z_{2^8}$? Basically, the real question which I thought was better asked that way is what are the ways to represent all ordered pairs of elements $(x,y)$ where $x\in Z_5$ and $y\in Z_7$ in a byte of memory? I.e.  There needs to be atleast 5*7 = 35 code words.  I'm working on a way right now, but if someone's already shown all the ways, please post a link.  Ways that are useful arithmetically are better.  I.e. if adding two bytes has some meaningful result on their embeded pairs.
 A: Probably the most straightforward way to do this would be to use the first 4 bits to keep track of the elements of $\mathbb{Z}_5$ and the next 4 bits to keep track of $\mathbb{Z}_7$.
So $(3,5) \mapsto 0011\;0101_2$ etc.
Just so you know. In terms of arithmetic, $\mathbb{Z}_5 \times \mathbb{Z}_7$ cannot be embedded in $\mathbb{Z}_{2^8}$ (as groups under addition). Lagrange's theorem tells us that the order of a subgroup must divide the order of the group and $35$ doesn't divide evenly into $2^8$. In fact the only group homomorphism from $\mathbb{Z}_5 \times \mathbb{Z}_7$ to $\mathbb{Z}_{2^8}$ is the trivial one which sends everything to zero.
A: Embed first $Z_5$ into $Z_8$ and $Z_7$ into $Z_8$. Then simply embed $Z_8 \times Z_8$ into $Z_{2^6} \hookrightarrow Z_{2^8}$
If you are looking for all ways, keep in mind that $Z_5 \times Z_7$ is "the same" as $Z_{35}$. Chinese Reminder Theorem gives you a way to identify them as groups, and then you forget the group structure...So your problem asks you how to embed $Z_{35}$ into $Z_{2^8}$...
