1、写出n阶线性反馈移位寄存器的实现过程
2、假设一个GF(2)上的5阶线性反馈移位寄存器的反馈函数为
f(x1,x2,x3,x4,x5)=x1+x5
初始状态为10011,试写出该线性反馈移位寄存器的输出序列
程序:
#include<iostream>
#include<math.h>
using namespace std;
void GF(int a,int n)
{
int b;
for(int i=1;i<32;i++)
{
cout<<(a&1);
b=a&1^((a>>