I want to send in HEX and receive in HEX
The decimal number 1110 can be written as C16 in hexadecimal or 10111 in binary.
When you say that you want to send and receive in "HEX" I suspect you mean that you want to send and receive printing ASCII characters which represent the hexadecimal equivalent of a number.
The ASCII character ‘C’ actually has a numeric value which is 64 decimal , 43 hexadecimal and 0100 0011 binary.
You probably want to transmit the ASCII characters ‘0’, ’1’, ’2’, ’3’, ’4’, ’5’, ’6’, ’7’, ’8’, ’9’, ’A’, ’B’, ’C’, ’D’, ’E’, ’F’ to represent hexadecimal digits.
When you receive a character you need to decide which ASCII character it is then use the actual hex number it represents to calculate your overall number.
I hope that makes sense.