Sunday, December 13, 2009

Binary Hex Morse Everything Converter

This past week my friend Jacquelyn started posting all sorts of things on facebook in binary, morse code, hexadecimal and other such craziness. Of course, I wanted to get in on the fun so I posted some things to her in various codes and what not. She sent a reply to me in octal(base 8). I suspected that was what it was but I didn't want to do the math by hand and I couldn't find a good converter, so I decided to write one. Well, once my geekiness starts going it can't be stopped. What you see below is the result of my geekiness gone wild over a whole weekend. You can convert to and from morse code, binary, hex, or any numerical base. I even threw in pig latin because I felt it was necessary. I also put in the Ong language which was a language that my friend Cong Yong Long ee and I invented in junior high school. I know, I didn't provide a conversion back from Ong or Pig Latin. I was tired and decided I was done.

Text

Morse

Decimal/Ascii Code

Binary

Any Base

Hex

Pig Latin

Ong

A few notes: I threw this together over the course of one weekend. All of the conversions work but I didn't try to prevent you from putting in any invalid input. I know that makes it not professional grade. If anyone wants to pay me I am willing to upgrade it to that level. For this reason, just be aware that if you put in bad input you'll get bad output. Also, things like the binary field are designed to view binary as a computer does, in bytes. So numbers above 255 won't compute. But the any base field doesn't have that restriction so feel free to change it to 2. The default is 8 because octal is awesome.

Also, one more thing: It worked in all browsers when I tested the javascript in a file on my machine. Once I stuck it in blogger it quit working for firefox. Blogger and firefox are stupid. Sorry if it doesn't work in your browser, blame blogger.

Base 36. Very clever. Don't worry. Encryption is much more sophisticated than this. There are always ways to crack every code, but your data is much more secure than it would be if it just used one of these encodings.