converting text to binary and vise versa

March 30, 2008 at 9:49 pm (Uncategorized) (, , , , , , , , , , )

Today I found an interesting fact: the number of the ANSCII character with the base of 10, is it’s corresponding binary with the base of 2.

Now this might be overwhelming with the first look, but take a look at this chart. If you take a character ( preferably your favorite character ) and look up its ANSCII number, then convert that number to base 2 ( I hope you have learned how to do it in school ), there you have the binary! I won’t explain how you convert a base 10 to base 2, but the base 2 number you get, must be 8 bytes ( 8 ones and zeros beside each other ) and that makes up a ANSCII printable character.

for example, if you want to type ‘NAME’ your numbers according to that chart would be: 78 65 77 69 Now take this number and convert each of them into base 2 with 8 bytes: 01001110 01000001 01001101 01000101 YAY!!! THIS IS THE BINARY!!!

footnote: cheating is not generally good, but you can just copy the corresponding binary code for each character from the chart ;)

Post a Comment