0x8000 is a value (in hexadecimal notation) that serves as a bitmask. In binary it would look like: 10000000000000000000000000000000 (which you can see has only the most signficant bit set.) Using the bitwise and operator on this value and the value returned by GetAsyncKeyState results in another value that is not equal to 0 if the value returned by GetAsyncKeyState had it's most significant bit set and is equal to 0 if the value returned by GetAsyncKeyState did not have it's most significant bit set.