Lfsr
伽羅瓦型 LFSR 的序列輸出
我提供了一個伽羅瓦型 LFSR 的圖表。我被告知它輸出一個週期 31 的序列。
查找此 LFSR 輸出的序列。
通過應用班次,我得到了看似微不足道的答案 $ 0,0,0,0,1 $ 我知道它一定是錯的,因為它的周期是 31。我哪裡出錯了?
你在回饋的傳播中犯了一個錯誤。
如果你非常緩慢地遵循 LFSR,這就是你得到的:
initial state: +--------------------------------------------------------------+ | | | | | | +-----+ +-----+ | +-----+ | +-----+ | +-----+ | | | | | | v | | v | | v | | | +--->+ 0 +---->+ 0 +--+->+ 0 +--+->+ 0 +--+->+ 1 +-------> ... | | | | | | | | | | +-----+ +-----+ +-----+ +-----+ +-----+ the 1 get on the branch and we are going to do the xor +--------------------------------------------------------------+ | | | | | | +-----+ +-----+ | +-----+ | +-----+ | +-----+ | | | | | | 1 | | 1 | | 1 | | | +-1->+ ? +--0->+ ? +-0+->+ ? +-0+->+ ? +-0+->+ ? +---1---> ... | | | | | | | | | | +-----+ +-----+ +-----+ +-----+ +-----+ compute the XORs +--------------------------------------------------------------+ | | | | | | +-----+ +-----+ | +-----+ | +-----+ | +-----+ | | | | | | v | | v | | v | | | +-1->+ ? +--0->+ ? +--+1>+ ? +--+1>+ ? +--+1>+ ? +-----1-> ... | | | | | | | | | | +-----+ +-----+ +-----+ +-----+ +-----+ move the results to the next box (and output 1) +--------------------------------------------------------------+ | | | | | | +-----+ +-----+ | +-----+ | +-----+ | +-----+ | | | | | | | | | | | | | | | | +--->+ 1 +---->+ 0 +--+->+ 1 +--+->+ 1 +--+->+ 1 +-------> ouput: 1 | | | | | | | | | | +-----+ +-----+ +-----+ +-----+ +-----+
所以你有了 $ 10111 $ 代替 $ 10000 $ . 然後將對其進行迭代,依此類推。