In general I have always considered myself as very competent in Excel (normal, Pivot Tables, graphing, VBA, etc), but right now I'm about to look for a good stiff drink!!!
I have a large number of hexadecimal records that I want to analyze and plot some of the calculated results. In a program it might look like this
static float getValue (uint8_t highbyte, uint8_t lowbyte) {
int highbits = (highbyte & 0x0F) << 7 ;
int lowbits = lowbyte & 0x7F;
int rawValue = highbits | lowbits;
float Value = rawValue;
return Value;
}
I have tried using Excel and its binary and hexadecimal functions. Sometimes I get something that makes sense, for example "=BITAND(HEX2BIN(G3,8),HEX2BIN(N2,8))" where cell g3 is hex "30" and n2 is hex "0f" and the result is 1040. This I assume is the decimal result, but Excel throws a data error when I try to convert it to the binary equivalent so I can carry out the left shift operation.
As I said above I have a lot of records to process and I would like to keep it all in Excel if possible.
Needless to say, working in hex or binary is not my strong suit. Can anyone help me with the Excel functions to duplicate the above programming code?....RDK