Skip to content Skip to sidebar Skip to footer
Showing posts with the label Hex

How To Convert A Hex String To Hex Number

I want to convert a hex string (ex: 0xAD4) to hex number, then to add 0x200 to that number and agai… Read more How To Convert A Hex String To Hex Number

Converting Hex String Representation To Float In Python

I have data in IEEE 745 hexadecimal format: 0x1.5c28f5c28f5c3p-1 How would I convert this to a floa… Read more Converting Hex String Representation To Float In Python

Correct Interpretation Of Hex Byte, Convert It To Float

I am currently trying to connect to an electric meter via RS485. It works quite well so far, except… Read more Correct Interpretation Of Hex Byte, Convert It To Float

Hex String To Signed Int In Python 3.2?

How do I convert a hex string to a signed int in Python 3.2? The best I can come up with is h = … Read more Hex String To Signed Int In Python 3.2?

How To Build Byte Array Frame And Calculate Checksum

I'm trying to communicate with a serial port as defined in a specification. ser = serial.Serial… Read more How To Build Byte Array Frame And Calculate Checksum

Python String To Escaped Hex

I have some python code below I managed to cobble together to achieve what I needed, but being quit… Read more Python String To Escaped Hex

Hex String To Signed Int In Python 3.2?

How do I convert a hex string to a signed int in Python 3.2? The best I can come up with is h = … Read more Hex String To Signed Int In Python 3.2?

Check If A String Is Hexadecimal

I know the easiest way is using a regular expression, but I wonder if there are other ways to do th… Read more Check If A String Is Hexadecimal