Please post screenshots of the file with comments please and one output example
ID: 3777795 • Letter: P
Question
Please post screenshots of the file with comments please and one output example
We will use an 8-bit register so the output is limited to 255 values.
There are two type of LFSRs, with external and internal feedback. We will use
the external feedback kind.
We will shift to the right by one position on each step.
The new bit entering at the left (new bit b7) is a function of the old bits (before
the shift occurs).
The function for the new bit is XOR(b4,XOR(b3,XOR(b0,b2))).
You might as well use a register to hold your value.
Initialize the register to 1. (If it is zero, the register contents will never change.)
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.
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.
Hints
The following skills are exercised in this assignment:
Bit manipulation
Function call • printf()
Explanation / Answer
import win32com.client sh=win32com.client.gencache.EnsureDispatch('Shell.Application',0) ns = sh.NameSpace(r'm:musicAerosmithClassics Live!') colnum = 0 columns = [] while True: colname=ns.GetDetailsOf(None, colnum) if not colname: break columns.append(colname) colnum += 1 for item in ns.Items(): print (item.Path) for colnum in range(len(columns)): colval=ns.GetDetailsOf(item, colnum) if colval: print(' ', columns[colnum], colval)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.