测试习题
2009级软件测试 2012.2.28
测试习题内容2
• Only the eight bits of data in each message byte are used for generating the CRC. During generation of the CRC, each 8-bit message is exclusive ORed with the register’s high 8-bit content. Then, the result is shifted in the direction of the Most Significant bit (MSB), with a zero filled into the Least Significant bit (LSB) position.
测试习题内容4
• After the last (eighth) shift, the next 8-bit message is exclusive ORed with the high 8-bit of the register’s current value, and the process repeats for eight more shifts as described above. After all the contents of the message have been applied, The final content of the register is the CRC value.
测试习题内容1
•Cyclic Redundancy Check (CRC)
Generation: The CRC field is two bytes. The CRC is started by first preloading a 16-bit register to all ‘1’s. Then, a process begins of applying successive 8-bit bytes of the incoming message to the current contents of the register.
测试习题内容3
•The previous extracted MSB is examined. If the MSB was a 1, the register is then exclusive ORed with a fixed value(0x8005). If the MSB was a 0 (zero), no exclusive OR takes place. This process is repeated until eight shifts have been performed.
测试习题内容5
•Please manually calculate the CRC result of an 1byte incoming
message:0xFB. Write out detailed calculating steps and final CRC
result.(All data in Hexadecimal).(8分)
1
2012/2/28
测试习题内容6
•Please write out a method “MySoftwareCRC” in C# language, to calculating a CRC of an Array which is a 10bytes message named as myMessage below. The method should return a CRC with unsigned short type, and take incoming message as a parameter. (10分) •Note: byte[] myMessage ={ 0xFB,
0x22,0x33,0x44,0x55,0x66,0x77,0x88,0x99,0xAA};
2
因篇幅问题不能全部显示,请点此查看更多更全内容