Data Operations
Hex Workshop supports data operations within hex editor. This allow users to perform arithmetic and logical operations on their data while interpreting their data as decimal values.
You can invoke a operation by selecting it on the Data Operation Toolbar or by selection the operation under the Tools-Operations menu. The following operations are available:
Byte Flip |
Flip the order of bytes. | |
|
Inverse Bits |
Inverse the bits. |
Shift Left |
Shift bits to the left by 1 bit. | |
Shift Right |
Shift bits to the right by 1 bit. | |
Rotate Left |
Rotate bits to the left by 1 bit. | |
Rotate Right |
Rotate bits to the right by 1 bit. | |
Block Shift Left |
Block shift bits to the left by 1 bit (bits are carried for entire block). | |
Block Shift Right |
Block shift bits to the right by 1 bit (bits are carried for entire block). | |
XOR |
Perform XOR (Exclusive OR) on data. Requires additional parameter. | |
OR |
Perform bitwise OR on data. Requires additional parameter. | |
AND |
Perform bitwise AND on data. Requires additional parameter. | |
Change Sign |
Change sign from negative to positive or from positive to negative. | |
|
Add |
Add value to data. Requires additional parameter. |
Subtract |
Subtract value from data. Requires additional parameter. | |
Multiply |
Multiply data by a value. Requires additional parameter. | |
|
Divide |
Divide data by a value. Requires additional parameter. |
|
Modulo Division |
Perform modulo division on data. Requires additional parameter. |
Set Floor Value |
Sets the minimum/floor value. If any values are lower than the specified value, then the value is replaced with another value. Requires additional parameters. | |
Set Ceiling Value |
Sets the maximum/ceiling value. If any values are greater than the specified value, then the value is replaced with another value. Requires additional parameters. | |
Upper Case |
Convert ASCII characters to upper case. Non-alphabetic characters are not changed. | |
Lower Case |
Convert ASCII characters to lower case. Non-alphabetic characters are not changed. | |
Swap Case |
Swaps the case of ASCII characters: lower case becomes upper case, uppercase becomes lower case, non-alphabetic does not change. |
Hex Workshop will prompt you when additional parameters are required, if not using environmental settings (see Preferences: General), or if invoked from the Tools-Operations menu. A sample dialog is shown below:
Treat Data As:
Hex Workshop needs to interpret the data as a decimal value for most data operations. For example, rotating 4 individual bytes will yield different results than rotating a single long which is 4 bytes in length. Signed vs Unsigned status is only used for arithmetic operations.
Byte Ordering:
Hex Workshop allows you to interpret data in either Little Endian (e.g. Intel) or Big Endian (e.g. Motorola) byte ordering. Please see Understanding Byte Ordering for more information on byte ordering in general.
Value:
Users can enter a decimal or hexadecimal operand for operations. You can toggle between hexadecimal and decimal by selecting the appropriate "Decimal" or "Hex" radio button.
Apply On:
Hex Workshop can apply the operation on either a selection or your entire document. The "Selection" radio button will be disabled if the dialog is invoked without a selection.