This applet will read plain text and translate it into the hexadecimal or decimal ascii code for each character. It also converts hexadecimal or decimal numbers into their ascii character equivalents. The characters that appear before each character's ascii number ('%' for hex, and '&#' for dec) are standard prefixes used in HTML code to indicate ascii code numbers. For more information on code representations of text characters see the Unicode (UTF-8) website. The ASCII standard is now contained within the first byte of the Unicode standard (UTF-8 characters #0000 - #00FF).
Use: The buttons are toggle buttons, so that any string entered in the text field will be in the format indicated by the state of the buttons. The applet begins with the first button in the "Hex" position, and the "Text" button not selected, meaning hexidecimal numbers must be entered. If decimal numbers are to be entered, simply click the "Hex" button so that it displays "Dec". If text characters are to be translated back into hex or dec, you must first click the "Text" button once to get it into selected position, and then enter the string into the text field. The translation appears in the text field itself.
Bugs: There are some bugs I'm too lazy to correct. For example, if you enter '%2g' as a hex value, the program will throw a NumberFormatException, as character values for hex numbers only extend through 'f'. If you are using the applet properly, this shouldn't be a problem.
Swing JRE 1.3 version:
AWT JRE 1.1 version
Return to Java
Return to Math Links
Return to The Robert Kelley Composition Page
© 2001 Robert Kelley