For example, a random number is generated between 0 ~ 15.
1. How to convert it to binary.
2. For example, if it is 14, it should be 1110. If it is 8, then it is 111. How to change it to 0111?
The easiest way is to calculate the string converted from 0-15 to binary in advance, and then store it in a string array, and then obtain the corresponding string according to the value.