up
 ```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. ``` ``` var a, b, i; var vals = new Array; var primes = new Array; primes[primes.length] = 2; primes[primes.length] = 3; primes[primes.length] = 5; primes[primes.length] = 7; primes[primes.length] = 11; primes[primes.length] = 13; primes[primes.length] = 17; primes[primes.length] = 19; primes[primes.length] = 23; primes[primes.length] = 29; primes[primes.length] = 31; primes[primes.length] = 37; primes[primes.length] = 41; primes[primes.length] = 43; primes[primes.length] = 47; primes[primes.length] = 53; primes[primes.length] = 59; var valsorig = new Array(); compute(); vals = valsorig; vals.sort(compareNum); dumpSorted(); document.write("

" + primes[a] + "^" + (b+1) + " - 2 = " + val + "
" + vals[i] + "
" + vals[i] + "
\n"); dumpUnsorted(); function compute() { for (a = 0; a < 4; a++) { for (b = 0; b < 64; b++) { val = Math.pow(primes[a], b+1) - 2; valsorig[valsorig.length] = val; } } } function dumpUnsorted() { i = 0; for (a = 0; a < 4; a++) { for (b = 0; b < 64; b++) { val = Math.pow(primes[a], b+1) - 2; document.write("\n"); i++; } } } function dumpSorted() { for (i = 0; i < vals.length; i++) { if (i > 0 && vals[i] == vals[i-1]) document.write("\n"); else document.write("\n"); } } function compareNum(a,b) { return a-b; } function megapower (a, n, m) { var x = a; x = Math.pow(x, Math.pow(n,m)); return x; } function biggie(a) { return megapower(a, a, a); } function poobaloo() { var a = document.f1.i1.value; var n = document.f1.i2.value; var m = document.f1.i3.value; document.f1.i4.value = megapower(a,n,m); } function poobadoopaloo() { document.f1.i6.value = biggie(document.f1.i5.value); } a = n = m = X = a = X = (note, biggie(255)=255^ 46531388344983681457769984555620005635274427815488751368772861643065 27336046109809769059770264739422997516152388772934870967919220279082 02723577523298823921405525156108220587367401450451500030722647224647 46837070302159356661765043244993104360887623976285955058200326531849 13766856273818439738536117928730928632771252899582070218059456600829 45938206217699514913249070142151765097584047604513358472527446978205 15292329680698271481385779516652518207263143889034764775414387732372 81284045688088516336103748545240617631186826742835849240807519768891 10536037148834033749308919511097903942697939783101901412010192871093 75 ```