I have a temperature sensor which will be presenting data in the serial monitor.
To convert from the raw data the eqn is as follows:
T = C x 2n
C = the sensor output in decimal ( the output is a 9bit and I have it in the form of a 16 bit integer)
n is defined by what resolution you are getting from the sensor ( 9, 10, 11, 12) in my case n = -1
My question is this how do I convert my integer "temp" into a decimal to then use in this formula.
Decimal is a way of representing a number textually, it is not an attribute of the integer value. If you have the temperature value as a 16-bit integer as you say, then you need simply multiply it by your constant (2^-1) to get the result. And that calculation is not going to be too complicated.