Skip to content

Instantly share code, notes, and snippets.

@rcombs
Created May 7, 2013 04:14
Show Gist options
  • Save rcombs/5530211 to your computer and use it in GitHub Desktop.
Save rcombs/5530211 to your computer and use it in GitHub Desktop.
#! /usr/bin/env node
s = [0,1,2,3,4,5,6,7];
//s[0] = 0; s[1] = 0x62b2595e; s[2] = 0xffffffff; s[3] = 0x92259269; s[4] = 0xffffffff; s[5] = 0xc8264b33; s[7] = 0; s[8] = 0x16519807;
s[1] = 0x60a04958; s[0] = 0x42121146; s[3] = 0x80241209; s[2] = 0x12018061; s[5] = 0x88244212; s[4] = 0x40220921; s[7] = 0x12118806; s[6] = 0x04501801;
var str = "";
for(var i = 0; i < 256; i+=2){
if(s[((i + 1) / 32) >>> 0] & (1 << ((i + 1) % 32))){
str += "1";
}else if(s[(i / 32) >>> 0] & (1 << ((i) % 32))){
str += "2";
}else{
str += "0";
}
}
console.log(str);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment