Skip to content

Instantly share code, notes, and snippets.

@ezhov-da
Last active March 10, 2019 12:15
Show Gist options
  • Save ezhov-da/a5e5b8e36d77b342e8f5ddfaf4ec922b to your computer and use it in GitHub Desktop.
Save ezhov-da/a5e5b8e36d77b342e8f5ddfaf4ec922b to your computer and use it in GitHub Desktop.
java byte to bit
String.format("%8s", Integer.toBinaryString(bytes[i] & 0xFF)).replace(' ', '0');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment