In a function node, assuming msg.payload has the value (-1, -2, -3 etc) create an array of the codes
let codes = ["FF", "FE", "FD",..."EE"];
let mynum = msg.payload;
let code = codes[((mynum*-1)-1)];
let msg.payload = code;
so you have an array of the codes but the numbers are negative and the first entry in the array is offset zero. If you multiply the number by -1 it will become a positive number, subtract 1 from it and you should have the lookup value to get the code you want.
That is not weird at all. Suppose you have an 8 bit byte with the value 0, so, in binary that is 0000 0000. Now subtract one from that, then the result is 1111 1111, with a carry off the front. Now if you add 1 back on again you get back to 0000 0000. So 1111 1111 or FF is in fact the normal representation of -1 in an 8 bit byte.
In order to do what (I think) you want it is just necessary to logical AND it with 0xFF, so if the value is in msg.payload you can do msg.payload = msg.payload & 0xFF
That may be exactly what you want or it may not, it depends on what you want to do with it. If you want it as a number, for sending to Modbus for example then the result is what you want. If you want it as a string then you can use msg.payload = (msg.payload & 0xff).toString(16)
However, as @Steve-Mcl said, the buffer parser node can do this for you, particularly if you need a number of such values in an array for sending to Modbus, for example.
Generally this is a HVAC controller, but for great simplicity I can tell you it uses modified Modbus RTU transmission (I think )
This thread that I created is responsible for correction of outside temperature and positive values of correction are presented as 00-0F (hex) for 0°C to +3°C.
Negative values are shown as FF-F1(hex) [decreasing] for -0,2°C to -3°C.