Implementing a pseudo random generator with shift-register method
i'm new to this board, so hello!
Like the topic said, i have to implement a pseudo random generator with the so called shift-register method. All i know is the interface this project should have but no idea how that generator is suppose to work?
Ok, basically i create an object from RandomPseudo and when calling it's method next, i'm getting a new random number. But how works the RandomPesudo class with the classes XOR and Register?
I make it more clear for you:
int next(int bits)
void shiftLeft(int lsb)
int getBitAt(int position)
boolean xor(boolean i1, boolean i2)
I hope someone can help me!
You have lots of NON-JAVA research to do.
It looks like your assignment is to build
the generator from the ground up.
The register is the easiest class by my
experience. But it has nothing to do with
java. It's a part of computer architecture
that you will have to research from a
computer architecture/design source.
Your outline of the XOR class seems a
lttle confusing to me. It should be the
easiest to understand from my experience.
You had better get a better definition of
how this should work.