none
Remove Most Significant Byte (MSB) from HEX

    Question

  • Hi,

    I like to remove the Most Significant Byte (MSB) of a HEX value.

    For example

    I have the value 0x86 in HEX, in BIN that is 10000110.

    I have to sent the HEX with the MSB removed so that will be in BIN 110 and in HEX that will be 0x06.

    Does anyone has a function that can do this?

    Thanks and regards!

    Roel

    Sunday, September 12, 2010 11:03 AM

Answers

  • You want to remove the 4 MSbs or the upper nibble?  If it's hex, convert to binary, And with 0x0F and convert  to hex.  If it's already binary, forget the first conversion.
    • Marked as answer by Figo Fei Monday, September 20, 2010 8:29 AM
    Sunday, September 12, 2010 12:08 PM