Because: I, J, K are unsigned short integers, which take up two bytes, and you only use one byte, of course, the result is wrong.
Where: ~ I =111111165438.
Please refer to