This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Conversion
#1
Hi,
I have a strange modbus that give me a number 2 byte uint (63793). I need to convert it to binary and then take the first 10 bit (from 0bit to 10 bit) and convert again into number. In this case the result number it is 305.

I explain better the conversion
63793 -> 1111 1001 0011 0001 -> 001 0011 0001 -> 305

Can you help me please.
BR Cristian Grassi
Reply


Messages In This Thread
Conversion - by CristianAgata - 12.03.2025, 17:54
RE: Conversion - by Daniel - 12.03.2025, 18:06
RE: Conversion - by CristianAgata - 12.03.2025, 18:20
RE: Conversion - by Daniel - Yesterday, 11:18
RE: Conversion - by CristianAgata - Yesterday, 12:47

Forum Jump: