I didn’t create a program for this. It can be done by hand.
A signed short is 2 bytes (8 bits). 1 bit is used to indicate positive or negative which leaves us with 7 bits.
1111111 in decimal is 127. At first I was going to say the range was -63 through 63 for 127 values, but then I facepalmed to remember there is a bit for the sign so it indeed extends from -127 to 127.
As for the unsigned short (no negative values). I assumed there is no bit to indicate it is positive. This would be pointless to me, but if someone knows for sure please tell me
This means it has the full 8 bits. 11111111 = 255. There is no negative numbers so it ranges from 0 to 254 (must include 0).
I guess I could make a program to show this. I will see what I come up with and post later.