There is a hash function.
Hehe, it's very simple. Hashf ( 16) = 1,Hashf (256) = 16。 But there is something wrong with your function. There is no ";" In the return statement.

Do the following:

Because the parameter is an unsigned short integer, it is an integer of 16 bits. therefore

16 binary: 00000000010000.

Move four places to the right: 000000000001.

That is decimal 1.

Divide by 256 to find the remainder, which is 1 of course.

Similarly,

256 binary: 0000000 1, 00000000.

Move four positions to the right:

00000000,000 10000

That is decimal 16.

Divide by 256 to find the remainder, which is of course 16.

What, is that enough?