Same problem, that's not how sign extension works.
You would have to repeat the MSB of the immediate to fill an entire 32bit int.
All you are doing is repeating said MSB _once_, so 1111b would become 10001111b (bit widths not important).
This way -1 (1111b) would be converted to -113...
You could try the following: (the immediate is a signed 8 bit)
int SIMM = (int)(char)get_num(op, 7, 8); // cast to char, sign extend to int
for example (int)(char)(0xFF) == -1