01 Jul Write a 32 bit pseudo-random number generator function, using a 32 bit LFSR (Linear Feedback Shift Register)
Question Description
Write a 32 bit pseudo-random number generator function, using a 32 bit LFSR (Linear Feedback Shift Register) – see:
https://en.wikipedia.org/wiki/Linear-feedback_shif…
Animated graphic illustrating a 4 bit LFSR:
https://upload.wikimedia.org/wikipedia/commons/7/7f/LFSR-F4.GIF
function prototype:
unsigned long lfsr32 ( unsigned long seed );
// if argument seed ==0 it returns the next 32 bit value in the sequence
// if argument seed !=0 it is used as the initial “seed” value
You must write the function in C first, and then write your own COMMENTED assembly language version that is *different* than the code generated by a compiler.
Note that one bit shift generates one bit and 32 NEW bits must be generated for return to the caller each time the function is called.
You must write main in C that calls the ARM/AVR/IA32-x86 assembly lfsr function and displays the first twenty 32 bit values generated when starting with a seed value of 0x5AA5FF00. The function they write should use the following taps: 32 30 26 and 25
This selection of taps for the LFSR generates a maximum length pseudorandom sequence 4294967296 bits long or 4294967296/32 = 134217728 pseudorandom 32 bit numbers.
You may use Wikipedia and other resources for reference, but you must come up with your own unique and original assembly language solution, and you may NOT submit code generated by a compiler or copy from any other source.
You must submit a document of type .doc .docx or .pdf containing a description of your code, ALL the C and assembly source code pasted into the document, as well as a screen shot of the output of your program. You must also submit separate files containing the C and assembly source files so that we can reproduce your results. The code can be compiled and demonstrated using either Eclipse or Code::blocks, or at the command line using the gcc compiler.
Please include all the required files separately (not in a zip, tar or other compressed form) using the link above. You may re-submit if necessary, but include all the required
Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.
About Writedemy
We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.
How It Works
To make an Order you only need to click on “Order Now” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Are there Discounts?
All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.