Adding hexadecimal values in c++
-
Hi, I am working with Serial communication in VC++. I have a message in this format: Message: "0XD07889ABCDEF47". It is in hexadecimal format. 0XD0 - Header 7889ABCDEF - Data 47 - Checksum I have to compute the checksum using the formula (~((Header+Data) & 0X7F) & 0X7F)) What data type can I use to store the Message? How do I compute the checksum using C++ code? I am new to this exercise. Can anyone please guide me? Thanks Madhavi
-
Hi, I am working with Serial communication in VC++. I have a message in this format: Message: "0XD07889ABCDEF47". It is in hexadecimal format. 0XD0 - Header 7889ABCDEF - Data 47 - Checksum I have to compute the checksum using the formula (~((Header+Data) & 0X7F) & 0X7F)) What data type can I use to store the Message? How do I compute the checksum using C++ code? I am new to this exercise. Can anyone please guide me? Thanks Madhavi