How to Convert an ASCII String to Hex Format

If you are studying computer science, programming or preparing for a certification, at some point it becomes necessary to be able to convert an ASCII (American Standard Code for Information Interchange) string to Hex (hexadecimal) format. Converting from decimal to hex, binary or octal is easy once you understand the procedure, but converting to ASCII is a different matter. If you have to do this from memory, the first thing you will want to be able to do is to convert ASCII directly to decimal; our brains can learn ASCII to decimal easily. It is just a simple matter of converting from decimal to hex.

Instructions

  1. The Hard way

    • 1

      Write down the ASCII string on a single line.

    • 2

      Open an ASCII to Hex table like the one in this picture.

    • 3

      Below each ASCII character, write the equivalent Hex value.

    The Easy Way

    • 4

      Download, install and open the ASCII to Hex string converter (see link in Resources).

    • 5

      Type in your ASCII string; the Hex equivalent will display below it.

    • 6

      Click the "Mode" menu item and switch to "Hex to ASCII" string conversion to test your knowledge of the ASCII table.

Tips & Warnings

  • Unfortunately you cannot convert from ASCII to Hex, Binary, Octal, or Decimal directly, you must use a table (see link in Resources). If you will be taking a test where they do not allow string converters or conversion calculators, you must memorize the table. Memorizing the table is not difficult unless you have to memorize the extended ASCII table. That can get involved, but it is doable.

Related Searches:

Resources

Comments

You May Also Like

Related Ads

Featured