Created
January 22, 2012 08:23
-
-
Save camt/1656251 to your computer and use it in GitHub Desktop.
algorithm for aesthetically converting bytes to strings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static string b2s(byte b) { | |
string result = Convert.ToString(b, 2); | |
while(result.Length < 8 ) result = "0" + result; | |
return result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment