Generate an unsigned random number.
Return an unsigned 16-bit random number. The returned value will range between 0 and n (exclusive).