You will write a program to generate a series of pseudo random numbers, using a linear feedback shift register method. You will start with an arbitrary number (not zero) x with a representation in n bits. If x = 15 and n = 4, then x = 1111. Then you will select a pair of bits, say bits 0 and 1, take their "xor" producing a new bit - in this case a 0. The number x will then shift to the right, with the new bit becoming the new high bit - in this case 0111. The process continues in this manner to produce a random set of bits. With four bits, we can only have up to
15 unique transitions before repetitions begin, or 2n - 1. With n = 32, the number of random bits has a much greater potential. The numbers actually produced by the "shifting" cannot be considered "random", since all but one of the bits overlap from each succeeding number. However, if we want to produce, say 100 6-bit numbers, then we need to shift the bits into an 6- bit register. We can then save its "value" in an array of 100 integers. Then we should produce the output which will display the distribution. Random numbers should follow a uniform
distribution. Using a 32-bit generator does not guarantee 2n - 1 random bits. For good results try using bit combinations 0/4, 0/7, 0/25, 0,26, 0/29
Hi,
I understand your requirements, I can create this for you.
Can you give one sample input expected out put from the random generator, then it would be more clear.
About Me: A freelancer with strong passion towards image processing and graphics programming.
I have more than 6 years of experience in c++ ,Opengl and Other technologies, You can find more details from my profile.
Hi This is Ali Arbaz
I am C++ developer and know about cryptography.
Here you want a pseudo random generator that will give random number according to given input, that is it will give different output number for different input number but same output for one input every time.
Contact me for further discuss
Cheers
(i have a question here)
you wrote "If x = 15 and n = 4, then x = 1111. Then you will select a pair of bits, say bits 0 and 1, take their "xor" producing a new bit - in this case a 0."
here picking bit # 0 and bit # 1 are random??
and you said "The process continues in this manner to produce a random set of bits." here how long we have to repeat process like explain according to above example.
I'm 3-year experience embedded engineer that is working in C/C++ linux and window. So I can implement your project easily. Please contact me if you want the fastest delivery.
Hello Sir,
I have gone through your algorithm. I have worked on Random number generation earlier using timers and CPU clock. But your method seems better. We can work on this. I have worked with arbitrary precision numbers, so we can generate very very big numbers.
Thank You
Hi Dan,
Even though I am new to this site, But you can allow me to do this project. I am not hungry for money but just want to make some business relations. I can complete this within two days.
Please give me your feedback.
I'm experienced both in the field of maths and C++. I can write C++ code with excellent style and structure. Now,I have a full-time C++ programming job and also have enough spare time to take this task.
I have handsome on c++ and bitwise operations like xor and also had completed embedded projects.
Ansuring your work will be done in promised time limit
Hi!
This is an interesting task. So I can do that for you. So to do that task I need 3 days. If you have any additional information or any wishes you are welcome.
Thanks.
i can do the job. I have already done a random number generator for physics simulations. So if you want to know more about my generator just let me know.
Dear sir/madam,
I am totally new on freelancer, but with more than 8 professional experience with C/C++ coding, mainly in computer graphics in embedded systems. I believe your task quite straightforward with precise specification so I would take 1 day for implementation and 2 more for further testing and debugging. I have quite large experience in implementing various algorithms for use in C/C++ applications, mainly from CG.
I am ably to supply a multiplatform version with project in MS Visual Studio, Eclipse, Linux/Cygwin/MinGW Makefiles.
I'm looking forward to hearing from you. If you have any question, please do not hesitate to contact me.
Sincerely yours
Rostislav Hulik
I have been working with C++ since 1998 and can have this project completed for you within 3 days. I have written random number generators before and understand how this one is to be implemented.
Dan911,
This seems like a strait forward project; you did a very good job explaining what you wanted in your description. The Linear Feedback Shift Register method of random number generation is a technique I am very familiar with coming from a hardware background. I have been working in C++ professionally for almost 3 years now, and I also have a solid embedded background with hardware. I have built LFSR's before many times in Verilog, and this will be easy to translate over into C++.
For this particular project, I would create a C++ class. The number of bits, bit mask and seed value will all be passed to the constructor. If there is a particular need for speed increases, this can be template to push work up to compile time and allow runtime to execute quicker. For the underlying data types, if the number of bits is less than the sizeof(int) for a particular system, I would use an unsigned int which would produce the fastest code. If the number of bits is larger, I would resort to keeping a vector of unsigned int's and manage the code for this. All of the code I provide will be of my own design and will be well commented. I will also provide save coding practices like range and bounds checking to ensure no unforeseen crashes.
If you have any questions for me, please feel free to contact me.
Michael Berman