Skip to content

Instantly share code, notes, and snippets.

@Hugoberry
Created February 27, 2017 23:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hugoberry/c844d6300dcc85915515870d6a190a85 to your computer and use it in GitHub Desktop.
Save Hugoberry/c844d6300dcc85915515870d6a190a85 to your computer and use it in GitHub Desktop.
Function to reverse an 8 bit number
reverse = (x) =>
Number.Mod(Number.BitwiseAnd((x* 0x0202020202),0x010884422010),1023),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment