CRC
循环码的编码与译码器(支持一位的纠错)
编码(n,k可调)
测试用例1:
input:n=7 k=3 g=11101 m=101
output:1010011
input:n=7 k=3 g=11101 m=010
output:0100111
测试用例2:
input:n=7 k=4 g=1011 m=1101
output:1101001
input:n=7 k=4 g=1011 m=1010
output:1010011
译码(可译一位错)
测试用例1:
input:n=7 k=3 g=11101 r=0100110
已纠错 output:0100111
input:n=7 k=3 g=11101 r=1110011
已纠错 output:1010011
测试用例2:
input:n=7 k=4 g=1011 r=1110011
已纠错 output:1010011
input:n=7 k=4 g=1011 r=1111001
已纠错 output:1101001(Encoding and decoding of cyclic codes (to support an error-correction)
Coding (n, k adjustable)
Test Case 1:
input: n = 7 k = 3 g = 11 101 m = 101
output: 1,010,011
input: n = 7 k = 3 g = 11 101 m = 010
output: 0,100,111
Test Case 2:
input: n = 7 k = 4 g = 1011 m = 1101
output: 1101001
input: n = 7 k = 4 g = 1011 m = 1010
output: 1,010,011
Decoding (translation of a wrong)
Test Case 1:
input: n = 7 k = 3 g, = 11 101 r = 0.10011 million
Error-correcting output,: 0,100,111
input: n = 7 k = 3 g, = 11 101 r = 1,110,011
Error-correcting output,: 1,010,011
Test Case 2:
input: n = 7 k = 4 g, = 1011 r = 1,110,011
Error-correcting output,: 1,010,011
input: n = 7 k = 4 g, = 1011 r = 1,111,001
Error-correcting output,: 1,101,001)
- 2012-03-04 16:02:48下载
- 积分:1