Compress two or more numbers into one byte
问题 I think this is not really possible but worth asking anyway. Say I have two small numbers (Each ranges from 0 to 11). Is there a way that I can compress them into one byte and get them back later. How about with four numbers of similar sizes. What I need is something like: a1 + a2 = x. I only know x and from that get a1, a2 For the second part: a1 + a2 + a3 + a4 = x. I only know x and from that get a1, a2, a3, a4 Note: I know you cannot unadd, just illustrating my question. x must be one byte