Hi,guys! I study about how to generate a random number recently,a lot of articles said "Linear Congruential Generator" is a frequently-used method!However,I used the mothod rand() in the stdlib.h,which is a lib function of keil,I observed it seems as if it don't use this kind of method,do it???
Even a quick glance shows it's an LSFR implementation.
It's LFSR, to be exact. Don't let typos confuse the original poster even more. Here is the Wikipedia link: en.wikipedia.org/.../LFSR
There is an artical about keil generates the random with LSFR: http://www.keil.com/forum/docs/thread3202.asp what is : Masks for 3-bit galios LFSR maximum run length generator Masks for 8-bit galios LFSR maximum run length generator Masks for 10-bit galios LFSR maximum run length generator ... Masks for 32-bit galios LFSR maximum run length generator why masks the register?!
"There is an artical about keil generates the random with LSFR"
Indeed - and its first paragraph gives a link to an article explaining the technical details!
If you really want to get into this, then you are going to have to get down to some serious study - it is beyond the scope of this forum!
I understand the LSFR roughly,but seems that keil dosen't use it?!There is no some kind of masks for registers in LSFR?!