There are three methods to converting hexadecimal strings depending on the need for byte or bit swapping:
Method 1: If no bit swapping is required
- Input hexadecimal string
- Convert hexadecimal string into a number using Hexadecimal String to Number VI
- Convert number to double precision float
- Display result
Method 2: Bit Swapping is necessary
- Input hexadecimal string
- Read each hexadecimal value using a For Loop and String Subset VI
- Convert each hexadecimal value to boolean (bit)
- Build a boolean array
- Reverse boolean array (reverse bits)
- Build reversed array
- Convert boolean array to number
- Convert number to double
Method 3: Byte Swapping is necessary
- Input hexadecimal string
- Turn hexadecimal string into an array
- Reverse array
- Turn array back into hexadecimal string
- Convert hexadecimal string to number
- Convert number to double