This help is for assembly language please post screenshots o
This help is for assembly language.
please post screenshots of commented file and output of one time through the sequnce.
Step 2. The application area. The wikipedia article is a bit math-heavy, but gives a good description of the many application areas en wikipedia.or wiki/ Linear-feedback shift register https Here is a more hardware-oriented description htt id-1274550 Here is a summary explanation that does not involve a hardware description. You are familiar with the shift left and shift right instructions. These move all the bits in the register to the left or right respectively by a specified number of bit positions Let\'s suppose that we shift by one position. Then a new bit value will enter at the least or most significant end of the register respectively. The value of the new bit would be zero if shifting to the left. Shifting to the right, the new bit is a zero for a logical shift, and a duplicate of the sign bit for an arithmetic shift. A linear feedback shift register (LFSR) is a shift register whose input bit is a linear function of its previous state The only linear function of single bits is XOR, thus it is a shift register whose input bit is driven by the exclusive-or (XOR) of some bits of the overall shift register value In a LFSR, the new bit is neither of those, but some arbitrary function of the existing bits in a register. Depending on the function, as the shifts repeat, the successive values in the register will go through a repeating seguence. It can be shown that the maximum length of the sequence for an n-bit register is 2 -1 if you chose the best function. Other functions may give shorter sequencesSolution
#!/usr/bin/env python
from random import randint
from time import sleep
from Queue import Queue
from myThread import MyThread
def writeQ(queue):
print \'producing object for alphabetic character...\',
queue.put(\'xxx\', 1)
print \"size now\", queue.qsize()
def readQ(queue):
val = queue.get(1)
print \'consumed object from alphabetic character... size now\', \\
queue.qsize()
def writer(queue, loops):
for i in range(loops):
writeQ(queue)
sleep(randint(1, 3))
def reader(queue, loops):
for i in range(loops):
readQ(queue)
sleep(randint(2, 5))
funcs = [writer, reader]
nfuncs = range(len(funcs))
def main():
nloops = randint(2, 5)
q = Queue(32)
threads = []
for i in nfuncs:
t = MyThread(funcs[i], (q, nloops), \\
funcs[i].__name__)
threads.append(t)
for i in nfuncs:
threads[i].start()
for i in nfuncs:
threads[i].join()
print \'all DONE\'
if __name__ == \'__main__\':
main()

