Representing large numbers with only 8 bits. Given 8 bits ABCDEFGH, this interprets AB as a binary number N between 1 and 4 inclusive, and CDEFGH as a binary number M between 1 and 64 inclusive. The entire number is interpreted as [(the Nth prime)^(10^M)] - 2. This gives a reasonable range of unique values from 0 to about 10^54, including 0,1,2 and 3. .. I guess this is fairly similar to fixed-point math. Listed below first in uh.. unencoded order, then in ABCDEFGH order. |