signedIntToNybble function

Convert a signed integer to a nybble in raw data.