Dan Zainal

Dan Zainal

  • NA
  • 5
  • 583

Convert hexadecimal values and converting to various type

Jul 29 2019 10:30 PM
In my project, i am able to retrieve an 8 byte hexadecimal value. From the received string, i would like to know how to code out a program that will be able to take the hex value, decode according to the specifications and store in the newly decoded values into the database. Besides the decoding fuction, i realize that i need to carry out some automation process at the same time.
 
The hexadecimal values need to be decoded into these values
 
Hex value to be converted: 0000//41d9999a//0e10 (The slashes define the bits and types the values need to be converted too)
 
2byte : 16 bit unsigned integer 4bytes: float (32 bit float) 2bytes: 16 bit unsigned integer
 
Iva already acquired the code for the HEX to Float codes, and ive already found the codes to convert the hex values to INT.
 
However, i need a solution where the hexadecimal values can be converted automatically and inserted into the database.

Answers (1)