in reply to Re^3: Invalid Hex Conversion?
in thread Invalid Hex Conversion?

Thanks to everyone, it was indeed that I hadn't converted it from a string to a regular number before the applying the necessary math to it. Thanks guys!