Search This Blog

Saturday, March 15, 2014

Hex to Decimal to Binary to Gray Code Converter Tool

I expanded the little windows/linux PC Java widget I made to decode bits while programming JTAG registers.  It was proving very useful.  Now it also includes Gray code.   This is a live tool that as soon as you enter a number in one format, it instantly updates the value in the others.   This saves a ton of time when you read a register and the individual bits are used set switches or report values and it is all glommed together into a big word.  A minimal amount of button clicking and typing decodes a hex value into it's bits, allows you to click one on or off, and tells you the new hex value.

I also added a big display of the hex and binary at the top.  Now this wastes a bit of screen space so it might get canned.  The tool is getting a bit big.

I used the rules here:

I checked it against this gray code converter (which only goes one way)

I've tested it pretty thoroughly and it seems to be totally solid.

Download the executable java here:

All you have to do is doubleclick on the .jar file and it will run on your computer if you have java jre installed!  Most everybody does, but in case you don't you have to download from here:

Complete source files in netbeans are also here: