i16 = i32 >> 16; でi16は0x8000
になっているけど
‌int代入する場合は
(unsigned short)i16;
ってしなければいけないってことですか?
http://codepad.org/b9lgoMlT