Convert the 24 bits of sensor data into string format of Wireless Thermocouple

Hi, I have been working with the wireless thermocouple sensor and it is giving me 24 bits value

but I need to know the best way which helps me to convert the 24bit values into a string format,

Any suggestion on this will be a great help.


1. Assume that the 24-bit number is an unsigned number.

2. There are standard data types byte, unsigned int, unsigned long, ... for 8-bit, 16-bit, 32-bit, .. data. We will choose unsigned long type for your data, That is --

unsigned long myData;    //unsigned long int myData;   int is silent

3. Assume that myData = 0x0032ABCD in hex and it is 3320781 in decimal. You want the string (ASCII representation) for the digits (0, 0 , 3, 2, A, B, C, D) of the hex number or for the digits (3, 3, 2, 0, 7, 8, 1) of the decimal number.