Skip to content
keneoneth edited this page Nov 4, 2022 · 4 revisions

Link to site: https://keneoneth.github.io/InstrHexBinDecConvertDecoder-Release/

This Instruction Hex-Bin-Dec Convert & Decoder website is developed as a helper tool to 1) ease the conversion between hexadecimal, binary and decimal values (specifically for instruction code), 2) display values, names and default values of all fields of a given instruction code and 3) provide an instruction panel for instruction auto-matching based on an instruction set (defined in a json file).

Homepage

image

Individual features

1) Input Form - provides conversion between hex, bin and dec values

when the user starts entering either one of hex/bin/dec number (or instruction code), the other two blocks will show the converted numbers automatically!
image
Note: the input number is limited to 128 bits in the current version

2) Display Board - displays values, names and default values of all fields of a given instruction code

when the user has input an instruction code, it will synchronously and automatically be shown in hex/dec/bin formats in the last three rows of the table at the display board below
image

Besides the conversion, the display board will also show some other info. Row 1 shows the range [15:0] and length e.g. (16) of the code; Row 2 shows the name of that range (which is by default a '?', and the way to change this name is described in the next section); Row 3 shows the default binary code (e.g. the opcode and will be described in the next section).

To split the instruction code into differnt fields, simply click the '||' signs at the table column. After selection, the '||' turns into a red color, and the instruction code is split afterwards. This is especially convenient for users whom want to verify the correctness of the instruction code.
image

Lastly, you may change the display board among 16,32,64,128 bit formats, depending on your needs.
image

3) Instruction Panel - provides instruction auto-matching based on an instruction set

The instruction panel is a bit complex. First of all, in the middle there are a few instructions available (and the first row is always an 'unnamed' instruction as a dummy).
image

Feel free to select other instructions and you will see, on the left, the display board will show the corresponding instruction code format, with the instruction code split to different fields as well as the field names and default values shown. In particular, if the default values are not matching with the input, they will appear in red color.
image

The user may also add/edit/delete the instruction list based on the [add] [edit] [delete] buttons (note: the dummy 'unnamed' instruction can only be added). The [add] button means adding a duplicate of the current selected instruction to the list; the [delete] button, on the other hand, deletes the current selection from the list; and lastly, the [edit] button will activate an instruction edit modal like below.
image

The user may change the name, str format, and the match list (which defines the field names that will be used for automatching). And below, you may add/edit/delete each individual field of their name, default value and position values.
image

Lastly, the [auto-match] button will help auto match the corresponding instruction based on the current instruction code input, and the [clear] button will just clear the current selection and set it to 'unnamed' instruction again.

In fact, the instruction list is defined in Json format. Feel free to click the export button at the top to check the format, and you may import your own instruction list with your Json file. The format is quite straightforward, which is similar to the instruction edit modal, and the webpage will check the format of your input file to ensure it is valid.

Ending

That's it. And hope you enjoy the features of this webpage. If you encounter any bugs, don't hesitate to report in https://github.com/keneoneth/InstrHexBinDecConvertDecoder-Release/issues Happy coding!