I have a small concern about the return type (signed char) that is right shifted by 4 bits in relation to the sign bit.
Unit test show that it is ok but I am not sure that this is fully portable.

Unless language does an implicit integer promotion, maybe we could help by changing return type to int16 or just int.