I have problem to solve and have no idea how to do that. My program receives from serial port string with hex value (like DFF7DF). I need to convert it to binary form, discard first four bits, take fifth bit as sign bit and next 12 bits as a value.
I need to get value as normal INT.
I was able to make such program in MATLAB, but I need C++ to be able to run it on my linux arm board.
Thanks in advance for help! Marcin