Question: Create a Linear feedback shift register(LFSR) w/ NASM x86 (ASSEMBLY LANGUAGE) What the code should do 1. We will use an 8-bit register so the
Create a Linear feedback shift register(LFSR) w/ NASM x86 (ASSEMBLY LANGUAGE)
What the code should do
1. We will use an 8-bit register so the output is limited to 255 values. 2. There are two type of LFSRs, with external and internal feedback. We will use the external feedback kind. 3. We will shift to the right by one position on each step. 4. The new bit entering at the left (new bit b7) is a function of the old bits (before the shift occurs). 5. The function for the new bit is XOR(b4, XOR(b3, XOR(b0, b2))). 6. You might as well use a register to hold your value. 7. Initialize the register to 1. (If it is zero, the register contents will never change.) 8. One more time--remember that the new bit value must be calculated before the shift takes place, and then placed in bit position b7 after the shift takes place. 9. Print out the sequence in both binary and hex using printf(). 10. printf()does not support a binary output format. You will have to write a function to do this. (See http://stackoverflow.com/questions/6373093/how- to-print-binary-number-via-printf) 11.Print out one time through the sequence. As well have a commented listing file
The following skills are exercised in this assignment: Bit manipulation Function call printf()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
