Oh and the reason why you didn't get a negative value at all was because (mynumber | 0x8000) will actually give you an int so you have to cast it back to a short if that's what you want.
cout << static_cast<short>(mynumber | 0x8000); // Prints "-32763".
Ok thankyou for your time I seem to have to investigate this two's compliment representation. Somehow I was led to believe only the sign bit had to be flipped.
Ok I understand two's compliment now. For anyone else who would like an explanation I found http://www.youtube.com/watch?v=9W67I2zzAfo easier to understand than wikipeida. I modified the code to represent two's compliment and took the equation out of the stream so not to bother with recasting to a short. Here is the code now.