Hexadecimal string calculator